cloudmax

ROM Patcher Preview

Jan 28th, 2014
145
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.11 KB | None | 0 0
  1. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2. ;Set up variables
  3. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  4. var,dma,0x12F70
  5. var,code,[{dma}+0x10*28]
  6. var,codeRAMtoROM,{code}-0x8001CE60
  7. var,romID,([0x3B]*0x100)+([0x3C]&0xFF)
  8. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  9. ;First we set variable dma to the address of the dma table.
  10. ;Then we take that and add 0x10 multiplied by the code.zasm
  11. ;entry ID in the table, which is 28.
  12. ;We set variable code to the pointer at that address.
  13. ;We set variable codeRAMtoROM to code subtracted by the offset
  14. ;of code.zasm when it is loaded into RAM so that we can convert
  15. ;RAM addresses to ROM addresses.
  16. ;We also look up the ID and Version number of the ROM.
  17. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  18. ;Check if ROM ID or Version is Incorrect
  19. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  20. con,patchable,!({romID}==0x4E5A4C450F||{romID}==0x435A4C450F)
  21. alert,The provided ROM has an incorrect ID or Version.
  22. abort
  23. endCon,patchable
  24. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  25. ;If the ROM ID & Version isn't 0x4E5A4C450F or 0x435A4C450F
  26. ;an alert will appear, and the patch is aborted.
  27. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  28. ;Patch
  29. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  30. blah! Random crap.
  31. ;A Button Red (0x64)
  32. {codeRAMtoROM}+0x80110F3C, 240E 0064 A5AE 0AC0
  33. ;A Button Green (0xC8)
  34. {codeRAMtoROM}+0x80110F08, 240F 00C8
  35. ;A Button Blue (0xFF)
  36. {codeRAMtoROM}+0x80110F1C, 2419 00FF
  37. ;B Button Red (0x64)
  38. {codeRAMtoROM}+0x80110EE8, 240E 0064
  39. ;B Button Green (0xFF)
  40. {codeRAMtoROM}+0x80110EF4, 2403 00FF
  41. ;B Button Blue (0x78)
  42. {codeRAMtoROM}+0x80110F10, 2419 0078 A719 06EE
  43. ;C Button Red (0xFF)
  44. {codeRAMtoROM}+0x801110E8, 240D 00FF
  45. ;C Button Green (0xFF)
  46. {codeRAMtoROM}+0x80111494, 2418 00FF
  47. ;C Button Blue (0x00)
  48. {codeRAMtoROM}+0x801114B4, 240E 0000 A72E 07E6
  49. ;START Button Red (0xFF), Green (0x82), Blue (0x3C)
  50. {codeRAMtoROM}+0x80089180, 3C01 FF82 3421 3C00
  51. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Advertisement
Add Comment
Please, Sign In to add comment