Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ; Offscreen indicator. Displays a small sprite at the top/bottom of the screen to show where Mario is when he's offscreen.
- ; Change the settings below as you need to, then insert with UberASM as either level asm or gamemode asm (for mode 14).
- !tileAbove = $1D ; 8x8 tile to use for the marker when above the screen.
- !propsAbove = $28 ; YXPPCCCT properties for the tile when above the screen.
- !yOffAbove = $02 ; How many pixels below the very top of the screen that the tile should appear.
- !tileBelow = $1D ; 8x8 tile to use for the marker when below the screen.
- !propsBelow = $28 ; YXPPCCCT properties for the tile when below the screen.
- !yOffBelow = $02 ; How many pixels below the very bottom of the screen that the tile should appear.
- ;;;
- !oamIndex = $0000 ; OAM index from $0200 to use.
- ; ^ don't touch this one unless you know how it works
- ; the default value isn't really used by much so it should be fine
- ;;;;;
- ; Code begins
- main:
- LDY #$00
- REP #$20
- LDA $80
- CMP #$FFE1
- BMI .offscreen
- LDX $19
- BNE +
- CLC : ADC #$0008
- + CMP #$00DA
- BMI .ret
- LDY #$01
- .offscreen
- SEP #$20
- LDA $7E
- CLC : ADC #$04
- STA $0200+!oamIndex
- LDA yOffs,y
- STA $0201+!oamIndex
- LDA Tiles,y
- STA $0202+!oamIndex
- LDA Props,y
- STA $0203+!oamIndex
- STZ $0420+(!oamIndex/4)
- .ret
- SEP #$20
- RTL
- Tiles:
- db !tileAbove,!tileBelow
- Props:
- db !propsAbove,!propsBelow
- yOffs:
- db !yOffAbove,$D8-!yOffBelow
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement