Zeldara109

nepenutpriorityfix.asm

Jun 17th, 2026 (edited)
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
ARM 0.87 KB | None | 0 0
  1. ; Prevents Nep-Enut/Gargantua Blargg (sprite 0A5) from overwriting layer 1's priority
  2.  
  3. ; Warning: with this patch, the eye sprites are displayed in front of layer 1
  4. ;  (visible in vanilla 2-3's Nep-Enut room)
  5.  
  6. .gba
  7. .open "sma3.gba", "sma3-nepenutfix.gba", 0x08000000
  8.  
  9. ; Nep-Enut code: replace hardcoded sublevel 03 check
  10. .org 0x08057B62
  11. .area @AreaEnd-org()
  12.     ldr r2,=0x030069CE
  13.     ldrh r0,[r2]        ; layer 3 control register
  14.     mov r1,1            ;\
  15.     bic r0,r1           ;| set layer 3 priority to 2
  16.     mov r1,2            ;| (clear bit 0, set bit 1)
  17.     orr r0,r1           ;/
  18.     strh r0,[r2]
  19.     b @Return
  20.     .pool
  21. .endarea
  22.  
  23. ; overwrite remaining vanilla code
  24.     .fill @AreaEnd-org()
  25. .org 0x08057B94
  26. @AreaEnd:
  27.  
  28. .org 0x08057BAC         ; area to clear includes last 5 .pool entries
  29.     .fill @Return-org()
  30. .org 0x08057BE8
  31. @Return:
  32.  
  33. .close
Advertisement
Add Comment
Please, Sign In to add comment