diff --git a/BizHawk.Emulation.Cores/Consoles/Magnavox/Odyssey2/O2Hawk.IEmulator.cs b/BizHawk.Emulation.Cores/Consoles/Magnavox/Odyssey2/O2Hawk.IEmulator.cs index 52a1b25e05..4618d1b4cb 100644 --- a/BizHawk.Emulation.Cores/Consoles/Magnavox/Odyssey2/O2Hawk.IEmulator.cs +++ b/BizHawk.Emulation.Cores/Consoles/Magnavox/Odyssey2/O2Hawk.IEmulator.cs @@ -12,6 +12,7 @@ namespace BizHawk.Emulation.Cores.Consoles.O2Hawk public bool in_vblank_old; public bool in_vblank; public bool vblank_rise; + public uint ticker; public bool FrameAdvance(IController controller, bool render, bool rendersound) { @@ -59,8 +60,6 @@ namespace BizHawk.Emulation.Cores.Consoles.O2Hawk { // PAL timing is: 17.7 / 5 ppu // and 17.7 / 9 for cpu (divide by 3 externally then by 3 again internally) - int ticker = 0; - while (frame_chk) { ticker++; @@ -68,7 +67,6 @@ namespace BizHawk.Emulation.Cores.Consoles.O2Hawk if ((ticker % 5) == 0) { ppu.tick(); - if ((ticker % 10) == 0) { ppu.Audio_tick(); diff --git a/BizHawk.Emulation.Cores/Consoles/Magnavox/Odyssey2/O2Hawk.IStatable.cs b/BizHawk.Emulation.Cores/Consoles/Magnavox/Odyssey2/O2Hawk.IStatable.cs index 394705f00b..1c89f6127a 100644 --- a/BizHawk.Emulation.Cores/Consoles/Magnavox/Odyssey2/O2Hawk.IStatable.cs +++ b/BizHawk.Emulation.Cores/Consoles/Magnavox/Odyssey2/O2Hawk.IStatable.cs @@ -32,6 +32,7 @@ namespace BizHawk.Emulation.Cores.Consoles.O2Hawk ser.Sync(nameof(in_vblank), ref in_vblank); ser.Sync(nameof(in_vblank_old), ref in_vblank_old); ser.Sync(nameof(vblank_rise), ref vblank_rise); + ser.Sync(nameof(ticker), ref ticker); ser.Sync(nameof(RAM_en), ref RAM_en); ser.Sync(nameof(ppu_en), ref ppu_en);