diff options
-rw-r--r-- | src/NDS.cpp | 17 | ||||
-rw-r--r-- | src/NDS.h | 1 |
2 files changed, 18 insertions, 0 deletions
diff --git a/src/NDS.cpp b/src/NDS.cpp index a16eb1c..da36bdc 100644 --- a/src/NDS.cpp +++ b/src/NDS.cpp @@ -170,6 +170,7 @@ bool Init() IPCFIFO7 = new FIFO<u32>(16); if (!NDSCart::Init()) return false; + if (!GBACart::Init()) return false; if (!GPU::Init()) return false; if (!SPU::Init()) return false; if (!SPI::Init()) return false; @@ -191,6 +192,7 @@ void DeInit() delete IPCFIFO7; NDSCart::DeInit(); + GBACart::DeInit(); GPU::DeInit(); SPU::DeInit(); SPI::DeInit(); @@ -492,6 +494,7 @@ void Reset() RCnt = 0; NDSCart::Reset(); + GBACart::Reset(); GPU::Reset(); SPU::Reset(); SPI::Reset(); @@ -693,6 +696,7 @@ bool DoSavestate(Savestate* file) ARM7->DoSavestate(file); NDSCart::DoSavestate(file); + GBACart::DoSavestate(file); GPU::DoSavestate(file); SPU::DoSavestate(file); SPI::DoSavestate(file); @@ -721,6 +725,19 @@ bool LoadROM(const char* path, const char* sram, bool direct) } } +bool LoadGBAROM(const char* path, const char* sram) +{ + if (GBACart::LoadROM(path, sram)) + { + return true; + } + else + { + printf("Failed to load ROM %s\n", path); + return false; + } +} + void LoadBIOS() { Reset(); @@ -135,6 +135,7 @@ void SetARM9RegionTimings(u32 addrstart, u32 addrend, int buswidth, int nonseq, void SetARM7RegionTimings(u32 addrstart, u32 addrend, int buswidth, int nonseq, int seq); bool LoadROM(const char* path, const char* sram, bool direct); +bool LoadGBAROM(const char* path, const char* sram); void LoadBIOS(); void SetupDirectBoot(); void RelocateSave(const char* path, bool write); |