diff --git a/README.md b/README.md index d20150c7..71af8d5c 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,8 @@ Requirements: CMake, pthread. ## Progress -![progress_ikaruga](/imgstore/progress_ikaruga.png) +|![progress_bs2](/imgstore/progress_bs2.png)|![progress_ikaruga](/imgstore/progress_ikaruga.png)| +|---|---| ## Credits diff --git a/build/Data/Json/DebuggerJdi.json b/build/Data/Json/DebuggerJdi.json index b0cbddf4..b39dbfaf 100644 --- a/build/Data/Json/DebuggerJdi.json +++ b/build/Data/Json/DebuggerJdi.json @@ -33,8 +33,8 @@ "usage": [ "Syntax: StartProfiler [ms]", "Specify the Json file name where the collected information will be saved, after calling the StopProfiler command.", - "The interval is specified in milliseconds. Possible values are 2-50. The default is 5.", - "Example: StartProfiler Data\\sampleData.json 10" + "The interval is specified in emulated Gekko milliseconds. Possible values are 2-50. The default is 5.", + "Example: StartProfiler Data/sampleData.json 10" ] }, diff --git a/imgstore/progress_bs2.png b/imgstore/progress_bs2.png new file mode 100644 index 00000000..ef67afc2 Binary files /dev/null and b/imgstore/progress_bs2.png differ diff --git a/src/bootrtc.cpp b/src/bootrtc.cpp index 437429b7..3e791b27 100644 --- a/src/bootrtc.cpp +++ b/src/bootrtc.cpp @@ -640,3 +640,14 @@ void BootROM(bool dvd, bool rtc, uint32_t consoleVer) ReadFST(); // load FST, for demos } } + +bool IsBootromPALRevision() +{ + if (mi.BootromPresent) { + + if (strstr((char*)mi.bootrom, "PAL")) { + return true; + } + } + return false; +} diff --git a/src/bootrtc.h b/src/bootrtc.h index 2fa802b5..6a9edf73 100644 --- a/src/bootrtc.h +++ b/src/bootrtc.h @@ -37,3 +37,8 @@ void MXTransfer(); // to EXI void IPLDescrambler(uint8_t* data, size_t size); void BootROM(bool dvd, bool rtc, uint32_t consoleVer); + +/// +/// Checks that the bootstrap (if present) is of PAL revision. This is determined by the "PAL" substring in the first unencoded 0x100 bytes with copyright. +/// +bool IsBootromPALRevision(); diff --git a/src/main.cpp b/src/main.cpp index f8ada8d9..994631ef 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -964,4 +964,10 @@ void LoadFile(const std::wstring& filename) DVD::Region region = DVD::RegionById(id); VISetEncoderFuse(DVD::IsNtsc(region) ? 0 : 1); } + + // Do the same for the bootstrap. + if (bootrom) { + + VISetEncoderFuse(IsBootromPALRevision() ? 1 : 0); + } } diff --git a/src/pi.cpp b/src/pi.cpp index 4129bf21..2d030de9 100644 --- a/src/pi.cpp +++ b/src/pi.cpp @@ -642,6 +642,16 @@ static void read_config(uint32_t addr, uint32_t* reg) *reg = 0; } +// +// PI_STRGTH +// + +static void write_strength(uint32_t addr, uint32_t data) +{ + // Just so the BS doesn't give an error on unmapped HW. + Report(Channel::PI, "Strength: 0x%08x\n", data); +} + // // PI fifo (CPU) // @@ -682,6 +692,7 @@ void PIOpen(HWConfig* config) PISetTrap(32, PI_CHIPID, read_FlipperID, nullptr); PISetTrap(8, PI_CONFIG, read_config, write_config); PISetTrap(32, PI_CONFIG, read_config, write_config); + PISetTrap(32, PI_STRGTH, nullptr, write_strength); // Processor interface CP fifo. // Some of the CP FIFO registers are mapped to PI registers for the reason that writes to the FIFO Stream Pointer are made by the Gekko Burst transactions and are serviced by PI.