MCPcopy Create free account
hub / github.com/PCSX2/pcsx2 / ReadOSDConfigParames

Function ReadOSDConfigParames

pcsx2/ps2/BiosTools.cpp:53–78  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

51std::vector<u8> BiosRom;
52
53void ReadOSDConfigParames()
54{
55 if (ParamsRead)
56 return;
57
58 ParamsRead = true;
59
60 u8 params[16];
61 cdvdReadLanguageParams(params);
62
63 configParams1.UC[0] = params[1] & 0x1F; // SPDIF, Screen mode, RGB/Comp, Jap/Eng Switch (Early bios).
64 configParams1.ps1drvConfig = params[0]; // PS1 Mode Settings.
65 configParams1.version = (params[2] & 0xE0) >> 5; // OSD Ver (Not sure but best guess).
66 configParams1.language = params[2] & 0x1F; // Language.
67 configParams1.timezoneOffset = params[4] | ((u32)(params[3] & 0x7) << 8); // Timezone offset in minutes.
68 configParams1.timeZoneID = params[6]; // ID for time zone selection
69
70 // Region settings for time/date and extended language
71 configParams2.UC[1] = ((u32)params[3] & 0x78) << 1; // Daylight Savings, 24hr clock, Date format
72 configParams2.daylightSavings = configParams2.UC[1] & 0x10 ? 1 : 0;
73 configParams2.timeFormat = configParams2.UC[1] & 0x20 ? 1 : 0;
74 configParams2.dateFormat = configParams2.UC[1] & 0x80 ? 2 : (configParams2.UC[1] & 0x40 ? 1 : 0);
75 // FIXME: format, version and language are set manually by the bios. Not sure if any game needs them, but it seems to set version to 2 and duplicate the language value.
76 configParams2.version = 2;
77 configParams2.language = configParams1.language;
78}
79
80static bool LoadBiosVersion(std::FILE* fp, u32& version, std::string& description, u32& region, std::string& zone, std::string& serial)
81{

Callers 2

SYSCALLFunction · 0.85
cdvdResetFunction · 0.85

Calls 1

cdvdReadLanguageParamsFunction · 0.85

Tested by

no test coverage detected