mirror of
https://github.com/RaySollium99/picodrive.git
synced 2025-09-05 15:27:46 -04:00
added timer saving to savestates
git-svn-id: file:///home/notaz/opt/svn/PicoDrive@487 be3aeb3a-fb24-0410-a615-afba39da0efa
This commit is contained in:
parent
07abbab17a
commit
e53704e691
5 changed files with 45 additions and 18 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue