Files
BFM-decomp/tools/ghidra_scripts/VerifyOverlay.java
T
Drew T bd5e21b366 feat(phase-3): file-loader & overlay-map RE + PCSX-Redux runtime oracle
- RE'd the full file-loader/overlay subsystem in Ghidra via MCP: CdReadRequest ->
  CdReadStateMachine (hand-rolled CdControl SeekL/ReadN reader, NOT PsyQ CdRead);
  LIST.CD RAM cache cdFileLocTable + ResourceGetCdLoc/resourceIdMap lookup; LZSS
  staging buffer 0x80079A70; loadDestPtrTable; ~50 symbols named (T1-T5,T8)
- T6b MILESTONE: resident blob @0x800CEDF8 + location overlay @0x80128158 proven
  byte-identical (sha1-equal contiguous prefixes) vs live PCSX-Redux RAM; blobs
  imported into Ghidra (ImportOverlay.java); overlay-map table -> memory-map.md §4.3
- PCSX-Redux runtime oracle: Windows-native build, WSL reads RAM via the web API
  at 172.17.208.1:8081; ledger #4 resolved
- live-verified player/time state: gold(/10) HP BP day hour tiredness boss-HP;
  save-header template (Q#5) + debug-menu dispatch (Q#9: DEBUG.BIN path is dead)
- overlay map: 13 area-states across SC01/02/03, 2 duplicate pairs, location x
  chapter keying, free-roam vs menu-hub granularity
- resolves Open Q#1/#3/#4/#5/#6/#8/#9/#12; corrects SLUS-90029 (FF8 demo, not BFM)
- 2 US prototypes acquired + CRC-verified (Aug-31 1369DE07, Sep-8 5C24728E)
- rules R9 (verify persistence), R10 (>=3-datapoint live verification),
  R11 (runtime oracle Windows-native, bridged to WSL)
- bumps project version 1.2.0 -> 1.3.0
2026-06-14 02:04:28 -06:00

20 lines
930 B
Java

// VerifyOverlay.java — read-only R9 check that the imported overlay/resident bytes persisted.
// analyzeHeadless ... -process SLUS_007.26 -noanalysis -readOnly -postScript VerifyOverlay.java
import ghidra.app.script.GhidraScript;
import ghidra.program.model.address.Address;
public class VerifyOverlay extends GhidraScript {
public void run() throws Exception {
String[][] t = { {"residentBlob","0x800CEDF8"}, {"ovl_tutForest","0x80128158"} };
for (String[] e : t) {
Address a = toAddr(e[1]);
byte[] c = new byte[8];
currentProgram.getMemory().getBytes(a, c);
StringBuilder sb = new StringBuilder();
for (byte x : c) sb.append(String.format("%02x", x));
boolean init = currentProgram.getMemory().getBlock(a).isInitialized();
println("BFMVERIFY " + e[0] + " @" + a + " init=" + init + " first8=" + sb);
}
}
}