Okay, of course I was a jerk.
I was so tired that in my code I wrote "LDA $14D4,x" instead of "STA $14D4,x".
End of my trouble. =)
I was so tired that in my code I wrote "LDA $14D4,x" instead of "STA $14D4,x".
End of my trouble. =)
LDA $19 CMP #$02 BEQ ReturntA
LDA $19 CMP #$02 BNE + JMP ReturntA +
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; INIT and MAIN JSL targets ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; incsrc subroutinedefs.asm Init: LDA $7FAB28,x PHX LDX $000DB2 BIT $1F2C,x BEQ NEXT1 PLX STZ $14C8,x ; Erase sprite if already gotten RTL NEXT1: PLX JSL !SubHorizPos ;face mario initially TYA STA $157C,x RTL Main: LDA $14C8,x ; return if sprite status != 8 CMP #$08 BNE RETURN JSR SUB_GFX LDA $9D ; return if sprites locked BNE RETURN JSL !SubOffscreenX0 ; only process sprite while on screen LDA $187A BNE RETURN JSL $01A7DC BCC RETURN LDA $0DC5 INC CMP #$08 BPL NEXT2 STA $0DC5 LDA $0DC4 INC STA $0DC4 PHY LDY $000DB2 LDA $1F2C,y ORA $7FAB28,x STA $1F2C,y PLY NEXT2: LDA #$01 STA $C2,x LDA #$29 STA $1DFC STZ $14C8,x RETURN: RTL ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; GRAPHICS ROUTINE ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; SUB_GFX: JSL !GetDrawInfo ; after: Y = index to sprite OAM ($300) ; $00 = sprite x position relative to screen boarder ; $01 = sprite y position relative to screen boarder LDA $157C,x ; $02 = sprite direction STA $02 LDA $00 ; set x position of the tile STA $0300,y LDA $01 ; set y position of the tile STA $0301,y LDA #$C2 ; set tile number STA $0302,y LDA $15F6,x ; get sprite palette info PHX LDX $02 ; flip the tile if the sprite direction is 0 BNE NO_FLIP_1 ORA #$40 NO_FLIP_1: PLX ORA $64 ; add in the priority bits from the level settings STA $0303,y ; set properties INY ; get the index to the next slot of the OAM INY ; (this is needed if you wish to draw another tile) INY INY LDY #$02 ; #$02 means the tiles are 16x16 LDA #$00 ; This means we drew one tile JSL $01B7B3 RTS
define = $xx,$xx
LDA $10