|
Post by oziphantom on Apr 5, 2019 4:59:37 GMT
All Z80s start at $0000 just as all 6502 read from $FFFE/FFFF. What you are missing is the Z80 is what boots the C128, so the Z80 starts at $0000, runs a bunch of code, copies some code to RAM and then when it wants to switch back the 8500, it then jumps to that code in RAM, at FFE0. The Z80 runs the code, the instruction at FFEB tells the MMU to enable the 8500 which disables the Z80. The PC in the Z80 has ticked over to point to FFED. So the Z80 is halted at FFED. When you wake it back up, it just continues from FFED. When CP/M wants to jump back to the 8500 they jp FFE0 again. There is a similar hand over routine in RAM for the 8502. But once you restore the Z80 you can make it halt and switch over wherever you want.
|
|