Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- org $008E1A
- autoclean JSL Main
- NOP
- org $00C547
- BRA +
- NOP #6
- +
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- !pow_bar_loc = $0F0B
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- freecode
- reset bytes
- Main:
- PHB : PHK : PLB
- JSR Pow_Meter
- Return:
- PLB
- LDA $1493
- ORA $9D
- RTL
- Pow_Text:
- db $19,$18,$20,$78
- Pow_Meter:
- LDA $14AD : BEQ Pow_Off
- .Pow_On:
- Draw_Meter:
- ; the "POW:" text
- LDX #$03
- - LDA Pow_Text,x : STA !pow_bar_loc,x
- DEX : BPL -
- ; the bar
- LDX #$03
- LDA $14AD : STA $4205 : STZ $4204
- LDA #$B0 : STA $4206
- JSR Divwait
- LDA $4214
- LSR : LSR : LSR
- PHA : AND #$18 : STA $00
- PLA : AND #$07 : CLC : ADC #$E1 : STA $01
- LDA #$20
- - SEC : SBC #$08 : CMP $00 : PHA
- BCC +1 ; ??????
- BNE +2 ; ????????????????????????????????
- LDA $01 : STA !pow_bar_loc+5,x
- BRA dmloopend
- LDA #$E8 : STA !pow_bar_loc+5,x : BRA dmloopend
- LDA #$E0 : STA !pow_bar_loc+5,x
- dmloopend:
- PLA : DEX : BPL -3
- LDA #$D0 : STA !pow_bar_loc+4 : INC : STA !pow_bar_loc+9
- RTS
- Pow_Off:
- Remove_Meter:
- LDX #$09
- LDA #$FC
- - STA !pow_bar_loc,x : DEX : BPL -
- RTS
- Math:
- Divwait:
- NOP #2
- Multwait:
- NOP #4
- RTS
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement