Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- ;; Mothra Boss
- ;; By Flabort
- ;; Originally for use in Super Mallow World by
- ;; The Catbus Comunity for Glitchcat7
- ;; (As such, instead of Mario, the player character will be refered to as Mallow)
- ;; Credit to SMWC and Nesquick Bunny for Sprite Tutorial
- ;; Credit to Katrina and Biob of SMWC for Debugging.
- ;; Graphics included provided by FerpyMcFrosting
- ;;
- ;;
- ;; Uses Extra Bit
- ;; When set, has 2HP per phase instead of 1
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- ;Constants
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- YDISP: db $F0,$00,$F0,$00 ;\There are lines in each constant because there are two directions
- db $F0,$00,$F0,$00 ;|to be facing and two frames per animation state
- db $F0,$00,$F0,$00 ;|There are 4 values per line because the sprite is made of
- db $F0,$00,$F0,$00 ;/four 16x16 tiles to make one 32x32 sprite
- XDISP: db $00,$00,$F0,$F0 ;\
- db $00,$00,$F0,$F0 ;| X and Y DISP is the displacement for each tile
- db $F0,$F0,$00,$00 ;|So they aren't all drawn in the same place
- db $F0,$F0,$00,$00 ;/
- TILEMAPPASSIVE: db $80,$A0,$82,$A2 ;\
- db $C8,$E8,$CA,$EA ;|Tiles to use in phase 1&2 when Mothra is flying back and forth in the sky
- db $80,$A0,$82,$A2 ;|
- db $C8,$E8,$CA,$EA ;/
- TILEMAPSWOOPDOWN: db $84,$A4,$86,$A6 ;\
- db $84,$A4,$86,$A6 ;|Tiles to use in phase 1&3 when Mothra dives towards Mallow
- db $84,$A4,$86,$A6 ;|
- db $84,$A4,$86,$A6 ;/
- TILEMAPSWOOPUP: db $88,$A8,$8A,$AA ;\
- db $88,$A8,$8A,$AA ;|Tiles to use in phase 1&3 when mothra returns upwards
- db $88,$A8,$8A,$AA ;|
- db $88,$A8,$8A,$AA ;/
- TILEMAPDIVE: db $8C,$AC,$8E,$AE ;\
- db $8C,$AC,$8E,$AE ;|Tiles to use in phase 2 when mothra dives at Mallow
- db $8C,$AC,$8E,$AE ;|
- db $8C,$AC,$8E,$AE ;/
- TILEMAPBOTTOM: db $C0,$E0,$C2,$E2 ;\
- db $C0,$E0,$C2,$E2 ;|Tiles to use in phase 2 when mothra pauses at the bottom of flight
- db $C0,$E0,$C2,$E2 ;|
- db $C0,$E0,$C2,$E2 ;/
- TILEMAPPULLUP: db $C4,$E4,$C6,$E6 ;\
- db $CC,$EC,$CE,$EE ;|Tiles to use in phase 2 when mothra returns to passive
- db $C4,$E4,$C6,$E6 ;|
- db $CC,$EC,$CE,$EE ;/
- XSPEED: db $12,$EE ;\
- db $0A,$F6 ;|
- db $0A,$F6 ;|X and Y speeds for different movement patterns
- db $00,$00 ;|Left is moving right, right is moving left
- db $00,$00 ;|each row is for a different Dive State (see HITP)
- db $00,$00 ;|
- db $1B,$E5 ;|Last two rows are double speed versions of
- db $1B,$E5 ;|diving at angle and rising back up, for
- YSPEED: db $00,$00 ;|
- db $0A,$0A ;|
- db $F6,$F6 ;|
- db $12,$12 ;|
- db $00,$00 ;|
- db $EE,$EE ;|
- db $1B,$1B ;|
- db $E5,$E5 ;/
- ;Shortcut Lables (addresses that will be called over and over)
- !FACE = $157C ;Facing left?
- !HITP = $1528 ;Format: xxEDDDHH
- ;D: Dive state. 0(0) idle/back+forth, 1(4) diving at angle,
- ;2(8)rising back up, 3(C) diving straight, 4(10) bottom,
- ;5(14) rising straight, 6(18) and 7(1C) double speed versions
- ;of diving at angle and rising back up respectively.
- ;
- ;H: Health. 3 max, 2 and 1 damaged, 0 dead/dying
- ;AND 03 = Hit points
- ;AND 1C = Dive State
- ;AND 20 = Extra Hit with Extra Bit
- ;AND C0 = should be null
- !SPAWNH = $1534 ;The height/Y level at which Mothra is spawned.
- ;This is as high as Mothra should rise when flying
- !MALLOWH = $96 ;The height/Y level of Mallow.
- ;This is as low as Mothra should dive when flying
- !INVINCE = $163E ;Invincibility timer after Mothra is damaged
- !ATTACK = $1510 ;Timer used for different attacks in different phases
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- ; Main and Init
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- print "INIT ",pc
- LDX $15E9
- LDA #$2B
- STA !HITP,x
- STZ !FACE,x
- LDA $D8,x
- STA !SPAWNH,x
- LDA $F0
- STA !ATTACK,x
- RTL
- print "MAIN ",pc
- PHB
- PHK
- PLB
- JSR Graphics
- JSR SpriteCode
- PLB
- RTL
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- ; Phase controls
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- SpriteCode:
- LDA $14C8,x ;\
- CMP #$08 ;| If sprite is dead or not in a normal state, return
- BNE RETURN1 ;/
- LDA $9D ;\
- BNE RETURN1 ;/ If sprites are locked, return
- JMP NoReturn
- RETURN1:
- RTS
- NoReturn:
- ;\ If Mothra is touching mallow...
- JSL $01A7DC ;|
- BCC NoContact ;|
- LDA !HITP,x ;|\Check if Mothra is alive,
- AND #$03 ;||
- CMP #$01 ;||And if he is,
- BMI Death ;||
- JSL $00F5B7 ;|/Hurt Mallow!
- JMP NoContact ;|
- Death: ;|-\Solve a Branch Out of Range error
- JMP DeathAnim ;|_/
- NoContact: ;/
- PHX ;\
- LDX #$0B ;|Set up the start of a loop to check if a sprite
- ClipLoop: ;/is clipping with Mothra, to see if it damages him
- TXA ;\
- CMP $15E9 ;|If the register is Mothra, don't check clipping
- BEQ NotSelf ;/
- PHX ;\
- LDX $15E9 ;|
- JSL $03B69F ;|Get bounding box for Mothra
- PLX ;/
- JSL $03B6E5 ;\
- JSL $03B72B ;|Is the sprite in X registry touching?
- BCS SprContact ;/
- NotSelf:
- DEX ;\If not, continue loop
- BMI NoSprContact ;| or branch away if all possible sprites have been checked
- JMP ClipLoop ;/
- SprContact:
- LDA $14C8,x ;\If the sprite was kicked at mothra
- CMP #$0A ;|or being carried, keep going
- BMI NoSprContact ;/else, ignore the sprite
- PHX ;\
- LDX $15E9 ;|
- LDA !HITP,x ;|
- AND #$03 ;|Deal Damage to Mothra, as long as Mothra can
- CMP #$01 ;|be damaged.
- BMI NoDamage ;|
- LDA !INVINCE,x ;|
- BNE NoDamage ;|
- ;|
- LDA $7FAB10,x ;|\
- AND #$04 ;||If extra bit is in use...
- BEQ BitClear ;|/
- LDA !HITP,x ;|\
- EOR #$20 ;||
- STA !HITP,x ;||...then double the HP per phase
- AND #$20 ;||
- BNE BitClear ;||
- INC !HITP,x ;|/
- BitClear: ;|
- ;|
- DEC !HITP,x ;|
- LDA #$60 ;|
- STA !INVINCE,x ;|
- LDA #$28 ;|\Play "Boss/Chuck Hurt/Stunned" sound
- STA $1DFC ;|/
- NoDamage: ;|
- PLX ;/
- LDA #$04 ;\Kill the sprite
- STA $14C8,x ;/so it doesn't continue to damage Mothra
- NoSprContact: ;\After doing sprite contact stuff or if there was no contact
- PLX ;/Return Mothra's sprite registry value to X
- LDA !ATTACK,x ;\
- BEQ NoDec ;|Decrement the timer for attack patterns
- DEC !ATTACK,x ;|
- NoDec: ;/
- LDA !HITP,x ;\
- AND #$1C ;|Get movement state
- LSR ;|(divestate+facing)
- EOR !FACE,x ;|and put into Y registry
- TAY ;/
- LDA XSPEED,y ;\
- STA $B6,x ;|Use Y registry to get X and Y speeds, store them.
- LDA YSPEED,y ;|
- STA $AA,x ;/
- JSL $018022 ;\Update sprite's position now that we have speed,
- JSL $01801A ;/Without gravity
- LDA $E4,x ;\
- CMP #$0A ;|
- BCS NotNearLeft ;|
- STZ !FACE,x ;|
- JMP NotNearRight ;|If Mothra is near a screen boundary, turn around
- NotNearLeft: ;|
- LDA $E4,x ;|
- CMP #$F6 ;|
- BCC NotNearRight ;|
- LDA #$01 ;|
- STA !FACE,x ;|
- NotNearRight: ;/
- LDA !HITP,x ;\
- AND #$03 ;|Branch to the appropriate phase depending on
- CMP #$03 ;|Mothra's HP
- BEQ Phase1JMP ;|
- CMP #$02 ;|
- BEQ Phase2JMP ;|
- CMP #$01 ;|
- BNE DeathJMP ;/
- JMP Phase3 ;\
- DeathJMP: ;|
- JMP DeathAnim ;|
- Phase1JMP: ;|Because the branches to Phase1, Phase2, and DeathAnim
- JMP Phase1 ;|were too far away from here.
- Phase2JMP: ;|
- JMP Phase2 ;/
- Phase3:
- LDA !HITP,x ;\
- AND #$1C ;|Unlike phase2, phase3 only has 2 states, so no need to check
- CMP #$1C ;|if it's in a state that phase3 doesn't use, only need to
- BEQ Phase3_2 ;/check if it's in one or any other.
- Phase3_1:
- LDA $D8,x ;\
- CMP !MALLOWH ;|If reached mallow's height, turn around
- BPL Phase3_2 ;/
- LDA !HITP,x ;\
- AND #$E3 ;|Set high speed dive down
- ORA #$18 ;|
- STA !HITP,x ;/
- JMP RETURN2
- Phase3_2:
- LDA $D8,x ;\
- CMP !SPAWNH,x ;|If reached spawn height, turn around
- BMI Phase3_1 ;/
- LDA !HITP,x ;\
- AND #$E3 ;|Set high speed rise up
- ORA #$1C ;|
- STA !HITP,x ;/
- JMP RETURN2
- Phase2:
- LDA !HITP,x ;\
- AND #$1C ;/Get dive state
- CMP #$04 ;\If diving at an angle,
- BEQ Phase2_Return ;|it's because it was damaged in Phase1,
- CMP #$08 ;|so go to a special subphase
- BEQ Phase2_Return ;/
- CMP #$0C ;\
- BEQ Phase2_2 ;|If going one way, keep doing that
- CMP #$10 ;|
- BEQ Phase2_3 ;|
- CMP #$14 ;|
- BEQ Phase2_4 ;/
- JMP Phase2_1
- Phase2_Return:
- LDA $D8,x ;\
- CMP !SPAWNH,x ;|If Mothra has reached it's spawn height, branch.
- BMI Phase2_Return2 ;/
- LDA !HITP,x ;\
- AND #$E3 ;|Set Dive State to rising
- ORA #$08 ;|
- STA !HITP,x ;/
- JMP RETURN2
- Phase2_Return2:
- LDA #$F0 ;\Set timer until next dive
- STA !ATTACK,x ;/
- Phase2_1:
- LDA !ATTACK,x ;\If the timer has run out, start next subphase
- BEQ Phase2_2 ;/
- LDA !HITP,x ;\
- AND #$E3 ;|Fly Horizontally
- STA !HITP,x ;/
- JMP RETURN2
- Phase2_2:
- LDA #$64 ;\
- STA !ATTACK,x ;|Set timer for next phase and
- LDA $D8,x ;|check if at Mallow's height. If so,
- CMP !MALLOWH ;|start next subphase
- BPL Phase2_3 ;/
- LDA !HITP,x ;\
- AND #$E3 ;|Set Dive State properly
- ORA #$0C ;|
- STA !HITP,x ;/
- JMP RETURN2
- Phase2_3:
- LDA !ATTACK,x ;\If the timer runs out,
- BEQ Phase2_4 ;/start next subphase
- LDA !HITP,x ;\
- AND #$E3 ;|Set Dive State properly
- ORA #$10 ;|
- STA !HITP,x ;/
- JMP RETURN2
- Phase2_4:
- LDA #$F0 ;\
- STA !ATTACK,x ;|Set timer for first phase and
- LDA $D8,x ;|check if at spawn height.
- CMP !SPAWNH,x ;|If so, start first subphase
- BMI Phase1_1 ;/
- LDA !HITP,x ;\
- AND #$E3 ;|Set Dive State properly
- ORA #$14 ;|
- STA !HITP,x ;/
- JMP RETURN2
- Phase1:
- LDA !HITP,x ;\
- AND #$1C ;|If Mothra is not idle, branch.
- CMP #$01 ;|
- BPL Phase1_1 ;/
- LDA !ATTACK,x ;\If the attack timer has reached the end, start a dive
- BEQ Phase1_2 ;/
- JMP RETURN2 ;Else, just keep going back and forth in the sky
- Phase1_1:
- LDA !HITP,x ;\
- AND #$1C ;|
- CMP #$08 ;|
- BEQ Phase1_3 ;/If the dive is up, branch.
- Phase1_2:
- LDA $D8,x ;\
- CMP !MALLOWH ;|If down to Mallow's Y pos or lower, change subphases.
- BPL Phase1_3 ;/
- LDA !HITP,x ;\
- AND #$E3 ;|Set the proper
- ORA #$04 ;|dive state
- STA !HITP,x ;/
- JMP RETURN2
- Phase1_3:
- LDA $D8,x ;\
- CMP !SPAWNH,x ;|If Mothra has reached it's spawn height, branch.
- BMI Phase1_4 ;/
- LDA !HITP,x ;\
- AND #$E3 ;|Set Dive State to rising
- ORA #$08 ;|
- STA !HITP,x ;/
- JMP RETURN2
- Phase1_4:
- LDA !HITP,x ;\
- AND #$E3 ;|Set Dive State to regular flying
- STA !HITP,x ;/
- LDA #$F0 ;\
- STA !ATTACK,x ;/Set timer for next dive
- JMP RETURN2
- DeathAnim: ;\While falling off screen,
- LDA !HITP,x ;|
- AND #$E3 ;|Make sure the diving down animation is used,
- ORA #$0C ;|
- STA !HITP,x ;/
- ;\and spawn fireballs/explosions off of wings
- ;TBD ;|every so often
- ;/
- LDA $D8,x ;\Once off screen, set state to dead.
- CLC ;|Also, set level clear flag?
- ADC #$50 ;|
- LDA $14D4,x ;|
- ADC #$00 ;|
- CMP #$02 ;|
- BMI RETURN2 ;|
- LDA #$FF ;|
- STA $1493 ;|
- LDA #$0B ;|<-Song# to load when level is passed
- STA $1DBF ;|
- STZ $14C8,x ;/
- RETURN2:
- RTS
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- ; Graphics
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- Graphics:
- JSR GET_DRAW_INFO ;Get the sprite's location so we can set up OAM
- LDA !FACE,x ;\
- CLC ;|
- STA $03 ;/ Get facing and store it for later
- PHX ;Push the sprite's index onto the stack so we don't mess it up while we loop
- LDX #$03 ;The number of times to loop - 1
- Loop:
- PHX ;Store the loop value into Stack so we don't mess it up either.
- LDA $14 ;\
- AND #$10 ;|If digit of a global timer is an odd number (every n frames for n/2 frames)
- BNE No_Anim ;|then add 4 to X
- TXA ;|causing line 2 or 4 in the tile tables
- ADC #$04 ;|to be used instead of 1 or 3.
- TAX ;|
- No_Anim: ;/
- LDA $03 ;\
- BNE No_Right ;|If facing left,
- TXA ;|then add 8 to X
- ADC #$08 ;|causing line 3 or 4 in the tile tables
- TAX ;|to be used instead of 1 or 2.
- No_Right: ;/
- LDA $00 ;\
- CLC ;|Store sprite's X location to OAM so it can be drawn,
- ADC XDISP,x ;|with displacement for extra tiles
- STA $0300,y ;/
- LDA $01 ;\
- CLC ;|Store sprite's Y location to OAM so it can be drawn,
- ADC YDISP,x ;|with displacement for extra tiles
- STA $0301,y ;/
- PHX ;\
- LDX $15E9 ;|Get the state of Mothra so we can draw the right tiles.
- LDA !HITP,x ;|
- AND #$1C ;|
- PLX ;/
- CMP #$1C ;\
- BEQ Graphics_Dive_Up ;|
- CMP #$18 ;|
- BEQ Graphics_Dive_Down ;|
- CMP #$14 ;|
- BEQ Graphics_Vert_Up ;|
- CMP #$10 ;|Basically a Switch-Case system; since CMP does not
- BEQ Graphics_Vert_Pause ;|Affect A, we can use multiple CMP commands
- CMP #$0C ;|in a row. So for each of these cases we have
- BEQ Graphics_Vert_Down ;|a different branch we go to.
- CMP #$08 ;|If none of them are true, we go to the default
- BEQ Graphics_Dive_Up ;|case which is Graphics_Passive
- CMP #$04 ;|
- BEQ Graphics_Dive_Down ;/
- Graphics_Passive:
- LDA TILEMAPPASSIVE,x
- STA $0302,y
- JMP Graphics_Finish
- Graphics_Dive_Down:
- LDA TILEMAPSWOOPDOWN,x
- STA $0302,y
- JMP Graphics_Finish
- Graphics_Dive_Up:
- LDA TILEMAPSWOOPUP,x
- STA $0302,y
- JMP Graphics_Finish
- Graphics_Vert_Down:
- LDA TILEMAPDIVE,x
- STA $0302,y
- JMP Graphics_Finish
- Graphics_Vert_Pause:
- LDA TILEMAPBOTTOM,x
- STA $0302,y
- JMP Graphics_Finish
- Graphics_Vert_Up:
- LDA TILEMAPPULLUP,x
- STA $0302,y
- Graphics_Finish:
- PHX ;Put X onto the stack (useful for temporary variables)
- LDX $15E9 ;Get a new value for X,
- LDA $15F6,x ;and use that value to get the location of the YXPPCCCT from CFG and load it
- PHA ;Store A in stack
- LDA $03 ;\Get facing, if facing left skip next step,
- BEQ Skip_Step ;|Which is to flip the X facing
- PLA ;|\
- EOR #$40 ;||Said step
- PHA ;|/
- Skip_Step: ;/
- LDA !HITP,x ;\
- CMP #$01 ;|If HP is one,
- BNE Skip_Other ;|increase the palette
- PLA ;|(use a palette from 8 to E, so
- ADC #$02 ;|the maximum palette this increases to is
- PHA ;|F or lower)
- Skip_Other: ;/
- LDA !INVINCE,x ;\
- BEQ Skip_Final ;|
- LDA $14 ;|
- AND #$02 ;|If Mothra was recently damaged and the invincibility
- BEQ Skip_Final ;|timer is running, switch palettes rapidly.
- PLA ;|
- EOR #$02 ;|
- PHA ;/
- Skip_Final:
- PLA ;Get A back
- STA $0303,y ;Store into OAM with the rest of the draw information
- PLX ;Now that we are done with X, put the value from the stack back in it
- INY ;\
- INY ;|
- INY ;|Increase the value of Y so on the next pass of the loop we don't overwrite what we did
- INY ;/
- PLX ;Get back the value of the loop
- DEX ;\
- BMI NoLoop ;/ End of loop, decrement counter and if it's still positive go back to start.
- JMP Loop
- NoLoop:
- PLX ;Now that we are done inside the loop, return the value to X that we stored just before the loop
- LDY #$02 ;Mothra is 32x32, so we'll be drawing 4 16x16 tiles, which means a value of 02.
- LDA #$03 ;Number of tiles written in loop- 1
- JSL $01B7B3 ; Now that everything's loaded into OAM, call a routine to draw the sprite
- RTS
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- ; GET_DRAW_INFO
- ; This is a helper for the graphics routine. It sets off screen flags, and sets up
- ; variables. It will return with the following:
- ;
- ; Y = index to sprite OAM ($300)
- ; $00 = sprite x position relative to screen boarder
- ; $01 = sprite y position relative to screen boarder
- ;
- ; It is adapted from the subroutine at $03B760
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- SPR_T1: db $0C,$1C
- SPR_T2: db $01,$02
- GET_DRAW_INFO: STZ $186C,x ; reset sprite offscreen flag, vertical
- STZ $15A0,x ; reset sprite offscreen flag, horizontal
- LDA $E4,x ; \
- CMP $1A ; | set horizontal offscreen if necessary
- LDA $14E0,x ; |
- SBC $1B ; |
- BEQ ON_SCREEN_X ; |
- INC $15A0,x ; /
- ON_SCREEN_X: LDA $14E0,x ; \
- XBA ; |
- LDA $E4,x ; |
- REP #$20 ; |
- SEC ; |
- SBC $1A ; | mark sprite invalid if far enough off screen
- CLC ; |
- ADC.W #$0040 ; |
- CMP.W #$0180 ; |
- SEP #$20 ; |
- ROL A ; |
- AND #$01 ; |
- STA $15C4,x ; /
- BNE INVALID ;
- LDY #$00 ; \ set up loop:
- LDA $1662,x ; |
- AND #$20 ; | if not smushed (1662 & 0x20), go through loop twice
- BEQ ON_SCREEN_LOOP ; | else, go through loop once
- INY ; /
- ON_SCREEN_LOOP: LDA $D8,x ; \
- CLC ; | set vertical offscreen if necessary
- ADC SPR_T1,y ; |
- PHP ; |
- CMP $1C ; | (vert screen boundry)
- ROL $00 ; |
- PLP ; |
- LDA $14D4,x ; |
- ADC #$00 ; |
- LSR $00 ; |
- SBC $1D ; |
- BEQ ON_SCREEN_Y ; |
- LDA $186C,x ; | (vert offscreen)
- ORA SPR_T2,y ; |
- STA $186C,x ; |
- ON_SCREEN_Y: DEY ; |
- BPL ON_SCREEN_LOOP ; /
- LDY $15EA,x ; get offset to sprite OAM
- LDA $E4,x ; \
- SEC ; |
- SBC $1A ; | $00 = sprite x position relative to screen boarder
- STA $00 ; /
- LDA $D8,x ; \
- SEC ; |
- SBC $1C ; | $01 = sprite y position relative to screen boarder
- STA $01 ; /
- RTS ; return
- INVALID: PLA ; \ return from *main gfx routine* subroutine...
- PLA ; | ...(not just this subroutine)
- RTS ; /
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement