Closed Alessandro1970 closed 2 years ago
Confirmed. Interestingly, the CPU is not jammed. It executes some code around here:
Fixed
The culprit was the raster IRQ. When the raster IRQ line is changed by a poke to the corresponding VICII register, the emulator has to check if the trigger condition becomes true (which is the case if the new line matches the current line). I've done this check for $D012 which stores the lower 8 bits of the IRQ raster line. However, I missed out the ninth bit which is stored in $D011. Adding the IRQ check to this register fixes the issue.
Old code:
case 0x11: // Control register 1
...
rasterIrqLine = (u16)((rasterIrqLine & 0x00FF) | ((value & 0x80) << 1));
break;
case 0x12: // RASTER_COUNTER
rasterIrqLine = (rasterIrqLine & 0xFF00) | value;
checkForRasterIrq();
return;
New code:
case 0x11: // Control register 1
...
rasterIrqLine = (u16)((rasterIrqLine & 0x00FF) | ((value & 0x80) << 1));
checkForRasterIrq();
break;
case 0x12: // RASTER_COUNTER
rasterIrqLine = (rasterIrqLine & 0xFF00) | value;
checkForRasterIrq();
return;
v4.5b1 is online.
Hi, after trying lots of intro I noticed that the following hangs on the virtualc64: 1001 Crew #07 (19xx)(1001 Crew).prg.zip
VirtualC64:
Vice:
My settings (standard c64 roms):
Bye