Blaster Master + other fixes
[fceu.git] / x6502.h
diff --git a/x6502.h b/x6502.h
index 1b63a2f..3216d50 100644 (file)
--- 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); \
  } \
 }