[Coco] CoCo 3 MMU test for all

Darren A. darccml at hotmail.com
Mon Jan 21 21:29:17 EST 2008


This looks like another situation that depends on the value of the last opcode byte fetched. The key thing to remember is that the last byte fetched isn't always the last byte of the current instruction, but may be the first byte of the next instruction.

Here are my test cases:

LDX #$FFA0
LDB ,X
NOP
STB $600

In this case, both B and location $600 end up containing $38. On the other hand...

LDX #$FFA0
LDB ,X
STB $600

results in both B and location $600 containing $F8. Furthermore...

LDX #$FFA0
LDB ,X
COMB
COMB
STB $600

results in both B and location $600 containing $78.

The critical ROM code for the PEEK command is:

LDB ,X
JMP $B4F3

This can also explain why PEEK returns $78, since the upper nybble of the JMP opcode is $7.

Darren


_________________________________________________________________
Climb to the top of the charts! Play the word scramble challenge with star power.
http://club.live.com/star_shuffle.aspx?icid=starshuffle_wlmailtextlink_jan


More information about the Coco mailing list