all repos — mgba @ 0c5ce511fb7f6c7f8da27638752dd574e413d8ed

mGBA Game Boy Advance Emulator

DS: Fix build
Jeffrey Pfau jeffrey@endrift.com
Sun, 25 Dec 2016 23:48:13 -0800
commit

0c5ce511fb7f6c7f8da27638752dd574e413d8ed

parent

6049c1b34025bf285d11dd799d22510836b35ea8

2 files changed, 25 insertions(+), 17 deletions(-)

jump to
M CMakeLists.txtCMakeLists.txt

@@ -605,9 +605,11 @@ if(M_CORE_DS)

add_definitions(-DM_CORE_DS) list(APPEND CORE_SRC ${ARM_SRC} - ${CMAKE_CURRENT_SOURCE_DIR}/src/arm/debugger/debugger.c - ${CMAKE_CURRENT_SOURCE_DIR}/src/arm/debugger/memory-debugger.c ${DS_SRC}) + list(APPEND DEBUGGER_SRC + ${CMAKE_CURRENT_SOURCE_DIR}/src/arm/debugger/cli-debugger.c + ${CMAKE_CURRENT_SOURCE_DIR}/src/arm/debugger/debugger.c + ${CMAKE_CURRENT_SOURCE_DIR}/src/arm/debugger/memory-debugger.c) endif() source_group("Virtual files" FILES ${CORE_VFS_SRC} ${VFS_SRC})
M src/ds/core.csrc/ds/core.c

@@ -86,7 +86,7 @@ free(dscore->cheatDevice);

free(core); } -static enum mPlatform _DSCorePlatform(struct mCore* core) { +static enum mPlatform _DSCorePlatform(const struct mCore* core) { UNUSED(core); return PLATFORM_DS; }

@@ -116,7 +116,10 @@

static void _DSCoreSetVideoBuffer(struct mCore* core, color_t* buffer, size_t stride) { } -static void _DSCoreGetVideoBuffer(struct mCore* core, color_t** buffer, size_t* stride) { +static void _DSCoreGetPixels(struct mCore* core, const void** buffer, size_t* stride) { +} + +static void _DSCorePutPixels(struct mCore* core, const void* buffer, size_t stride) { } static struct blip_t* _DSCoreGetAudioChannel(struct mCore* core, int ch) {

@@ -244,21 +247,21 @@ struct DS* ds = core->board;

return ds->video.frameCounter; } -static int32_t _DSCoreFrameCycles(struct mCore* core) { +static int32_t _DSCoreFrameCycles(const struct mCore* core) { UNUSED(core); return DS_VIDEO_TOTAL_LENGTH; } -static int32_t _DSCoreFrequency(struct mCore* core) { +static int32_t _DSCoreFrequency(const struct mCore* core) { UNUSED(core); return DS_ARM946ES_FREQUENCY; } -static void _DSCoreGetGameTitle(struct mCore* core, char* title) { +static void _DSCoreGetGameTitle(const struct mCore* core, char* title) { DSGetGameTitle(core->board, title); } -static void _DSCoreGetGameCode(struct mCore* core, char* title) { +static void _DSCoreGetGameCode(const struct mCore* core, char* title) { DSGetGameCode(core->board, title); }

@@ -306,25 +309,25 @@ struct ARMCore* cpu = core->cpu;

cpu->memory.store32(cpu, address, value, 0); } -static uint32_t _DSCoreRawRead8(struct mCore* core, uint32_t address) { +static uint32_t _DSCoreRawRead8(struct mCore* core, uint32_t address, int segment) { return 0; } -static uint32_t _DSCoreRawRead16(struct mCore* core, uint32_t address) { +static uint32_t _DSCoreRawRead16(struct mCore* core, uint32_t address, int segment) { return 0; } -static uint32_t _DSCoreRawRead32(struct mCore* core, uint32_t address) { +static uint32_t _DSCoreRawRead32(struct mCore* core, uint32_t address, int segment) { return 0; } -static void _DSCoreRawWrite8(struct mCore* core, uint32_t address, uint8_t value) { +static void _DSCoreRawWrite8(struct mCore* core, uint32_t address, int segment, uint8_t value) { } -static void _DSCoreRawWrite16(struct mCore* core, uint32_t address, uint16_t value) { +static void _DSCoreRawWrite16(struct mCore* core, uint32_t address, int segment, uint16_t value) { } -static void _DSCoreRawWrite32(struct mCore* core, uint32_t address, uint32_t value) { +static void _DSCoreRawWrite32(struct mCore* core, uint32_t address, int segment, uint32_t value) { } static bool _DSCoreSupportsDebuggerType(struct mCore* core, enum mDebuggerType type) {

@@ -381,7 +384,7 @@ static size_t _DSCoreSavedataClone(struct mCore* core, void** sram) {

return 0; } -static bool _DSCoreSavedataLoad(struct mCore* core, const void* sram, size_t size) { +static bool _DSCoreSavedataRestore(struct mCore* core, const void* sram, size_t size, bool writeback) { return false; }

@@ -399,7 +402,8 @@ core->setSync = _DSCoreSetSync;

core->loadConfig = _DSCoreLoadConfig; core->desiredVideoDimensions = _DSCoreDesiredVideoDimensions; core->setVideoBuffer = _DSCoreSetVideoBuffer; - core->getVideoBuffer = _DSCoreGetVideoBuffer; + core->getPixels = _DSCoreGetPixels; + core->putPixels = _DSCorePutPixels; core->getAudioChannel = _DSCoreGetAudioChannel; core->setAudioBufferSize = _DSCoreSetAudioBufferSize; core->getAudioBufferSize = _DSCoreGetAudioBufferSize;

@@ -440,13 +444,15 @@ core->rawRead32 = _DSCoreRawRead32;

core->rawWrite8 = _DSCoreRawWrite8; core->rawWrite16 = _DSCoreRawWrite16; core->rawWrite32 = _DSCoreRawWrite32; +#ifdef USE_DEBUGGERS core->supportsDebuggerType = _DSCoreSupportsDebuggerType; core->debuggerPlatform = _DSCoreDebuggerPlatform; core->cliDebuggerSystem = _DSCoreCliDebuggerSystem; core->attachDebugger = _DSCoreAttachDebugger; core->detachDebugger = _DSCoreDetachDebugger; +#endif core->cheatDevice = _DSCoreCheatDevice; core->savedataClone = _DSCoreSavedataClone; - core->savedataLoad = _DSCoreSavedataLoad; + core->savedataRestore = _DSCoreSavedataRestore; return core; }