Closed iflan closed 2 years ago
Cool, I didn't know they had their CORS headers set up so that was possible. IFAICT it's asking for acceleration via the Transwarp softswitch emulation, probably intentionally. From a quick investigation it's stuck in a read/write disk loop. (With the Preact UI you can actually see disk activity, woot!) I wonder if there's a bug in the Smartport code code around writing, it's probably not something that been exercised a whole lot.
I tried doing a bit of debugging:
$D363
which is one of the bits I partially disassembled, but didn't really understand. Apparently it's the start of the read block routine, which explains why the drive light stays on.Also, this was the original discussion that prompted me to try this ProDOS-enabled crack. So much better than swapping disks all the time.
I'll poke around at it more this week.
$D363 is the lowest level of disk access. It sets the parameters and then calls through the SmartPort interface. If there's an error, then the caller that's five(!) levels up will retry infinitely without interaction. Assuming that's what's happening, why is the SmartPort call failing? Perhaps it thinks that the disk is somehow write-protected?
Ugh, stupid bug. state.s &= flags.C;
is not how you clear the carry flag. I guess for most cases it was coming in already clear so that just mangled all the other flags (how did this every work) but this case carry was coming in set.
Thanks @peterferrie and @whscullin!
When everyone in the party dies, there is usually a "fade to black" sequence before Lord British resurrects the party. That does not happen with the emulator. Instead, the hard drive light stays on and nothing happens.
Repro steps:
A
until the whole sequence is done.Expected result: The fade to black sequence happens and then Lord British resurrects the party.
Actual result: Nothing happens.
Could this be related to the game activating the accelerated mode? Possibly. But since it's a ProDOS block device, I wouldn't think that timing would be that important.
I've tested this image on Virtual ][ and it works as expected. It also works correctly on real hardware.