mirror of
https://github.com/melonDS-emu/melonDS.git
synced 2025-07-21 21:31:00 -06:00
Custom path support (#1333)
also including: * getting rid of shitty strings * all new, cleaner ROM handling code * base for DSi savestates * GBA slot addons (for now, memory cart)
This commit is contained in:
31
src/NDS.h
31
src/NDS.h
@ -19,6 +19,8 @@
|
||||
#ifndef NDS_H
|
||||
#define NDS_H
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "Savestate.h"
|
||||
#include "types.h"
|
||||
|
||||
@ -48,8 +50,6 @@ enum
|
||||
Event_DSi_NWifi,
|
||||
Event_DSi_CamIRQ,
|
||||
Event_DSi_CamTransfer,
|
||||
|
||||
Event_DSi_RAMSizeChange,
|
||||
Event_DSi_DSP,
|
||||
|
||||
Event_MAX
|
||||
@ -162,6 +162,12 @@ struct MemRegion
|
||||
u32 Mask;
|
||||
};
|
||||
|
||||
// supported GBA slot addon types
|
||||
enum
|
||||
{
|
||||
GBAAddon_RAMExpansion = 1,
|
||||
};
|
||||
|
||||
#ifdef JIT_ENABLED
|
||||
extern bool EnableJIT;
|
||||
#endif
|
||||
@ -219,6 +225,7 @@ extern u8* ARM7WRAM;
|
||||
bool Init();
|
||||
void DeInit();
|
||||
void Reset();
|
||||
void Start();
|
||||
void Stop();
|
||||
|
||||
bool DoSavestate(Savestate* file);
|
||||
@ -229,13 +236,19 @@ void SetARM7RegionTimings(u32 addrstart, u32 addrend, u32 region, int buswidth,
|
||||
// 0=DS 1=DSi
|
||||
void SetConsoleType(int type);
|
||||
|
||||
bool LoadROM(const char* path, const char* sram, bool direct);
|
||||
bool LoadROM(const u8* romdata, u32 filelength, const char *sram, bool direct);
|
||||
bool LoadGBAROM(const char* path, const char* sram);
|
||||
bool LoadGBAROM(const u8* romdata, u32 filelength, const char *filename, const char *sram);
|
||||
void LoadBIOS();
|
||||
void SetupDirectBoot();
|
||||
void RelocateSave(const char* path, bool write);
|
||||
|
||||
bool LoadCart(const u8* romdata, u32 romlen, const u8* savedata, u32 savelen);
|
||||
void LoadSave(const u8* savedata, u32 savelen);
|
||||
void EjectCart();
|
||||
bool CartInserted();
|
||||
|
||||
bool NeedsDirectBoot();
|
||||
void SetupDirectBoot(std::string romname);
|
||||
|
||||
bool LoadGBACart(const u8* romdata, u32 romlen, const u8* savedata, u32 savelen);
|
||||
void LoadGBAAddon(int type);
|
||||
void EjectGBACart();
|
||||
|
||||
u32 RunFrame();
|
||||
|
||||
@ -249,8 +262,6 @@ void SetLidClosed(bool closed);
|
||||
|
||||
void MicInputFrame(s16* data, int samples);
|
||||
|
||||
int ImportSRAM(u8* data, u32 length);
|
||||
|
||||
void ScheduleEvent(u32 id, bool periodic, s32 delay, void (*func)(u32), u32 param);
|
||||
void CancelEvent(u32 id);
|
||||
|
||||
|
Reference in New Issue
Block a user