Post your own 6502 Killer Hacks and share them with the rest of us!
I also checked into Mark S. Ackerman with our trusty tool Google and found his 'vita' -
Pretty sure it's the same guy as he worked at GCC from 1982 - 1984 and was the lead on Ms. PacMan, Galaxian and Moon Patrol - time to update AtariAge database as these games are empty when it comes to staff
He has a patent on the Galaxian kernel.
Well here is the killer hack. This one is to scrimp on RAM.
Incrementing only the lower 4 bits of a byte (with wrap)
... lda word ; original byte and #$0f ; retrieve lower nybble tay ; index lda word clc ; might not be needed adc nextinc,y ; could be ora or sbc sta word ... nextinc .byte 1,2,3,4,5,6,7,8 .byte 9,10,11,12,13,14,15,0
Well, funny thing is - maybe I didn't transcribe it properly back in '87 - because it doesn't seem like it would work.
Seems like it needs an AND #$F0 after the second LDA word
So I thought I'd take a shot at a working version...
... lda word ; original byte and #$0f ; retrieve lower nybble tay ; index lda word clc adc nextinc,y sta word ... nextinc .byte 1,1,1,1,1,1,1,1 .byte 1,1,1,1,1,1,1,-15
who knows if that one works either. :-)
If someone has the original article from Feb 1987 Dr. Dobbs Journal, I'd be curious to see the code.
Also, post your own 6502 Killer Hacks and share them with the rest of us!
- David
Edited by djmips, Sun Jun 12, 2005 2:22 AM.















