Advertisement
mzxrules

Controller 3 Jump Op

Nov 10th, 2019
279
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.88 KB | None | 0 0
  1. Controller 3 Jump Op
  2.  
  3. We can generate an arbitrary jump to any address within RDRAM by pressing the following buttons:
  4.  
  5. //This sets J op
  6. 0800 = D-Up button
  7.  
  8. //Combinations of these sets J range between 0x00_0000 and 0x7C_0000
  9. 0010 = R Button
  10. 0008 = C-Up
  11. 0004 = C-Down
  12. 0002 = C-Left
  13. 0001 = C-Right
  14.  
  15. //Joystick input adds between 0000000 and 03FFFC to J
  16. //with an adapter, any value is possible, but physically there's an approx. limitation of +- 81 units
  17. 02: s8 = X axis, right is positive, left is negative
  18. 03: s8 = Y axis, up is positive, down is negative
  19.  
  20.  
  21. However, the delay slot is InputLast. If we hold Controller 3 input, the following are generated:
  22.  
  23. Input J Delay Slot Op
  24. 0800 000000 sll at, r0, 0
  25. 0801 040000 (Special) //undefined
  26. 0802 080000 srl at, r0, 0
  27. 0803 0C0000 sra at, r0, 0
  28. 0804 100000 sllv at, r0, r0
  29. 0805 140000 (Special) //undefined
  30. 0806 180000 srlv at, r0, r0
  31. 0807 1C0000 srav at, r0, r0
  32. 0808 200000 jr r0 //crash due to jump in delay slot
  33. 0809 240000 jalr at, r0 //crash due to jump in delay slot
  34. 080A 280000 (Special) //undefined
  35. 080B 2C0000 (Special) //undefined
  36. 080C 300000 SYSCALL //not sure what this does
  37. 080D 340000 BREAK //makes no sense in a delay slot, might have undefined behavior?
  38. 080E 380000 (Special) //undefined
  39. 080F 3C0000 SYNC //not sure what this does
  40. 0810 400000 mfhi at
  41. 0811 440000 mthi r0
  42. 0812 480000 mflo at
  43. 0813 4C0000 mtlo r0
  44. 0814 500000 dsllv at, r0, r0
  45. 0815 540000 (Special) //undefined
  46. 0816 580000 dsrlv at, r0, r0
  47. 0817 5C0000 dsrav at, r0, r0
  48. 0818 600000 mult r0, r0
  49. 0819 640000 multu r0, r0
  50. 081A 680000 div r0, r0
  51. 081B 6C0000 divu r0, r0
  52. 081C 700000 dmult r0, r0
  53. 081D 740000 dmultu r0, r0
  54. 081E 780000 ddiv r0, r0
  55. 081F 7C0000 ddivu r0, r0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement