all repos — mgba @ dcfc31f82d19990131d28f38077aea350290fa25

mGBA Game Boy Advance Emulator

PSP2: Increase clock rate, if possible
Jeffrey Pfau jeffrey@endrift.com
Sat, 29 Aug 2015 21:08:13 -0700
commit

dcfc31f82d19990131d28f38077aea350290fa25

parent

a74a0396bf1f50ae265abf7c25101581bef5c5b7

2 files changed, 5 insertions(+), 1 deletions(-)

jump to
M src/platform/psp2/CMakeLists.txtsrc/platform/psp2/CMakeLists.txt

@@ -2,7 +2,7 @@ file(GLOB PLATFORM_SRC ${CMAKE_SOURCE_DIR}/src/platform/psp2/*.c)

execute_process(COMMAND ${OBJCOPY} -I binary -O elf32-littlearm -B arm font.png ${CMAKE_BINARY_DIR}/font.o WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/res) -set(PLATFORM_LIBRARY -lvita2d -lSceCtrl_stub -lSceRtc_stub -lSceGxm_stub -lSceDisplay_stub -lSceAudio_stub -lSceMotion_stub -lpng -lz -l${M_LIBRARY}) +set(PLATFORM_LIBRARY -lvita2d -lSceCtrl_stub -lSceRtc_stub -lSceGxm_stub -lSceDisplay_stub -lSceAudio_stub -lSceMotion_stub -lScePower_stub -lpng -lz -l${M_LIBRARY}) add_executable(${BINARY_NAME}.elf ${PLATFORM_SRC} ${GUI_SRC} ${CMAKE_BINARY_DIR}/font.o) target_link_libraries(${BINARY_NAME}.elf ${BINARY_NAME} ${PLATFORM_LIBRARY})
M src/platform/psp2/psp2-context.csrc/platform/psp2/psp2-context.c

@@ -24,6 +24,7 @@ #include <psp2/display.h>

#include <psp2/gxm.h> #include <psp2/kernel/sysmem.h> #include <psp2/motion.h> +#include <psp2/power.h> #include <vita2d.h>

@@ -103,6 +104,7 @@ return rotation->state.gyro.z * 0x10000000;

} void GBAPSP2Setup() { + scePowerSetArmClockFrequency(80); GBAContextInit(&context, 0); struct GBAOptions opts = { .useBios = true,

@@ -143,6 +145,7 @@ printf("%s starting", projectName);

} bool GBAPSP2LoadROM(const char* path) { + scePowerSetArmClockFrequency(444); if (!GBAContextLoadROM(&context, path, true)) { printf("%s failed to load!", path); return false;

@@ -238,6 +241,7 @@ sceMotionStopSampling();

} GBAContextStop(&context); + scePowerSetArmClockFrequency(80); } void GBAPSP2Teardown(void) {