diff --git a/BUGS.md b/BUGS.md index 11bed6c..9a4b26f 100644 --- a/BUGS.md +++ b/BUGS.md @@ -7,11 +7,15 @@ This is a list of the software bugs (as opposed to the bugs in the game that you * Sometimes centipede segments seem to be stacked one on top of another. You think there is just one left but you shoot it and there is one underneath it. This should not happen. * A spider moving left to right went off screen and left garbage on the RHS as it exited. I have only seen this once. I think it coincided with the player dying. * Sometimes when the player dies, the "you can shoot" indicator is left behind as garbage on-screen. -* I have seen a couple of crashes. I think an off-screen centipede segment is getting "shot" at the beginning of a level leading to a crash. Almost definitely related to collision and shot handling. -* I am seeing other crashes where the PC ends up in bank 22 or so. Need to dig into the stack to figure out where it is coming from. + FIXED ======= * A shot is able to pass through an almost gone mushroom if lined up just right. Best to change the sprite code for the shot to scan the two pixels below for a collision. +* I have seen a couple of crashes. I think an off-screen centipede segment is getting "shot" at the beginning of a level leading to a crash. Almost definitely related to collision and shot handling. +* I am seeing other crashes where the PC ends up in bank 22 or so. Need to dig into the stack to figure out where it is coming from. + * I have confirmed that we are jumping to band 22 from segmentBodyJump_jumpInst. Not sure how a bad address is ending up in the jump table here. + * Seems to happen pretty reliably if I die from the last segment and progress to the next level. + * Caused by both gamePlayer.s and level.s calling start level when the last segment is the one which kills the player. The player code now defers to the level code to handle starting the level after the player dies that way. diff --git a/BuGS/gamePlayer.s b/BuGS/gamePlayer.s index 105565f..438c39f 100644 --- a/BuGS/gamePlayer.s +++ b/BuGS/gamePlayer.s @@ -86,7 +86,8 @@ updatePlayer_gameRunning anop beq updatePlayer_gameOver lda numSegments bne updatePlayer_notNextLevel - jsl levelNext +; If we are going to the next level, let updateLevel handle that for us. + rtl updatePlayer_notNextLevel anop jmp startLevel updatePlayer_gameOver anop diff --git a/BuGS/gameSegments.s b/BuGS/gameSegments.s index d909b6a..0c6cc6d 100644 --- a/BuGS/gameSegments.s +++ b/BuGS/gameSegments.s @@ -1740,7 +1740,6 @@ isSegmentCollision_returnTrue anop ; Call this with the segment num * 2 in the X register shootSegment entry - jsl explodeSegment phx lda segmentStates,x cmp #SEGMENT_STATE_BODY @@ -1751,6 +1750,7 @@ shootSegment_body anop jsl scoreAddTen shootSegment_doneScore anop plx + jsl explodeSegment ldy segmentPosOffset,x lda segmentCurrentTile,y