Tetris inner loop MOS6510 / C=64
=================================
(IMG) Tetris Block (.png)
Introduction
-------------
Once in a century code can make me really proud. Especially when it is concise and no byte can be stripped off. The last time was in 1991. Major things still to come in the third millenium.
The lookups to chars and blocks are initialized with an offset to a block/rotation with SMC . The same for color .
; block in x (0..6) rotation in y (0..3) calcblock stx colorit+1 tya asl asl asl asl stx draw+1 tax stx draw+4 … ; TODO this code needs testing and review
(IMG) Tetris block (.png)
The screen matrix of the VIC-II has 25 lines of 40 characters each with a linear memory layout.
0 | 1 | 2 | 3 | 4 | 5 | ...
40 | 41 | 42 | 43 | 44 | 45 | ...
80 | 81 | 82 | 83 | 84 | 85 | ...
120 | 121 | 122 | 123 | 124 | 125 | ...
In C it would like this:
Of course something will prove that at least one byte can be stripped off…
(DIR) previous KASM
(DIR) next Hextris C=64
Related
--------
(DIR) Delphi Tetris
(IMG) Delphi Tetris (.png)
(DIR) Pytris
(TXT) /img/fallback.svg (.svg)
(DIR) Blaztris
(TXT) /img/fallback.svg (.svg)
(DIR) Reactris
(TXT) /img/fallback.svg (.svg)
(DIR) Elmtris
(TXT) Tetris logo inspired by the Elm logo (.svg)
(DIR) GoTris
(IMG) GoTris (.png)
(DIR) Tetris for Commodore 64
(IMG) Tetris screenshot WIP (.png)
(DIR) TypeTris
(TXT) TypeTris (.svg)
(DIR) Scaltris
(TXT) /img/fallback.svg (.svg)
(DIR) Duotris
(TXT) Duotris (.svg)