STAR in Oricutron
Posted: Fri Aug 17, 2012 10:24 pm
It has been reported that the game STAR does not work in Oricutron 0.9 (see bug report and grab the tape image from here).
I have investigated the problem, but I'm really confused! Here is the description of my findings that I posted to the bug report:
I have investigated the problem, but I'm really confused! Here is the description of my findings that I posted to the bug report:
So... could someone with real hardware convert the exact .tap file linked to in that bug report and load it on a real oric with a 6502 and a 65c02 and tell me if it works on both machines?Hmm this one is interesting. Once STAR has loaded, the CPU jumps to RAM containing complete nonsense. Lots and lots of BRKs and illegal instructions. It executes from $0501 to around $ff4.
Because Euphoric doesn't emulate illegal operations, it just skips 1 byte when it reaches them, which means it ends up executing the instruction at address $ff4, which is a jump to $6400.
Oricutron, however, executes illegal instructions. Right before the jump to $6400 is a bunch of $FF bytes, and $FF is a 3-byte illegal opcode. This means that at the end of the $FF byte region, Oricutron ends up at address $ff5 (the JMP opcode at $ff4 is interpreted as part of the last $FF instruction @ $ff2). This means instead of jumping to $6400, Oricutron executes a BRK followed by an RTS and ends up back at the BASIC prompt.
Indeed, if I disable illegal opcode handling in Oricutron, STAR works perfectly.
Now, apparently $FF is a DIFFERENT illegal opcode on 65c02, and may even be 2 bytes instead of 3. But the Oric usually has a 6502, not 65c02!
What I can't understand is why this works on your real Oric. Does your Oric have a 65c02 by any chance?