Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var test_addr = 0x8016B600;
- var exec_addr = 0x800D41DC;
- var log_state = 1;
- var save_ctx = 0x8011A5D0;
- //var id = events.onexec(0x8009A750);
- var particleHash = {
- }
- events.onexec(0x8009A750, function()
- {
- console.log("---- SCENE NEW ----")
- console.log("ENT: " + mem.s32[save_ctx].toString(16));
- console.log("Cutscene Pointer: "+ mem.u32[gpr.a0+0x1D68].toString(16))
- })
- //Particle Logging
- var particle_id = -1;
- var hit = 0;
- events.onexec(0x8001B468, function()
- {
- particle_id = gpr.a1;
- if (!particleHash.hasOwnProperty(gpr.ra))
- {
- particleHash[gpr.ra] = true;
- console.log("! " + (gpr.ra-8).toString(16) + " new particle request source 0x"
- + gpr.a1.toString(16))
- }
- })
- events.onexec(0x8001B4E0, function()
- {
- console.log(": Allocating Particle 0x" + particle_id.toString(16) + " code")
- })
- /*
- var AllocTemp = 0;
- events.onexec(0x800CE17C, function()
- {
- AllocTemp = gpr.a1;
- })
- */
- events.onexec(0x800CE2AC, function()
- {
- //console.log("0x800CE17C: )
- console.log(": " + gpr.v0.toString(16) +" " + mem.s32[gpr.v0-0x2C].toString(16) +" - Tail End Allocation" )
- })
- events.onexec(0x80080A3C, function()
- {
- console.log("---- LOAD ROOM " + gpr.a2 + " ----")
- })
- events.onexec(0x800CCBB8, function()
- {
- if (log_state == 1)
- {
- console.log(": "
- + mem.u32[gpr.sp+0x10].toString(16)
- + " = " + gpr.a0.toString(16)
- + ":" + gpr.a1.toString(16)
- + " " + gpr.a2.toString(16)
- + ":" + gpr.a3.toString(16) )
- }
- })
- /*
- events.onexec(exec_addr, function()
- {
- var line = "a0: " + gpr.a0.toString(16)
- + " a1: " + gpr.a1.toString(16)
- + " a2: " + gpr.a2.toString(16)
- + " a3: " + gpr.a3.toString(16)
- + " ra: " + gpr.ra.toString(16);
- console.log(line)
- });
- */
- //console.log(Object.keys(gpr));
- //console.log(events.onexec);
- function GetEntrypointStats()
- {
- return "sp: " + gpr.sp.toString(16)
- + " a0: " + gpr.a0.toString(16)
- + " a1: " + gpr.a1.toString(16)
- + " a2: " + gpr.a2.toString(16)
- + " a3: " + gpr.a3.toString(16)
- + " ra: " + gpr.ra.toString(16);
- }
- function PrintFunctionEntryCSV()
- {
- return gpr.sp.toString(16)
- + "," + gpr.a0.toString(16)
- + "," + gpr.a1.toString(16)
- + "," + gpr.a2.toString(16)
- + "," + gpr.a3.toString(16)
- + "," + gpr.ra.toString(16);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement