diff --git a/src/BizHawk.Emulation.Common/Interfaces/IEmulator.cs b/src/BizHawk.Emulation.Common/Interfaces/IEmulator.cs index 4db0140b89..02e6f647a5 100644 --- a/src/BizHawk.Emulation.Common/Interfaces/IEmulator.cs +++ b/src/BizHawk.Emulation.Common/Interfaces/IEmulator.cs @@ -38,6 +38,7 @@ namespace BizHawk.Emulation.Common /// /// Gets the current frame count + /// Frame must be incremented after emulation in the core /// int Frame { get; } diff --git a/src/BizHawk.Emulation.Cores/Computers/MSX/MSX.IEmulator.cs b/src/BizHawk.Emulation.Cores/Computers/MSX/MSX.IEmulator.cs index 2b362783da..199fd5d5f6 100644 --- a/src/BizHawk.Emulation.Cores/Computers/MSX/MSX.IEmulator.cs +++ b/src/BizHawk.Emulation.Cores/Computers/MSX/MSX.IEmulator.cs @@ -30,8 +30,6 @@ namespace BizHawk.Emulation.Cores.Computers.MSX if (_controller.IsPressed("P2 B2")) ctrl2_byte -= 0x20; if (current_controller == MSXControllerKB) { kb_rows_check(controller); } - - _frame++; if (Tracer.Enabled) { @@ -45,7 +43,9 @@ namespace BizHawk.Emulation.Cores.Computers.MSX LibMSX.MSX_settracecallback(MSX_Pntr, tracecb); LibMSX.MSX_frame_advance(MSX_Pntr, ctrl1_byte, ctrl2_byte, kb_rows, true, true); - + + _frame++; + return true; } diff --git a/src/BizHawk.Emulation.Cores/Consoles/Atari/2600/Atari2600.IEmulator.cs b/src/BizHawk.Emulation.Cores/Consoles/Atari/2600/Atari2600.IEmulator.cs index ccad80285a..9849eef8d2 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Atari/2600/Atari2600.IEmulator.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Atari/2600/Atari2600.IEmulator.cs @@ -13,7 +13,6 @@ namespace BizHawk.Emulation.Cores.Atari.Atari2600 { _controller = controller; - _frame++; _islag = true; // Handle all the console controls here @@ -76,6 +75,8 @@ namespace BizHawk.Emulation.Cores.Atari.Atari2600 _tia.LineCount = 0; + _frame++; + return true; } diff --git a/src/BizHawk.Emulation.Cores/Consoles/Atari/A7800Hawk/A7800Hawk.IEmulator.cs b/src/BizHawk.Emulation.Cores/Consoles/Atari/A7800Hawk/A7800Hawk.IEmulator.cs index a074fd3f47..4e7608745d 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Atari/A7800Hawk/A7800Hawk.IEmulator.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Atari/A7800Hawk/A7800Hawk.IEmulator.cs @@ -68,8 +68,6 @@ namespace BizHawk.Emulation.Cores.Atari.A7800Hawk cpu.TraceCallback = null; } - _frame++; - if (controller.IsPressed("Power")) { // it seems that theMachine.Reset() doesn't clear ram, etc @@ -89,6 +87,8 @@ namespace BizHawk.Emulation.Cores.Atari.A7800Hawk _lagCount++; } + _frame++; + return true; } diff --git a/src/BizHawk.Emulation.Cores/Consoles/Atari/lynx/Lynx.cs b/src/BizHawk.Emulation.Cores/Consoles/Atari/lynx/Lynx.cs index acce99383f..dafcb97a80 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Atari/lynx/Lynx.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Atari/lynx/Lynx.cs @@ -121,7 +121,6 @@ namespace BizHawk.Emulation.Cores.Atari.Lynx public bool FrameAdvance(IController controller, bool render, bool rendersound = true) { - Frame++; if (controller.IsPressed("Power")) { LibLynx.Reset(Core); @@ -135,6 +134,8 @@ namespace BizHawk.Emulation.Cores.Atari.Lynx LagCount++; } + Frame++; + return true; } diff --git a/src/BizHawk.Emulation.Cores/Consoles/Coleco/ColecoVision.IEmulator.cs b/src/BizHawk.Emulation.Cores/Consoles/Coleco/ColecoVision.IEmulator.cs index 6664e6122c..34a8e09d5c 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Coleco/ColecoVision.IEmulator.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Coleco/ColecoVision.IEmulator.cs @@ -25,8 +25,6 @@ namespace BizHawk.Emulation.Cores.ColecoVision SoftReset(); } - _frame++; - _isLag = true; if (_tracer.Enabled) { @@ -164,6 +162,8 @@ namespace BizHawk.Emulation.Cores.ColecoVision _lagCount++; } + _frame++; + return true; } diff --git a/src/BizHawk.Emulation.Cores/Consoles/GCE/Vectrex/VectrexHawk.IEmulator.cs b/src/BizHawk.Emulation.Cores/Consoles/GCE/Vectrex/VectrexHawk.IEmulator.cs index f4fe1e9c69..37679fc028 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/GCE/Vectrex/VectrexHawk.IEmulator.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/GCE/Vectrex/VectrexHawk.IEmulator.cs @@ -21,8 +21,6 @@ namespace BizHawk.Emulation.Cores.Consoles.Vectrex cpu.TraceCallback = null; } - _frame++; - if (controller.IsPressed("Power")) { HardReset(); @@ -74,6 +72,8 @@ namespace BizHawk.Emulation.Cores.Consoles.Vectrex _lagcount++; } + _frame++; + return true; } diff --git a/src/BizHawk.Emulation.Cores/Consoles/Intellivision/Intellivision.IEmulator.cs b/src/BizHawk.Emulation.Cores/Consoles/Intellivision/Intellivision.IEmulator.cs index 3b332b7ec9..4c5ddba371 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Intellivision/Intellivision.IEmulator.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Intellivision/Intellivision.IEmulator.cs @@ -19,7 +19,6 @@ namespace BizHawk.Emulation.Cores.Intellivision _cpu.TraceCallback = null; } - _frame++; _sticRow = -1; // read the controller state here for now @@ -125,6 +124,8 @@ namespace BizHawk.Emulation.Cores.Intellivision SoftReset(); } + _frame++; + return true; } diff --git a/src/BizHawk.Emulation.Cores/Consoles/Magnavox/Odyssey2/O2Hawk.IEmulator.cs b/src/BizHawk.Emulation.Cores/Consoles/Magnavox/Odyssey2/O2Hawk.IEmulator.cs index 3d92f8f007..ca257c3b11 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Magnavox/Odyssey2/O2Hawk.IEmulator.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Magnavox/Odyssey2/O2Hawk.IEmulator.cs @@ -27,8 +27,6 @@ namespace BizHawk.Emulation.Cores.Consoles.O2Hawk cpu.TraceCallback = null; } - _frame++; - if (controller.IsPressed("Power")) { HardReset(); @@ -48,6 +46,8 @@ namespace BizHawk.Emulation.Cores.Consoles.O2Hawk _lagcount++; } + _frame++; + return true; } diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBA/MGBAHawk.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBA/MGBAHawk.cs index 998bca8a1a..89e4a3c806 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBA/MGBAHawk.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBA/MGBAHawk.cs @@ -116,7 +116,6 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBA public bool FrameAdvance(IController controller, bool render, bool renderSound = true) { - Frame++; if (controller.IsPressed("Power")) { LibmGBA.BizReset(Core); @@ -147,6 +146,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBA // this should be called in hblank on the appropriate line, but until we implement that, just do it here _scanlinecb?.Invoke(); + Frame++; + return true; } diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/GBHawk.IEmulator.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/GBHawk.IEmulator.cs index 448cbd723c..bbe6af7b5a 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/GBHawk.IEmulator.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/GBHawk.IEmulator.cs @@ -54,8 +54,6 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBHawk cpu.TraceCallback = null; } - _frame++; - if (controller.IsPressed("P1 Power")) { HardReset(); @@ -90,6 +88,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBHawk _lagcount++; } + _frame++; + return true; } diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawkLink/GBHawkLink.IEmulator.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawkLink/GBHawkLink.IEmulator.cs index 3f1b805c59..3b3b736e3b 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawkLink/GBHawkLink.IEmulator.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawkLink/GBHawkLink.IEmulator.cs @@ -53,8 +53,6 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBHawkLink L.cpu.TraceCallback = null; } - _frame++; - if (controller.IsPressed("P1 Power")) { L.HardReset(); @@ -91,6 +89,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBHawkLink _lagcount++; } + _frame++; + return true; } diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawkLink3x/GBHawkLink3x.IEmulator.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawkLink3x/GBHawkLink3x.IEmulator.cs index a75ff985e0..bd113eb7b4 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawkLink3x/GBHawkLink3x.IEmulator.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawkLink3x/GBHawkLink3x.IEmulator.cs @@ -68,8 +68,6 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBHawkLink3x L.cpu.TraceCallback = null; } - _frame++; - if (controller.IsPressed("P1 Power")) { L.HardReset(); @@ -130,6 +128,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBHawkLink3x _lagcount++; } + _frame++; + return true; } diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawkLink4x/GBHawkLink4x.IEmulator.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawkLink4x/GBHawkLink4x.IEmulator.cs index 9c17d1cebf..e80c8d0867 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawkLink4x/GBHawkLink4x.IEmulator.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawkLink4x/GBHawkLink4x.IEmulator.cs @@ -83,8 +83,6 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBHawkLink4x A.cpu.TraceCallback = null; } - _frame++; - if (controller.IsPressed("P1 Power")) { A.HardReset(); @@ -166,6 +164,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBHawkLink4x _lagcount++; } + _frame++; + return true; } diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/Gambatte.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/Gambatte.cs index 4ea90177ea..2b7512c954 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/Gambatte.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/Gambatte.cs @@ -276,8 +276,6 @@ namespace BizHawk.Emulation.Cores.Nintendo.Gameboy internal void FrameAdvancePrep(IController controller) { - Frame++; - // update our local copy of the controller data CurrentButtons = 0; @@ -327,6 +325,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.Gameboy LagCount++; } + Frame++; + endofframecallback?.Invoke(LibGambatte.gambatte_cpuread(GambatteState, 0xff40)); } diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/GambatteLink.IEmulator.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/GambatteLink.IEmulator.cs index 53592d3585..9e20eb8e83 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/GambatteLink.IEmulator.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/GambatteLink.IEmulator.cs @@ -38,7 +38,6 @@ namespace BizHawk.Emulation.Cores.Nintendo.Gameboy _cablediscosignal = cablediscosignalNew; - Frame++; L.FrameAdvancePrep(LCont); R.FrameAdvancePrep(RCont); @@ -148,6 +147,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.Gameboy LagCount++; } + Frame++; + return true; } diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/NES.Core.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/NES.Core.cs index eb0fca3980..24a2988f1f 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/NES.Core.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/NES.Core.cs @@ -304,8 +304,6 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES HardReset(); } - Frame++; - //if (resetSignal) //Controller.UnpressButton("Reset"); TODO fix this resetSignal = controller.IsPressed("Reset"); @@ -381,6 +379,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES // any cheats still active will be re-applied by the buspoke at the start of the next frame num_cheats = 0; + Frame++; + return true; } diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/PPU.regs.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/PPU.regs.cs index d015b2723a..67b1d02ef2 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/PPU.regs.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/PPU.regs.cs @@ -363,7 +363,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES //quite strange that is makes the sprite hit flag go high like this if (nes._isVS2c05==2) { - if (nes.Frame<4) + if (nes.Frame<3) { return (byte)((Reg2002_vblank_active << 7) | (Reg2002_objhit << 6) | (1 << 5) | (0x1D)); diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/QuickNES/QuickNES.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/QuickNES/QuickNES.cs index c7fda8519b..510ebf15c1 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/QuickNES/QuickNES.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/QuickNES/QuickNES.cs @@ -196,7 +196,6 @@ namespace BizHawk.Emulation.Cores.Consoles.Nintendo.QuickNES QN.qn_set_tracecb(Context, Tracer.Enabled ? _traceCb : null); - Frame++; LibQuickNES.ThrowStringError(QN.qn_emulate_frame(Context, j1, j2)); IsLagFrame = QN.qn_get_joypad_read_count(Context) == 0; if (IsLagFrame) @@ -210,6 +209,8 @@ namespace BizHawk.Emulation.Cores.Consoles.Nintendo.QuickNES _callBack1?.Invoke(); _callBack2?.Invoke(); + Frame++; + return true; } } diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/SNES/LibsnesCore.IEmulator.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/SNES/LibsnesCore.IEmulator.cs index 1bea346b38..d20ed70bc8 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/SNES/LibsnesCore.IEmulator.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/SNES/LibsnesCore.IEmulator.cs @@ -70,8 +70,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.SNES RefreshMemoryCallbacks(false); // apparently this is one frame? - _timeFrameCounter++; Api.CMD_run(); + _timeFrameCounter++; // once upon a time we forwarded messages from bsnes here, by checking for queued text messages, but I don't think it's needed any longer if (IsLagFrame) diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/SubGBHawk/SubGBHawk.IEmulator.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/SubGBHawk/SubGBHawk.IEmulator.cs index 00a55dcb3e..8625f6f771 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/SubGBHawk/SubGBHawk.IEmulator.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/SubGBHawk/SubGBHawk.IEmulator.cs @@ -36,8 +36,6 @@ namespace BizHawk.Emulation.Cores.Nintendo.SubGBHawk _GBCore.cpu.TraceCallback = null; } - _frame++; - reset_frame = false; if (controller.IsPressed("P1 Power")) { @@ -81,6 +79,9 @@ namespace BizHawk.Emulation.Cores.Nintendo.SubGBHawk } reset_frame = false; + + _frame++; + return ret; } diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/SubNESHawk/SubNESHawk.IEmulator.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/SubNESHawk/SubNESHawk.IEmulator.cs index 37e6f50879..add0e7afd9 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/SubNESHawk/SubNESHawk.IEmulator.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/SubNESHawk/SubNESHawk.IEmulator.cs @@ -21,8 +21,6 @@ namespace BizHawk.Emulation.Cores.Nintendo.SubNESHawk _nesCore.cpu.TraceCallback = null; } - _frame++; - if (controller.IsPressed("Power")) { HardReset(); @@ -62,6 +60,9 @@ namespace BizHawk.Emulation.Cores.Nintendo.SubNESHawk } reset_frame = false; + + _frame++; + return ret; } diff --git a/src/BizHawk.Emulation.Cores/Consoles/PC Engine/PCEngine.IEmulator.cs b/src/BizHawk.Emulation.Cores/Consoles/PC Engine/PCEngine.IEmulator.cs index 3413d76351..cce59b28b7 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/PC Engine/PCEngine.IEmulator.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/PC Engine/PCEngine.IEmulator.cs @@ -13,7 +13,6 @@ namespace BizHawk.Emulation.Cores.PCEngine _controller = controller; _lagged = true; DriveLightOn = false; - Frame++; CheckSpriteLimit(); PSG.BeginFrame(Cpu.TotalExecutedCycles); @@ -40,6 +39,8 @@ namespace BizHawk.Emulation.Cores.PCEngine _isLag = false; } + Frame++; + return true; } diff --git a/src/BizHawk.Emulation.Cores/Consoles/Sega/GGHawkLink/GGHawkLink.IEmulator.cs b/src/BizHawk.Emulation.Cores/Consoles/Sega/GGHawkLink/GGHawkLink.IEmulator.cs index d000f1d6fa..30e92db6cb 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Sega/GGHawkLink/GGHawkLink.IEmulator.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Sega/GGHawkLink/GGHawkLink.IEmulator.cs @@ -24,8 +24,6 @@ namespace BizHawk.Emulation.Cores.Sega.GGHawkLink L.Cpu.TraceCallback = null; } - _frame++; - if (controller.IsPressed("Power")) { HardReset(); @@ -53,6 +51,8 @@ namespace BizHawk.Emulation.Cores.Sega.GGHawkLink _lagCount++; } + _frame++; + return true; } diff --git a/src/BizHawk.Emulation.Cores/Consoles/Sega/SMS/SMS.IEmulator.cs b/src/BizHawk.Emulation.Cores/Consoles/Sega/SMS/SMS.IEmulator.cs index d317ffb423..8b3a7eeca6 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Sega/SMS/SMS.IEmulator.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Sega/SMS/SMS.IEmulator.cs @@ -46,7 +46,6 @@ namespace BizHawk.Emulation.Cores.Sega.MasterSystem { _controller = controller; _lagged = true; - _frame++; if (!IsGameGear) { @@ -129,6 +128,8 @@ namespace BizHawk.Emulation.Cores.Sega.MasterSystem _isLag = false; } + _frame++; + return true; } @@ -136,7 +137,6 @@ namespace BizHawk.Emulation.Cores.Sega.MasterSystem public void FrameAdvancePrep() { _lagged = true; - _frame++; if (!IsGameGear && IsGameGear_C) { @@ -156,6 +156,8 @@ namespace BizHawk.Emulation.Cores.Sega.MasterSystem { _isLag = false; } + + _frame++; } public int Frame => _frame; diff --git a/src/BizHawk.Emulation.Cores/Consoles/Sega/gpgx64/GPGX.IEmulator.cs b/src/BizHawk.Emulation.Cores/Consoles/Sega/gpgx64/GPGX.IEmulator.cs index 0e010030b1..531b3d1b3a 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Sega/gpgx64/GPGX.IEmulator.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Sega/gpgx64/GPGX.IEmulator.cs @@ -53,7 +53,7 @@ namespace BizHawk.Emulation.Cores.Consoles.Sega.gpgx throw new Exception($"{nameof(Core.gpgx_put_control)}() failed!"); IsLagFrame = true; - Frame++; + _driveLight = false; Core.gpgx_advance(); @@ -68,7 +68,9 @@ namespace BizHawk.Emulation.Cores.Consoles.Sega.gpgx LagCount++; if (_cds != null) - DriveLightOn = _driveLight; + DriveLightOn = _driveLight; + + Frame++; return true; } diff --git a/src/BizHawk.Emulation.Cores/Consoles/Sony/PSX/Octoshock.cs b/src/BizHawk.Emulation.Cores/Consoles/Sony/PSX/Octoshock.cs index 7176afefc1..ac56aa7847 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Sony/PSX/Octoshock.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Sony/PSX/Octoshock.cs @@ -808,8 +808,6 @@ namespace BizHawk.Emulation.Cores.Sony.PSX //TODO - actually, make this feedback from the core. there should be a register or status which effectively corresponds to whether it's reading. DriveLightOn = false; - Frame++; - SetInput(); OctoshockDll.shock_SetLEC(psx, _SyncSettings.EnableLEC); @@ -899,6 +897,8 @@ namespace BizHawk.Emulation.Cores.Sony.PSX OctoshockDll.shock_GetSamples(psx, samples); } + Frame++; + return true; } diff --git a/src/BizHawk.Emulation.Cores/Consoles/WonderSwan/WonderSwan.cs b/src/BizHawk.Emulation.Cores/Consoles/WonderSwan/WonderSwan.cs index 2afaa1c89b..401f3501a4 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/WonderSwan/WonderSwan.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/WonderSwan/WonderSwan.cs @@ -62,7 +62,6 @@ namespace BizHawk.Emulation.Cores.WonderSwan public bool FrameAdvance(IController controller, bool render, bool rendersound = true) { - Frame++; IsLagFrame = true; if (controller.IsPressed("Power")) @@ -79,6 +78,8 @@ namespace BizHawk.Emulation.Cores.WonderSwan if (IsLagFrame) LagCount++; + Frame++; + return true; }