mordicaithebeastey2 / bizhawk

Automatically exported from code.google.com/p/bizhawk
1 stars 0 forks source link

SNES Loadstate failure with DSP firmware. #177

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Load a snes game utilising DSP chips 1,2,3 or 4.
2. Get into gameplay and make a savestate (maybe at any point)
3. Loadstate

What is the expected output? What do you see instead?
The games utilising 'digital signal processor' chips crash/corrupt when loading 
from a savestate. I expect to be able to load state and continue on without 
error.

What version of the product are you using? On what operating system?
SVN 6663 Windows 7 64bit

Please provide any additional information below.

I completed Topgear 3000 (DSP4) in Snex9x long ago, but save/loadstate has 
never worked in sneshawk.

While I haven't tested the other games in snes9x, these also fail in bizhawk 
when loading state. Super Mario Kart, Pilot Wings (DSP1) (Actually I never had 
pilot wings work in snes9x either).  Dungeon Master (DSP2), SD Gundam GX (DSP3).

A few SuperFX games tested seem ok. (Doom, Star Fox, Yoshi's island)

Full list of co-processor games are listed here 
http://en.wikipedia.org/wiki/List_of_Super_NES_enhancement_chips

Original issue reported on code.google.com by MThompso...@gmail.com on 20 May 2014 at 6:14

GoogleCodeExporter commented 9 years ago
I checked Pilotwings (U) with the Compatibility and Performance cores.  Made a 
save state, closed ROM, reopened the ROM and loaded the save state.
No issues for me.

Do you get any error messages?

Original comment by hegyak on 20 May 2014 at 6:46

GoogleCodeExporter commented 9 years ago
No error messages.  I tried all 3 compatibility modes.  Load rom (u) and keep 
pressing start until in the main game. save state, load state and the game 
hangs.  if save/load during while in the menus, then the main game may never 
load (Blank screen).

Original comment by MThompso...@gmail.com on 20 May 2014 at 7:02

GoogleCodeExporter commented 9 years ago
Got it now.  Using Compatibility core.  Saved state, started to pilot the 
plane, saved state, loaded state, crash/freeze as reported.  Closed ROM, opened 
ROM, loaded state, same problem.

Original comment by hegyak on 20 May 2014 at 10:03

Attachments:

GoogleCodeExporter commented 9 years ago
All of the DSP based SNES games have this issue.
Dungeon Master's error can be seen by making a save state inside the dungeon 
(navigate a little bit first) then do a load state.
SD Gundam GX can be done by going to the map (?) making a save state then load 
state.
Top Gear 3000 Can be done by save state during a race, then load state.

I didn't notice Pilotwing's error initially because the Menu for what event you 
want to do is not using the DSP chip (?)

I included some error screenshots of Dungeon Master and SD Gundam GX.

Original comment by hegyak on 20 May 2014 at 10:30

Attachments:

GoogleCodeExporter commented 9 years ago
I think this is caused by the DSP roms getting whacked when the core resets and 
then not getting reloaded. I've debugged this before. I'm not sure why it's the 
way it is right now

Original comment by zero...@zeromus.org on 22 May 2014 at 10:07

GoogleCodeExporter commented 9 years ago
seems as if it was the problem indeed, fixed in r6679

Original comment by zero...@zeromus.org on 23 May 2014 at 12:13

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
It's 1/2 fixed.  Top Gear 3000 and Pilotwings are loading from Savestates.  
Dungeon Master and SD Gundam GX are not.  Super Mario Kart will also cause this 
error.

Dungeon Master, Super Mario Kart and SD Gundam GX error message:
************** Exception Text **************
System.InvalidOperationException: Re-defined a shared memory block. Check bsnes 
init/shutdown code. Block name: CARTRIDGE_RAM
   at BizHawk.Emulation.Cores.Nintendo.SNES.LibsnesApi.Handle_SIG(eMessage msg)
   at BizHawk.Emulation.Cores.Nintendo.SNES.LibsnesApi.WaitForCompletion()
   at BizHawk.Emulation.Cores.Nintendo.SNES.LibsnesApi.CMD_load_cartridge_normal(Byte[] rom_xml, Byte[] rom_data)
   at BizHawk.Emulation.Cores.Nintendo.SNES.LibsnesCore.LoadCurrent()
   at BizHawk.Emulation.Cores.Nintendo.SNES.LibsnesCore.CoreLoadState(Byte[] data)
   at BizHawk.Emulation.Cores.Nintendo.SNES.LibsnesCore.LoadStateBinary(BinaryReader reader)
   at BizHawk.Client.Common.SavestateManager.<LoadStateFile>b__a(BinaryReader br)
   at BizHawk.Client.Common.BinaryStateLoader.<>c__DisplayClass1.<GetLump>b__0(Stream s)
   at BizHawk.Client.Common.BinaryStateLoader.GetLump(BinaryStateLump lump, Boolean abort, Action`1 callback)
   at BizHawk.Client.Common.BinaryStateLoader.GetLump(BinaryStateLump lump, Boolean abort, Action`1 callback)
   at BizHawk.Client.Common.BinaryStateLoader.GetCoreState(Action`1 callbackBinary, Action`1 callbackText)
   at BizHawk.Client.Common.SavestateManager.LoadStateFile(String path, String name)
   at BizHawk.Client.EmuHawk.MainForm.LoadState(String path, String userFriendlyStateName, Boolean fromLua)
   at BizHawk.Client.EmuHawk.MainForm.LoadQuickSave(String quickSlotName, Boolean fromLua)
   at BizHawk.Client.EmuHawk.MainForm.Loadstate1MenuItem_Click(Object sender, EventArgs e)
   at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
   at System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)
   at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
   at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
   at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)
   at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)
   at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
   at System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   at System.Windows.Forms.ToolStrip.WndProc(Message& m)
   at System.Windows.Forms.ToolStripDropDown.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

Original comment by hegyak on 23 May 2014 at 1:06

GoogleCodeExporter commented 9 years ago

Original comment by zero...@zeromus.org on 23 May 2014 at 7:51

GoogleCodeExporter commented 9 years ago
I don't think hegyak's last bug is relevant anymore. I think it was due to an 
out-of-date exe in the repository, which I fixed in r6687 on 23-may-2014.

Since then, in r7784, I have essentially rolled back r6679 and done it a 
different way, which is not so slow for loadstate/rewind.  This issue should be 
checked again. Please test the ARMv3 game though, if you know how. I gave 
special treatment to each of the firmware chip types to keep their roms loaded 
across loadstates.

Original comment by zero...@zeromus.org on 2 Sep 2014 at 5:05

GoogleCodeExporter commented 9 years ago
This is working now.
Tested against r9111

Original comment by hegyak on 24 Feb 2015 at 5:14