Re: How to resume the 6510 after being stopped the hardware way.

From: silverdr_at_srebrnysen.com
Date: Sat, 9 Jul 2022 20:44:35 +0000
Message-Id: <DE8CCDE6-6BA8-4DF2-83F0-ABEDEC29238B_at_srebrnysen.com>
> On 2022-07-09, at 19:51, ruud_at_baltissen.org wrote:
> 
> Normally you don't stop the 6510 "just like that". When giving control to the Z80 in the CP/M module it is the 6510 that initiates the whole proces. It (re)sets a flipflop with a specific bit which on its turn negates the DMA line and then executes some NOPs. When the Z80 returns the control, the 6510 resumes with executing those NOPs and then resumes with the rest of the program.
> 
> If you negate the DMA line just out of the blue, there is a chance that you disable it in the middle of reading an instruction. If you "stop" the 6510 in the beginning of PHI2, you will disable the buses of the 6510. The 6510 will read $FF as the next instruction and that is a KILL instruction: stop and do nothing at all anymore. Looks familiar?
> 
> I can give several other reasons why things can go wrong. But my main message is: negate the DMA line only under controlled circumstances.

There's a well-known document by Gideon

https://codebase64.org/lib/exe/fetch.php?media=base:safely_freezing_the_c64.pdf

which explains a lot of this stuff in detail. There's one error in this doc, which was confirmed with Gideon. Namely the part about 850x CPU. BR does exactly the stuff Gideon describes there, and it works 100% on HMOS-II CPUs too. The rest is spot-on and an invaluable resource.
Received on 2022-07-09 23:00:02

Archive generated by hypermail 2.3.0.