Closed dirkwhoffmann closed 1 year ago
Update: This CRT is part of OneLoad64 Games Collection v2 Now Released - 1001 unique games to play via Magic Desk CRT format which contains lots of other CRTs in Magic Desk format. All other titles I've tried seem to work. Hence, I expect the issue is not related to the cartridge format. However, the D64 version of Barry McGuigan works just fine.
Yes is part of OneLoad64 v4, I've tried 100s of other CRT from the same collection and they seem to work fine, maybe the D64 works fine because of a different crack or the way the memory dump has been made for the CRT... Sent you a d64 of Doughboy who also crash after the trainer (works in VICE)...
I cannot reproduce the Doughboy bug here (although I've spotted some other bugs in the latest beta (v4.6b1 is essentially broken):
More findings:
VirtualC64 eventually takes the jump at address $5127 which seems to be a ticket to death (it eventually executes an illegal instruction). VICE doesn't seem to take this jump. The culprit might be the LDA instruction at $5116 which reads from IO2 space. The current implementation of VirtualC64 always returns 0 here (only IO1 is used by this cartridge type).
However, VICE seems to return different values (values behind A:) :
Now, the question is where those values come from.
Maybe some changes in 4.6 fixed it, I get a corrupted screen and the emulator stop working completely after the trainer in Doughboy...
Preliminary findings:
Now, the question is where those values come from.
It should behave the same way as if no cartridge is attached (open IO returns the bus value during phi1).
I have no idea what the code is doing. Maybe it's a cartridge check and somehow related to VICE bug 1011
I've tried the following two code changes, but both didn't work
u8
MagicDesk::peekIO2(u16 addr) const
{
return vic.getDataBusPhi1();
}
u8
MagicDesk::peekIO2(u16 addr) const
{
return rand() & 0xFF;
}
I'll stop working on this issue for now as I don't have enough time to dig deeper.
Nailed it. Returning phi1 is the right thing to do, but I only did this for the IO 2 space. It also has to be done for IO 1:
u8
MagicDesk::peekIO1(u16 addr)
{
return spypeekIO1(addr);
}
u8
MagicDesk::spypeekIO1(u16 addr) const
{
return disabled() ? vic.getDataBusPhi1() : control;
}
I was right with assuming the game implements a cartridge check. But with my first code change, it passed the IO 2 check, only. With the latest changes, it passes the IO 1 check, too.
Fixed in v4.6.
Reported by @chris70c.
At some point, the CPU halts:
Interestingly, the cartridge has type "Magic Desk":
Also, the CPU instruction view is broken in latest beta: