aboutsummaryrefslogtreecommitdiff
path: root/src/NDS.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/NDS.cpp')
-rw-r--r--src/NDS.cpp27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/NDS.cpp b/src/NDS.cpp
index df3c103..d0346a5 100644
--- a/src/NDS.cpp
+++ b/src/NDS.cpp
@@ -830,6 +830,20 @@ void SetConsoleType(int type)
ConsoleType = type;
}
+bool LoadROM(const u8* romdata, u32 filelength, const char *sram, bool direct)
+{
+ if (NDSCart::LoadROM(romdata, filelength, sram, direct))
+ {
+ Running = true;
+ return true;
+ }
+ else
+ {
+ printf("Failed to load ROM from archive\n");
+ return false;
+ }
+}
+
bool LoadROM(const char* path, const char* sram, bool direct)
{
if (NDSCart::LoadROM(path, sram, direct))
@@ -857,6 +871,19 @@ bool LoadGBAROM(const char* path, const char* sram)
}
}
+bool LoadGBAROM(const u8* romdata, u32 filelength, const char *filename, const char *sram)
+{
+ if (GBACart::LoadROM(romdata, filelength, sram))
+ {
+ return true;
+ }
+ else
+ {
+ printf("Failed to load ROM %s from archive\n", filename);
+ return false;
+ }
+}
+
void LoadBIOS()
{
Reset();