Advertisement
GenesisFan64

LightCrusader

Oct 7th, 2020 (edited)
375
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.11 KB | None | 0 0
  1. RAM:
  2. $FFA800 buff - DMA'd window tilemap
  3. $FFAA04 byte -
  4. $FFEBA4 long - LONG(4bytes) copy of $FFFF80
  5. $FFEBA8 word - WORD copy of $EBA6 (ACTUAL player input)
  6.  
  7. $FFEFE8 byte - Screen transition
  8. $FFEB00 byte - any write increases Player Life
  9. $FFF800 buff - SMPS sound buffer
  10. $FFEBA0 byte - (MENU) cursor auto-move timer
  11. $FFEC13 byte - Current MENU list/layout
  12. $FFEC27 byte - (MENU: MAGIC) Current selection in MAGIC menu
  13. $FFEFEC word - OLD value of $FFF022
  14. $FFF130 list - Magic points (4 bytes, in order: wind,fire,earthquake,heal)
  15.  
  16. $FFF022 word - bitselection for the MAGIC powers:
  17. %00000000 0000hefw (hefw: disable/enable heal|earthquake|fire|wind)
  18.  
  19. $FFFF80 - Controller input buffer 1
  20. $FFFF88 - Controller input buffer 2
  21. Format:
  22. $00 | Type:
  23. | $02 - 3pad
  24. | $04 - 6pad
  25. $01 | 6pad input data (4 bits MXYZ) %pppphhhh p=pressed h=holding
  26. $02 | SACBRLDU hold
  27. $03 | SACBRLDU press
  28.  
  29. ROM:
  30. $003BD2 - Checks if magicbits changed
  31. $00DEB8 - (ROUTINE) checks TRIGGER (ABC) input by the player [MXYZ check goes here]
  32. $00DDD8 - (ROUTINE) casts the magic spells
  33. $0037A8 - Check if player presses START to open the menu
  34. $026E72 - Check if player presses C at the MAGIC MENU to bitset magic spells (d0: bit to set using bset)
  35. $023052 - Refresh MAGIC display
  36.  
  37. ; ====================================================================
  38. ; XYZM patch to enable/disable spells
  39. ;
  40. ; US ROM
  41. ; ====================================================================
  42.  
  43. ; at $DEB8:
  44. ; 4E B9 00 02 7E 00
  45. ; 4E 75
  46. ;
  47. ; at $27E00
  48. move.b ($FFFFEBA5),d7 ; Get MZYXpress|MZYXhold
  49. btst #4,d7 ; X hold?
  50. beq.s .nothold_x
  51. bchg #2,($FFFFF023).w
  52. bchg #2,($FFFFEFED).w
  53. .nothold_x:
  54. btst #5,d7 ; Y hold?
  55. beq.s .nothold_y
  56. bchg #1,($FFFFF023).w
  57. bchg #1,($FFFFEFED).w
  58. .nothold_y:
  59. btst #6,d7 ; Z hold?
  60. beq.s .nothold_z
  61. bchg #0,($FFFFF023).w
  62. bchg #0,($FFFFEFED).w
  63. .nothold_z:
  64. btst #7,d7 ; M hold?
  65. beq.s .nothold_m
  66. bchg #3,($FFFFF023).w
  67. bchg #3,($FFFFEFED).w
  68. .nothold_m:
  69. jsr ($23052).l ; Update status
  70. move.b ($FFFFEB38).w,d7 ; Original code
  71. jsr ($E0A4).l
  72. jmp ($DEC0).l
  73.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement