diff --git a/BizHawk.Client.Common/RomLoader.cs b/BizHawk.Client.Common/RomLoader.cs index f46ebe829f..a6e9831301 100644 --- a/BizHawk.Client.Common/RomLoader.cs +++ b/BizHawk.Client.Common/RomLoader.cs @@ -460,8 +460,7 @@ namespace BizHawk.Client.Common sw.WriteLine("-------------------------"); } - nextEmulator = new Octoshock(nextComm, discs, discNames, null, GetCoreSettings(), GetCoreSyncSettings()); - nextEmulator.CoreComm.RomStatusDetails = sw.ToString(); + nextEmulator = new Octoshock(nextComm, discs, discNames, null, GetCoreSettings(), GetCoreSyncSettings(), sw.ToString()); game = new GameInfo { Name = Path.GetFileNameWithoutExtension(file.Name), @@ -565,10 +564,10 @@ namespace BizHawk.Client.Common (Saturnus.Settings)GetCoreSettings(), (Saturnus.SyncSettings)GetCoreSyncSettings()); break; case "PSX": - nextEmulator = new Octoshock(nextComm, new List(new[] { disc }), new List(new[] { Path.GetFileNameWithoutExtension(path) }), null, GetCoreSettings(), GetCoreSyncSettings()); + string romDetails; if (game.IsRomStatusBad() || game.Status == RomStatus.NotInDatabase) { - nextEmulator.CoreComm.RomStatusDetails = "Disc could not be identified as known-good. Look for a better rip."; + romDetails = "Disc could not be identified as known-good. Look for a better rip."; } else { @@ -578,9 +577,10 @@ namespace BizHawk.Client.Common sw.WriteLine("According to redump.org, the ideal hash for entire disc is: CRC32:{0:X8}", game.GetStringValue("dh")); sw.WriteLine("The file you loaded hasn't been hashed entirely (it would take too long)"); sw.WriteLine("Compare it with the full hash calculated by the PSX menu's Hash Discs tool"); - nextEmulator.CoreComm.RomStatusDetails = sw.ToString(); + romDetails = sw.ToString(); } + nextEmulator = new Octoshock(nextComm, new List(new[] { disc }), new List(new[] { Path.GetFileNameWithoutExtension(path) }), null, GetCoreSettings(), GetCoreSyncSettings(), romDetails); break; case "PCFX": nextEmulator = new Tst(nextComm, new[] { disc }, @@ -791,8 +791,7 @@ namespace BizHawk.Client.Common } // todo: copy pasta from PSX .cue section - nextEmulator = new Octoshock(nextComm, discs, discNames, null, GetCoreSettings(), GetCoreSyncSettings()); - nextEmulator.CoreComm.RomStatusDetails = sw.ToString(); + nextEmulator = new Octoshock(nextComm, discs, discNames, null, GetCoreSettings(), GetCoreSyncSettings(), sw.ToString()); game = new GameInfo { Name = Path.GetFileNameWithoutExtension(file.Name), @@ -883,7 +882,6 @@ namespace BizHawk.Client.Common PSF psf = new PSF(); psf.Load(path, cbDeflater); nextEmulator = new Octoshock(nextComm, psf, GetCoreSettings(), GetCoreSyncSettings()); - nextEmulator.CoreComm.RomStatusDetails = "It's a PSF, what do you want. Oh, tags maybe?"; // total garbage, this rom = new RomGame(file); @@ -1114,8 +1112,7 @@ namespace BizHawk.Client.Common : CoreInventory.Instance["GBA", "VBA-Next"]; break; case "PSX": - nextEmulator = new Octoshock(nextComm, null, null, rom.FileData, GetCoreSettings(), GetCoreSyncSettings()); - nextEmulator.CoreComm.RomStatusDetails = "PSX etc."; + nextEmulator = new Octoshock(nextComm, null, null, rom.FileData, GetCoreSettings(), GetCoreSyncSettings(), "PSX etc."); break; case "Arcade": nextEmulator = new MAME(nextComm, file.Directory, file.CanonicalName, GetCoreSyncSettings(), out var gameName); diff --git a/BizHawk.Emulation.Cores/Consoles/Sony/PSX/Octoshock.cs b/BizHawk.Emulation.Cores/Consoles/Sony/PSX/Octoshock.cs index e24441487e..bfc7b81128 100644 --- a/BizHawk.Emulation.Cores/Consoles/Sony/PSX/Octoshock.cs +++ b/BizHawk.Emulation.Cores/Consoles/Sony/PSX/Octoshock.cs @@ -37,20 +37,21 @@ namespace BizHawk.Emulation.Cores.Sony.PSX { public Octoshock(CoreComm comm, PSF psf, object settings, object syncSettings) { - Load(comm, null, null, null, settings, syncSettings, psf); + Load(comm, null, null, null, settings, syncSettings, psf, romDetails); OctoshockDll.shock_PowerOn(psx); } //note: its annoying that we have to have a disc before constructing this. //might want to change that later. HOWEVER - we need to definitely have a region, at least - public Octoshock(CoreComm comm, List discs, List discNames, byte[] exe, object settings, object syncSettings) + public Octoshock(CoreComm comm, List discs, List discNames, byte[] exe, object settings, object syncSettings, string romDetails) { - Load(comm, discs, discNames, exe, settings, syncSettings, null); + Load(comm, discs, discNames, exe, settings, syncSettings, null, romDetails); OctoshockDll.shock_PowerOn(psx); } - void Load(CoreComm comm, List discs, List discNames, byte[] exe, object settings, object syncSettings, PSF psf) + void Load(CoreComm comm, List discs, List discNames, byte[] exe, object settings, object syncSettings, PSF psf, string romDetails) { + CoreComm.RomStatusDetails = romDetails; ConnectTracer(); CoreComm = comm; DriveLightEnabled = true;