X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?p=fceu.git;a=blobdiff_plain;f=x6502.h;h=3216d50f984152d8890574af723dae27c82344a5;hp=1b63a2f46ba182ad4f275be900c52e6c31833990;hb=8fa5eb3371d902b8d58dba6e6bf62726d7ed8dbc;hpb=c0bf6f9f02a2b6afb961a7e9195e2168d7e9cecf diff --git a/x6502.h b/x6502.h index 1b63a2f..3216d50 100644 --- a/x6502.h +++ b/x6502.h @@ -84,11 +84,11 @@ extern void FP_FASTAPASS(1) (*MapIRQHook)(int a); { \ int32 cycles = (c) << 4; /* *16 */ \ if (PAL) cycles -= (c); /* *15 */ \ - nes_registers[7]+=cycles; \ - if (nes_registers[7] > 0) { \ - cycles = (int32)nes_registers[7]; \ + nes_registers[7]+=cycles<<16; \ + cycles=(int32)nes_registers[7]>>16; \ + if (cycles > 0) { \ X6502_Run_a(); \ - cycles -= (int32)nes_registers[7]; \ + cycles -= (int32)nes_registers[7]>>16; \ asmcpu_update(cycles); \ } \ }