aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/NDS.cpp17
-rw-r--r--src/NDS.h1
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();
diff --git a/src/NDS.h b/src/NDS.h
index 3243337..16c42ef 100644
--- a/src/NDS.h
+++ b/src/NDS.h
@@ -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);