X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=Pico%2FMemory.c;h=88e3a3220edf77b5b526996edd773b203b6ea33d;hb=b6d7ac70909e29ba8f40d6eaee53dd5b1bb71e52;hp=755b5b5046b01468683cccaa696f26bc14b7b0b0;hpb=e4fb433cd685d06ddbf0ec367c19a38b75d6ac68;p=picodrive.git diff --git a/Pico/Memory.c b/Pico/Memory.c index 755b5b5..88e3a32 100644 --- a/Pico/Memory.c +++ b/Pico/Memory.c @@ -798,7 +798,7 @@ int ym2612_write_local(u32 a, u32 d, int is_from_z80) ym2612.OPN.ST.TA = TAnew; //ym2612.OPN.ST.TAC = (1024-TAnew)*18; //ym2612.OPN.ST.TAT = 0; - timer_a_step = timer_a_offset = 16466 * (1024 - TAnew); + timer_a_step = timer_a_offset = TIMER_A_TICK_ZCYCLES * (1024 - TAnew); if (ym2612.OPN.ST.mode & 1) { int cycles = is_from_z80 ? z80_cyclesDone() : cycles_68k_to_z80(SekCyclesDone()); timer_a_next_oflow = (cycles << 8) + timer_a_step; @@ -813,7 +813,7 @@ int ym2612_write_local(u32 a, u32 d, int is_from_z80) ym2612.OPN.ST.TB = d; //ym2612.OPN.ST.TBC = (256-d) * 288; //ym2612.OPN.ST.TBT = 0; - timer_b_step = timer_b_offset = 262800 * (256 - d); // 262881 + timer_b_step = timer_b_offset = TIMER_B_TICK_ZCYCLES * (256 - d); // 262800 if (ym2612.OPN.ST.mode & 2) { int cycles = is_from_z80 ? z80_cyclesDone() : cycles_68k_to_z80(SekCyclesDone()); timer_b_next_oflow = (cycles << 8) + timer_b_step; @@ -839,7 +839,7 @@ int ym2612_write_local(u32 a, u32 d, int is_from_z80) if ((d ^ old_mode) & 0xc0) { #ifdef __GP2X__ - if (PicoOpt & POPT_EXT_FM) YM2612Write_940(a, d, get_scanline(is_from_z80)); + if (PicoOpt & POPT_EXT_FM) return YM2612Write_940(a, d, get_scanline(is_from_z80)); #endif return 1; }