Skip to content

Instantly share code, notes, and snippets.

@Ravenslofty
Last active February 26, 2019 20:53
Show Gist options
  • Select an option

  • Save Ravenslofty/751d0cd22ad667b0d60eced18a375f40 to your computer and use it in GitHub Desktop.

Select an option

Save Ravenslofty/751d0cd22ad667b0d60eced18a375f40 to your computer and use it in GitHub Desktop.
local c0_prid = 0x2E20LL
local k0 = c0_prid
local at = (k0 < 0x00000059LL) and 1LL or 0LL
local zero = 0LL
local branch_condition = (at ~= zero)
s.gpr[1] = at
s.gpr[26] = k0
if branch_condition then
return run[0xbfc00020]()
else
return run[0xbfc00014]()
end
s:mfc0(16, 0, 26, 15, 0, 0); s:cycle_update(); s:bus_cycle_update();
s:sll(0, 0, 0, 0, 0, 0); s:cycle_update();
s:slti(10, 26, 1, 0, 1, 25); s:cycle_update(); s:bus_cycle_update();
s:bne(5, 1, 0, 0, 0, 5); s:cycle_update();
s:sll(0, 0, 0, 0, 0, 0); s:cycle_update(); s:bus_cycle_update(); return run[tonumber(s.pc)]()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment