Not sure if sempressimo meant crashing in the emulator, or actually crashing the emulator program itself. If the latter happened, this is a bug in the emulator and should be reported (would you mind sending me the ROM if this is the case?). Yes, I meant crashing the emulator itself, it is crashing ...
This is why you need to go step by step in a debugger (like FCEUX) to see why it's not doing what you expect. By the way, you don't need to CMP #0. If bullet_index is zero, LDA bullet_index will set the zero flag...beq will branch if zero flag is set, therefore it will branch correctly without the ...
You will have to run it through a debugger. Set a breakpoint for writes to $258 or possibly whatever "bullet_index" is and step through it to see if it loads the values the way you expect. Are you sure you are assigning a non-empty tile to the bullet? I pinpoint the error to the bullet_in...
I don't see anything wrong with this piece of code. How exactly are the bullets misbehaving? How are you creating and destroying the bullets? Are you initializing bullet_speed properly before firing any bullets? Thank for your help guys on making sure the loop is proper ASM, I am still not confiden...
I would have expected adc #BULLET_SPEED or adc bullet_speed, X , but I obviously know nothing about the context. As a side note, you can do increments and comparisons directly on the X register. You don't really need to store and retrieve bullet_index in this example. INX ; INC bullet_index ; LDA b...
Mostly I want someone just to see if I have an obvious ASM error in this loop.. :( When I add one to bullet(x) it comes out with some other value not being 80 or 81 which is the expected.. UpdateBullets: LDA #$00 STA bullet_index .next_bullet LDX bullet_index LDA bullet_y, x CMP #INACTIVE BEQ .skip_...
I thought is was the same, but I am having some bug related to this. What's your bug, exactly? Cant tell know as I opted to rewrite most of the affected logic anyhow. Before I was treating the player as one object, enemeies as its own object array but then decided to just have them all as one objec...