Advertisement
Guest User

DisplayImg

a guest
May 2nd, 2015
363
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1. .text
  2. .align 2
  3. .thumb
  4. .thumb_func
  5.  
  6. DisplayImg:
  7. ldr r1, setLocation
  8. ldr r0, set
  9. swi 0x12
  10. ldr r1, mapLocation
  11. ldr r0, map
  12. swi 0x12
  13. ldr r1, palLocation
  14. ldr r0, pal
  15. swi 0x11
  16. b WaitForInputLoop
  17.  
  18. WaitForInputLoop:
  19. ldr r0, keyInput
  20. ldrb r0, [r0, #0x0]
  21. neg r0, r0
  22. mov r1, #0x2
  23. tst r0, r1
  24. beq WaitForInputLoop
  25.  
  26. End:
  27. bx lr
  28.  
  29. .align 2
  30. pal: .word 0x08825510 @ pointer to palette (.pal)
  31. palLocation: .word 0x020375F8 + (0x20 * 0xD) @ palette slot 0xD, replace 0xD with the pal slot you want to use
  32. set: .word 0x08824310 @ pointer to tileset (.bmp)
  33. setLocation: .word 0x06008000 @ char base for bg0
  34. map: .word 0x088251A0 @ pointer to tilemap (.raw)
  35. mapLocation: .word 0x0600F800 @ map base for bg0
  36. keyInput: .word 0x04000130 @ check key input
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement