im trying to debug my states code.
state number $00 is the first line and so on..
What's happening is that at one point in the code, if i uncomment a 2 byte command (ldy #5), the one enemy on the screen, that is susposed to be a type 02 (starts at state 2 and continues to 3.. ) is some how turned into type 00. I checked, and the state values change from the 02 loop to the 00 loop when two more bytes are added to a part of the code.
What is happening? I'm so lost .
Code:
;y portion, y portion decimal, x portion, x portion decimal, delay, , , next state
.byte $01, $00, $01, $00, $78, $00, $00, $01 ;00 ;$78 == 120 == ~ 2 second delay
.byte $01, $00, $00, $00, $3c, $02, $00, $00 ;01 ;$3c == 60 == ~ 1 second delay
.byte $ff, %00010100, $ff, %00101011, $3c, $00, $00, $03 ;02
.byte $00, %11111011, $00, %00000000, $3c, $00, $00, $04 ;03
.byte $00, %00110010, $00, %10110101, $3c, $00, $00, $05 ;04
.byte $00, %00000000, $00, %11101100, $3c, $00, $00, $02 ;05
.byte $ff, %00000000, $01, %00000000, $3c, $00, $00, $07 ;06
.byte $00, %00000000, $01, %00000000, $3c, $00, $00, $08 ;07
.byte $01, %00000000, $01, %00000000, $3c, $00, $00, $09 ;08
.byte $ff, %00000000, $ff, %00000000, $3c, $00, $00, $0a ;09
.byte $00, %00000000, $ff, %00000000, $3c, $00, $00, $0b ;0a
.byte $01, %00000000, $ff, %00000000, $3c, $00, $00, $06 ;0b
.byte $01, $00, $01, $00, $78, $00, $00, $01 ;00 ;$78 == 120 == ~ 2 second delay
.byte $01, $00, $00, $00, $3c, $02, $00, $00 ;01 ;$3c == 60 == ~ 1 second delay
.byte $ff, %00010100, $ff, %00101011, $3c, $00, $00, $03 ;02
.byte $00, %11111011, $00, %00000000, $3c, $00, $00, $04 ;03
.byte $00, %00110010, $00, %10110101, $3c, $00, $00, $05 ;04
.byte $00, %00000000, $00, %11101100, $3c, $00, $00, $02 ;05
.byte $ff, %00000000, $01, %00000000, $3c, $00, $00, $07 ;06
.byte $00, %00000000, $01, %00000000, $3c, $00, $00, $08 ;07
.byte $01, %00000000, $01, %00000000, $3c, $00, $00, $09 ;08
.byte $ff, %00000000, $ff, %00000000, $3c, $00, $00, $0a ;09
.byte $00, %00000000, $ff, %00000000, $3c, $00, $00, $0b ;0a
.byte $01, %00000000, $ff, %00000000, $3c, $00, $00, $06 ;0b
state number $00 is the first line and so on..
What's happening is that at one point in the code, if i uncomment a 2 byte command (ldy #5), the one enemy on the screen, that is susposed to be a type 02 (starts at state 2 and continues to 3.. ) is some how turned into type 00. I checked, and the state values change from the 02 loop to the 00 loop when two more bytes are added to a part of the code.
What is happening? I'm so lost .