ArjunNair / Zero-Emulator

Zero is a ZX Spectrum emulator for Windows, written using C#.
Other
41 stars 10 forks source link

Crash loading some TZX and Z80 #20

Closed Hexaae closed 6 years ago

Hexaae commented 7 years ago

Here are the files: https://1drv.ms/u/s!ApMUGr0cuN39-kpb5rRoosOT-eSF

They make Zero 0.7.1 crash instantly with error:

Le informazioni su come richiamare il debug JIT (Just-In-Time) anziché questa finestra
sono riportate in fondo al messaggio.

************** Testo dell'eccezione **************
System.IndexOutOfRangeException: Indice oltre i limiti della matrice.
   in Peripherals.Z80Loader.LoadZ80(Stream fs)
   in Peripherals.Z80Loader.LoadZ80(String filename)
   in ZeroWin.Form1.LoadZXFile(String filename)
   in ZeroWin.Form1.openFileMenuItem1_Click(Object sender, EventArgs e)
   in System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
   in System.Windows.Forms.ToolStripButton.OnClick(EventArgs e)
   in System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
   in System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
   in System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)
   in System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)
   in System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
   in System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   in System.Windows.Forms.Control.WndProc(Message& m)
   in System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   in System.Windows.Forms.ToolStrip.WndProc(Message& m)
   in System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   in System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   in System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

************** Assembly caricati **************
mscorlib
    Versione assembly: 2.0.0.0
    Versione Win32: 2.0.50727.8745 (WinRel.050727-8700)
    Base di codice: file:///C:/Windows/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
Zero
    Versione assembly: 1.0.0.0
    Versione Win32: 1.0.0.0
    Base di codice: file:///C:/Users/Luca/Zero/Zero.exe
----------------------------------------
System.Windows.Forms
    Versione assembly: 2.0.0.0
    Versione Win32: 2.0.50727.8745 (WinRel.050727-8700)
    Base di codice: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
    Versione assembly: 2.0.0.0
    Versione Win32: 2.0.50727.8750 (QFE.050727-8700)
    Base di codice: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
    Versione assembly: 2.0.0.0
    Versione Win32: 2.0.50727.8745 (WinRel.050727-8700)
    Base di codice: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
Speccy
    Versione assembly: 1.0.0.0
    Versione Win32: 1.0.0.0
    Base di codice: file:///C:/Users/Luca/Zero/Speccy.DLL
----------------------------------------
Microsoft.DirectX.DirectInput
    Versione assembly: 1.0.2902.0
    Versione Win32: 5.04.00.2904
    Base di codice: file:///C:/WINDOWS/assembly/GAC/Microsoft.DirectX.DirectInput/1.0.2902.0__31bf3856ad364e35/Microsoft.DirectX.DirectInput.dll
----------------------------------------
System.Windows.Forms.resources
    Versione assembly: 2.0.0.0
    Versione Win32: 2.0.50727.8745 (WinRel.050727-8700)
    Base di codice: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms.resources/2.0.0.0_it_b77a5c561934e089/System.Windows.Forms.resources.dll
----------------------------------------
Peripherals
    Versione assembly: 1.0.0.0
    Versione Win32: 1.0.0.0
    Base di codice: file:///C:/Users/Luca/Zero/Peripherals.DLL
----------------------------------------
System.Core
    Versione assembly: 3.5.0.0
    Versione Win32: 3.5.30729.8763 built by: WinRel
    Base di codice: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Core/3.5.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
Microsoft.DirectX
    Versione assembly: 1.0.2902.0
    Versione Win32: 5.04.00.2904
    Base di codice: file:///C:/WINDOWS/assembly/GAC/Microsoft.DirectX/1.0.2902.0__31bf3856ad364e35/Microsoft.DirectX.dll
----------------------------------------
System.Configuration
    Versione assembly: 2.0.0.0
    Versione Win32: 2.0.50727.8745 (WinRel.050727-8700)
    Base di codice: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Xml
    Versione assembly: 2.0.0.0
    Versione Win32: 2.0.50727.8745 (WinRel.050727-8700)
    Base di codice: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
mscorlib.resources
    Versione assembly: 2.0.0.0
    Versione Win32: 2.0.50727.8745 (WinRel.050727-8700)
    Base di codice: file:///C:/Windows/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
ZeroSound
    Versione assembly: 1.0.0.0
    Versione Win32: 1.0.0.0
    Base di codice: file:///C:/Users/Luca/Zero/ZeroSound.DLL
----------------------------------------
Microsoft.DirectX.DirectSound
    Versione assembly: 1.0.2902.0
    Versione Win32: 5.04.00.2904
    Base di codice: file:///C:/WINDOWS/assembly/GAC/Microsoft.DirectX.DirectSound/1.0.2902.0__31bf3856ad364e35/Microsoft.DirectX.DirectSound.dll
----------------------------------------
Microsoft.VisualC
    Versione assembly: 8.0.0.0
    Versione Win32: 8.00.50727.9268
    Base di codice: file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.VisualC/8.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualC.dll
----------------------------------------
Microsoft.DirectX.Direct3D
    Versione assembly: 1.0.2902.0
    Versione Win32: 9.05.132.0000
    Base di codice: file:///C:/WINDOWS/assembly/GAC/Microsoft.DirectX.Direct3D/1.0.2902.0__31bf3856ad364e35/Microsoft.DirectX.Direct3D.dll
----------------------------------------
Microsoft.DirectX.Direct3DX
    Versione assembly: 1.0.2911.0
    Versione Win32: 9.12.589.0000
    Base di codice: file:///C:/WINDOWS/assembly/GAC/Microsoft.DirectX.Direct3DX/1.0.2911.0__31bf3856ad364e35/Microsoft.DirectX.Direct3DX.dll
----------------------------------------

************** Debug JIT **************
Per attivare il debug JIT, è necessario impostare il valore
jitDebugging nella sezione system.windows.forms del file di configurazione
dell'applicazione o del computer (machine.config).
L'applicazione inoltre deve essere compilata con il debug
attivato.

Ad esempio:

<configuration>
    <system.windows.forms jitDebugging="true" />
</configuration>

Quando il debug JIT è attivato, tutte le eccezioni non gestite
vengono inviate al debugger JIT registrato nel computer,
anziché essere gestite da questa finestra di dialogo.

Le informazioni su come richiamare il debug JIT (Just-In-Time) anziché questa finestra
sono riportate in fondo al messaggio.

************** Testo dell'eccezione **************
System.IndexOutOfRangeException: Indice oltre i limiti della matrice.
   in Peripherals.Z80Loader.LoadZ80(Stream fs)
   in Peripherals.Z80Loader.LoadZ80(String filename)
   in ZeroWin.Form1.LoadZXFile(String filename)
   in ZeroWin.Form1.openFileMenuItem1_Click(Object sender, EventArgs e)
   in System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
   in System.Windows.Forms.ToolStripButton.OnClick(EventArgs e)
   in System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
   in System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
   in System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)
   in System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)
   in System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
   in System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   in System.Windows.Forms.Control.WndProc(Message& m)
   in System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   in System.Windows.Forms.ToolStrip.WndProc(Message& m)
   in System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   in System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   in System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

************** Assembly caricati **************
mscorlib
    Versione assembly: 2.0.0.0
    Versione Win32: 2.0.50727.8745 (WinRel.050727-8700)
    Base di codice: file:///C:/Windows/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
Zero
    Versione assembly: 1.0.0.0
    Versione Win32: 1.0.0.0
    Base di codice: file:///C:/Users/Luca/Zero/Zero.exe
----------------------------------------
System.Windows.Forms
    Versione assembly: 2.0.0.0
    Versione Win32: 2.0.50727.8745 (WinRel.050727-8700)
    Base di codice: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
    Versione assembly: 2.0.0.0
    Versione Win32: 2.0.50727.8750 (QFE.050727-8700)
    Base di codice: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
    Versione assembly: 2.0.0.0
    Versione Win32: 2.0.50727.8745 (WinRel.050727-8700)
    Base di codice: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
Speccy
    Versione assembly: 1.0.0.0
    Versione Win32: 1.0.0.0
    Base di codice: file:///C:/Users/Luca/Zero/Speccy.DLL
----------------------------------------
Microsoft.DirectX.DirectInput
    Versione assembly: 1.0.2902.0
    Versione Win32: 5.04.00.2904
    Base di codice: file:///C:/WINDOWS/assembly/GAC/Microsoft.DirectX.DirectInput/1.0.2902.0__31bf3856ad364e35/Microsoft.DirectX.DirectInput.dll
----------------------------------------
System.Windows.Forms.resources
    Versione assembly: 2.0.0.0
    Versione Win32: 2.0.50727.8745 (WinRel.050727-8700)
    Base di codice: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms.resources/2.0.0.0_it_b77a5c561934e089/System.Windows.Forms.resources.dll
----------------------------------------
Peripherals
    Versione assembly: 1.0.0.0
    Versione Win32: 1.0.0.0
    Base di codice: file:///C:/Users/Luca/Zero/Peripherals.DLL
----------------------------------------
System.Core
    Versione assembly: 3.5.0.0
    Versione Win32: 3.5.30729.8763 built by: WinRel
    Base di codice: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Core/3.5.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
Microsoft.DirectX
    Versione assembly: 1.0.2902.0
    Versione Win32: 5.04.00.2904
    Base di codice: file:///C:/WINDOWS/assembly/GAC/Microsoft.DirectX/1.0.2902.0__31bf3856ad364e35/Microsoft.DirectX.dll
----------------------------------------
System.Configuration
    Versione assembly: 2.0.0.0
    Versione Win32: 2.0.50727.8745 (WinRel.050727-8700)
    Base di codice: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Xml
    Versione assembly: 2.0.0.0
    Versione Win32: 2.0.50727.8745 (WinRel.050727-8700)
    Base di codice: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
mscorlib.resources
    Versione assembly: 2.0.0.0
    Versione Win32: 2.0.50727.8745 (WinRel.050727-8700)
    Base di codice: file:///C:/Windows/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
ZeroSound
    Versione assembly: 1.0.0.0
    Versione Win32: 1.0.0.0
    Base di codice: file:///C:/Users/Luca/Zero/ZeroSound.DLL
----------------------------------------
Microsoft.DirectX.DirectSound
    Versione assembly: 1.0.2902.0
    Versione Win32: 5.04.00.2904
    Base di codice: file:///C:/WINDOWS/assembly/GAC/Microsoft.DirectX.DirectSound/1.0.2902.0__31bf3856ad364e35/Microsoft.DirectX.DirectSound.dll
----------------------------------------
Microsoft.VisualC
    Versione assembly: 8.0.0.0
    Versione Win32: 8.00.50727.9268
    Base di codice: file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.VisualC/8.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualC.dll
----------------------------------------
Microsoft.DirectX.Direct3D
    Versione assembly: 1.0.2902.0
    Versione Win32: 9.05.132.0000
    Base di codice: file:///C:/WINDOWS/assembly/GAC/Microsoft.DirectX.Direct3D/1.0.2902.0__31bf3856ad364e35/Microsoft.DirectX.Direct3D.dll
----------------------------------------
Microsoft.DirectX.Direct3DX
    Versione assembly: 1.0.2911.0
    Versione Win32: 9.12.589.0000
    Base di codice: file:///C:/WINDOWS/assembly/GAC/Microsoft.DirectX.Direct3DX/1.0.2911.0__31bf3856ad364e35/Microsoft.DirectX.Direct3DX.dll
----------------------------------------

************** Debug JIT **************
Per attivare il debug JIT, è necessario impostare il valore
jitDebugging nella sezione system.windows.forms del file di configurazione
dell'applicazione o del computer (machine.config).
L'applicazione inoltre deve essere compilata con il debug
attivato.

Ad esempio:

<configuration>
    <system.windows.forms jitDebugging="true" />
</configuration>

Quando il debug JIT è attivato, tutte le eccezioni non gestite
vengono inviate al debugger JIT registrato nel computer,
anziché essere gestite da questa finestra di dialogo.
ArjunNair commented 7 years ago

The files seem to be invalid z80's. They have been saved as Type 1 snapshots (for the 48k spectrum) and so should be 49182 bytes in size (30 bytes header + 48k speccy memory) but they seem to be 49179 bytes in size. I tried loading them in by ignoring the missing last 3 bytes but the games don't load correctly (there is no emu crash) anyway. How were the z80's saved out? Using which emulator?

Hexaae commented 7 years ago

Don't know... maybe ASp (ZX Spectrum emulator for AmigaOS) or another... But they did work with other PC ZX emulators. I think Zero should not crash anyway when the format is incorrect. Thanks for support! Hope to see a new public version soon...