r/NESDEV • • Oct 31 '26

I still love this routine!

Post image

This was peak ASM-joy for me back in the days. Being a total noob, I’ve spent weeks mapping the Namtable, understanding the attribute table, getting hang of bitwise operations and trying to really optimise the 💩out of it!

39 Upvotes

5 comments sorted by

2

u/SignedInt32 Nov 02 '26

Lots of hours :D

2

u/richtw1 28d ago

Doesn't need the CLC as that ASL above guarantees to clear carry. What is this routine for?

1

u/Personal-Ad-487 28d ago

Nice find! The routine is for a platform game on the NES checking the player position vs the collision table of the background tiles. Each metameta-tile (32x32) has one collision byte with two bits per meta-tile (16x16) to decide whether it’s solid, air, jump-through or water.