Push BIOS_STATE location further down.
Some checks failed
Build Linux ARM64 / build_linux_arm64 (push) Has been cancelled
Build macOS / build_macos (push) Has been cancelled
Build Windows / build_windows (x86_32, Visual Studio 16 2019, installer32.nsi, win32_msvc2019, Win32) (push) Has been cancelled
Build Windows / build_windows (x86_64, Visual Studio 16 2019, installer64.nsi, win64_msvc2019_64, x64) (push) Has been cancelled
Check Format / run_clangformat (push) Has been cancelled
Build Linux ARM32 / build_linux_arm32 (push) Has been cancelled
Build Android / build_android (apk) (push) Has been cancelled
Build Android / build_android (libretro) (push) Has been cancelled
Build iOS / build_ios (push) Has been cancelled
Build JavaScript / build_js (push) Has been cancelled
Build Linux / build_linux (push) Has been cancelled
Build Windows Psf / build_windows_psf (off, x86_64, Visual Studio 16 2019, installer64.nsi, x64) (push) Has been cancelled
Build Windows Psf / build_windows_psf (on, x86_64, Visual Studio 16 2019, installer64.nsi, x64) (push) Has been cancelled

Fixes crash in Saru Get You: Million Monkey english patch.
This commit is contained in:
Jean-Philip Desjardins 2025-04-07 10:35:12 -04:00
parent 64c63f1b03
commit f66e60ffda

View file

@ -31,7 +31,7 @@
#include "AppConfig.h" #include "AppConfig.h"
#include "PS2VM_Preferences.h" #include "PS2VM_Preferences.h"
#define BIOS_ADDRESS_STATE_BASE 0x1000 #define BIOS_ADDRESS_STATE_BASE 0x4000
#define BIOS_ADDRESS_STATE_ITEM(a) (BIOS_ADDRESS_STATE_BASE + offsetof(BIOS_STATE, a)) #define BIOS_ADDRESS_STATE_ITEM(a) (BIOS_ADDRESS_STATE_BASE + offsetof(BIOS_STATE, a))
#define BIOS_ADDRESS_INTERRUPT_THREAD_CONTEXT (BIOS_ADDRESS_STATE_BASE + sizeof(BIOS_STATE)) #define BIOS_ADDRESS_INTERRUPT_THREAD_CONTEXT (BIOS_ADDRESS_STATE_BASE + sizeof(BIOS_STATE))
@ -239,6 +239,7 @@ CPS2OS::CPS2OS(CMIPS& ee, uint8* ram, uint8* bios, uint8* spr, CGSHandler*& gs,
, m_intcHandlerQueue(m_intcHandlers, &m_state->intcHandlerQueueBase) , m_intcHandlerQueue(m_intcHandlers, &m_state->intcHandlerQueueBase)
, m_dmacHandlerQueue(m_dmacHandlers, &m_state->dmacHandlerQueueBase) , m_dmacHandlerQueue(m_dmacHandlers, &m_state->dmacHandlerQueueBase)
{ {
static_assert((BIOS_ADDRESS_INTERRUPT_THREAD_CONTEXT + STACKRES) <= BIOS_ADDRESS_DECI2HANDLER_BASE);
static_assert((BIOS_ADDRESS_SEMAPHORE_BASE + (sizeof(SEMAPHORE) * MAX_SEMAPHORE)) <= BIOS_ADDRESS_CUSTOMSYSCALL_BASE, "Semaphore overflow"); static_assert((BIOS_ADDRESS_SEMAPHORE_BASE + (sizeof(SEMAPHORE) * MAX_SEMAPHORE)) <= BIOS_ADDRESS_CUSTOMSYSCALL_BASE, "Semaphore overflow");
CAppConfig::GetInstance().RegisterPreferenceInteger(PREF_SYSTEM_LANGUAGE, static_cast<uint32>(OSD_LANGUAGE::JAPANESE)); CAppConfig::GetInstance().RegisterPreferenceInteger(PREF_SYSTEM_LANGUAGE, static_cast<uint32>(OSD_LANGUAGE::JAPANESE));