all repos — mgba @ 28268a601bcd1fcc71389c1b8a278dd69bcefd9f

mGBA Game Boy Advance Emulator

Core: Add patch loading stub
Jeffrey Pfau jeffrey@endrift.com
Wed, 03 Feb 2016 21:33:50 -0800
commit

28268a601bcd1fcc71389c1b8a278dd69bcefd9f

parent

dd4b974a0c46b041fa7d4cea88f06af8f7f798a6

2 files changed, 12 insertions(+), 0 deletions(-)

jump to
M src/core/core.hsrc/core/core.h

@@ -48,6 +48,8 @@

bool (*loadBIOS)(struct mCore*, struct VFile* vf, int biosID); bool (*selectBIOS)(struct mCore*, int biosID); + bool (*loadPatch)(struct mCore*, struct VFile* vf); + void (*reset)(struct mCore*); void (*runFrame)(struct mCore*); void (*runLoop)(struct mCore*);

@@ -66,5 +68,6 @@ };

bool mCoreLoadFile(struct mCore* core, const char* path); bool mCoreAutoloadSave(struct mCore* core); +bool mCoreAutoloadPatch(struct mCore* core); #endif
M src/gb/core.csrc/gb/core.c

@@ -80,6 +80,14 @@ static bool _GBCoreLoadSave(struct mCore* core, struct VFile* vf) {

return GBLoadSave(core->board, vf); } +static bool _GBCoreLoadPatch(struct mCore* core, struct VFile* vf) { + // TODO + UNUSED(core); + UNUSED(vf); + mLOG(GB, STUB, "Patches are not yet supported"); + return false; +} + static void _GBCoreUnloadROM(struct mCore* core) { return GBUnloadROM(core->board); }

@@ -153,6 +161,7 @@ core->setVideoBuffer = _GBCoreSetVideoBuffer;

core->isROM = GBIsROM; core->loadROM = _GBCoreLoadROM; core->loadSave = _GBCoreLoadSave; + core->loadPatch = _GBCoreLoadPatch; core->unloadROM = _GBCoreUnloadROM; core->reset = _GBCoreReset; core->runFrame = _GBCoreRunFrame;