Hallo,
der eine oder andere kennt vielleicht das Dokument https://github.com/markusC64/1…0freezing%20the%20C64.pdf , welches beschreibt, wie man den C64 freezt. Auf dem C128 gibt es damit Probleme, wenn man im 2 MHz Modus ist.
Dieser Thread soll dazu da sein, Lösungsideen zu diskutieren.
Von Gideon gibt es dazu folgende Aussagen mit jede Menge offener Probleme (Wiedergabe mit Gideons expliziter Erlaubnis):
Zitat von Gideon Z.Alles anzeigenYes, Backing up and restoring $d030 will do the trick for 2 MHz. However, as you said, the freezing might not work correctly.
As described in the document, there are three ways to freeze the CPU, of which the safest is to wait for a bad line and then just set the DMA line and wait for BA to become high. This way, the bad line was correctly started by the VIC, and we just extend it indefinitely.
I must admit that I do not know what exactly happens in 2 MHz mode. Obviously, the VIC fetches are given a lower priority. I'd say that the bad lines do not occur anymore at all, but I haven't done measurements to confirm this.
If bad lines don't occur, the Ultimate hardware will wait for the next most feasible solution, which is waiting for three writes in a row; which happens when an interrupt occurs. However, in 2 MHz mode, these three writes do not happen in three consecutive cycles, but they appear at three consecutive HALF-cycles, so the Ultimate won't recognize this.
Most likely, the Ultimate will fall back to the third, unsafe option: just assert DMA and accept the chance of losing a write cycle from the CPU. This may indeed lead to random crashes. It MAY even be so that this method incorrectly breaks a read cycle, because 2 MHz timing is not considered. When a read fails, you know what will happen: upon continue, any opcode / operand might be corrupt, your program might crash right there and then.
So, in order to fix this, measurements need to be done to know how to solve this problem.
Jeder Hinweis ist willkommen.