mirror of
https://github.com/Druthulu/BFM-decomp
synced 2026-09-26 13:33:34 -04:00
bd5e21b366
- 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
39 lines
1.5 KiB
Java
39 lines
1.5 KiB
Java
// GetSymbolAt.java — read-only: print the function/symbol name at a given address.
|
|
// Used by tools/ghidra_mcp_verify.sh to confirm (rule R9) that a recent edit actually
|
|
// persisted to the saved project DB after a Ghidra save-shutdown. No package decl
|
|
// (Ghidra script). Pure ghidra API (no extension import) so it compiles/run anywhere.
|
|
//
|
|
// Arg: <address> (e.g. 0x80018730). Prints: BFMVERIFY SYMBOL@<addr>=<name>
|
|
|
|
import ghidra.app.script.GhidraScript;
|
|
import ghidra.program.model.address.Address;
|
|
import ghidra.program.model.listing.Function;
|
|
import ghidra.program.model.symbol.Symbol;
|
|
|
|
public class GetSymbolAt extends GhidraScript {
|
|
|
|
@Override
|
|
protected void run() throws Exception {
|
|
String[] a = getScriptArgs();
|
|
if (a == null || a.length < 1) {
|
|
println("BFMVERIFY ERROR: missing address argument");
|
|
return;
|
|
}
|
|
String argAddr = a[0].trim();
|
|
long off = Long.decode(argAddr); // accepts 0x-prefixed hex
|
|
Address addr = currentProgram.getAddressFactory().getDefaultAddressSpace().getAddress(off);
|
|
|
|
String name = "<none>";
|
|
Function f = currentProgram.getFunctionManager().getFunctionAt(addr);
|
|
if (f != null) {
|
|
name = f.getName();
|
|
} else {
|
|
Symbol s = currentProgram.getSymbolTable().getPrimarySymbol(addr);
|
|
if (s != null) {
|
|
name = s.getName();
|
|
}
|
|
}
|
|
println("BFMVERIFY " + argAddr + " name=[" + name + "]");
|
|
}
|
|
}
|