mirror of
https://github.com/ran-j/PS2Recomp.git
synced 2026-09-26 16:59:35 -04:00
Add IOP, audio, pad, fio changes, VAG handling, and call-stack logger (#76)
- Add IOP with RPC handling (handleRPC, LibSd SID) and init/reset using RDRAM - Add IOP audio layer for LibSd RPC (handleLibSdRpc) - Add PS2AudioBackend with VAG decode, onVagTransfer/onSoundCommand, raylib playback - Add PSPadBackend with readState and raylib input - Add IOP RAM mapping in Memory (getIOPRAM) for EE↔IOP access - Add fio syscalls: fioOpen, fioRead, fioWrite, fioClose, fioLseek, fioMkdir - Add VAG accumulation for fio reads (multi-chunk VagAccumEntry) - Add ps2_log.h call-stack logger (tab-indented, Debug only, ps2_log.txt next to exe) - Code generator: emit ps2_log include and PS_LOG_ENTRY for full functions - Recompiler: emit ps2_log include and PS_LOG_ENTRY for stubs - Runtime: print "[PS2 LOG] Logs saved at <path>" on exit (Debug only)
This commit is contained in:
@@ -821,6 +821,9 @@ namespace ps2recomp
|
||||
ss << "#include \"ps2_recompiled_stubs.h\"\n\n";
|
||||
ss << "#include \"ps2_syscalls.h\"\n";
|
||||
ss << "#include \"ps2_stubs.h\"\n\n";
|
||||
ss << "#ifdef _DEBUG\n";
|
||||
ss << "#include \"ps2_log.h\"\n";
|
||||
ss << "#endif\n\n";
|
||||
}
|
||||
|
||||
AnalysisResult analysisResult = collectInternalBranchTargets(function, instructions);
|
||||
@@ -836,7 +839,11 @@ namespace ps2recomp
|
||||
sanitizedName = nameBuilder.str();
|
||||
}
|
||||
|
||||
ss << "void " << sanitizedName << "(uint8_t* rdram, R5900Context* ctx, PS2Runtime *runtime) {\n\n";
|
||||
ss << "void " << sanitizedName << "(uint8_t* rdram, R5900Context* ctx, PS2Runtime *runtime) {\n";
|
||||
ss << "#ifdef _DEBUG\n";
|
||||
ss << " PS_LOG_ENTRY(\"" << sanitizedName << "\");\n";
|
||||
ss << "#endif\n";
|
||||
ss << "\n";
|
||||
ss << " ctx->pc = 0x" << std::hex << function.start << "u;\n"
|
||||
<< std::dec;
|
||||
ss << "\n";
|
||||
|
||||
Reference in New Issue
Block a user