X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=Pico%2FPicoInt.h;h=c2f8b60fa9eef902fe73753bc580e1bfe5af1960;hb=e53704e691c4de8c53ebe3c54e75a9ca8825bb2b;hp=12d8e2ae1a853dc8643a42cfd99c6cde0ebcd496;hpb=4936aac1cac5db9c8a0bec2d743d05be5c799f1f;p=picodrive.git diff --git a/Pico/PicoInt.h b/Pico/PicoInt.h index 12d8e2a..c2f8b60 100644 --- a/Pico/PicoInt.h +++ b/Pico/PicoInt.h @@ -476,17 +476,20 @@ extern int timer_a_next_oflow, timer_a_step, timer_a_offset; // in z80 cycles extern int timer_b_next_oflow, timer_b_step, timer_b_offset; 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;