a bit better 5200 keyboard but still not good...

This commit is contained in:
2022-10-08 02:04:20 -04:00
parent ecc8e11d13
commit 443b62e9e6
4 changed files with 57 additions and 110 deletions
+32
View File
@@ -2181,5 +2181,37 @@ ybarrel
rts
.endp
;--------------------------------------------------
.proc PMoutofScreen
;--------------------------------------------------
lda #$00 ; let all P/M disappear
:8 sta hposp0+#
rts
.endp
;--------------------------------------------------
.proc ColorsOfSprites
lda TankColoursTable ; colours of sprites under tanks
sta PCOLR0
lda TankColoursTable+1
sta PCOLR1
lda TankColoursTable+2
sta PCOLR2
lda TankColoursTable+3
sta PCOLR3
LDA TankColoursTable+4
STA COLOR3 ; joined missiles (5th tank)
rts
.endp
;--------------------------------------------------
.proc SetPMWidth
lda #$00
sta sizep0 ; P0-P3 widths
sta sizep0+1
sta sizep0+2
sta sizep0+3
lda #%01010101
sta sizem ; all missiles, double width
rts
.endp
.endif
+2 -67
View File
@@ -37,6 +37,7 @@ STRIG0 = $1a ;There is no strig0 but we will make this the shadow of the TR
chbas = $1b ;There is no CHBAS but we will make this the shadow of the CHBASE
CONSOL = $1c ;There are no console keys on Atari 5200, so we replace console h/w reads with a new shadow based on the keypad keys
consol_reset = $07;The constant value representing that no consol key is pressed
kbcode = $1d ;There is no keyboard on the Atari 5200, so replace kbcode h/w reads with a byte variable read based on the keypad keys
; PAGE 2
VIMIRQ EQU $0200 ;IMMED IRQ VECTOR
@@ -74,7 +75,7 @@ POT5 EQU POKEY+$05
POT6 EQU POKEY+$06
POT7 EQU POKEY+$07
ALLPOT EQU POKEY+$08
KBCODE EQU POKEY+$09
KBCODE_5200 EQU POKEY+$09
RANDOM EQU POKEY+$0a
POTGO EQU POKEY+$0b
SERIN EQU POKEY+$0d
@@ -269,69 +270,3 @@ scr32 = @dmactl(narrow|dma|players|missiles|lineX1)
_reset = $0e
.ende
*/
.enum @kbcode
_none = 255
_esc = 28
_1 = 31
_2 = 30
_3 = 26
_4 = 24
_5 = 29
_6 = 27
_7 = 51
_8 = 53
_9 = 48
_0 = 50
_lt = 54
_gt = 55
_del = 52
_tab = 44
_Q = 47
_W = 46
_E = 42
_R = 40
_T = 45
_Y = 43
_U = 11
_I = 13
_O = 8
_P = 10
_min = 14
_up = 14 ; cursor function
_eq = 15
_down = 15 ; cursor function
_ret = 12
_A = 63
_S = 62
_D = 58
_F = 56
_G = 61
_H = 57
_J = 1
_K = 5
_L = 0
_semicolon = 2
_plus = 6
_left = 6 ; cursor function
_asterisk = 7
_right = 7 ; cursor function
_caps = 60
_Z = 23
_X = 22
_C = 18
_V = 16
_B = 21
_N = 36
_M = 37
_comma = 32
_dot = 34
_slash = 38
_atari = 39
_help = 17
_F1 = 3
_F2 = 4
_F3 = 19
_F4 = 20
_space = 33
.ende
+20 -40
View File
@@ -6,7 +6,7 @@
;Miami & Warsaw 2022
;---------------------------------------------------
.def TARGET = 800; 5200 ; or 800
.def TARGET = 5200 ; or 800
;atari800 -5200 -cart ${outputFilePath} -cart-type 4
;atari800 -run ${outputFilePath}
;---------------------------------------------------
@@ -134,7 +134,7 @@
OPT h-f+ ; no headers, single block --> cart bin file
icl 'lib/5200SYS.ASM'
icl 'lib/5200MACRO.ASM'
/* .enum @kbcode
.enum @kbcode
/*
_0
_1
@@ -152,7 +152,7 @@
_pause = $0d
_reset = $0e
*/
/* _space = $00
_space = $00
_Y = $01
_up = $02
_O = $03
@@ -163,10 +163,10 @@
_down = $08
_I = $09
_esc = $0a
_ret = $0b
_ret = $fa ;$0b
_M = $0d
_S = $0e
_del = $0e ; not used in 5200
_del = $fe ; not used in 5200
.ende */
.ELSE
@@ -262,6 +262,7 @@ FirstSTART
.IF TARGET = 5200
mva #$0f STICK0
mva #$04 CONSOL5200 ;Speaker off, Pots enabled, port #1 selected
mwa #kb_continue VKEYCNT ;Keyboard handler
.ENDIF
VMAIN VBLinterrupt,7 ;jsr SetVBL
@@ -1003,27 +1004,6 @@ B0 DEY
sta MaxForceTableL,x
rts
.endp
;--------------------------------------------------
.proc PMoutofScreen
;--------------------------------------------------
lda #$00 ; let all P/M disappear
:8 sta hposp0+#
rts
.endp
;--------------------------------------------------
.proc ColorsOfSprites
lda TankColoursTable ; colours of sprites under tanks
sta PCOLR0
lda TankColoursTable+1
sta PCOLR1
lda TankColoursTable+2
sta PCOLR2
lda TankColoursTable+3
sta PCOLR3
LDA TankColoursTable+4
STA COLOR3 ; joined missiles (5th tank)
rts
.endp
;--------------------------------------------------
.proc WeaponCleanup;
@@ -1125,17 +1105,6 @@ MakeTanksVisible
rts
.endp
;--------------------------------------------------
.proc SetPMWidth
lda #$00
sta sizep0 ; P0-P3 widths
sta sizep0+1
sta sizep0+2
sta sizep0+3
lda #%01010101
sta sizem ; all missiles, double width
rts
.endp
;--------------------------------------------------
.proc DLIinterruptGraph
;sta dliA
;sty dliY
@@ -1313,6 +1282,17 @@ exitVBL
jmp XITVBV
.ENDIF
.endp
.IF TARGET = 5200
.proc kb_continue
sta kbcode ;Store key code in shadow.
exit pla
tay
pla
tax
pla
rti
.endp
.ENDIF
;----------------------------------------------
.proc RandomizeSequence0
ldx #0
@@ -1787,15 +1767,15 @@ noingame
rts
.endp
;----------------------------------------------
icl 'weapons.asm'
icl 'constants.asm'
;----------------------------------------------
icl 'textproc.asm'
;----------------------------------------------
icl 'grafproc.asm'
;----------------------------------------------
icl 'ai.asm'
icl 'weapons.asm'
;----------------------------------------------
icl 'constants.asm'
icl 'ai.asm'
;----------------------------------------------
icl 'artwork/talk.asm'
;----------------------------------------------
BIN
View File
Binary file not shown.