3DS: Remove fancy memory mapping

This commit is contained in:
Vicki Pfau 2023-12-24 20:43:22 -08:00
parent 2e3ad7ed16
commit e01fc0f2b7
3 changed files with 6 additions and 22 deletions

View File

@ -1,17 +0,0 @@
/* Copyright (c) 2013-2014 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 <mgba-util/memory.h>
#include <3ds.h>
void* anonymousMemoryMap(size_t size) {
return linearAlloc(size);
}
void mappedMemoryFree(void* memory, size_t size) {
UNUSED(size);
linearFree(memory);
}

View File

@ -19,8 +19,12 @@ if(${CMAKE_BUILD_TYPE} STREQUAL Debug OR ${CMAKE_BUILD_TYPE} STREQUAL RelWithDeb
else()
list(APPEND OS_LIB citro3d ctru)
endif()
file(GLOB OS_SRC ${CMAKE_CURRENT_SOURCE_DIR}/3ds-*.c ${CMAKE_CURRENT_SOURCE_DIR}/ctru-heap.c ${CMAKE_CURRENT_SOURCE_DIR}/socket.c)
set(OS_SRC ${OS_SRC} PARENT_SCOPE)
set(OS_SRC
${PROJECT_SOURCE_DIR}/src/util/memory.c
${CMAKE_CURRENT_SOURCE_DIR}/3ds-vfs.c
${CMAKE_CURRENT_SOURCE_DIR}/ctru-heap.c
${CMAKE_CURRENT_SOURCE_DIR}/socket.c
PARENT_SCOPE)
set(OS_LIB ${OS_LIB} PARENT_SCOPE)
source_group("3DS-specific code" FILES ${OS_SRC})

View File

@ -7,9 +7,6 @@
#include <mgba-util/common.h>
u32 __ctru_heap_size = 0x02400000;
u32 __ctru_linear_heap_size = 0x01400000;
uint32_t* romBuffer = NULL;
size_t romBufferSize;