Re:Prince of Persia source code released (Apple II assembly)
by to3m on Tuesday April 17, 2012 @07:12PM
(#3855531)
"How MOS 6502 Illegal Opcodes really work": http://www.pagetable.com/?p=39
Re:Prince of Persia source code released (Apple II assembly)
by rbanffy on Wednesday April 18, 2012 @09:32AM
(#3857810)
Sadly, the 65C02 used on the //c and //e enhanced converted those to NOPs :-(
I actually had to rewrite some code because of that. I remember the comments in the source code were less than kind towards the engineers responsible. I may even have the listings somewhere.
(IIRC, the 6502 decoded instructions by bitmasks; say bit 7 meant "load" and bit 6 meant "move" or some such thing. So you could trigger combination instructions that'd still execute in 3 cycles but perform the work of two instructions that'd normally take 6. This might have been 6510-only, but I don't think it was.)