Language…
6 users online: Danik2343, DinoMom, Firstnamebutt, masl, Saibot1997, Zavok - Guests: 212 - Bots: 350
Users: 64,795 (2,380 active)
Latest user: mathew

Breack blocks Bug

i have the next error with my next sprite:

Video

i am using the next code :

Code
DestroyX: db $00,$0E,$00,$0E
DestroyY: db $00,$00,$0E,$0E
	
romper:

	LDA $13
	AND #$03
	STA $157C,x
	
	LDA $157C,x
	TAY 
	
	LDA $E4,x 		;\
	CLC
	ADC DestroyX,y
	BCS conIncR
	AND #$F0 	;| Update the position
	STA $9A 		;| of the block
	LDA $14E0,x 		;| so it doesn't shatter
	STA $9B 		;| where the players at
	JMP sRomper:
conIncR:
	AND #$F0 	;| Update the position
	STA $9A 		;| of the block
	LDA $14E0,x 		;| so it doesn't shatter
	INC A
	STA $9B 		;| where the players at
sRomper:
	LDA $D8,x 		;|
	CLC
	SBC DestroyY,y
	AND #$F0 	;|
	STA $98 		;|
	LDA $14D4,x 		;|
	STA $99 		;/
	
	LDA #$01                ;
	STA $9C
	LDY #$00
	JSL $00BEB0
	
	LDA $1588,x
	BEQ finRomper
	PHB
	LDA #$02
	PHA
	PLB
	LDA #$00 	;set to 0 for normal explosion, 1 for rainbow (throw blocks)
	JSL $028663 	;breaking effect
	PLB
	
finRomper:
	RTS
RTS


how can i fix this?

------------------------------------------------------

Youtube
Twitter
SMWControlLibX GitHub
My Discord Server
Snestorage where you can download my resources
Originally posted by anonimzwx

LDA #$01
STA $9C


Probably not it, but its worth trying, change the #$01 to #$02.
May I ask how? The similar things I've seen in the past were annoying as hell to fix.
if you divide your codes in sub routines is easier fix the bugs. But always there are bugs that are hard to fix.

i found the bug in the graphic routine, for some reason the RAM 192C provokes the bug. I replace this ram and works.

------------------------------------------------------

Youtube
Twitter
SMWControlLibX GitHub
My Discord Server
Snestorage where you can download my resources