mirror of https://github.com/mgba-emu/mgba.git
PSP2: Increase clock rate, if possible
This commit is contained in:
parent
a74a0396bf
commit
dcfc31f82d
|
@ -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)
|
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)
|
add_executable(${BINARY_NAME}.elf ${PLATFORM_SRC} ${GUI_SRC} ${CMAKE_BINARY_DIR}/font.o)
|
||||||
target_link_libraries(${BINARY_NAME}.elf ${BINARY_NAME} ${PLATFORM_LIBRARY})
|
target_link_libraries(${BINARY_NAME}.elf ${BINARY_NAME} ${PLATFORM_LIBRARY})
|
||||||
|
|
|
@ -24,6 +24,7 @@
|
||||||
#include <psp2/gxm.h>
|
#include <psp2/gxm.h>
|
||||||
#include <psp2/kernel/sysmem.h>
|
#include <psp2/kernel/sysmem.h>
|
||||||
#include <psp2/motion.h>
|
#include <psp2/motion.h>
|
||||||
|
#include <psp2/power.h>
|
||||||
|
|
||||||
#include <vita2d.h>
|
#include <vita2d.h>
|
||||||
|
|
||||||
|
@ -103,6 +104,7 @@ static int32_t _readGyroZ(struct GBARotationSource* source) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void GBAPSP2Setup() {
|
void GBAPSP2Setup() {
|
||||||
|
scePowerSetArmClockFrequency(80);
|
||||||
GBAContextInit(&context, 0);
|
GBAContextInit(&context, 0);
|
||||||
struct GBAOptions opts = {
|
struct GBAOptions opts = {
|
||||||
.useBios = true,
|
.useBios = true,
|
||||||
|
@ -143,6 +145,7 @@ void GBAPSP2Setup() {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool GBAPSP2LoadROM(const char* path) {
|
bool GBAPSP2LoadROM(const char* path) {
|
||||||
|
scePowerSetArmClockFrequency(444);
|
||||||
if (!GBAContextLoadROM(&context, path, true)) {
|
if (!GBAContextLoadROM(&context, path, true)) {
|
||||||
printf("%s failed to load!", path);
|
printf("%s failed to load!", path);
|
||||||
return false;
|
return false;
|
||||||
|
@ -238,6 +241,7 @@ void GBAPSP2UnloadROM(void) {
|
||||||
}
|
}
|
||||||
|
|
||||||
GBAContextStop(&context);
|
GBAContextStop(&context);
|
||||||
|
scePowerSetArmClockFrequency(80);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GBAPSP2Teardown(void) {
|
void GBAPSP2Teardown(void) {
|
||||||
|
|
Loading…
Reference in New Issue