notaz.gp2x.de
/
picodrive.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
tried to adjust timers using formulae
[picodrive.git]
/
Pico
/
PicoInt.h
diff --git
a/Pico/PicoInt.h
b/Pico/PicoInt.h
index
c2f8b60
..
4ac115f
100644
(file)
--- a/
Pico/PicoInt.h
+++ b/
Pico/PicoInt.h
@@
-480,6
+480,10
@@
void ym2612_pack_state(void);
void ym2612_unpack_state(void);
\r
\r
#define TIMER_NO_OFLOW 0x70000000
\r
void ym2612_unpack_state(void);
\r
\r
#define TIMER_NO_OFLOW 0x70000000
\r
+// tA = 72 * (1024 - NA) / M
\r
+#define TIMER_A_TICK_ZCYCLES 17203
\r
+// tB = 1152 * (256 - NA) / M
\r
+#define TIMER_B_TICK_ZCYCLES 262800 // 275251 broken, see Dai Makaimura
\r
\r
#define timers_cycle() \
\r
if (timer_a_next_oflow > 0 && timer_a_next_oflow < TIMER_NO_OFLOW) \
\r
\r
#define timers_cycle() \
\r
if (timer_a_next_oflow > 0 && timer_a_next_oflow < TIMER_NO_OFLOW) \
\r
@@
-490,8
+494,8
@@
void ym2612_unpack_state(void);
\r
#define timers_reset() \
\r
timer_a_next_oflow = timer_b_next_oflow = TIMER_NO_OFLOW; \
\r
\r
#define timers_reset() \
\r
timer_a_next_oflow = timer_b_next_oflow = TIMER_NO_OFLOW; \
\r
- timer_a_step = timer_a_offset =
16495
* 1024; \
\r
- timer_b_step = timer_b_offset =
263912
* 256;
\r
+ timer_a_step = timer_a_offset =
TIMER_A_TICK_ZCYCLES
* 1024; \
\r
+ timer_b_step = timer_b_offset =
TIMER_B_TICK_ZCYCLES
* 256;
\r
\r
\r
// VideoPort.c
\r
\r
\r
// VideoPort.c
\r