From a00081386da3dcca8663f4341c354072ab04aa92 Mon Sep 17 00:00:00 2001 From: zeromus Date: Fri, 5 Oct 2012 18:20:27 +0000 Subject: [PATCH] fix some things related to sgb movies --- BizHawk.MultiClient/MainForm.cs | 3 ++- BizHawk.MultiClient/RecordMovie.cs | 6 ++++++ BizHawk.MultiClient/movie/MovieHeader.cs | 1 + BizHawk.MultiClient/movie/MovieImport.cs | 3 ++- 4 files changed, 11 insertions(+), 2 deletions(-) diff --git a/BizHawk.MultiClient/MainForm.cs b/BizHawk.MultiClient/MainForm.cs index fb7fe2d659..942cec052f 100644 --- a/BizHawk.MultiClient/MainForm.cs +++ b/BizHawk.MultiClient/MainForm.cs @@ -1488,7 +1488,7 @@ namespace BizHawk.MultiClient } else { - MessageBox.Show("Couldn't open sgb.smc from the configured SNES firmwares path, which is:\n\n" + PathManager.MakeAbsolutePath(Global.Config.PathSNESFirmwares, "SNES") + "\n\nPlease make sure it is available and try again.\n\nWe're going to disable SGB for now; please re-enable it when you've set up the file."); + MessageBox.Show("Couldn't open sgb.sfc from the configured SNES firmwares path, which is:\n\n" + PathManager.MakeAbsolutePath(Global.Config.PathSNESFirmwares, "SNES") + "\n\nPlease make sure it is available and try again.\n\nWe're going to disable SGB for now; please re-enable it when you've set up the file."); Global.Config.GB_AsSGB = false; game.System = "GB"; goto RETRY; @@ -1502,6 +1502,7 @@ namespace BizHawk.MultiClient } if (sgbrom != null) { + game.System = "SNES"; game.AddOption("SGB"); var snes = new LibsnesCore(); nextEmulator = snes; diff --git a/BizHawk.MultiClient/RecordMovie.cs b/BizHawk.MultiClient/RecordMovie.cs index 09c3ae8465..0a764a9cd3 100644 --- a/BizHawk.MultiClient/RecordMovie.cs +++ b/BizHawk.MultiClient/RecordMovie.cs @@ -9,6 +9,7 @@ using System.Windows.Forms; using System.IO; using BizHawk.Emulation.Consoles.GB; +using BizHawk.Emulation.Consoles.Nintendo.SNES; namespace BizHawk.MultiClient { @@ -83,6 +84,11 @@ namespace BizHawk.MultiClient MovieToRecord.Header.SetHeaderLine(MovieHeader.GB_GBA_IN_CGB, Global.Config.GB_GBACGB.ToString()); } + if (Global.Emulator is LibsnesCore) + { + MovieToRecord.Header.SetHeaderLine(MovieHeader.SGB, Global.Config.GB_ForceDMG.ToString()); + } + if (StartFromCombo.SelectedItem.ToString() == "Now") { MovieToRecord.StartsFromSavestate = true; diff --git a/BizHawk.MultiClient/movie/MovieHeader.cs b/BizHawk.MultiClient/movie/MovieHeader.cs index 4e8cc1f9f8..be5acfbde9 100644 --- a/BizHawk.MultiClient/movie/MovieHeader.cs +++ b/BizHawk.MultiClient/movie/MovieHeader.cs @@ -32,6 +32,7 @@ namespace BizHawk.MultiClient //Gameboy Settings that affect sync public const string GB_FORCEDMG = "Force_DMG_Mode"; public const string GB_GBA_IN_CGB = "GBA_In_CGB"; + public const string SGB = "SGB"; //a snes movie will set this to indicate that it's actually SGB public static string MovieVersion = "BizHawk v0.0.1"; diff --git a/BizHawk.MultiClient/movie/MovieImport.cs b/BizHawk.MultiClient/movie/MovieImport.cs index 6df17db31b..86c6f7b730 100644 --- a/BizHawk.MultiClient/movie/MovieImport.cs +++ b/BizHawk.MultiClient/movie/MovieImport.cs @@ -1010,7 +1010,8 @@ namespace BizHawk.MultiClient break; case "sgb_ntsc": case "sgb_pal": - platform = "SGB"; + platform = "SNES"; + m.Header.SetHeaderLine(MovieHeader.SGB, true.ToString()); break; } bool pal = (gametype == "snes_pal" || gametype == "sgb_pal");