Next... try ?

This commit is contained in:
Pecusx
2023-05-08 15:49:08 +02:00
parent c32d7b0ce4
commit 825ef76362
8 changed files with 40 additions and 79 deletions
+3 -3
View File
@@ -193,12 +193,12 @@ ClearPlot
;-------------------------------------------------- ;--------------------------------------------------
.proc ClearScreen .proc ClearScreen
;-------------------------------------------------- ;--------------------------------------------------
mwa #display temp mwa #displayC64 temp
ldy #0 ldy #0
@ lda #$ff @ lda #$ff
sta (temp),y sta (temp),y
inw temp inw temp
cpw temp #display+screenheight*screenBytes+1 cpw temp #displayC64+screenheight*screenBytes+1
bne @- bne @-
rts rts
.endp .endp
@@ -223,7 +223,7 @@ ClearPlot
;-------------------------------------------------- ;--------------------------------------------------
.proc SetMainScreen .proc SetMainScreen
SwitchVICBank(0) SwitchVICBank(0)
SetScreenMemory(displayC64) SetScreenMemory($2000)
SetHiresBitmapMode ; Hires mode on SetHiresBitmapMode ; Hires mode on
rts rts
.endp .endp
+1 -1
View File
@@ -3,7 +3,7 @@
;* SYSTEM EQUATES * ;* SYSTEM EQUATES *
;**************************************************************************** ;****************************************************************************
FAKEADDR EQU $0100 FAKEADDR EQU $0002
; ;
+4
View File
@@ -280,4 +280,8 @@ upstartEnd
;------------------------------------- ;-------------------------------------
.macro wait .macro wait
nop nop
.endm
;-------------------------------------
.macro halt
?s jmp ?s
.endm .endm
-3
View File
@@ -1630,9 +1630,6 @@ NotHigher
rts rts
.endp .endp
;---------------------------------------------------
icl 'Atari/gr_basics.asm'
;---------------------------------------------------
;-------------------------------------------------- ;--------------------------------------------------
.proc TypeChar .proc TypeChar
+1
View File
@@ -603,6 +603,7 @@ noingame
icl 'Atari/textproc.asm' icl 'Atari/textproc.asm'
;---------------------------------------------- ;----------------------------------------------
icl 'grafproc.asm' icl 'grafproc.asm'
icl 'Atari/gr_basics.asm'
;---------------------------------------------- ;----------------------------------------------
icl 'weapons.asm' icl 'weapons.asm'
;---------------------------------------------- ;----------------------------------------------
BIN
View File
Binary file not shown.
+31 -72
View File
@@ -28,8 +28,7 @@
.endm .endm
.macro RMTSong .macro RMTSong
lda #:1 lda #:1 ; do nothing in C64
rts ; do nothing in C64
.endm .endm
;--------------------------------------------------- ;---------------------------------------------------
@@ -160,11 +159,10 @@ FirstZpageVariable = $57
;----------------------------------------------- ;-----------------------------------------------
; variable declarations in RAM (no code) ; variable declarations in RAM (no code)
;----------------------------------------------- ;-----------------------------------------------
ORG PMGraph + $0300 - (variablesEnd - OneTimeZeroVariables + 1)
icl 'variables.asm'
; Game loading address ; Game loading address
ORG $4000 ORG $4000
icl 'variables.asm'
WeaponFont WeaponFont
ins 'artwork/weapons_AW6_mod.fnt' ; 'artwork/weapons.fnt' ins 'artwork/weapons_AW6_mod.fnt' ; 'artwork/weapons.fnt'
@@ -182,9 +180,28 @@ FirstSTART
DisplayCopyPurchaseEnd = 0 DisplayCopyPurchaseEnd = 0
DisplayCopyPurchaseStart = 0 DisplayCopyPurchaseStart = 0
displayC64 = $2000 ; graphics screen memory start displayC64 = $2000 ; graphics screen memory start
; SEI ; disable IRQ
LDA #$36
STA $0001 ; Turn Off BASIC ROM
/* LDA #<NMI ;
STA $0318 ; change NMI vector
LDA #>NMI ; to our routine
STA $0319 ;
LDA #$00 ; stop Timer A
STA $DD0E ;
STA $DD04 ; set Timer A to 0, after starting
STA $DD05 ; NMI will occur immediately
LDA #$81 ;
STA $DD0D ; set Timer A as source for NMI
LDA #$01 ;
STA $DD0E ; start Timer A -> NMI
*/
; from here on NMI is disabled
jsr MakeDarkScreen jsr MakeDarkScreen
; one time zero variables in RAM (non zero page) ; one time zero variables in RAM (non zero page)
lda #0 lda #0
ldy #OneTimeZeroVariablesCount-1 ldy #OneTimeZeroVariablesCount-1
@@ -216,8 +233,6 @@ FirstSTART
; Random INIT ; Random INIT
InitializeSIDrnd InitializeSIDrnd
;-------------------------------------------------- ;--------------------------------------------------
; Main program of the game ; Main program of the game
icl 'game.asm' icl 'game.asm'
@@ -231,65 +246,9 @@ FirstSTART
; result: A=keycode ; result: A=keycode
;-------------------------------------------------- ;--------------------------------------------------
jsr WaitForKeyRelease jsr WaitForKeyRelease
@ lda #0
.IF TARGET = 800 sta escFlag
lda SKSTAT lda #$ff
cmp #$ff
beq checkJoyGetKey ; key not pressed, check Joy
cmp #$f7 ; SHIFT
beq checkJoyGetKey
.ELSE
lda SkStatSimulator
and #%11111110
bne checkJoyGetKey ; key not pressed, check Joy
.ENDIF
lda kbcode
cmp #@kbcode._none
beq checkJoyGetKey
and #$3f ;CTRL and SHIFT ellimination
cmp #@kbcode._esc ; 28 ; ESC
bne getkeyend
mvy #$80 escFlag
bne getkeyend
checkJoyGetKey
;------------JOY-------------
;happy happy joy joy
;check for joystick now
lda STICK0
and #$0f
cmp #$0f
beq notpressedJoyGetKey
tay
lda joyToKeyTable,y
bne getkeyend
notpressedJoyGetKey
;fire
lda STRIG0
beq JoyButton
.IF TARGET = 800 ; Select and Option key only on A800
bne checkSelectKey
checkSelectKey
lda CONSOL
and #%00000010 ; Select
beq SelectPressed
lda CONSOL
and #%00000100 ; Option
.ENDIF
bne @-
OptionPressed
lda #@kbcode._atari ; Option key
bne getkeyend
SelectPressed
lda #@kbcode._tab ; Select key
bne getkeyend
JoyButton
lda #@kbcode._ret ;Return key
getkeyend
ldy #0
sty ATRACT ; reset atract mode
mvy #sfx_keyclick sfx_effect
rts rts
.endp .endp
@@ -344,16 +303,11 @@ peopleAreHere
;-------------------------------------------------- ;--------------------------------------------------
MakeDarkScreen MakeDarkScreen
;-------------------------------------------------- ;--------------------------------------------------
jsr PMoutofScreen ; hide P/M ; mva #0 dmactls ; dark screen
mva #0 dmactls ; dark screen
; and wait one frame :) ; and wait one frame :)
;-------------------------------------------------- ;--------------------------------------------------
.proc WaitOneFrame .proc WaitOneFrame
;-------------------------------------------------- ;--------------------------------------------------
lda CONSOL
and #%00000101 ; Start + Option
sne:mva #$40 escFlag
and #%00000001 ; START KEY
seq:wait ; or waitRTC ? seq:wait ; or waitRTC ?
rts rts
.endp .endp
@@ -387,6 +341,7 @@ MakeDarkScreen
icl 'C64/textproc.asm' icl 'C64/textproc.asm'
;---------------------------------------------- ;----------------------------------------------
icl 'grafproc.asm' icl 'grafproc.asm'
icl 'C64/gr_basics.asm'
;---------------------------------------------- ;----------------------------------------------
icl 'weapons.asm' icl 'weapons.asm'
;---------------------------------------------- ;----------------------------------------------
@@ -463,4 +418,8 @@ EndofBFGDLI
;---------------------------------------------- ;----------------------------------------------
icl 'constants_top.asm' icl 'constants_top.asm'
;---------------------------------------------- ;----------------------------------------------
NMI
INC $D020 ; change border colour, indication for a NMI
RTI ; exit interrupt
; (not acknowledged!)
BIN
View File
Binary file not shown.