CDL - fix snes games with no cartram
This commit is contained in:
parent
fb7ed39944
commit
c68fdc511b
|
@ -48,6 +48,11 @@ namespace BizHawk.Emulation.Common
|
|||
/// </summary>
|
||||
Dictionary<string, GCHandle> Pins = new Dictionary<string, GCHandle>();
|
||||
|
||||
/// <summary>
|
||||
/// Whether the CDL is tracking a block with the given name
|
||||
/// </summary>
|
||||
public bool Has(string blockname) { return ContainsKey(blockname); }
|
||||
|
||||
/// <summary>
|
||||
/// This is just a hook, if needed, to readily suspend logging, without having to rewire the core
|
||||
/// </summary>
|
||||
|
|
|
@ -210,8 +210,16 @@ namespace BizHawk.Emulation.Cores.Nintendo.SNES
|
|||
WritePipePointer(cdl.GetPin("CARTROM"),false);
|
||||
bwPipe.Write(cdl["CARTROM"].Length);
|
||||
|
||||
if (cdl.Has("CARTRAM"))
|
||||
{
|
||||
WritePipePointer(cdl.GetPin("CARTRAM"), false);
|
||||
bwPipe.Write(cdl["CARTRAM"].Length);
|
||||
}
|
||||
else
|
||||
{
|
||||
WritePipePointer(IntPtr.Zero);
|
||||
WritePipePointer(IntPtr.Zero);
|
||||
}
|
||||
|
||||
WritePipePointer(cdl.GetPin("WRAM"));
|
||||
bwPipe.Write(cdl["WRAM"].Length);
|
||||
|
|
|
@ -185,7 +185,10 @@ namespace BizHawk.Emulation.Cores.Nintendo.SNES
|
|||
public void NewCDL(CodeDataLog cdl)
|
||||
{
|
||||
cdl["CARTROM"] = new byte[MemoryDomains["CARTROM"].Size];
|
||||
|
||||
if (MemoryDomains.Has("CARTRAM"))
|
||||
cdl["CARTRAM"] = new byte[MemoryDomains["CARTRAM"].Size];
|
||||
|
||||
cdl["WRAM"] = new byte[MemoryDomains["WRAM"].Size];
|
||||
cdl["APURAM"] = new byte[MemoryDomains["APURAM"].Size];
|
||||
|
||||
|
|
|
@ -5,6 +5,10 @@
|
|||
//helpful detailed reg list
|
||||
//http://wiki.superfamicom.org/snes/show/Registers
|
||||
|
||||
//TODO
|
||||
//SF2 title art doesnt seem to show up..
|
||||
//scanline control doesnt work?
|
||||
|
||||
using System;
|
||||
|
||||
namespace BizHawk.Emulation.Cores.Nintendo.SNES
|
||||
|
|
Loading…
Reference in New Issue