mirror of
https://github.com/melonDS-emu/melonDS.git
synced 2025-07-23 06:10:03 -06:00
Properly init/deinit the GBA slot
This commit is contained in:
17
src/NDS.cpp
17
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);
|
||||
|
Reference in New Issue
Block a user