From 49d8f6c5b9b965c7afd918d31246b918c2b02880 Mon Sep 17 00:00:00 2001 From: zeromus Date: Fri, 25 Apr 2014 02:21:45 +0000 Subject: [PATCH] remove savestate loading hacks for movie header skipping --- .../Consoles/Nintendo/Gameboy/Gambatte.cs | 8 -------- BizHawk.Emulation.Cores/Consoles/Nintendo/N64/N64.cs | 8 -------- .../Consoles/Nintendo/QuickNES/QuickNES.cs | 8 -------- .../Consoles/Nintendo/SNES/LibsnesCore.cs | 8 -------- BizHawk.Emulation.Cores/Consoles/Sega/Saturn/Yabause.cs | 8 -------- BizHawk.Emulation.Cores/Consoles/Sega/gpgx/GPGX.cs | 8 -------- 6 files changed, 48 deletions(-) diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/Gambatte.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/Gambatte.cs index 4bc8b8c276..01ecac99d8 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/Gambatte.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/Gambatte.cs @@ -447,14 +447,6 @@ namespace BizHawk.Emulation.Cores.Nintendo.Gameboy public void LoadStateText(System.IO.TextReader reader) { string hex = reader.ReadLine(); - if (hex.StartsWith("emuVersion")) // movie save - { - do // theoretically, our portion should start right after StartsFromSavestate, maybe... - { - hex = reader.ReadLine(); - } while (!hex.StartsWith("StartsFromSavestate")); - hex = reader.ReadLine(); - } byte[] state = new byte[hex.Length / 2]; state.ReadFromHex(hex); LoadStateBinary(new BinaryReader(new MemoryStream(state))); diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/N64/N64.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/N64/N64.cs index d83d484ade..7a2674eb7a 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/N64/N64.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/N64/N64.cs @@ -197,14 +197,6 @@ namespace BizHawk.Emulation.Cores.Nintendo.N64 public void LoadStateText(TextReader reader) { string hex = reader.ReadLine(); - if (hex.StartsWith("emuVersion")) // movie save - { - do // theoretically, our portion should start right after StartsFromSavestate, maybe... - { - hex = reader.ReadLine(); - } while (!hex.StartsWith("StartsFromSavestate")); - hex = reader.ReadLine(); - } byte[] state = new byte[hex.Length / 2]; state.ReadFromHexFast(hex); LoadStateBinary(new BinaryReader(new MemoryStream(state))); diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/QuickNES/QuickNES.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/QuickNES/QuickNES.cs index 62ead5f5f1..2c763c2072 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/QuickNES/QuickNES.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/QuickNES/QuickNES.cs @@ -243,14 +243,6 @@ namespace BizHawk.Emulation.Cores.Consoles.Nintendo.QuickNES public void LoadStateText(System.IO.TextReader reader) { string hex = reader.ReadLine(); - if (hex.StartsWith("emuVersion")) // movie save - { - do // theoretically, our portion should start right after StartsFromSavestate, maybe... - { - hex = reader.ReadLine(); - } while (!hex.StartsWith("StartsFromSavestate")); - hex = reader.ReadLine(); - } byte[] state = new byte[hex.Length / 2]; state.ReadFromHexFast(hex); LoadStateBinary(new System.IO.BinaryReader(new System.IO.MemoryStream(state))); diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/SNES/LibsnesCore.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/SNES/LibsnesCore.cs index 230ee5a6ea..b01c0f2d79 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/SNES/LibsnesCore.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/SNES/LibsnesCore.cs @@ -826,14 +826,6 @@ namespace BizHawk.Emulation.Cores.Nintendo.SNES public void LoadStateText(TextReader reader) { string hex = reader.ReadLine(); - if (hex.StartsWith("emuVersion")) // movie save - { - do // theoretically, our portion should start right after StartsFromSavestate, maybe... - { - hex = reader.ReadLine(); - } while (!hex.StartsWith("StartsFromSavestate")); - hex = reader.ReadLine(); - } byte[] state = new byte[hex.Length / 2]; state.ReadFromHexFast(hex); LoadStateBinary(new BinaryReader(new MemoryStream(state))); diff --git a/BizHawk.Emulation.Cores/Consoles/Sega/Saturn/Yabause.cs b/BizHawk.Emulation.Cores/Consoles/Sega/Saturn/Yabause.cs index ddc043bfc7..75c0c4b4ea 100644 --- a/BizHawk.Emulation.Cores/Consoles/Sega/Saturn/Yabause.cs +++ b/BizHawk.Emulation.Cores/Consoles/Sega/Saturn/Yabause.cs @@ -364,14 +364,6 @@ namespace BizHawk.Emulation.Cores.Sega.Saturn public void LoadStateText(TextReader reader) { string hex = reader.ReadLine(); - if (hex.StartsWith("emuVersion")) // movie save - { - do // theoretically, our portion should start right after StartsFromSavestate, maybe... - { - hex = reader.ReadLine(); - } while (!hex.StartsWith("StartsFromSavestate")); - hex = reader.ReadLine(); - } byte[] state = new byte[hex.Length / 2]; state.ReadFromHexFast(hex); LoadStateBinary(new BinaryReader(new MemoryStream(state))); diff --git a/BizHawk.Emulation.Cores/Consoles/Sega/gpgx/GPGX.cs b/BizHawk.Emulation.Cores/Consoles/Sega/gpgx/GPGX.cs index 17e4895f7a..98f9029a25 100644 --- a/BizHawk.Emulation.Cores/Consoles/Sega/gpgx/GPGX.cs +++ b/BizHawk.Emulation.Cores/Consoles/Sega/gpgx/GPGX.cs @@ -489,14 +489,6 @@ namespace BizHawk.Emulation.Cores.Consoles.Sega.gpgx public void LoadStateText(System.IO.TextReader reader) { string hex = reader.ReadLine(); - if (hex.StartsWith("emuVersion")) // movie save - { - do // theoretically, our portion should start right after StartsFromSavestate, maybe... - { - hex = reader.ReadLine(); - } while (!hex.StartsWith("StartsFromSavestate")); - hex = reader.ReadLine(); - } byte[] state = new byte[hex.Length / 2]; state.ReadFromHexFast(hex); LoadStateBinary(new System.IO.BinaryReader(new System.IO.MemoryStream(state)));