Advertisement
AndrewHaxalot

08 Codetype Tutorial Wii

May 25th, 2014
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.99 KB | None | 0 0
  1. I want to write the value 42C80000 to each of these addresses, but the 04 codetype would take up too many lines. I want to shorten the amount of lines, so I can put more codes into my GCT. So, I'm going to use the 08 codetype to shorten it.
  2.  
  3. 8115E620
  4. 8115E624
  5. 8115E628
  6. 8115E62C
  7. 8115E630
  8. 8115E634
  9. 8115E638
  10. 8115E63C
  11. 8115E640
  12.  
  13. Since, the addresses are > 81000000, we'll have to increase the codetype by 1. So, instead of using 08, we'll have to use 09 instead.
  14.  
  15. 08______ XXXXXXXX
  16. TNNNZZZZ VVVVVVVV
  17.  
  18. ______ + ba = Initial Address
  19. X = Initial value for the RAM write
  20. T = Value Size (0 = byte, 1 = halfword, 2 = word)
  21. N = Amount of additional addresses to write to (the first is assumed)
  22. Z = Address Increment; in bytes (How many To skip By)
  23. V = Value Increment (How much to add to the value after each additional RAM write)
  24.  
  25. To use po instead of ba, change the codetype from 08 to 18.
  26. For values of ______ >= 0x01000000, add one to the codetype.
  27.  
  28. We change 08 to 09.
  29.  
  30. 09______ XXXXXXXX
  31. TNNNZZZZ VVVVVVVV
  32.  
  33. We take the first address and add it onto the line. Remove 81 because it will be replaced by the codetype.
  34.  
  35. 0915E620 XXXXXXXX
  36. TNNNZZZZ VVVVVVVV
  37.  
  38. We want to write 42C80000, which is 50 in Float. This number is displayed in Hex, but represents a Float integer. Replace XXXXXXXX with the Float value.
  39.  
  40. 0915E620 42C80000
  41. TNNNZZZZ VVVVVVVV
  42.  
  43. The value size of what we want to write to each address is a Word. Replace T with 2. XX = Byte XXXX = Half Word XXXXXXXX = Word
  44.  
  45. 0915E620 42C80000
  46. 2NNNZZZZ VVVVVVVV
  47.  
  48. There are 8 addresses not including the first one as it is already assumed. Replace NNN with 008.
  49.  
  50. 0915E620 42C80000
  51. 2008ZZZZ VVVVVVVV
  52.  
  53. The addresses only increase by 4, so replace ZZZZ with 0004.
  54.  
  55. 0915E620 42C80000
  56. 20080004 VVVVVVVV
  57.  
  58. We don't want to write anything other than 42C80000 to each address, so we'll tell it to write nothing. Replace VVVVVVVV with 00000000.
  59.  
  60. 0915E620 42C80000
  61. 20080004 00000000
  62.  
  63. Congrtulations! You finished! I hope you learned something. ;)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement