Site Pages

Thursday 14 May 2015

Tetris in 6502 Assembler, the Nintendo way

I spotted a link on reddit towards this brilliant article, which you will probably enjoy if you have followed my series about programming Tetris on the C64.



The C64 and the NES both used the 6502, so there is something to be learned here. What is interesting to me is how different their approach to storing data, spawning blocks and rotations is.

Also, generating random numbers with the Linear feedback shift register algorithm sounds intriguing! I might use that in a later version, as I now use the SID chip to create a random number. That might not be handy when I start using sound :)

There are also little nuggets concerning getting the right block spawn ID, and using tables to get to values directly instead of using loops and additions... They used lots of lookup tables!

Very insightful. Read it if you like 6502 programming.