Skip to content

Instantly share code, notes, and snippets.

@maxton
maxton / hax.patch
Created August 28, 2020 01:10
Xenia patch for TB:RB fun
diff --git a/src/xenia/cpu/backend/x64/x64_sequences.cc b/src/xenia/cpu/backend/x64/x64_sequences.cc
index f6a688b0..4cc82d2d 100644
--- a/src/xenia/cpu/backend/x64/x64_sequences.cc
+++ b/src/xenia/cpu/backend/x64/x64_sequences.cc
@@ -54,6 +54,112 @@ using xe::cpu::hir::Instr;
typedef bool (*SequenceSelectFn)(X64Emitter&, const Instr*);
std::unordered_map<uint32_t, SequenceSelectFn> sequence_table;
+typedef struct {
+ xe::be<uint32_t> vtbl;
@maxton
maxton / ExportXeniaMap.java
Last active July 17, 2021 05:20
Ghidra script to export .map files for the Xenia debugger. Load maps by launching Xenia with the --load_module_map="C:\path\to\ghidra.map" argument.
//Saves function names and addresses for Xenia
//@author Maxton
//@category Functions
//@keybinding
//@menupath File.Export Xenia Map File...
//@toolbar
import java.io.File;
import java.io.FileOutputStream;
import java.io.PrintWriter;