diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/SNES/LibsnesApi.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/SNES/LibsnesApi.cs index 0af74a5e41..1954c8fdcb 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/SNES/LibsnesApi.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/SNES/LibsnesApi.cs @@ -29,7 +29,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.SNES { static LibsnesApi() { - if (sizeof(CommStruct) != 232) + if (sizeof(CommStruct) != 280) { throw new InvalidOperationException("sizeof(comm)"); } @@ -296,19 +296,19 @@ namespace BizHawk.Emulation.Cores.Nintendo.SNES [FieldOffset(128)] //bleck. this is a long so that it can be a 32/64bit pointer - public fixed long cdl_ptr[4]; - [FieldOffset(160)] - public fixed int cdl_size[4]; - - [FieldOffset(176)] - public CPURegs cpuregs; - [FieldOffset(212)] - public LayerEnables layerEnables; + public fixed long cdl_ptr[8]; + [FieldOffset(192)] + public fixed int cdl_size[8]; [FieldOffset(224)] + public CPURegs cpuregs; + [FieldOffset(260)] + public LayerEnables layerEnables; + + [FieldOffset(272)] //static configuration-type information which can be grabbed off the core at any time without even needing a QUERY command public SNES_REGION region; - [FieldOffset(228)] + [FieldOffset(276)] public SNES_MAPPER mapper; //utilities diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/SNES/LibsnesCore.ICodeDataLogger.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/SNES/LibsnesCore.ICodeDataLogger.cs index 028a91a14d..e1cbb1d5ed 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/SNES/LibsnesCore.ICodeDataLogger.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/SNES/LibsnesCore.ICodeDataLogger.cs @@ -30,7 +30,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.SNES cdl["SGB_HRAM"] = new byte[_memoryDomains["SGB HRAM"].Size]; cdl["SGB_WRAM"] = new byte[_memoryDomains["SGB WRAM"].Size]; - if (_memoryDomains.Has("SGB_CARTRAM")) + if (_memoryDomains.Has("SGB CARTRAM")) cdl["SGB_CARTRAM"] = new byte[_memoryDomains["SGB CARTRAM"].Size]; } diff --git a/waterbox/libsnes/bsnes/target-libsnes/libsnes_pwrap.cpp b/waterbox/libsnes/bsnes/target-libsnes/libsnes_pwrap.cpp index b8ea3d64fc..29df0f44d1 100644 --- a/waterbox/libsnes/bsnes/target-libsnes/libsnes_pwrap.cpp +++ b/waterbox/libsnes/bsnes/target-libsnes/libsnes_pwrap.cpp @@ -165,8 +165,8 @@ struct CommStruct int32 padding3; - int64 cdl_ptr[4]; - int32 cdl_size[4]; + int64 cdl_ptr[8]; + int32 cdl_size[8]; CPURegsComm cpuregs; LayerEnablesComm layerEnables; @@ -623,13 +623,13 @@ EXPORT void* DllInit() T(buf, 88); T(buf_size, 112); T(cdl_ptr, 128); - T(cdl_size, 160); - T(cpuregs, 176); - T(layerEnables, 212); - T(region, 224); - T(mapper, 228); + T(cdl_size, 192); + T(cpuregs, 224); + T(layerEnables, 260); + T(region, 272); + T(mapper, 276); // start of private stuff - T(privbuf, 232); + T(privbuf, 280); #undef T memset(&comm, 0, sizeof(comm));