Fix for different types of joysticks in different ports.

This commit is contained in:
Pecusx
2023-06-01 09:13:45 +02:00
parent 1b99839d77
commit 2d82073983
7 changed files with 21 additions and 7 deletions
+5 -4
View File
@@ -16,8 +16,9 @@
; - money each player has on the beginning of the game (moneyL i moneyH)
; - and I am sure maxwind, gravity, no_of_rounds in a game, speed of shell flight
mwa #(display+40*140) temp ; we only need to clear last 60 lines (faster)
jsr clearscreen.Go ;let the screen be clean
; mwa #(display+40*140) temp ; we only need to clear last 60 lines (faster)
; jsr clearscreen.Go ;let the screen be clean
jsr clearscreen ;let the screen be clean
mwa #DisplayCopyRom temp
mwa #display temp2
@@ -221,7 +222,7 @@ invertme
jmp AfterManualPurchase
ManualPurchase
lda JoyNumber,x
sta JoystickNumber ; set joystick port for player
jsr SetJoystickPort ; set joystick port for player
mva #0 isInventory
jsr Purchase ; purchase weapons
bit escFlag
@@ -1542,7 +1543,7 @@ displayloop1
mva #0 COLOR1
sta COLBAKS ; set color of background
sta CreditsVScrol
sta JoystickNumber ; set joystick port for player
jsr SetJoystickPort ; set joystick port for player
mva #TextForegroundColor COLOR2
SetDLI DLIinterruptGameOver ; jsr SetDLI for Game Over screen
; make text and color lines for each tank
+4 -3
View File
@@ -52,7 +52,7 @@ MainGameLoop
mva #0 TankNr ;
sta COLBAKS ; set background color to black
sta JoystickNumber ; set joystick port for player
jsr SetJoystickPort ; set joystick port for player
; Hide all (easier than hide last ;) ) tanks
jsr cleartanks ; A=0
@@ -374,7 +374,7 @@ RoboTanks
ManualShooting
lda JoyNumber,x
sta JoystickNumber ; set joystick port for player
jsr SetJoystickPort ; set joystick port for player
jsr WaitForKeyRelease
lda #%00000000
sta TestFlightFlag ; set "Test Fight" off
@@ -809,7 +809,6 @@ deletePtr = temp
; clean variables
lda #0
sta escFlag
sta JoystickNumber
tay
mwa #variablesStart deletePtr
@ tya
@@ -817,6 +816,8 @@ deletePtr = temp
inw deletePtr
cpw deletePtr #variablesEnd
bne @-
tya
jsr SetJoystickPort
; ser initial shapes for each tank (tanks 0-5 has shape 0 now)
ldy #1
+9
View File
@@ -375,6 +375,15 @@ NoRMT_PALchange
icl 'game.asm'
;--------------------------------------------------
.proc SetJoystickPort
sta JoystickNumber
.IF TARGET = 800
jsr WaitOneFrame
jmp GetKey.Check2button ; update state second joy button
.ELSE
rts
.ENDIF
.endp
;--------------------------------------------------
.proc GetKey
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
+3
View File
@@ -235,6 +235,9 @@ FirstSTART
icl 'game.asm'
;--------------------------------------------------
.proc SetJoystickPort
rts
.endp
;--------------------------------------------------
.proc GetKey
BIN
View File
Binary file not shown.