BIOSHLE: Get all OSDSYS Parameters. Only use when Fast Boot is enabled

This commit is contained in:
refractionpcsx2 committed 2020-11-19 11:22:40 +00:00
1 parent ab97832a78
commit e8ebb7d23d
4 files changed
+29

No files matched your search

+5
View File
@@ -259,6 +259,11 @@ static void cdvdWriteMAC(const u8* num)
setNvmData(num, 0, 8, offsetof(NVMLayout, mac));
}
void cdvdReadLanguageParams(u8* config)
{
getNvmData(config, 0xF, 16, offsetof(NVMLayout, config1));
}
s32 cdvdReadConfig(u8* config)
{
// make sure its in read mode
+2
View File
@@ -139,6 +139,8 @@ struct cdvdStruct
extern cdvdStruct cdvd;
extern void cdvdReadLanguageParams(u8* config);
extern void cdvdReset();
extern void cdvdVsync();
extern void cdvdActionInterrupt();
+21
View File
@@ -23,6 +23,7 @@
#include "R5900OpcodeTables.h"
#include "R5900Exceptions.h"
#include "GS.h"
#include "CDVD/CDVD.h"
GS_VideoMode gsVideoMode = GS_VideoMode::Uninitialized;
bool gsIsInterlaced = false;
@@ -942,6 +943,26 @@ void SYSCALL()
DevCon.Warning("Set GS CRTC configuration. %s %s (%s)",mode.c_str(), inter, field);
}
break;
case Syscall::GetOSParamConfig:
if(g_SkipBiosHack)
{
u8* pointer = (u8*)PSM(cpuRegs.GPR.n.a0.UL[0]);
u8 params[16];
cdvdReadLanguageParams(params);
u32 osdconf = 0;
u32 timezone = params[4] | ((u32)(params[3] & 0x7) << 8);
osdconf |= params[1] & 0x1F; // SPDIF, Screen mode, RGB/Comp, Jap/Eng Switch (Early bios)
osdconf |= (u32)params[0] << 5; // PS1 Mode Settings
osdconf |= (u32)((params[2] & 0xE0) >> 5) << 13; // OSD Ver (Not sure but best guess)
osdconf |= (u32)(params[2] & 0x1F) << 16; // Language
osdconf |= timezone << 21; // Timezone
memcpy(pointer, &osdconf, 4);
return;
}
break;
case Syscall::SetVTLBRefillHandler:
DevCon.Warning("A tlb refill handler is set. New handler %x", (u32*)PSM(cpuRegs.GPR.n.a1.UL[0]));
+1
View File
@@ -21,6 +21,7 @@ enum Syscall : u8
{
SetGsCrt = 2,
SetVTLBRefillHandler = 13,
GetOSParamConfig = 75,
sysPrintOut = 117,
sceSifSetDma = 119,
Deci2Call = 124