diff --git a/Assets/dll/faust.wbx.zst b/Assets/dll/faust.wbx.zst index 16f41e012a5..3a20d608f5e 100644 Binary files a/Assets/dll/faust.wbx.zst and b/Assets/dll/faust.wbx.zst differ diff --git a/Assets/dll/hyper.wbx.zst b/Assets/dll/hyper.wbx.zst index 31448757a58..b8a6b14193a 100644 Binary files a/Assets/dll/hyper.wbx.zst and b/Assets/dll/hyper.wbx.zst differ diff --git a/Assets/dll/ngp.wbx.zst b/Assets/dll/ngp.wbx.zst index a2a711e1a0c..c4872e9d763 100644 Binary files a/Assets/dll/ngp.wbx.zst and b/Assets/dll/ngp.wbx.zst differ diff --git a/Assets/dll/pcfx.wbx.zst b/Assets/dll/pcfx.wbx.zst index 9422bb522ea..d6a90964473 100644 Binary files a/Assets/dll/pcfx.wbx.zst and b/Assets/dll/pcfx.wbx.zst differ diff --git a/Assets/dll/shock.wbx.zst b/Assets/dll/shock.wbx.zst index 6eb87d99a68..557e6bfaac5 100644 Binary files a/Assets/dll/shock.wbx.zst and b/Assets/dll/shock.wbx.zst differ diff --git a/Assets/dll/ss.wbx.zst b/Assets/dll/ss.wbx.zst index 73d04f9b939..d04e783cf5e 100644 Binary files a/Assets/dll/ss.wbx.zst and b/Assets/dll/ss.wbx.zst differ diff --git a/Assets/dll/turbo.wbx.zst b/Assets/dll/turbo.wbx.zst index 2da491f71ee..e3fa54f0b76 100644 Binary files a/Assets/dll/turbo.wbx.zst and b/Assets/dll/turbo.wbx.zst differ diff --git a/Assets/dll/vb.wbx.zst b/Assets/dll/vb.wbx.zst index aaba7457bec..63c399732e8 100644 Binary files a/Assets/dll/vb.wbx.zst and b/Assets/dll/vb.wbx.zst differ diff --git a/waterbox/nyma/NymaCore.cpp b/waterbox/nyma/NymaCore.cpp index 20420699bdd..4da16819bc7 100644 --- a/waterbox/nyma/NymaCore.cpp +++ b/waterbox/nyma/NymaCore.cpp @@ -142,7 +142,7 @@ ECL_EXPORT void FrameAdvance(MyFrameInfo& frame) if (frame.Command) Game->DoSimpleCommand(frame.Command); - + memcpy(InputPortData, frame.InputPortData, sizeof(InputPortData)); if (Game->TransformInput) @@ -254,6 +254,7 @@ struct SystemInfo int32_t NominalWidth; int32_t NominalHeight; int32_t VideoSystem; + int32_t GameType; int32_t FpsFixed; int64_t MasterClock; int32_t LcmWidth; @@ -272,6 +273,7 @@ ECL_EXPORT SystemInfo* GetSystemInfo() SI.NominalWidth = Game->nominal_width; SI.NominalHeight = Game->nominal_height; SI.VideoSystem = Game->VideoSystem; + SI.GameType = Game->GameType; SI.FpsFixed = Game->fps; SI.MasterClock = Game->MasterClock; SI.LcmWidth = Game->lcm_width; diff --git a/waterbox/nyma/mednafen b/waterbox/nyma/mednafen index 66c482b516f..33165f0cfe3 160000 --- a/waterbox/nyma/mednafen +++ b/waterbox/nyma/mednafen @@ -1 +1 @@ -Subproject commit 66c482b516f3b37927a9f51522f2e6cc9dd0aed0 +Subproject commit 33165f0cfe30eb9cab3b61b3666cd9dbf8b1a204 diff --git a/waterbox/nyma/ss.cpp b/waterbox/nyma/ss.cpp index d6c5774cfb6..b879b1928e6 100644 --- a/waterbox/nyma/ss.cpp +++ b/waterbox/nyma/ss.cpp @@ -5,6 +5,7 @@ #include "nyma.h" #include #include +#include #include #include namespace MDFN_IEN_SS @@ -42,6 +43,8 @@ namespace MDFN_IEN_SS extern uint16* CS1RAM; extern uint16 ExtRAM[0x200000]; extern uint16 ROM[0x100000]; + extern uint16 STV_ROM[0x3000000 / sizeof(uint16)]; + extern AK93C45 eep; extern int ActiveCartType; @@ -72,6 +75,9 @@ ECL_EXPORT uint32_t GetSaveRamLength() if (ActiveCartType == CART_BACKUP_MEM) return sizeof(BackupRAM) + sizeof(ExtBackupRAM) + sizeof(uint8_t) + sizeof(RTC.raw) + sizeof(SaveMem); + if (ActiveCartType == CART_STV) + return sizeof(BackupRAM) + sizeof(eep.mem) + sizeof(uint8_t) + sizeof(RTC.raw) + sizeof(SaveMem); + return sizeof(BackupRAM) + sizeof(uint8_t) + sizeof(RTC.raw) + sizeof(SaveMem); } @@ -86,6 +92,12 @@ ECL_EXPORT void GetSaveRam(uint8_t* data) data += sizeof(ExtBackupRAM); } + if (ActiveCartType == CART_STV) + { + memcpy(data, eep.mem, sizeof(eep.mem)); + data += sizeof(eep.mem); + } + *data = RTC.Valid; data += sizeof(uint8_t); @@ -114,6 +126,16 @@ ECL_EXPORT void PutSaveRam(uint8_t* data, uint32_t length) } } + if (ActiveCartType == CART_STV) + { + if (length >= sizeof(eep.mem)) + { + memcpy(eep.mem, data, sizeof(eep.mem)); + data += sizeof(eep.mem); + length -= sizeof(eep.mem); + } + } + if (length >= (sizeof(uint8_t) + sizeof(RTC.raw) + sizeof(SaveMem))) { RTC.Valid = *data != 0; @@ -144,7 +166,7 @@ ECL_EXPORT void GetMemoryAreas(MemoryArea* m) while (0) AddMemoryDomain("Sound Ram", SCSP.GetRAMPtr(), 0x100000, MEMORYAREA_FLAGS_WRITABLE | MEMORYAREA_FLAGS_SWAPPED | MEMORYAREA_FLAGS_YUGEENDIAN | MEMORYAREA_FLAGS_WORDSIZE2); AddMemoryDomain("Backup Ram", BackupRAM, sizeof(BackupRAM), MEMORYAREA_FLAGS_WRITABLE | MEMORYAREA_FLAGS_YUGEENDIAN | MEMORYAREA_FLAGS_WORDSIZE2); - AddMemoryDomain("Boot Rom", BIOSROM, 524288, MEMORYAREA_FLAGS_SWAPPED | MEMORYAREA_FLAGS_YUGEENDIAN | MEMORYAREA_FLAGS_WORDSIZE2); + AddMemoryDomain("Boot Rom", BIOSROM, 524288, MEMORYAREA_FLAGS_WRITABLE | MEMORYAREA_FLAGS_SWAPPED | MEMORYAREA_FLAGS_YUGEENDIAN | MEMORYAREA_FLAGS_WORDSIZE2); AddMemoryDomain("Work Ram Low", WorkRAML, sizeof(WorkRAML), MEMORYAREA_FLAGS_WRITABLE | MEMORYAREA_FLAGS_SWAPPED | MEMORYAREA_FLAGS_YUGEENDIAN | MEMORYAREA_FLAGS_WORDSIZE2); AddMemoryDomain("Work Ram High", WorkRAMH, sizeof(WorkRAMH), MEMORYAREA_FLAGS_WRITABLE | MEMORYAREA_FLAGS_SWAPPED | MEMORYAREA_FLAGS_YUGEENDIAN | MEMORYAREA_FLAGS_WORDSIZE2 | MEMORYAREA_FLAGS_PRIMARY); AddMemoryDomain("VDP1 Ram", VDP1::VRAM, sizeof(VDP1::VRAM), MEMORYAREA_FLAGS_WRITABLE | MEMORYAREA_FLAGS_SWAPPED | MEMORYAREA_FLAGS_YUGEENDIAN | MEMORYAREA_FLAGS_WORDSIZE2); @@ -160,7 +182,12 @@ ECL_EXPORT void GetMemoryAreas(MemoryArea* m) if (ActiveCartType == CART_EXTRAM_1M) AddMemoryDomain("Ram Cart", ExtRAM, sizeof(ExtRAM) / 4, MEMORYAREA_FLAGS_WRITABLE | MEMORYAREA_FLAGS_SWAPPED | MEMORYAREA_FLAGS_YUGEENDIAN | MEMORYAREA_FLAGS_WORDSIZE2); if (ActiveCartType == CART_KOF95 || ActiveCartType == CART_ULTRAMAN) - AddMemoryDomain("Rom Cart", ROM, sizeof(ROM), MEMORYAREA_FLAGS_SWAPPED | MEMORYAREA_FLAGS_YUGEENDIAN | MEMORYAREA_FLAGS_WORDSIZE2); + AddMemoryDomain("Rom Cart", ROM, sizeof(ROM), MEMORYAREA_FLAGS_WRITABLE | MEMORYAREA_FLAGS_SWAPPED | MEMORYAREA_FLAGS_YUGEENDIAN | MEMORYAREA_FLAGS_WORDSIZE2); + if (ActiveCartType == CART_STV) + { + AddMemoryDomain("Rom Cart", STV_ROM, sizeof(STV_ROM), MEMORYAREA_FLAGS_WRITABLE | MEMORYAREA_FLAGS_SWAPPED | MEMORYAREA_FLAGS_YUGEENDIAN | MEMORYAREA_FLAGS_WORDSIZE2); + AddMemoryDomain("STV EEPROM", eep.mem, sizeof(eep.mem), MEMORYAREA_FLAGS_WRITABLE | MEMORYAREA_FLAGS_SWAPPED | MEMORYAREA_FLAGS_YUGEENDIAN | MEMORYAREA_FLAGS_WORDSIZE2); + } AddMemoryDomain("SMPC RTC", RTC.raw, sizeof(RTC.raw), MEMORYAREA_FLAGS_WRITABLE | MEMORYAREA_FLAGS_WORDSIZE1); AddMemoryDomain("SMPC SaveMem", SaveMem, sizeof(SaveMem), MEMORYAREA_FLAGS_WRITABLE | MEMORYAREA_FLAGS_WORDSIZE1); }