Hi,
I'm trying to make status bar using sprite 0 hit.
But theres colorful lines in sprite0 height:
Yes, I know, status bar is broken for now.I need to deal with those line first.
Oh, here is the sprite 0 hit code:
Code is started after all actions in frame was done.
I also tried
Instead of
As a sprite 0 hit checking method by it gives same effects.
So, any help, anyone?
I'm trying to make status bar using sprite 0 hit.
But theres colorful lines in sprite0 height:
Yes, I know, status bar is broken for now.I need to deal with those line first.
Oh, here is the sprite 0 hit code:
Code:
Sprite0Hit:
lda #$20
sta $7F0
ldy #$B8
ldx #$0
lda #$1b
jsr Rys1 ;Sprite 0
CheckSprite0Hit:
bit $2002
bvs CheckSprite0Hit
CheckSprite0Hit2:
bit $2002
bvc CheckSprite0Hit2
lda #$00
sta $2000
sta $2001 ;Turn PPU OFF
lda #$06
sta BG1
lda #$07
sta BG2
lda #$08
sta BG3 ;Change CHR ROM Chunks
lda #$3F
sta $2006
lda #$0
sta $2006 ;Set PPU ADDR for palete
ldx #$00
Statbar_Load_PAL:
lda Statbar_Pal,x
sta $2007
inx
cpx #$11
bne Statbar_Load_PAL ;Load Status bar palete
lda #$00
sta $2005
lda #$D0
sta $2005 ;Set scrolling
lda #%10001000 ;enable NMI,Sprites from VRAM1
sta $2000
lda #%00011110 ;Turn PPU ON,show 8 left pixels of BG and show sprites.
sta $2001
rts
lda #$20
sta $7F0
ldy #$B8
ldx #$0
lda #$1b
jsr Rys1 ;Sprite 0
CheckSprite0Hit:
bit $2002
bvs CheckSprite0Hit
CheckSprite0Hit2:
bit $2002
bvc CheckSprite0Hit2
lda #$00
sta $2000
sta $2001 ;Turn PPU OFF
lda #$06
sta BG1
lda #$07
sta BG2
lda #$08
sta BG3 ;Change CHR ROM Chunks
lda #$3F
sta $2006
lda #$0
sta $2006 ;Set PPU ADDR for palete
ldx #$00
Statbar_Load_PAL:
lda Statbar_Pal,x
sta $2007
inx
cpx #$11
bne Statbar_Load_PAL ;Load Status bar palete
lda #$00
sta $2005
lda #$D0
sta $2005 ;Set scrolling
lda #%10001000 ;enable NMI,Sprites from VRAM1
sta $2000
lda #%00011110 ;Turn PPU ON,show 8 left pixels of BG and show sprites.
sta $2001
rts
Code is started after all actions in frame was done.
I also tried
Code:
CheckSprite0Hit:
lda $2002
AND #%01000000
cmp #%01000000
bne CheckSprite0Hit
lda $2002
AND #%01000000
cmp #%01000000
bne CheckSprite0Hit
Instead of
Code:
CheckSprite0Hit:
bit $2002
bvs CheckSprite0Hit
CheckSprite0Hit2:
bit $2002
bvc CheckSprite0Hit2
bit $2002
bvs CheckSprite0Hit
CheckSprite0Hit2:
bit $2002
bvc CheckSprite0Hit2
As a sprite 0 hit checking method by it gives same effects.
So, any help, anyone?