Advertisement
Guest User

Status_Bar

a guest
Aug 29th, 2016
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.33 KB | None | 0 0
  1. LDA $1BE3 ;\ Load layer 3 tilemap value
  2. BNE Boss_Battle_05 ;/ If not equal, status bar is on top
  3. LDA $0D9B ;\ Load fight mode value
  4. BNE Boss_Battle_05 ;/ If not equal, status bar on top
  5. LDA #$09 ;\ Layer 3 has
  6. STA $3E ;/ priority
  7. STZ $22 ;\
  8. STZ $23 ;| Fixed layer 3
  9. STZ $24 ;| position
  10. STZ $25 ;/
  11. STZ $2115 ;\ Set VRAM Address Increment Value to x00
  12. LDA #$22 ;|
  13. STA $2116 ;| Set Address for VRAM Read/Write to x5322
  14. LDA #$53 ;| Address for VRAM Read/Write (Low Byte)
  15. STA $2117 ;|
  16. BRA Before_SB_Loop_01 ;/ Continue code
  17. Boss_Battle_05:
  18. STZ $2115 ;\ Set VRAM Address Increment Value to x00
  19. LDA #$42 ;|
  20. STA $2116 ;| Set Address for VRAM Read/Write to x5042
  21. LDA #$50 ;| Address for VRAM Read/Write (Low Byte)
  22. STA $2117 ;/
  23. Before_SB_Loop_01:
  24. LDX #$06 ;\ $06 bytes
  25. SB_Loop_01:
  26. LDA SB_DMA_Table_01,X ;| Get data from table
  27. STA $4310,X ;| Store to DMA registers
  28. DEX ;| Decrease X
  29. BPL SB_Loop_01 ;/ Loop code
  30. LDA #$02 ;\ Activate DMA channel 1
  31. STA $420B ;/ Regular DMA Channel Enable
  32. LDA $1BE3 ;\ Load layer 3 tilemap value
  33. BNE Boss_Battle_06 ;/ If not equal, status bar is on top
  34. LDA $0D9B ;\ Load fight mode value
  35. BNE Boss_Battle_06 ;/ If not equal, status bar on top
  36. STZ $2115 ;\ Set VRAM Address Increment Value to x00
  37. LDA #$43 ;|
  38. STA $2116 ;| Set Address for VRAM Read/Write to x5343
  39. LDA #$53 ;| Address for VRAM Read/Write (Low Byte)
  40. STA $2117 ;|
  41. BRA Before_SB_Loop_02 ;/ Continue code
  42. Boss_Battle_06:
  43. STZ $2115 ;\ Set VRAM Address Increment Value to x00
  44. LDA #$63 ;|
  45. STA $2116 ;| Set Address for VRAM Read/Write to x5063
  46. LDA #$50 ;| Address for VRAM Read/Write (Low Byte)
  47. STA $2117 ;/
  48. Before_SB_Loop_02:
  49. LDX #$06 ;\ $06 bytes
  50. SB_Loop_02:
  51. LDA SB_DMA_Table_02,X ;| Get data from table
  52. STA $4310,X ;| Store to DMA registers
  53. DEX ;| Decrease X
  54. BPL SB_Loop_02 ;/ Loop code
  55. LDA #$02 ;\ Activate DMA channel 1
  56. STA $420B ;| Regular DMA Channel Enable
  57. RTL ;/ Return
  58. SB_DMA_Table_01:
  59. db $00,$18,$F9,$0E,$00,$1C,$00 ;| DMA settings 2nd row (timers,etc)
  60. SB_DMA_Table_02:
  61. db $00,$18,$15,$0F,$00,$1B,$00 ;| DMA settings 3rd row (timers,etc)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement