Saturday, April 07, 2007

6502'ing...

I was doing my demo for the demo-comp, and I came across an instruction my debugger didn't know about. It was a simple omission but got me thinking about undocumented opcodes and memory in general. Minus4 nukes memory to 0 before starting up, but this is hardly ever correct, Yape uses a $ff,$ff,$00,$00 pattern which is much closer to the real thing. But in actual fact, each Plus/4 is totally different. I have one here that hardly wipes memory at all. In fact, I can switch the machine off/on and still have the program completly in memory. I used this a lot when growing up to get around the "no software reset" hacks software houses used to put in, and it let me hack them quite a bit more than I should have been able to.

I was also looking for ways to get more bang for my buck in my demo, and looked at the XAA opcode. This is listed on various sites as a normal 6502 undocumented op, but doesn't appear to work on the Plus/4 - or mine at least. Yape also doesnt use it, so I started to wonder what the plus/4 does have. I use lax in XeO3 to help speed up my sprite routine, and that appears to be working fine, but I may be treading on thin ice as it were, as you never know when you cross the line.

Still, I guess as long as you try these out on a real machine, it shouldn't be too bad....

No comments: