X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=Pico%2FPicoInt.h;h=c2f8b60fa9eef902fe73753bc580e1bfe5af1960;hb=e53704e691c4de8c53ebe3c54e75a9ca8825bb2b;hp=06f4c645f87ae551b076ddccdd989ddf1134fa50;hpb=07abbab17a9baab5eeabe30767b0336326049994;p=picodrive.git diff --git a/Pico/PicoInt.h b/Pico/PicoInt.h index 06f4c64..c2f8b60 100644 --- a/Pico/PicoInt.h +++ b/Pico/PicoInt.h @@ -479,15 +479,17 @@ void ym2612_sync_timers(int z80_cycles, int mode_old, int mode_new); void ym2612_pack_state(void); void ym2612_unpack_state(void); +#define TIMER_NO_OFLOW 0x70000000 + #define timers_cycle() \ - if (timer_a_next_oflow > 0 && timer_a_next_oflow < 0x70000000) \ + if (timer_a_next_oflow > 0 && timer_a_next_oflow < TIMER_NO_OFLOW) \ timer_a_next_oflow -= Pico.m.pal ? 70938*256 : 59659*256; \ - if (timer_b_next_oflow > 0 && timer_b_next_oflow < 0x70000000) \ + if (timer_b_next_oflow > 0 && timer_b_next_oflow < TIMER_NO_OFLOW) \ timer_b_next_oflow -= Pico.m.pal ? 70938*256 : 59659*256; \ ym2612_sync_timers(0, ym2612.OPN.ST.mode, ym2612.OPN.ST.mode); #define timers_reset() \ - timer_a_next_oflow = timer_b_next_oflow = 0x70000000; \ + timer_a_next_oflow = timer_b_next_oflow = TIMER_NO_OFLOW; \ timer_a_step = timer_a_offset = 16495 * 1024; \ timer_b_step = timer_b_offset = 263912 * 256;