Oricutron and illegal opcode 80
Posted: Wed May 08, 2019 10:20 am
I noticed something strange in the 1st part of Harrier Attack (loading screen). Apparently, the Atmos version has a bug; on the original tape or transfer bug - I still need to check that but so far I think it was on the original Atmos version of the tape.
Here's the bug, as shown by Oric Explorer:
This code is a bit stupid, because it does load and save values in $066* memory... That are already loaded there! Anyway, the bug leads to an illegal opcode $80.
On a real machine: can't see what happens, but the memory locations that are supposed to be set by these instructions remain unaffected, and the loading screen is OK. Of course with illegal opcodes, this might depend on the 6502 version, but I'll let experts investigate here (seems most Orics always react in the same way?)
On Euphoric: nothing seems to happen, the loading screen is perfectly loaded. What happens is that Euphoric executes the illegal opcode, in a way that does not affect the expected result. I'm not sure what happens, here's the step by step sequence from the debugger. Note that apparently illegal opcodes are executed in some way, though not displayed in the CODE area. Here, "???" followed by STA $0663, becomes 80 8D 63 (unknown effect), followed by 06 A9 (ASL $A9). Anyway, the loading screen is OK.
On Oricutron: the illegal opcode is announced as DOP #$80 (what's that?), but when executed step by step, it seems skipped (or interpreted as NOP), thus executing the following STA $0663. So here, the memory values are affected, and the loading screen is shifted.
I'm not willing to start a debate on "how should emaultaors interpret illegal opcodes", but just wanted to point this difference, as it made me belive there was a bug in Novalight
(EDIT: there's a mess with attachements and preview function. Re-uploading files).
Here's the bug, as shown by Oric Explorer:
Code: Select all
$06B2 A9 10 LDA #$10 ..
$06B4 8D 61 06 STA $0661 .a.
$06B7 A9 07 LDA #$07 ..
$06B9 09 62 ORA #$62 .b **** => BUG, was 8D 62 06 (STA 0662) on the Oric-1 version ****
$06BB 06 A9 ASL $A9 ..
$06BD 80 ??? .
$06BE 8D 63 06 STA $0663 .c.
$06C1 A9 BB LDA #$BB ..
On a real machine: can't see what happens, but the memory locations that are supposed to be set by these instructions remain unaffected, and the loading screen is OK. Of course with illegal opcodes, this might depend on the 6502 version, but I'll let experts investigate here (seems most Orics always react in the same way?)
On Euphoric: nothing seems to happen, the loading screen is perfectly loaded. What happens is that Euphoric executes the illegal opcode, in a way that does not affect the expected result. I'm not sure what happens, here's the step by step sequence from the debugger. Note that apparently illegal opcodes are executed in some way, though not displayed in the CODE area. Here, "???" followed by STA $0663, becomes 80 8D 63 (unknown effect), followed by 06 A9 (ASL $A9). Anyway, the loading screen is OK.
On Oricutron: the illegal opcode is announced as DOP #$80 (what's that?), but when executed step by step, it seems skipped (or interpreted as NOP), thus executing the following STA $0663. So here, the memory values are affected, and the loading screen is shifted.
I'm not willing to start a debate on "how should emaultaors interpret illegal opcodes", but just wanted to point this difference, as it made me belive there was a bug in Novalight
(EDIT: there's a mess with attachements and preview function. Re-uploading files).