Skip to content

Commit

Permalink
tetris-PRG.info: Add local labels for stageSpriteForCurrentPiece
Browse files Browse the repository at this point in the history
  • Loading branch information
ejona86 committed Jan 24, 2024
1 parent d956dd3 commit 295d6dc
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
9 changes: 7 additions & 2 deletions tetris-PRG.info
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ RANGE { START $887C; END $8882; TYPE BYTETABLE; NAME "rngTable"; };
RANGE { START $88EE; END $8913; TYPE DBYTETABLE; NAME "rotationTable"; }; # canon
RANGE { START $898E; END $89AB; TYPE BYTETABLE; NAME "framesPerDropTable"; }; # canon
RANGE { START $89AC; END $89AD; TYPE BYTETABLE; NAME "unreferenced_framesPerDropTable"; };
RANGE { START $8A9C; END $8B8B; TYPE BYTETABLE; NAME "orientationTable"; }; # canon
RANGE { START $8A9C; END $8B8B; TYPE BYTETABLE; NAME "orientationTable"; COMMENT "4 sprites per tetrimino. 3 bytes per sprite: signed y off, tile, signed x off"; }; # canon
RANGE { START $8BE5; END $8BF7; TYPE BYTETABLE; NAME "orientationToSpriteTable"; COMMENT "Only cares about orientations selected by spawnTable"; };
RANGE { START $8BF8; END $8C0A; TYPE BYTETABLE; NAME "unreferenced_orientationToSpriteTable"; COMMENT "Same as orientationToSpriteTable except sprites have different offsets"; };
RANGE { START $8C0B; END $8C26; TYPE BYTETABLE; NAME "unreferenced_data2"; };
Expand Down Expand Up @@ -643,7 +643,12 @@ LABEL { ADDR $89D7; NAME "@buttonHeldDown"; };
LABEL { ADDR $89EC; NAME "@notPressingRight"; }; # canon
LABEL { ADDR $8A01; NAME "@restoreX"; }; # canon
LABEL { ADDR $8A09; NAME "@ret"; };
LABEL { ADDR $8A0A; NAME "stageSpriteForCurrentPiece"; };
LABEL { ADDR $8A0A; NAME "stageSpriteForCurrentPiece"; COMMENT "temp memory usage: generalCounter3=tetrimino x pos"; };
LABEL { ADDR $8A2C; NAME "@calcYPos"; COMMENT "generalCounter4=tetrimino y pos"; };
LABEL { ADDR $8A36; NAME "@calcOrientationTableOffset"; COMMENT "x=currentPiece*12"; };
LABEL { ADDR $8A4B; NAME "@copySprite"; };
LABEL { ADDR $8A84; NAME "@spriteShown"; COMMENT "If y <= 2F, then the sprite is shown. Calculate and set x pos"; };
LABEL { ADDR $8A93; NAME "@inc"; };
LABEL { ADDR $8B8C; NAME "unreferenced_func2"; };
LABEL { ADDR $8B9D; NAME "@loop"; };
LABEL { ADDR $8BCE; NAME "stageSpriteForNextPiece"; };
Expand Down
10 changes: 5 additions & 5 deletions twoplayer-tetris-PRG.s.diff
Original file line number Diff line number Diff line change
Expand Up @@ -206,23 +206,23 @@
@@ -1569,17 +1569,17 @@ stageSpriteForCurrentPiece:
lda numberOfPlayers
cmp #$01
beq L8A2C
beq @calcYPos
lda generalCounter3
sec
- sbc #$40
+ sbc #$50 ;sbc #$40
sta generalCounter3
lda activePlayer
cmp #$01
beq L8A2C
beq @calcYPos
lda generalCounter3
- adc #$6F
+ adc #$8F ;adc #$6F
sta generalCounter3
L8A2C: clc
; generalCounter4=tetrimino y pos
@calcYPos:
clc
lda tetriminoY
rol a
rol a
@@ -1717,12 +1717,12 @@ L8B9D: lda orientationTable,y
bne L8B9D
stx oamStagingLength
Expand Down

0 comments on commit 295d6dc

Please sign in to comment.