Fanatical like a Demon
I want to spawn specific sprites in each phase, I found this code:
EDIT: Works
Code
JSL $02A9DE BMI RETURN ; If sprite slots are full, ; don't generate. After this, the sprite to generate is in the Y register. PHX ; NOTE: We need to use the X register for the generated sprite. TYX ; So we preserve the current sprites data. LDA #$05 STA $9E,x ; The sprite number is stored to the custom sprite RAM Address. ; STA $7FAB9E,y doesn't exist, that's why we transfered X to Y. TXY ; Transfer sprite to spawn back to Y. PLX ; Restore X. LDA #$01 STA $14C8,y ; Run sprite's INIT code first. LDA $E4,x STA $00E4,y ; X position. LDA $14E0,x STA $14E0,y ; X position high. LDA $D8,x STA $00D8,y ; Y position. LDA $14D4,x STA $14D4,y ; Y position high. PHX ; Push current sprite. TYX ; Get sprite to generate into X. JSL $07F7D2 ; Reset sprite tables, to generate this one. PLX ; Restore previous sprite. RTS
EDIT: Works