diff options
Diffstat (limited to 'src/NDSCart.cpp')
-rw-r--r-- | src/NDSCart.cpp | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/NDSCart.cpp b/src/NDSCart.cpp index eaa6487..1e5a45b 100644 --- a/src/NDSCart.cpp +++ b/src/NDSCart.cpp @@ -383,6 +383,16 @@ void CartCommon::SetIRQ() NDS::SetIRQ(1, NDS::IRQ_CartIREQMC); } +u8 *CartCommon::GetSaveMemory() const +{ + return nullptr; +} + +u32 CartCommon::GetSaveMemoryLength() const +{ + return 0; +} + void CartCommon::ReadROM(u32 addr, u32 len, u8* data, u32 offset) { if (addr >= ROMLength) return; @@ -553,6 +563,16 @@ u8 CartRetail::SPIWrite(u8 val, u32 pos, bool last) } } +u8 *CartRetail::GetSaveMemory() const +{ + return SRAM; +} + +u32 CartRetail::GetSaveMemoryLength() const +{ + return SRAMLength; +} + void CartRetail::ReadROM_B7(u32 addr, u32 len, u8* data, u32 offset) { addr &= (ROMLength-1); @@ -1732,6 +1752,16 @@ void SetupDirectBoot(std::string romname) Cart->SetupDirectBoot(romname); } +u8* GetSaveMemory() +{ + return Cart ? Cart->GetSaveMemory() : nullptr; +} + +u32 GetSaveMemoryLength() +{ + return Cart ? Cart->GetSaveMemoryLength() : 0; +} + void EjectCart() { if (!CartInserted) return; |