mgba/src/gb/core.c

534 lines
16 KiB
C
Raw Normal View History

2016-01-27 09:05:12 +00:00
/* Copyright (c) 2013-2016 Jeffrey Pfau
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "core.h"
#include "core/core.h"
2016-05-08 08:34:51 +00:00
#include "gb/cheats.h"
2016-04-26 05:34:14 +00:00
#include "gb/cli.h"
2016-01-27 09:05:12 +00:00
#include "gb/gb.h"
2016-09-06 18:15:27 +00:00
#include "gb/mbc.h"
2016-09-09 23:29:52 +00:00
#include "gb/overrides.h"
2016-01-27 09:05:12 +00:00
#include "gb/renderers/software.h"
2016-05-30 22:03:20 +00:00
#include "gb/serialize.h"
2016-05-08 07:52:15 +00:00
#include "lr35902/debugger/debugger.h"
2016-09-09 23:29:52 +00:00
#include "util/crc32.h"
2016-01-27 09:05:12 +00:00
#include "util/memory.h"
2016-02-06 10:30:58 +00:00
#include "util/patch.h"
2016-05-20 05:31:13 +00:00
#include "util/vfs.h"
2016-01-27 09:05:12 +00:00
struct GBCore {
struct mCore d;
struct GBVideoSoftwareRenderer renderer;
uint8_t keys;
2016-04-26 05:34:14 +00:00
struct mCPUComponent* components[CPU_COMPONENT_MAX];
2016-09-09 23:29:52 +00:00
const struct Configuration* overrides;
2016-04-26 05:34:14 +00:00
struct mDebuggerPlatform* debuggerPlatform;
2016-05-08 08:34:51 +00:00
struct mCheatDevice* cheatDevice;
2016-01-27 09:05:12 +00:00
};
static bool _GBCoreInit(struct mCore* core) {
struct GBCore* gbcore = (struct GBCore*) core;
struct LR35902Core* cpu = anonymousMemoryMap(sizeof(struct LR35902Core));
struct GB* gb = anonymousMemoryMap(sizeof(struct GB));
if (!cpu || !gb) {
free(cpu);
free(gb);
return false;
}
core->cpu = cpu;
core->board = gb;
2016-09-09 23:29:52 +00:00
gbcore->overrides = NULL;
2016-04-26 05:34:14 +00:00
gbcore->debuggerPlatform = NULL;
2016-05-08 08:34:51 +00:00
gbcore->cheatDevice = NULL;
2016-01-27 09:05:12 +00:00
GBCreate(gb);
2016-04-26 05:34:14 +00:00
memset(gbcore->components, 0, sizeof(gbcore->components));
LR35902SetComponents(cpu, &gb->d, CPU_COMPONENT_MAX, gbcore->components);
2016-01-27 09:05:12 +00:00
LR35902Init(cpu);
GBVideoSoftwareRendererCreate(&gbcore->renderer);
2016-05-29 19:33:40 +00:00
gbcore->renderer.outputBuffer = NULL;
2016-01-27 09:05:12 +00:00
2016-02-14 19:30:49 +00:00
gbcore->keys = 0;
2016-01-27 09:05:12 +00:00
gb->keySource = &gbcore->keys;
2016-02-04 04:56:08 +00:00
#if !defined(MINIMAL_CORE) || MINIMAL_CORE < 2
mDirectorySetInit(&core->dirs);
#endif
2016-01-27 09:05:12 +00:00
return true;
}
static void _GBCoreDeinit(struct mCore* core) {
LR35902Deinit(core->cpu);
GBDestroy(core->board);
mappedMemoryFree(core->cpu, sizeof(struct LR35902Core));
mappedMemoryFree(core->board, sizeof(struct GB));
2016-02-04 04:56:08 +00:00
#if !defined(MINIMAL_CORE) || MINIMAL_CORE < 2
mDirectorySetDeinit(&core->dirs);
#endif
2016-05-08 08:34:51 +00:00
struct GBCore* gbcore = (struct GBCore*) core;
free(gbcore->debuggerPlatform);
if (gbcore->cheatDevice) {
mCheatDeviceDestroy(gbcore->cheatDevice);
}
free(gbcore->cheatDevice);
2016-09-07 18:04:31 +00:00
mCoreConfigFreeOpts(&core->opts);
free(core);
2016-01-27 09:05:12 +00:00
}
2016-02-10 06:03:31 +00:00
static enum mPlatform _GBCorePlatform(struct mCore* core) {
UNUSED(core);
return PLATFORM_GB;
}
2016-02-04 04:03:04 +00:00
static void _GBCoreSetSync(struct mCore* core, struct mCoreSync* sync) {
struct GB* gb = core->board;
gb->sync = sync;
}
2016-02-08 04:07:08 +00:00
static void _GBCoreLoadConfig(struct mCore* core, const struct mCoreConfig* config) {
UNUSED(config);
2016-02-10 07:29:25 +00:00
struct GB* gb = core->board;
2016-02-21 16:50:21 +00:00
if (core->opts.mute) {
gb->audio.masterVolume = 0;
} else {
gb->audio.masterVolume = core->opts.volume;
}
2016-02-15 01:37:53 +00:00
gb->video.frameskip = core->opts.frameskip;
2016-05-20 05:31:13 +00:00
#if !defined(MINIMAL_CORE) || MINIMAL_CORE < 2
struct VFile* bios = 0;
if (core->opts.useBios && core->opts.bios) {
bios = VFileOpen(core->opts.bios, O_RDONLY);
}
if (bios) {
GBLoadBIOS(gb, bios);
}
2016-09-09 23:29:52 +00:00
struct GBCore* gbcore = (struct GBCore*) core;
gbcore->overrides = mCoreConfigGetOverridesConst(config);
2016-05-20 05:31:13 +00:00
#endif
2016-02-05 05:58:45 +00:00
}
2016-01-27 09:05:12 +00:00
static void _GBCoreDesiredVideoDimensions(struct mCore* core, unsigned* width, unsigned* height) {
UNUSED(core);
*width = GB_VIDEO_HORIZONTAL_PIXELS;
*height = GB_VIDEO_VERTICAL_PIXELS;
}
2016-02-01 04:22:18 +00:00
static void _GBCoreSetVideoBuffer(struct mCore* core, color_t* buffer, size_t stride) {
2016-01-27 09:05:12 +00:00
struct GBCore* gbcore = (struct GBCore*) core;
gbcore->renderer.outputBuffer = buffer;
gbcore->renderer.outputBufferStride = stride;
}
2016-02-07 23:29:02 +00:00
static void _GBCoreGetVideoBuffer(struct mCore* core, color_t** buffer, size_t* stride) {
struct GBCore* gbcore = (struct GBCore*) core;
*buffer = gbcore->renderer.outputBuffer;
*stride = gbcore->renderer.outputBufferStride;
}
2016-02-04 08:49:45 +00:00
static struct blip_t* _GBCoreGetAudioChannel(struct mCore* core, int ch) {
struct GB* gb = core->board;
switch (ch) {
case 0:
return gb->audio.left;
case 1:
return gb->audio.right;
default:
return NULL;
}
}
2016-02-09 05:21:17 +00:00
static void _GBCoreSetAudioBufferSize(struct mCore* core, size_t samples) {
struct GB* gb = core->board;
GBAudioResizeBuffer(&gb->audio, samples);
}
2016-02-10 04:20:14 +00:00
static size_t _GBCoreGetAudioBufferSize(struct mCore* core) {
struct GB* gb = core->board;
return gb->audio.samples;
}
2016-02-08 06:41:10 +00:00
static void _GBCoreSetAVStream(struct mCore* core, struct mAVStream* stream) {
2016-02-15 06:50:08 +00:00
struct GB* gb = core->board;
gb->stream = stream;
2016-02-16 06:19:15 +00:00
if (stream && stream->videoDimensionsChanged) {
stream->videoDimensionsChanged(stream, GB_VIDEO_HORIZONTAL_PIXELS, GB_VIDEO_VERTICAL_PIXELS);
}
2016-02-08 06:41:10 +00:00
}
2016-02-04 04:56:08 +00:00
static bool _GBCoreLoadROM(struct mCore* core, struct VFile* vf) {
return GBLoadROM(core->board, vf);
2016-01-27 09:05:12 +00:00
}
2016-02-09 04:46:23 +00:00
static bool _GBCoreLoadBIOS(struct mCore* core, struct VFile* vf, int type) {
UNUSED(type);
2016-05-20 05:31:13 +00:00
GBLoadBIOS(core->board, vf);
return true;
2016-02-09 04:46:23 +00:00
}
2016-02-04 04:56:08 +00:00
static bool _GBCoreLoadSave(struct mCore* core, struct VFile* vf) {
return GBLoadSave(core->board, vf);
2016-01-27 09:05:12 +00:00
}
2016-08-28 08:45:04 +00:00
static bool _GBCoreLoadTemporarySave(struct mCore* core, struct VFile* vf) {
struct GB* gb = core->board;
GBSavedataMask(gb, vf);
return true; // TODO: Return a real value
}
2016-02-04 05:33:50 +00:00
static bool _GBCoreLoadPatch(struct mCore* core, struct VFile* vf) {
2016-02-06 10:30:58 +00:00
if (!vf) {
return false;
}
struct Patch patch;
if (!loadPatch(vf, &patch)) {
return false;
}
GBApplyPatch(core->board, &patch);
return true;
2016-02-04 05:33:50 +00:00
}
2016-01-27 09:05:12 +00:00
static void _GBCoreUnloadROM(struct mCore* core) {
return GBUnloadROM(core->board);
}
static void _GBCoreReset(struct mCore* core) {
struct GBCore* gbcore = (struct GBCore*) core;
struct GB* gb = (struct GB*) core->board;
2016-02-15 03:02:45 +00:00
if (gbcore->renderer.outputBuffer) {
GBVideoAssociateRenderer(&gb->video, &gbcore->renderer.d);
}
2016-09-09 23:29:52 +00:00
struct GBCartridgeOverride override;
const struct GBCartridge* cart = (const struct GBCartridge*) &gb->memory.rom[0x100];
if (cart) {
override.headerCrc32 = doCrc32(cart, sizeof(*cart));
if (GBOverrideFind(gbcore->overrides, &override)) {
GBOverrideApply(gb, &override);
}
}
2016-01-27 09:05:12 +00:00
LR35902Reset(core->cpu);
}
static void _GBCoreRunFrame(struct mCore* core) {
struct GB* gb = core->board;
int32_t frameCounter = gb->video.frameCounter;
while (gb->video.frameCounter == frameCounter) {
LR35902Run(core->cpu);
}
}
static void _GBCoreRunLoop(struct mCore* core) {
LR35902Run(core->cpu);
}
static void _GBCoreStep(struct mCore* core) {
struct LR35902Core* cpu = core->cpu;
do {
LR35902Tick(cpu);
} while (cpu->executionState != LR35902_CORE_FETCH);
2016-01-27 09:05:12 +00:00
}
2016-05-30 22:03:20 +00:00
static size_t _GBCoreStateSize(struct mCore* core) {
2016-02-04 10:31:50 +00:00
UNUSED(core);
2016-05-30 22:03:20 +00:00
return sizeof(struct GBSerializedState);
2016-02-04 10:31:50 +00:00
}
2016-05-30 22:03:20 +00:00
static bool _GBCoreLoadState(struct mCore* core, const void* state) {
return GBDeserialize(core->board, state);
}
static bool _GBCoreSaveState(struct mCore* core, void* state) {
struct LR35902Core* cpu = core->cpu;
while (cpu->executionState != LR35902_CORE_FETCH) {
LR35902Tick(cpu);
}
2016-05-31 06:06:32 +00:00
GBSerialize(core->board, state);
return true;
2016-02-04 10:31:50 +00:00
}
2016-01-27 09:05:12 +00:00
static void _GBCoreSetKeys(struct mCore* core, uint32_t keys) {
struct GBCore* gbcore = (struct GBCore*) core;
gbcore->keys = keys;
}
static void _GBCoreAddKeys(struct mCore* core, uint32_t keys) {
struct GBCore* gbcore = (struct GBCore*) core;
gbcore->keys |= keys;
}
static void _GBCoreClearKeys(struct mCore* core, uint32_t keys) {
struct GBCore* gbcore = (struct GBCore*) core;
gbcore->keys &= ~keys;
}
2016-01-30 07:00:49 +00:00
static int32_t _GBCoreFrameCounter(struct mCore* core) {
struct GB* gb = core->board;
return gb->video.frameCounter;
}
static int32_t _GBCoreFrameCycles(struct mCore* core) {
UNUSED(core);
return GB_VIDEO_TOTAL_LENGTH;
}
static int32_t _GBCoreFrequency(struct mCore* core) {
UNUSED(core);
// TODO: GB differences
return DMG_LR35902_FREQUENCY;
}
2016-02-08 05:50:29 +00:00
static void _GBCoreGetGameTitle(struct mCore* core, char* title) {
GBGetGameTitle(core->board, title);
}
2016-02-17 06:18:09 +00:00
static void _GBCoreGetGameCode(struct mCore* core, char* title) {
GBGetGameCode(core->board, title);
}
2016-01-30 07:49:25 +00:00
static void _GBCoreSetRTC(struct mCore* core, struct mRTCSource* rtc) {
struct GB* gb = core->board;
gb->memory.rtc = rtc;
}
2016-02-19 05:54:06 +00:00
static void _GBCoreSetRotation(struct mCore* core, struct mRotationSource* rotation) {
struct GB* gb = core->board;
gb->memory.rotation = rotation;
}
2016-02-21 02:46:39 +00:00
static void _GBCoreSetRumble(struct mCore* core, struct mRumble* rumble) {
struct GB* gb = core->board;
gb->memory.rumble = rumble;
}
static uint32_t _GBCoreBusRead8(struct mCore* core, uint32_t address) {
struct LR35902Core* cpu = core->cpu;
return cpu->memory.load8(cpu, address);
}
static uint32_t _GBCoreBusRead16(struct mCore* core, uint32_t address) {
struct LR35902Core* cpu = core->cpu;
return cpu->memory.load8(cpu, address) | (cpu->memory.load8(cpu, address + 1) << 8);
}
static uint32_t _GBCoreBusRead32(struct mCore* core, uint32_t address) {
struct LR35902Core* cpu = core->cpu;
return cpu->memory.load8(cpu, address) | (cpu->memory.load8(cpu, address + 1) << 8) |
(cpu->memory.load8(cpu, address + 2) << 16) | (cpu->memory.load8(cpu, address + 3) << 24);
}
static void _GBCoreBusWrite8(struct mCore* core, uint32_t address, uint8_t value) {
struct LR35902Core* cpu = core->cpu;
cpu->memory.store8(cpu, address, value);
}
static void _GBCoreBusWrite16(struct mCore* core, uint32_t address, uint16_t value) {
struct LR35902Core* cpu = core->cpu;
cpu->memory.store8(cpu, address, value);
cpu->memory.store8(cpu, address + 1, value >> 8);
}
static void _GBCoreBusWrite32(struct mCore* core, uint32_t address, uint32_t value) {
struct LR35902Core* cpu = core->cpu;
cpu->memory.store8(cpu, address, value);
cpu->memory.store8(cpu, address + 1, value >> 8);
cpu->memory.store8(cpu, address + 2, value >> 16);
cpu->memory.store8(cpu, address + 3, value >> 24);
}
static uint32_t _GBCoreRawRead8(struct mCore* core, uint32_t address, int segment) {
struct LR35902Core* cpu = core->cpu;
return GBView8(cpu, address, segment);
}
static uint32_t _GBCoreRawRead16(struct mCore* core, uint32_t address, int segment) {
struct LR35902Core* cpu = core->cpu;
return GBView8(cpu, address, segment) | (GBView8(cpu, address + 1, segment) << 8);
}
static uint32_t _GBCoreRawRead32(struct mCore* core, uint32_t address, int segment) {
struct LR35902Core* cpu = core->cpu;
return GBView8(cpu, address, segment) | (GBView8(cpu, address + 1, segment) << 8) |
(GBView8(cpu, address + 2, segment) << 16) | (GBView8(cpu, address + 3, segment) << 24);
}
static void _GBCoreRawWrite8(struct mCore* core, uint32_t address, int segment, uint8_t value) {
2016-05-09 05:44:56 +00:00
struct LR35902Core* cpu = core->cpu;
GBPatch8(cpu, address, value, NULL);
}
static void _GBCoreRawWrite16(struct mCore* core, uint32_t address, int segment, uint16_t value) {
2016-05-09 05:44:56 +00:00
struct LR35902Core* cpu = core->cpu;
GBPatch8(cpu, address, value, NULL);
GBPatch8(cpu, address + 1, value >> 8, NULL);
}
static void _GBCoreRawWrite32(struct mCore* core, uint32_t address, int segment, uint32_t value) {
2016-05-09 05:44:56 +00:00
struct LR35902Core* cpu = core->cpu;
GBPatch8(cpu, address, value, NULL);
GBPatch8(cpu, address + 1, value >> 8, NULL);
GBPatch8(cpu, address + 2, value >> 16, NULL);
GBPatch8(cpu, address + 3, value >> 24, NULL);
}
static bool _GBCoreSupportsDebuggerType(struct mCore* core, enum mDebuggerType type) {
2016-04-26 05:34:14 +00:00
UNUSED(core);
switch (type) {
#ifdef USE_CLI_DEBUGGER
case DEBUGGER_CLI:
return true;
#endif
default:
return false;
}
}
static struct mDebuggerPlatform* _GBCoreDebuggerPlatform(struct mCore* core) {
2016-04-26 05:34:14 +00:00
struct GBCore* gbcore = (struct GBCore*) core;
if (!gbcore->debuggerPlatform) {
gbcore->debuggerPlatform = LR35902DebuggerPlatformCreate();
}
return gbcore->debuggerPlatform;
}
static struct CLIDebuggerSystem* _GBCoreCliDebuggerSystem(struct mCore* core) {
#ifdef USE_CLI_DEBUGGER
return GBCLIDebuggerCreate(core);
#else
UNUSED(core);
return NULL;
#endif
}
static void _GBCoreAttachDebugger(struct mCore* core, struct mDebugger* debugger) {
struct LR35902Core* cpu = core->cpu;
if (core->debugger) {
LR35902HotplugDetach(cpu, CPU_COMPONENT_DEBUGGER);
}
cpu->components[CPU_COMPONENT_DEBUGGER] = &debugger->d;
LR35902HotplugAttach(cpu, CPU_COMPONENT_DEBUGGER);
core->debugger = debugger;
}
static void _GBCoreDetachDebugger(struct mCore* core) {
struct LR35902Core* cpu = core->cpu;
LR35902HotplugDetach(cpu, CPU_COMPONENT_DEBUGGER);
cpu->components[CPU_COMPONENT_DEBUGGER] = NULL;
core->debugger = NULL;
}
2016-05-08 08:34:51 +00:00
static struct mCheatDevice* _GBCoreCheatDevice(struct mCore* core) {
struct GBCore* gbcore = (struct GBCore*) core;
if (!gbcore->cheatDevice) {
gbcore->cheatDevice = GBCheatDeviceCreate();
((struct LR35902Core*) core->cpu)->components[CPU_COMPONENT_CHEAT_DEVICE] = &gbcore->cheatDevice->d;
LR35902HotplugAttach(core->cpu, CPU_COMPONENT_CHEAT_DEVICE);
gbcore->cheatDevice->p = core;
}
return gbcore->cheatDevice;
}
2016-05-31 06:16:00 +00:00
static size_t _GBCoreSavedataClone(struct mCore* core, void** sram) {
struct GB* gb = core->board;
struct VFile* vf = gb->sramVf;
if (vf) {
*sram = malloc(vf->size(vf));
vf->seek(vf, 0, SEEK_SET);
return vf->read(vf, *sram, vf->size(vf));
}
2016-09-06 18:15:27 +00:00
*sram = malloc(gb->sramSize);
memcpy(*sram, gb->memory.sram, gb->sramSize);
return gb->sramSize;
2016-05-31 06:16:00 +00:00
}
static bool _GBCoreSavedataLoad(struct mCore* core, const void* sram, size_t size) {
struct GB* gb = core->board;
struct VFile* vf = gb->sramVf;
if (vf) {
vf->seek(vf, 0, SEEK_SET);
return vf->write(vf, sram, size) > 0;
}
if (size > 0x20000) {
size = 0x20000;
}
2016-09-06 18:15:27 +00:00
GBResizeSram(gb, size);
memcpy(gb->memory.sram, sram, size);
2016-05-31 06:16:00 +00:00
return true;
}
2016-01-27 09:05:12 +00:00
struct mCore* GBCoreCreate(void) {
struct GBCore* gbcore = malloc(sizeof(*gbcore));
struct mCore* core = &gbcore->d;
memset(&core->opts, 0, sizeof(core->opts));
core->cpu = NULL;
core->board = NULL;
core->debugger = NULL;
2016-01-27 09:05:12 +00:00
core->init = _GBCoreInit;
core->deinit = _GBCoreDeinit;
2016-02-10 06:03:31 +00:00
core->platform = _GBCorePlatform;
2016-02-04 04:03:04 +00:00
core->setSync = _GBCoreSetSync;
2016-02-05 05:58:45 +00:00
core->loadConfig = _GBCoreLoadConfig;
2016-01-27 09:05:12 +00:00
core->desiredVideoDimensions = _GBCoreDesiredVideoDimensions;
core->setVideoBuffer = _GBCoreSetVideoBuffer;
2016-02-07 23:29:02 +00:00
core->getVideoBuffer = _GBCoreGetVideoBuffer;
2016-02-04 08:49:45 +00:00
core->getAudioChannel = _GBCoreGetAudioChannel;
2016-02-09 05:21:17 +00:00
core->setAudioBufferSize = _GBCoreSetAudioBufferSize;
2016-02-10 04:20:14 +00:00
core->getAudioBufferSize = _GBCoreGetAudioBufferSize;
2016-02-08 06:41:10 +00:00
core->setAVStream = _GBCoreSetAVStream;
2016-02-04 04:56:08 +00:00
core->isROM = GBIsROM;
2016-01-27 09:05:12 +00:00
core->loadROM = _GBCoreLoadROM;
2016-02-09 04:46:23 +00:00
core->loadBIOS = _GBCoreLoadBIOS;
2016-02-04 04:56:08 +00:00
core->loadSave = _GBCoreLoadSave;
2016-08-28 08:45:04 +00:00
core->loadTemporarySave = _GBCoreLoadTemporarySave;
2016-02-04 05:33:50 +00:00
core->loadPatch = _GBCoreLoadPatch;
2016-01-27 09:05:12 +00:00
core->unloadROM = _GBCoreUnloadROM;
core->reset = _GBCoreReset;
core->runFrame = _GBCoreRunFrame;
core->runLoop = _GBCoreRunLoop;
core->step = _GBCoreStep;
2016-05-30 22:03:20 +00:00
core->stateSize = _GBCoreStateSize;
2016-02-04 10:31:50 +00:00
core->loadState = _GBCoreLoadState;
core->saveState = _GBCoreSaveState;
2016-01-27 09:05:12 +00:00
core->setKeys = _GBCoreSetKeys;
core->addKeys = _GBCoreAddKeys;
core->clearKeys = _GBCoreClearKeys;
2016-01-30 07:00:49 +00:00
core->frameCounter = _GBCoreFrameCounter;
core->frameCycles = _GBCoreFrameCycles;
core->frequency = _GBCoreFrequency;
2016-02-08 05:50:29 +00:00
core->getGameTitle = _GBCoreGetGameTitle;
2016-02-17 06:18:09 +00:00
core->getGameCode = _GBCoreGetGameCode;
2016-01-30 07:49:25 +00:00
core->setRTC = _GBCoreSetRTC;
2016-02-19 05:54:06 +00:00
core->setRotation = _GBCoreSetRotation;
2016-02-21 02:46:39 +00:00
core->setRumble = _GBCoreSetRumble;
core->busRead8 = _GBCoreBusRead8;
core->busRead16 = _GBCoreBusRead16;
core->busRead32 = _GBCoreBusRead32;
core->busWrite8 = _GBCoreBusWrite8;
core->busWrite16 = _GBCoreBusWrite16;
core->busWrite32 = _GBCoreBusWrite32;
core->rawRead8 = _GBCoreRawRead8;
core->rawRead16 = _GBCoreRawRead16;
core->rawRead32 = _GBCoreRawRead32;
2016-05-09 05:44:56 +00:00
core->rawWrite8 = _GBCoreRawWrite8;
core->rawWrite16 = _GBCoreRawWrite16;
core->rawWrite32 = _GBCoreRawWrite32;
core->supportsDebuggerType = _GBCoreSupportsDebuggerType;
core->debuggerPlatform = _GBCoreDebuggerPlatform;
2016-04-26 05:34:14 +00:00
core->cliDebuggerSystem = _GBCoreCliDebuggerSystem;
core->attachDebugger = _GBCoreAttachDebugger;
core->detachDebugger = _GBCoreDetachDebugger;
2016-05-08 08:34:51 +00:00
core->cheatDevice = _GBCoreCheatDevice;
2016-05-31 06:16:00 +00:00
core->savedataClone = _GBCoreSavedataClone;
core->savedataLoad = _GBCoreSavedataLoad;
2016-01-27 09:05:12 +00:00
return core;
}