Hmm... I think I might have found a bug in the cpu_arm_asm.s. Fortunately, it occurs early enough to detect and quickly fix:
#ifdef CPU_ARM_FAST_MODE
.globl ext_symbol(execute_instructions_fast)
ext_symbol(execute_instructions_fast):
#endif
#ifdef CPU_ARM_COMPATIBILITY_MODE
.globl ext_symbol(execute_instructions_compatible)
ext_symbol(execute_instructions_compatible):
#endif
ldr r1, 0b @ r1 = cpu
ldr r2, [r1, #0x0] @ r2 = cpu.global_cycles low
ldr r3, [r1, #0x4] @ r3 = cpu.global_cycles high
addadds r2, r2, r0 @ cpu.global_cycles += cycles
adc r3, r3, #0
The "add" is missing the "s". Without that the global_cycles mess up causing the threaded PSG to work incorrectly (at least for this port). Can't tell if it matters to you, but I figured it's good for you to know too.
Good find... I guess this must have not come up in testing because somehow global_cycles being clipped to 32-bit wasn't causing an issue for synchronization elsewhere (otherwise this would have caused issues around 200 seconds in and should have been noticed), and by chance the carry flag was cleared by something before calling this function. The latter part is probably what changed for you and is causing problems.
This is definitely something that should be fixed for anyone else who ever uses the ARM interpreter.
Last edited by Exophase,