mirror of
https://github.com/RaySollium99/picodrive.git
synced 2025-09-05 15:27:46 -04:00
tried to adjust timers using formulae
git-svn-id: file:///home/notaz/opt/svn/PicoDrive@497 be3aeb3a-fb24-0410-a615-afba39da0efa
This commit is contained in:
parent
e4fb433cd6
commit
45a1ef7153
3 changed files with 18 additions and 4 deletions
|
@ -480,6 +480,10 @@ void ym2612_pack_state(void);
|
|||
void ym2612_unpack_state(void);
|
||||
|
||||
#define TIMER_NO_OFLOW 0x70000000
|
||||
// tA = 72 * (1024 - NA) / M
|
||||
#define TIMER_A_TICK_ZCYCLES 17203
|
||||
// tB = 1152 * (256 - NA) / M
|
||||
#define TIMER_B_TICK_ZCYCLES 262800 // 275251 broken, see Dai Makaimura
|
||||
|
||||
#define timers_cycle() \
|
||||
if (timer_a_next_oflow > 0 && timer_a_next_oflow < TIMER_NO_OFLOW) \
|
||||
|
@ -490,8 +494,8 @@ void ym2612_unpack_state(void);
|
|||
|
||||
#define timers_reset() \
|
||||
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;
|
||||
timer_a_step = timer_a_offset = TIMER_A_TICK_ZCYCLES * 1024; \
|
||||
timer_b_step = timer_b_offset = TIMER_B_TICK_ZCYCLES * 256;
|
||||
|
||||
|
||||
// VideoPort.c
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue