Skip to content

Commit 85fc81b

Browse files
committed
twoplayer: Add controls for Start-less Famicom P2
Since P2 lacks a Start button on Famicom, we now let P2 press A to join. We also let P1 start the game with Start. If P2 is holding A when P1 presses start they will have +10 added to the level. The old controls are still supported. No detection of the Famicom is included. These keys are always allowed. Also, the on-screen text still says "PRESS START!" even though "A" is necessary on Famicom. Fixes #6
1 parent 5eabdbd commit 85fc81b

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

twoplayer.s

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -542,8 +542,8 @@ gameMode_levelMenu_nametable_mod:
542542
gameMode_levelMenu_processPlayer1Navigation_processPlayer2:
543543
.export gameMode_levelMenu_processPlayer1Navigation_processPlayer2
544544
lda newlyPressedButtons_player2
545-
cmp #$10
546-
bne @checkBPressed
545+
and #$90 ; Start or A. A is required for Famicom
546+
beq @checkBPressed
547547
lda numberOfPlayers
548548
cmp #$01
549549
bne @checkBPressed
@@ -622,11 +622,13 @@ gameMode_levelMenu_processPlayer2Navigation:
622622
lda selectingLevelOrHeight
623623
sta originalY
624624
lda newlyPressedButtons_player2
625-
cmp #$10
626-
bne @checkBPressed
625+
; allow player1 to press start for Famicom
626+
ora newlyPressedButtons_player1
627+
and #$10
628+
beq @checkBPressed
627629
lda heldButtons_player2
628-
cmp #$90
629-
bne @startAndANotPressed
630+
and #$80
631+
beq @startAndANotPressed
630632
lda player2_startLevel
631633
clc
632634
adc #$0A

0 commit comments

Comments
 (0)