multiple texts improved, tabs elliminated

This commit is contained in:
2023-05-19 23:16:49 -04:00
parent 8486645bc8
commit d0e1dc6f18
23 changed files with 4918 additions and 4928 deletions
+1 -1
View File
@@ -15,7 +15,7 @@ DLPurTitleAddr
.byte $50 .byte $50
.byte $42 .byte $42
.word purchaseTextBuffer .word purchaseTextBuffer
.byte $00+$80 .byte $00+$80
.byte $20+$80,$10+$80,$42 .byte $20+$80,$10+$80,$42
MoreUpdl MoreUpdl
.word EmptyLine .word EmptyLine
+29 -29
View File
@@ -13,7 +13,7 @@ OptionsScreen
.IF TARGET = 800 .IF TARGET = 800
dta d" Please select option with " dta d" Please select option with "
dta $fe,$dc,$dd,$ff ; cursors in inverse dta $fe,$dc,$dd,$ff ; cursors in inverse
dta d" and " dta d" and "
dta d"Tab"* dta d"Tab"*
dta d" " dta d" "
@@ -40,7 +40,7 @@ NameScreen5
.IF TARGET = 800 .IF TARGET = 800
dta d"TAB"* dta d"TAB"*
dta d" - Port nr " dta d" - Port nr "
dta $fe,$dc,$dd,$ff ; cursors in inverse dta $fe,$dc,$dd,$ff ; cursors in inverse
dta d" - Difficulty" dta d" - Difficulty"
dta d" " dta d" "
dta d"INV"* dta d"INV"*
@@ -182,19 +182,19 @@ dl ; MAIN game display list
;----------------------------------------------- ;-----------------------------------------------
OptionsDL OptionsDL
.byte $70 .byte $70
.byte $47 .byte $47
.word OptionsTitle .word OptionsTitle
.byte $70,$70 .byte $70,$70
.byte $42 .byte $42
.word OptionsScreen .word OptionsScreen
.byte $30,$02,$02,$70 .byte $30,$02,$02,$70
.byte $42 .byte $42
.word OptionsHere .word OptionsHere
.byte $10 .byte $10
:maxOptions-1 .by $02,$10 :maxOptions-1 .by $02,$10
:(9-maxOptions) .by $70,$10 :(9-maxOptions) .by $70,$10
.byte $80 .byte $80
.byte $60 ; to match moved sprites .byte $60 ; to match moved sprites
.byte $4f .byte $4f
.word (display+140*40) .word (display+140*40)
:21 .by $0f ;76 :21 .by $0f ;76
@@ -204,25 +204,25 @@ OptionsDL
;Enter names of tanks DL ;Enter names of tanks DL
NameDL NameDL
.byte $70 .byte $70
.byte $47 .byte $47
.word DifficultyTitle .word DifficultyTitle
.byte $70,$70 ; 16 empty lines .byte $70,$70 ; 16 empty lines
.byte $42 .byte $42
.word NameScreen .word NameScreen
.byte $30 ; 4 empty lines .byte $30 ; 4 empty lines
.byte $42 .byte $42
.word NameScreen2 .word NameScreen2
.byte $30+$80 ; 4 empty lines + DLI .byte $30+$80 ; 4 empty lines + DLI
.byte $42 .byte $42
.word NameScreen3 .word NameScreen3
.byte $10 ; 2 empty lines .byte $10 ; 2 empty lines
.byte $42 .byte $42
.word NameScreen4 .word NameScreen4
.byte $02,$02 .byte $02,$02
.byte $30 ; 4 empty lines .byte $30 ; 4 empty lines
.byte $42 .byte $42
.word NameScreen5 .word NameScreen5
.byte $02 .byte $02
.byte $41 .byte $41
.word NameDL .word NameDL
; ------------------------------------------------- ; -------------------------------------------------
@@ -252,8 +252,8 @@ GameOverDL
.byte $42 .byte $42
.word GameOverResults .word GameOverResults
:5 .byte $00+$80,$02 :5 .byte $00+$80,$02
.byte $01 .byte $01
.word DLCreditsFragm .word DLCreditsFragm
; --------------- ; ---------------
; end of "constants" (ROM) ; end of "constants" (ROM)
;----------------------------------------------- ;-----------------------------------------------
+175 -175
View File
@@ -41,7 +41,7 @@ MakeUnPlot
;--- ;---
tay tay
ldx WhichUnPlot ldx WhichUnPlot
tya tya
sta oldply,x sta oldply,x
ldx ydraw ldx ydraw
@@ -194,43 +194,43 @@ ClearPlot
;-------------------------------------------------- ;--------------------------------------------------
mwa #0 xdraw mwa #0 xdraw
mwa #mountaintable modify mwa #mountaintable modify
mva #1 color mva #1 color
drawmountainsloop drawmountainsloop
ldy #0 ldy #0
lda (modify),y lda (modify),y
cmp #screenheight cmp #screenheight
beq NoMountain beq NoMountain
sta ydraw sta ydraw
sty ydraw+1 sty ydraw+1
.IF FASTER_GRAF_PROCS = 1 .IF FASTER_GRAF_PROCS = 1
; there was Drawline proc ; there was Drawline proc
lda #screenheight lda #screenheight
sec sec
sbc ydraw sbc ydraw
sta tempbyte01 sta tempbyte01
jsr plot.MakePlot jsr plot.MakePlot
; after plot we have: (xbyte),y - addres of screen byte; X - index in bittable (number of bit) ; after plot we have: (xbyte),y - addres of screen byte; X - index in bittable (number of bit)
; jmp IntoDraw ; jumps inside Draw routine ; jmp IntoDraw ; jumps inside Draw routine
; because one pixel is already plotted (and who cares? :) ) ; because one pixel is already plotted (and who cares? :) )
@ @
lda (xbyte),y lda (xbyte),y
and bittable2,x and bittable2,x
sta (xbyte),y sta (xbyte),y
;IntoDraw ;IntoDraw
adw xbyte #screenBytes adw xbyte #screenBytes
dec tempbyte01 dec tempbyte01
bne @- bne @-
; end of Drawline proc ; end of Drawline proc
.ELSE .ELSE
; there was Drawline proc ; there was Drawline proc
drawline drawline
jsr plot.MakePlot jsr plot.MakePlot
inc ydraw inc ydraw
lda ydraw lda ydraw
cmp #screenheight cmp #screenheight
bne drawline bne drawline
; end of Drawline proc ; end of Drawline proc
.ENDIF .ENDIF
NoMountain NoMountain
inw modify inw modify
@@ -261,7 +261,7 @@ NoMountain
ldy #7 ldy #7
CopyChar CopyChar
lda (fontind),y lda (fontind),y
eor #$ff eor #$ff
sta char1,y sta char1,y
lda #$ff lda #$ff
sta char2,y sta char2,y
@@ -272,7 +272,7 @@ CopyChar
ldy #7 ldy #7
CopyMask CopyMask
lda (fontind),y lda (fontind),y
eor #$ff eor #$ff
sta mask1,y sta mask1,y
lda #$00 lda #$00
sta mask2,y sta mask2,y
@@ -312,7 +312,7 @@ MakeMask00
.endr .endr
sec sec
.rept 8 .rept 8
ror char1+# ; in second (and next) lines we have C=1 - one SEC enough ror char1+# ; in second (and next) lines we have C=1 - one SEC enough
ror char2+# ror char2+#
.endr .endr
dex dex
@@ -331,12 +331,12 @@ EmptyChar
ldx #0 ldx #0
CharLoopi CharLoopi
lda (xbyte),y lda (xbyte),y
ora mask1,x ora mask1,x
and char1,x and char1,x
sta (xbyte),y sta (xbyte),y
iny iny
lda (xbyte),y lda (xbyte),y
ora mask2,x ora mask2,x
and char2,x and char2,x
sta (xbyte),y sta (xbyte),y
dey dey
@@ -345,42 +345,42 @@ CharLoopi
cpx #8 cpx #8
bne CharLoopi bne CharLoopi
.ELSE .ELSE
mvx #7 temp ; line counter (Y) mvx #7 temp ; line counter (Y)
CharLoop1 CharLoop1
mva #7 temp+1 ; pixel counter (X) mva #7 temp+1 ; pixel counter (X)
CharLoop2 CharLoop2
mva #0 color mva #0 color
rol mask1,x rol mask1,x
bcc NoMaskNoPlot bcc NoMaskNoPlot
rol char1,x rol char1,x
bcs NoPlot bcs NoPlot
MakeCharPlot MakeCharPlot
lda Erase lda Erase
bne ErasingChar bne ErasingChar
inc color inc color
ErasingChar ErasingChar
NoPlot NoPlot
jsr plot.MakePlot jsr plot.MakePlot
AfterCharPlot AfterCharPlot
inw xdraw inw xdraw
ldx temp ldx temp
dec temp+1 dec temp+1
bpl CharLoop2 bpl CharLoop2
sec sec
sbw xdraw #8 sbw xdraw #8
dec ydraw dec ydraw
ldx temp ldx temp
dex dex
stx temp stx temp
bpl CharLoop1 bpl CharLoop1
clc clc
lda ydraw lda ydraw
adc #8 adc #8
sta ydraw sta ydraw
bne EndPutChar bne EndPutChar
NoMaskNoPlot NoMaskNoPlot
rol char1,x rol char1,x
jmp AfterCharPlot jmp AfterCharPlot
.ENDIF .ENDIF
EndPutChar EndPutChar
rts rts
@@ -397,16 +397,16 @@ EndPutChar
;-------------------------------------------------- ;--------------------------------------------------
cpw dy #(screenheight-1) cpw dy #(screenheight-1)
jcs TypeChar.EndPutChar ;nearest RTS jcs TypeChar.EndPutChar ;nearest RTS
cpw dy #(4) cpw dy #(4)
jcc TypeChar.EndPutChar ;nearest RTS jcc TypeChar.EndPutChar ;nearest RTS
cpw dx #(screenwidth-4) cpw dx #(screenwidth-4)
jcs TypeChar.EndPutChar ;nearest RTS jcs TypeChar.EndPutChar ;nearest RTS
; checks ommited. ; checks ommited.
; char to the table ; char to the table
lda CharCode4x4 lda CharCode4x4
and #%00000001 and #%00000001
beq Upper4bits beq Upper4bits
lda #$ff ; better option to check (nibbler4x4 = $00 or $ff) lda #$ff ; better option to check (nibbler4x4 = $00 or $ff)
Upper4bits Upper4bits
sta nibbler4x4 sta nibbler4x4
lda CharCode4x4 lda CharCode4x4
@@ -414,28 +414,28 @@ Upper4bits
sta fontind sta fontind
lda #$00 lda #$00
sta fontind+1 sta fontind+1
adw fontind #font4x4 adw fontind #font4x4
; and 4 bytes to the table ; and 4 bytes to the table
ldy #0 ldy #0
ldx #3 ldx #3
CopyChar CopyChar
lda (fontind),y ; Y must be 0 !!!! lda (fontind),y ; Y must be 0 !!!!
bit nibbler4x4 bit nibbler4x4
bpl GetUpper4bits bpl GetUpper4bits
:4 rol :4 rol
GetUpper4bits GetUpper4bits
ora #$0f ora #$0f
sta char1,x sta char1,x
lda #$ff lda #$ff
sta char2,x sta char2,x
; and 4 bytes as a mask ; and 4 bytes as a mask
lda #$f0 lda #$f0
sta mask1,x sta mask1,x
lda #$00 lda #$00
sta mask2,x sta mask2,x
adw fontind #32 ; next byte of 4x4 font adw fontind #32 ; next byte of 4x4 font
dex dex
bpl CopyChar bpl CopyChar
@@ -451,7 +451,7 @@ GetUpper4bits
; rorw xbyte ; rorw xbyte
; rorw xbyte ; rorw xbyte
;--- ;---
ldy xbyte ; horizontal byte offet stored in Y ldy xbyte ; horizontal byte offet stored in Y
lda dy ; y = y - 3 because left lower. lda dy ; y = y - 3 because left lower.
sec sec
sbc #3 sbc #3
@@ -471,75 +471,75 @@ MakeMask01
.endr .endr
sec sec
.rept 4 .rept 4
ror char1+# ; in second (and next) lines we have C=1 - one SEC enough ror char1+# ; in second (and next) lines we have C=1 - one SEC enough
ror char2+# ror char2+#
.endr .endr
dex dex
bne MakeMask01 bne MakeMask01
MaskOK01 MaskOK01
ldx #0 ldx #0
CharLoopi4x4 CharLoopi4x4
lda (xbyte),y lda (xbyte),y
ora mask1,x ora mask1,x
bit plot4x4color bit plot4x4color
bpl PutInColor0_1 ; only mask - no char bpl PutInColor0_1 ; only mask - no char
and char1,x and char1,x
PutInColor0_1 PutInColor0_1
sta (xbyte),y sta (xbyte),y
iny iny
lda (xbyte),y lda (xbyte),y
ora mask2,x ora mask2,x
bit plot4x4color bit plot4x4color
bpl PutInColor0_2 ; only mask - no char bpl PutInColor0_2 ; only mask - no char
and char2,x and char2,x
PutInColor0_2 PutInColor0_2
sta (xbyte),y sta (xbyte),y
dey dey
adw xbyte #screenBytes adw xbyte #screenBytes
inx inx
cpx #4 cpx #4
bne CharLoopi4x4 bne CharLoopi4x4
.ELSE .ELSE
mwa xdraw char2 mwa xdraw char2
mwa ydraw mask2 mwa ydraw mask2
mva color mask2+2 mva color mask2+2
mwa dx xdraw mwa dx xdraw
mwa dy ydraw mwa dy ydraw
mvx #3 temp ; line counter (Y) mvx #3 temp ; line counter (Y)
CharLoop1 CharLoop1
mva #3 temp+1 ; pixel counter (X) mva #3 temp+1 ; pixel counter (X)
CharLoop2 CharLoop2
mva #0 color mva #0 color
rol mask1,x rol mask1,x
bcc NoMaskNoPlot bcc NoMaskNoPlot
rol char1,x rol char1,x
bcs NoPlot bcs NoPlot
MakeCharPlot MakeCharPlot
lda plot4x4color lda plot4x4color
beq ErasingChar beq ErasingChar
inc color inc color
ErasingChar ErasingChar
NoPlot NoPlot
jsr plot.MakePlot jsr plot.MakePlot
AfterCharPlot AfterCharPlot
inw xdraw inw xdraw
ldx temp ldx temp
dec temp+1 dec temp+1
bpl CharLoop2 bpl CharLoop2
sec sec
sbw xdraw #4 sbw xdraw #4
dec ydraw dec ydraw
ldx temp ldx temp
dex dex
stx temp stx temp
bpl CharLoop1 bpl CharLoop1
mwa char2 xdraw mwa char2 xdraw
mwa mask2 ydraw mwa mask2 ydraw
mva mask2+2 color mva mask2+2 color
bpl EndPut4x4 bpl EndPut4x4
NoMaskNoPlot NoMaskNoPlot
rol char1,x rol char1,x
jmp AfterCharPlot jmp AfterCharPlot
.ENDIF .ENDIF
EndPut4x4 EndPut4x4
rts rts
@@ -573,7 +573,7 @@ EndPut4x4
iny iny
cpy #screenheight+1 cpy #screenheight+1
bne @- bne @-
rts rts
.endp .endp
;-------------------------------------------------- ;--------------------------------------------------
.proc SetMainScreen .proc SetMainScreen
@@ -584,7 +584,7 @@ EndPut4x4
; and #$fc ; and #$fc
; ora #$02 ; 2=normal, 3 = wide screen width ; ora #$02 ; 2=normal, 3 = wide screen width
sta dmactls sta dmactls
mva WallsType COLBAKS ; set color of background mva WallsType COLBAKS ; set color of background
jsr WaitOneFrame jsr WaitOneFrame
rts rts
.endp .endp
@@ -601,79 +601,79 @@ EndPut4x4
; ------------------------------------------------- ; -------------------------------------------------
mva #sfx_sandhog sfx_effect mva #sfx_sandhog sfx_effect
.IF FASTER_GRAF_PROCS = 1 .IF FASTER_GRAF_PROCS = 1
ldy #0 ; byte counter (from 0 to 39) ldy #0 ; byte counter (from 0 to 39)
NextColumn NextColumn
; big loop - we repat internal loops for each column of bytes ; big loop - we repat internal loops for each column of bytes
sty magic sty magic
ldx #120 ; line counter (from 0 to 60 ) ldx #120 ; line counter (from 0 to 60 )
; first loop - inverse column of bytes for a while ; first loop - inverse column of bytes for a while
ldy magic ldy magic
NextLine1 NextLine1
jsr InverseScreenByte jsr InverseScreenByte
dex dex
dex dex
bpl NextLine1 bpl NextLine1
; ;
jsr WaitOneFrame ; wait uses A only jsr WaitOneFrame ; wait uses A only
; second loop - inverse again and put random "snow" to column of bytes ; second loop - inverse again and put random "snow" to column of bytes
ldx #120 ldx #120
ldy magic ldy magic
mva #$55 magic+1 mva #$55 magic+1
NextLine2 NextLine2
jsr InverseScreenByte jsr InverseScreenByte
lda random lda random
ora magic+1 ora magic+1
and (temp),y and (temp),y
sta (temp),y sta (temp),y
lda magic+1 lda magic+1
eor #$ff eor #$ff
sta magic+1 sta magic+1
dex dex
dex dex
bpl NextLine2 bpl NextLine2
; and go to next column ; and go to next column
iny iny
cpy #40 cpy #40
bne NextColumn bne NextColumn
.ELSE .ELSE
mva #1 color mva #1 color
mwa #120 ydraw mwa #120 ydraw
NextLineSlow NextLineSlow
lda #0 lda #0
sta xdraw sta xdraw
sta xdraw+1 sta xdraw+1
NextPixelSlow NextPixelSlow
bit random bit random
bpl NoPlot bpl NoPlot
bvc NoPlot bvc NoPlot
jsr plot.MakePlot jsr plot.MakePlot
NoPlot NoPlot
inw xdraw inw xdraw
cpw xdraw #screenwidth cpw xdraw #screenwidth
bne NextPixelSlow bne NextPixelSlow
dec ydraw dec ydraw
dec ydraw dec ydraw
bpl NextLineSlow bpl NextLineSlow
.ENDIF .ENDIF
; and we have "snow" :) ; and we have "snow" :)
lda #0 lda #0
ldx TankNr ldx TankNr
sta ActiveDefenceWeapon,x ; deactivate Nuclear Winter sta ActiveDefenceWeapon,x ; deactivate Nuclear Winter
jsr SetFullScreenSoilRange jsr SetFullScreenSoilRange
jsr SoilDown2.NoClearTanks jsr SoilDown2.NoClearTanks
rts rts
; in order to optimize the fragment repeated in both internal loops ; in order to optimize the fragment repeated in both internal loops
; we save 15 bytes :) ; we save 15 bytes :)
InverseScreenByte InverseScreenByte
lda LineTableL,x lda LineTableL,x
sta temp sta temp
lda LineTableH,x lda LineTableH,x
sta temp+1 sta temp+1
lda (temp),y lda (temp),y
eor #$ff eor #$ff
sta (temp),y sta (temp),y
rts rts
.endp .endp
.ENDIF .ENDIF
+139 -139
View File
@@ -1,114 +1,114 @@
; @com.wudsn.ide.asm.mainsourcefile=scorch.asm ; @com.wudsn.ide.asm.mainsourcefile=scorch.asm
.IF *>0 ;this is a trick that prevents compiling this file alone .IF *>0 ;this is a trick that prevents compiling this file alone
;-------------------------------------------------- ;--------------------------------------------------
.proc DLIinterruptGraph .proc DLIinterruptGraph
pha pha
phy phy
ldy dliCounter ldy dliCounter
lda dliColorsBack,y lda dliColorsBack,y
.IF TARGET = 800 .IF TARGET = 800
nop ; necessary on 800 because DLIs take less time, jitter visible without it nop ; necessary on 800 because DLIs take less time, jitter visible without it
nop nop
nop nop
.ENDIF .ENDIF
nop nop
nop nop
sta COLPF1 sta COLPF1
lda GradientNr lda GradientNr
bne GoGradient bne GoGradient
ldy #$ff ; one mauntain color ldy #$ff ; one mauntain color
GoGradient GoGradient
iny iny
lda (GradientColors),y ; mountains colors array lda (GradientColors),y ; mountains colors array
sta COLPF2 sta COLPF2
inc dliCounter inc dliCounter
ply ply
pla pla
rti rti
.endp .endp
;-------------------------------------------------- ;--------------------------------------------------
.proc DLIinterruptOptions .proc DLIinterruptOptions
pha pha
phy phy
lda #0 ; background color lda #0 ; background color
sta COLPF1 sta COLPF1
ldy GradientNr ldy GradientNr
beq @+ beq @+
ldy #1 ldy #1
@ lda (GradientColors),y ; mountains colors array @ lda (GradientColors),y ; mountains colors array
sta COLPF2 sta COLPF2
ply ply
pla pla
rti rti
.endp .endp
;-------------------------------------------------- ;--------------------------------------------------
.proc DLIinterruptGameOver .proc DLIinterruptGameOver
pha pha
phy phy
lda dliCounter lda dliCounter
bne EndofPMG bne EndofPMG
lda #%00100001 ; playfield after P/M - prior=1 lda #%00100001 ; playfield after P/M - prior=1
;STA WSYNC ;STA WSYNC
sta PRIOR sta PRIOR
bne EndOfDLI_GO bne EndOfDLI_GO
EndofPMG EndofPMG
cmp #1 cmp #1
bne ColoredLines bne ColoredLines
lda #%00100100 ; playfield before P/M lda #%00100100 ; playfield before P/M
;STA WSYNC ;STA WSYNC
sta PRIOR sta PRIOR
bne EndOfDLI_GO bne EndOfDLI_GO
ColoredLines ColoredLines
cmp #9 cmp #9
beq CreditsScroll beq CreditsScroll
tay tay
lda GameOverColoursTable-3,y ; -2 because this is DLI nr 2 and -1 (labels line) lda GameOverColoursTable-3,y ; -2 because this is DLI nr 2 and -1 (labels line)
ldy #$0a ; text colour (brightnes) ldy #$0a ; text colour (brightnes)
;STA WSYNC ;STA WSYNC
sta COLPF2 sta COLPF2
sty COLPF1 sty COLPF1
bne EndOfDLI_GO bne EndOfDLI_GO
CreditsScroll CreditsScroll
lda #$00 lda #$00
sta COLPF2 sta COLPF2
EndOfDLI_GO EndOfDLI_GO
inc dliCounter inc dliCounter
ply ply
pla pla
rti rti
.endp .endp
;-------------------------------------------------- ;--------------------------------------------------
.proc DLIinterruptText .proc DLIinterruptText
pha pha
lda dliCounter lda dliCounter
bne MoreBarsColorChange bne MoreBarsColorChange
lda #TextBackgroundColor lda #TextBackgroundColor
;sta WSYNC ;sta WSYNC
sta COLPF2 sta COLPF2
mva #TextForegroundColor COLPF3 mva #TextForegroundColor COLPF3
bne EndOfDLI_Text bne EndOfDLI_Text
MoreBarsColorChange MoreBarsColorChange
and #%00000001 and #%00000001
rol rol
sta COLPF2 sta COLPF2
EndOfDLI_Text EndOfDLI_Text
inc dliCounter inc dliCounter
pla pla
DLIinterruptNone DLIinterruptNone
rti rti
.endp .endp
;-------------------------------------------------- ;--------------------------------------------------
.proc VBLinterrupt .proc VBLinterrupt
mva #0 dliCounter mva #0 dliCounter
mva #$02 DliColorBack mva #$02 DliColorBack
lda PAL lda PAL
and #%00001110 and #%00001110
beq itsPAL beq itsPAL
;it is NTSC here ;it is NTSC here
dec NTSCcounter dec NTSCcounter
bne itsPAL bne itsPAL
mva #6 NTSCcounter mva #6 NTSCcounter
@@ -118,13 +118,13 @@ DLIinterruptNone
itsPAL itsPAL
; pressTimer is trigger tick counter. always 50 ticks / s ; pressTimer is trigger tick counter. always 50 ticks / s
bit:smi:inc pressTimer ; timer halted if >127. max time measured 2.5 s bit:smi:inc pressTimer ; timer halted if >127. max time measured 2.5 s
SkippedIfNTSC SkippedIfNTSC
bit RMT_blocked bit RMT_blocked
bmi SkipRMTVBL bmi SkipRMTVBL
; ------- RMT ------- ; ------- RMT -------
lda sfx_effect lda sfx_effect
bmi lab2 bmi lab2
asl @ ; * 2 asl @ ; * 2
tay ;Y = 2,4,..,16 instrument number * 2 (0,2,4,..,126) tay ;Y = 2,4,..,16 instrument number * 2 (0,2,4,..,126)
@@ -138,53 +138,53 @@ SkippedIfNTSC
lab2 lab2
jsr RASTERMUSICTRACKER+3 ;1 play jsr RASTERMUSICTRACKER+3 ;1 play
; ------- RMT ------- ; ------- RMT -------
SkipRMTVBL SkipRMTVBL
bit ScrollFlag bit ScrollFlag
bpl EndOfCreditsVBI bpl EndOfCreditsVBI
CreditsVBI CreditsVBI
inc CreditsVScrol inc CreditsVScrol
lda CreditsVScrol lda CreditsVScrol
cmp #32 ;not too fast cmp #32 ;not too fast
beq nextlinedisplay beq nextlinedisplay
:2 lsr ;not too fast :2 lsr ;not too fast
sta VSCROL sta VSCROL
jmp EndOfCreditsVBI jmp EndOfCreditsVBI
nextlinedisplay nextlinedisplay
lda #0 lda #0
sta CreditsVScrol sta CreditsVScrol
sta VSCROL sta VSCROL
clc clc
lda DLCreditsAddr lda DLCreditsAddr
adc #40 adc #40
sta DLCreditsAddr sta DLCreditsAddr
bcc @+ bcc @+
inc DLCreditsAddr+1 inc DLCreditsAddr+1
@ @
cmp #<CreditsLastLine cmp #<CreditsLastLine
bne EndOfCreditsVBI bne EndOfCreditsVBI
lda DLCreditsAddr+1 lda DLCreditsAddr+1
cmp #>CreditsLastLine cmp #>CreditsLastLine
bne EndOfCreditsVBI bne EndOfCreditsVBI
; adw DLCreditsAddr #40 ; adw DLCreditsAddr #40
; cpw DLCreditsAddr #CreditsLastLine ; cpw DLCreditsAddr #CreditsLastLine
; bne EndOfCreditsVBI ; bne EndOfCreditsVBI
mwa #Credits DLCreditsAddr mwa #Credits DLCreditsAddr
EndOfCreditsVBI EndOfCreditsVBI
.IF TARGET = 5200 .IF TARGET = 5200
lda SkStatSimulator lda SkStatSimulator
bmi @+ bmi @+
inc SkStatSimulator inc SkStatSimulator
@ @
lda JoystickNumber ; select port lda JoystickNumber ; select port
ora #%00000100 ; Speaker off, Pots enabled ora #%00000100 ; Speaker off, Pots enabled
sta CONSOL5200 sta CONSOL5200
center = 114 ;Read analog stick and make it look like a digital stick center = 114 ;Read analog stick and make it look like a digital stick
threshold = 60 threshold = 60
lda JoystickNumber lda JoystickNumber
asl asl
tax tax
lda paddl0,x ;Read POT0 value (horizontal position) lda paddl0,x ;Read POT0 value (horizontal position)
cmp #center+threshold ;Compare with right threshold cmp #center+threshold ;Compare with right threshold
rol stick0 ;Feed carry into digital stick value rol stick0 ;Feed carry into digital stick value
@@ -201,14 +201,14 @@ EndOfCreditsVBI
eor #2+8 eor #2+8
and #$0f and #$0f
sta stick0 sta stick0
ldx JoystickNumber ldx JoystickNumber
; check shift key (5200 second fire button) ; check shift key (5200 second fire button)
lda SKSTAT lda SKSTAT
:3 lsr ; third bit :3 lsr ; third bit
and trig0,x ; and first button and trig0,x ; and first button
;lda trig0,x ;lda trig0,x
sta strig0 ;Move hardware to shadow sta strig0 ;Move hardware to shadow
mva chbas chbase mva chbas chbase
@@ -224,21 +224,21 @@ EndOfCreditsVBI
pla pla
tax tax
pla pla
rti rti
.ELSE .ELSE
; support for joysticks :) ; support for joysticks :)
ldx JoystickNumber ldx JoystickNumber
lda STICK0,x lda STICK0,x
sta STICK0 sta STICK0
lda STRIG0,x lda STRIG0,x
sta STRIG0 sta STRIG0
jmp XITVBV jmp XITVBV
.ENDIF .ENDIF
.endp .endp
.IF TARGET = 5200 .IF TARGET = 5200
.proc kb_continue .proc kb_continue
sta kbcode ;Store key code in shadow. sta kbcode ;Store key code in shadow.
mva #0 SkStatSimulator mva #0 SkStatSimulator
exit pla exit pla
tay tay
pla pla
@@ -250,18 +250,18 @@ exit pla
;-------------------------------------------------- ;--------------------------------------------------
.macro SetDLI .macro SetDLI
; SetDLI #WORD ; SetDLI #WORD
; Initialises Display List Interrupts ; Initialises Display List Interrupts
LDY # <:1 LDY # <:1
LDX # >:1 LDX # >:1
jsr _SetDLIproc jsr _SetDLIproc
.endm .endm
.proc _SetDLIproc .proc _SetDLIproc
LDA #$C0 LDA #$C0
STY VDSLST STY VDSLST
STX VDSLST+1 STX VDSLST+1
STA NMIEN STA NMIEN
rts rts
.endp .endp
.ENDIF .ENDIF
+490 -506
View File
File diff suppressed because it is too large Load Diff
+260 -260
View File
@@ -16,7 +16,7 @@ unPlotAfterX
lda oldplotH,x lda oldplotH,x
sta oldplot+1 sta oldplot+1
ldy #0 ldy #0
lda oldora,x lda oldora,x
sta (oldplot),y sta (oldplot),y
@@ -31,23 +31,23 @@ CheckX
MakeUnPlot MakeUnPlot
; let's count coordinates taken from xdraw and ydraw ; let's count coordinates taken from xdraw and ydraw
lda xdraw lda xdraw
and #%11111000 and #%11111000
;sta xbyte ;sta xbyte
;--- ;---
ldx ydraw ldx ydraw
clc clc
adc linetableL,x adc linetableL,x
sta xbyte sta xbyte
sta oldplot sta oldplot
lda linetableH,x lda linetableH,x
adc xdraw+1 adc xdraw+1
sta xbyte+1 sta xbyte+1
sta oldplot+1 sta oldplot+1
lda xdraw lda xdraw
and #$7 and #$7
tax tax
ldy #0 ldy #0
lda color lda color
bne ClearUnPlot bne ClearUnPlot
@@ -117,13 +117,13 @@ MakePlot
; let's calculate coordinates from xdraw and ydraw ; let's calculate coordinates from xdraw and ydraw
lda xdraw lda xdraw
and #%11111000 and #%11111000
;sta xbyte ;sta xbyte
;--- ;---
ldx ydraw ldx ydraw
clc clc
adc linetableL,x adc linetableL,x
sta xbyte sta xbyte
lda linetableH,x lda linetableH,x
adc xdraw+1 adc xdraw+1
sta xbyte+1 sta xbyte+1
@@ -131,7 +131,7 @@ MakePlot
lda xdraw lda xdraw
and #$7 and #$7
tax tax
ldy #0 ldy #0
lda color lda color
bne ClearPlot bne ClearPlot
@@ -156,13 +156,13 @@ ClearPlot
; let's calculate coordinates from xdraw and ydraw ; let's calculate coordinates from xdraw and ydraw
lda xdraw lda xdraw
and #%11111000 and #%11111000
;sta xbyte ;sta xbyte
;--- ;---
ldx ydraw ldx ydraw
clc clc
adc linetableL,x adc linetableL,x
sta xbyte sta xbyte
lda linetableH,x lda linetableH,x
adc xdraw+1 adc xdraw+1
sta xbyte+1 sta xbyte+1
@@ -170,7 +170,7 @@ ClearPlot
lda xdraw lda xdraw
and #$7 and #$7
tax tax
ldy #0 ldy #0
lda (xbyte),y lda (xbyte),y
eor #$ff eor #$ff
and bittable,x and bittable,x
@@ -181,55 +181,55 @@ ClearPlot
;-------------------------------------------------- ;--------------------------------------------------
mwa #0 xdraw mwa #0 xdraw
mwa #mountaintable modify mwa #mountaintable modify
mva #1 color mva #1 color
drawmountainsloop drawmountainsloop
ldy #0 ldy #0
lda (modify),y lda (modify),y
cmp #screenheight cmp #screenheight
beq NoMountain beq NoMountain
sta ydraw sta ydraw
sty ydraw+1 sty ydraw+1
.IF FASTER_GRAF_PROCS = 1 .IF FASTER_GRAF_PROCS = 1
; there was Drawline proc ; there was Drawline proc
lda #screenheight lda #screenheight
sec sec
sbc ydraw sbc ydraw
sta tempbyte01 sta tempbyte01
jsr plot.MakePlot jsr plot.MakePlot
; X - index in bittable (number of bit) and nothing more (for use) in C64 :) ; X - index in bittable (number of bit) and nothing more (for use) in C64 :)
; jmp IntoDraw ; jumps inside Draw routine ; jmp IntoDraw ; jumps inside Draw routine
; because one pixel is already plotted (and who cares? :) ) ; because one pixel is already plotted (and who cares? :) )
@ @
lda (xbyte),y lda (xbyte),y
and bittable2,x and bittable2,x
sta (xbyte),y sta (xbyte),y
;IntoDraw ;IntoDraw
inc ydraw inc ydraw
lda xdraw lda xdraw
and #%11111000 and #%11111000
;sta xbyte ;sta xbyte
;--- ;---
ldy ydraw ldy ydraw
clc clc
adc linetableL,y adc linetableL,y
sta xbyte sta xbyte
lda linetableH,y lda linetableH,y
adc xdraw+1 adc xdraw+1
sta xbyte+1 sta xbyte+1
ldy #0 ldy #0
dec tempbyte01 dec tempbyte01
bne @- bne @-
; end of Drawline proc ; end of Drawline proc
.ELSE .ELSE
; there was Drawline proc ; there was Drawline proc
drawline drawline
jsr plot.MakePlot jsr plot.MakePlot
inc ydraw inc ydraw
lda ydraw lda ydraw
cmp #screenheight cmp #screenheight
bne drawline bne drawline
; end of Drawline proc ; end of Drawline proc
.ENDIF .ENDIF
NoMountain NoMountain
inw modify inw modify
@@ -260,7 +260,7 @@ NoMountain
ldy #7 ldy #7
CopyChar CopyChar
lda (fontind),y lda (fontind),y
eor #$ff eor #$ff
sta char1,y sta char1,y
lda #$ff lda #$ff
sta char2,y sta char2,y
@@ -271,7 +271,7 @@ CopyChar
ldy #7 ldy #7
CopyMask CopyMask
lda (fontind),y lda (fontind),y
eor #$ff eor #$ff
sta mask1,y sta mask1,y
lda #$00 lda #$00
sta mask2,y sta mask2,y
@@ -291,16 +291,16 @@ MakeMask00
.endr .endr
sec sec
.rept 8 .rept 8
ror char1+# ; in second (and next) lines we have C=1 - one SEC enough ror char1+# ; in second (and next) lines we have C=1 - one SEC enough
ror char2+# ror char2+#
.endr .endr
dex dex
bne MakeMask00 bne MakeMask00
MaskOK00 MaskOK00
lda ydraw lda ydraw
sec sec
sbc #7 sbc #7
sta ydraw sta ydraw
; X = 0 ! ; X = 0 !
lda Erase lda Erase
beq CharLoopi ; it works, because x=0 beq CharLoopi ; it works, because x=0
@@ -314,67 +314,67 @@ EmptyChar
ldx #0 ldx #0
CharLoopi CharLoopi
; calculating coordinates from xdraw and ydraw ; calculating coordinates from xdraw and ydraw
ldy ydraw ldy ydraw
lda xdraw lda xdraw
and #%11111000 and #%11111000
clc clc
adc linetableL,y adc linetableL,y
sta xbyte sta xbyte
lda linetableH,y lda linetableH,y
adc xdraw+1 adc xdraw+1
sta xbyte+1 sta xbyte+1
;-- ;--
ldy #0 ldy #0
lda (xbyte),y lda (xbyte),y
ora mask1,x ora mask1,x
and char1,x and char1,x
sta (xbyte),y sta (xbyte),y
ldy #8 ldy #8
lda (xbyte),y lda (xbyte),y
ora mask2,x ora mask2,x
and char2,x and char2,x
sta (xbyte),y sta (xbyte),y
inc ydraw inc ydraw
inx inx
cpx #8 cpx #8
bne CharLoopi bne CharLoopi
.ELSE .ELSE
mvx #7 temp ; line counter (Y) mvx #7 temp ; line counter (Y)
CharLoop1 CharLoop1
mva #7 temp+1 ; pixel counter (X) mva #7 temp+1 ; pixel counter (X)
CharLoop2 CharLoop2
mva #0 color mva #0 color
rol mask1,x rol mask1,x
bcc NoMaskNoPlot bcc NoMaskNoPlot
rol char1,x rol char1,x
bcs NoPlot bcs NoPlot
MakeCharPlot MakeCharPlot
lda Erase lda Erase
bne ErasingChar bne ErasingChar
inc color inc color
ErasingChar ErasingChar
NoPlot NoPlot
jsr plot.MakePlot jsr plot.MakePlot
AfterCharPlot AfterCharPlot
inw xdraw inw xdraw
ldx temp ldx temp
dec temp+1 dec temp+1
bpl CharLoop2 bpl CharLoop2
sec sec
sbw xdraw #8 sbw xdraw #8
dec ydraw dec ydraw
ldx temp ldx temp
dex dex
stx temp stx temp
bpl CharLoop1 bpl CharLoop1
clc clc
lda ydraw lda ydraw
adc #8 adc #8
sta ydraw sta ydraw
bne EndPutChar bne EndPutChar
NoMaskNoPlot NoMaskNoPlot
rol char1,x rol char1,x
jmp AfterCharPlot jmp AfterCharPlot
.ENDIF .ENDIF
EndPutChar EndPutChar
rts rts
@@ -391,16 +391,16 @@ EndPutChar
;-------------------------------------------------- ;--------------------------------------------------
cpw dy #(screenheight-1) cpw dy #(screenheight-1)
jcs TypeChar.EndPutChar ;nearest RTS jcs TypeChar.EndPutChar ;nearest RTS
cpw dy #(4) cpw dy #(4)
jcc TypeChar.EndPutChar ;nearest RTS jcc TypeChar.EndPutChar ;nearest RTS
cpw dx #(screenwidth-4) cpw dx #(screenwidth-4)
jcs TypeChar.EndPutChar ;nearest RTS jcs TypeChar.EndPutChar ;nearest RTS
; checks ommited. ; checks ommited.
; char to the table ; char to the table
lda CharCode4x4 lda CharCode4x4
and #%00000001 and #%00000001
beq Upper4bits beq Upper4bits
lda #$ff ; better option to check (nibbler4x4 = $00 or $ff) lda #$ff ; better option to check (nibbler4x4 = $00 or $ff)
Upper4bits Upper4bits
sta nibbler4x4 sta nibbler4x4
lda CharCode4x4 lda CharCode4x4
@@ -408,36 +408,36 @@ Upper4bits
sta fontind sta fontind
lda #$00 lda #$00
sta fontind+1 sta fontind+1
adw fontind #font4x4 adw fontind #font4x4
; and 4 bytes to the table ; and 4 bytes to the table
ldy #0 ldy #0
ldx #3 ldx #3
CopyChar CopyChar
lda (fontind),y ; Y must be 0 !!!! lda (fontind),y ; Y must be 0 !!!!
bit nibbler4x4 bit nibbler4x4
bpl GetUpper4bits bpl GetUpper4bits
:4 rol :4 rol
GetUpper4bits GetUpper4bits
ora #$0f ora #$0f
sta char1,x sta char1,x
lda #$ff lda #$ff
sta char2,x sta char2,x
; and 4 bytes as a mask ; and 4 bytes as a mask
lda #$f0 lda #$f0
sta mask1,x sta mask1,x
lda #$00 lda #$00
sta mask2,x sta mask2,x
adw fontind #32 ; next byte of 4x4 font adw fontind #32 ; next byte of 4x4 font
dex dex
bpl CopyChar bpl CopyChar
.IF FASTER_GRAF_PROCS = 1 .IF FASTER_GRAF_PROCS = 1
; mask preparation and character shifting ; mask preparation and character shifting
lda dx lda dx
and #$7 and #$7
tax tax
beq MaskOK01 beq MaskOK01
MakeMask01 MakeMask01
.rept 4 .rept 4
@@ -446,90 +446,90 @@ MakeMask01
.endr .endr
sec sec
.rept 4 .rept 4
ror char1+# ; in second (and next) lines we have C=1 - one SEC enough ror char1+# ; in second (and next) lines we have C=1 - one SEC enough
ror char2+# ror char2+#
.endr .endr
dex dex
bne MakeMask01 bne MakeMask01
MaskOK01 MaskOK01
lda dy lda dy
sec sec
sbc #3 sbc #3
sta dy sta dy
ldx #0 ldx #0
CharLoopi4x4 CharLoopi4x4
; calculating coordinates from xdraw and ydraw ; calculating coordinates from xdraw and ydraw
ldy dy ldy dy
lda dx lda dx
and #%11111000 and #%11111000
clc clc
adc linetableL,y adc linetableL,y
sta xbyte sta xbyte
lda linetableH,y lda linetableH,y
adc dx+1 adc dx+1
sta xbyte+1 sta xbyte+1
;-- ;--
ldy #0 ldy #0
lda (xbyte),y lda (xbyte),y
ora mask1,x ora mask1,x
bit plot4x4color bit plot4x4color
bpl PutInColor0_1 ; only mask - no char bpl PutInColor0_1 ; only mask - no char
and char1,x and char1,x
PutInColor0_1 PutInColor0_1
sta (xbyte),y sta (xbyte),y
ldy #8 ldy #8
lda (xbyte),y lda (xbyte),y
ora mask2,x ora mask2,x
bit plot4x4color bit plot4x4color
bpl PutInColor0_2 ; only mask - no char bpl PutInColor0_2 ; only mask - no char
and char2,x and char2,x
PutInColor0_2 PutInColor0_2
sta (xbyte),y sta (xbyte),y
inc dy inc dy
inx inx
cpx #4 cpx #4
bne CharLoopi4x4 bne CharLoopi4x4
.ELSE .ELSE
mwa xdraw char2 mwa xdraw char2
mwa ydraw mask2 mwa ydraw mask2
mva color mask2+2 mva color mask2+2
mwa dx xdraw mwa dx xdraw
mwa dy ydraw mwa dy ydraw
mvx #3 temp ; line counter (Y) mvx #3 temp ; line counter (Y)
CharLoop1 CharLoop1
mva #3 temp+1 ; pixel counter (X) mva #3 temp+1 ; pixel counter (X)
CharLoop2 CharLoop2
mva #0 color mva #0 color
rol mask1,x rol mask1,x
bcc NoMaskNoPlot bcc NoMaskNoPlot
rol char1,x rol char1,x
bcs NoPlot bcs NoPlot
MakeCharPlot MakeCharPlot
lda plot4x4color lda plot4x4color
beq ErasingChar beq ErasingChar
inc color inc color
ErasingChar ErasingChar
NoPlot NoPlot
jsr plot.MakePlot jsr plot.MakePlot
AfterCharPlot AfterCharPlot
inw xdraw inw xdraw
ldx temp ldx temp
dec temp+1 dec temp+1
bpl CharLoop2 bpl CharLoop2
sec sec
sbw xdraw #4 sbw xdraw #4
dec ydraw dec ydraw
ldx temp ldx temp
dex dex
stx temp stx temp
bpl CharLoop1 bpl CharLoop1
mwa char2 xdraw mwa char2 xdraw
mwa mask2 ydraw mwa mask2 ydraw
mva mask2+2 color mva mask2+2 color
bpl EndPut4x4 bpl EndPut4x4
NoMaskNoPlot NoMaskNoPlot
rol char1,x rol char1,x
jmp AfterCharPlot jmp AfterCharPlot
.ENDIF .ENDIF
EndPut4x4 EndPut4x4
rts rts
@@ -555,59 +555,59 @@ EndPut4x4
mwa #linetableL temp2 mwa #linetableL temp2
mwa #linetableH modify mwa #linetableH modify
ldy #0 ldy #0
ldx #0 ldx #0
@ lda temp @ lda temp
sta (temp2),y sta (temp2),y
lda temp+1 lda temp+1
sta (modify),y sta (modify),y
cpx #7 cpx #7
bne NotChar bne NotChar
ldx #0 ldx #0
adw temp #(320-7) adw temp #(320-7)
jmp next8lines jmp next8lines
NotChar NotChar
inw temp inw temp
inx inx
next8lines next8lines
iny iny
cpy #screenheight+1 cpy #screenheight+1
bne @- bne @-
rts rts
.endp .endp
;-------------------------------------------------- ;--------------------------------------------------
.proc SetMainScreen .proc SetMainScreen
lda #$b ; Grey background and border lda #$b ; Grey background and border
lda WallsType lda WallsType
:4 rol :4 rol
sta $d020 sta $d020
sta $d021 sta $d021
lda $dd00 ; Set video bank to start at 0 lda $dd00 ; Set video bank to start at 0
and #252 and #252
ora #3 ora #3
sta $dd00 sta $dd00
lda #$18 lda #$18
sta $d018 sta $d018
; SwitchVICBank(0) ; SwitchVICBank(0)
; SetScreenMemory($2000) ; SetScreenMemory($2000)
SetHiresBitmapMode ; Hires mode on SetHiresBitmapMode ; Hires mode on
lda #$00 lda #$00
sta 53281 sta 53281
; clear color RAM ; clear color RAM
ldx #0 ldx #0
@ lda #1 @ lda #1
sta $d800,x sta $d800,x
sta $d900,x sta $d900,x
sta $da00,x sta $da00,x
sta $db00,x sta $db00,x
lda #$0f lda #$0f
sta $0400,x sta $0400,x
sta $0500,x sta $0500,x
sta $0600,x sta $0600,x
sta $0700,x sta $0700,x
inx inx
bne @- bne @-
rts rts
.endp .endp
;-------------------------------------------------- ;--------------------------------------------------
@@ -623,86 +623,86 @@ next8lines
; ------------------------------------------------- ; -------------------------------------------------
mva #sfx_sandhog sfx_effect mva #sfx_sandhog sfx_effect
.IF FASTER_GRAF_PROCS = 1 .IF FASTER_GRAF_PROCS = 1
mvy #0 magic ; byte counter (from 0 to 39) mvy #0 magic ; byte counter (from 0 to 39)
NextColumn NextColumn
; big loop - we repat internal loops for each column of bytes ; big loop - we repat internal loops for each column of bytes
ldx #120 ; line counter (from 0 to 60 ) ldx #120 ; line counter (from 0 to 60 )
; first loop - inverse column of bytes for a while ; first loop - inverse column of bytes for a while
NextLine1 NextLine1
jsr InverseScreenByte jsr InverseScreenByte
dex dex
dex dex
bpl NextLine1 bpl NextLine1
; ;
jsr WaitOneFrame ; wait uses A only jsr WaitOneFrame ; wait uses A only
; second loop - inverse again and put random "snow" to column of bytes ; second loop - inverse again and put random "snow" to column of bytes
ldx #120 ldx #120
mva #$55 magic+1 mva #$55 magic+1
NextLine2 NextLine2
jsr InverseScreenByte jsr InverseScreenByte
lda random lda random
ora magic+1 ora magic+1
and (temp),y and (temp),y
sta (temp),y sta (temp),y
lda magic+1 lda magic+1
eor #$ff eor #$ff
sta magic+1 sta magic+1
dex dex
dex dex
bpl NextLine2 bpl NextLine2
; and go to next column ; and go to next column
inc magic inc magic
ldy magic ldy magic
cpy #40 cpy #40
bne NextColumn bne NextColumn
.ELSE .ELSE
mva #1 color mva #1 color
mwa #120 ydraw mwa #120 ydraw
NextLineSlow NextLineSlow
lda #0 lda #0
sta xdraw sta xdraw
sta xdraw+1 sta xdraw+1
NextPixelSlow NextPixelSlow
bit random bit random
bpl NoPlot bpl NoPlot
bvc NoPlot bvc NoPlot
jsr plot.MakePlot jsr plot.MakePlot
NoPlot NoPlot
inw xdraw inw xdraw
cpw xdraw #screenwidth cpw xdraw #screenwidth
bne NextPixelSlow bne NextPixelSlow
dec ydraw dec ydraw
dec ydraw dec ydraw
bpl NextLineSlow bpl NextLineSlow
.ENDIF .ENDIF
; and we have "snow" :) ; and we have "snow" :)
lda #0 lda #0
ldx TankNr ldx TankNr
sta ActiveDefenceWeapon,x ; deactivate Nuclear Winter sta ActiveDefenceWeapon,x ; deactivate Nuclear Winter
jsr SetFullScreenSoilRange jsr SetFullScreenSoilRange
jsr SoilDown2.NoClearTanks jsr SoilDown2.NoClearTanks
rts rts
; in order to optimize the fragment repeated in both internal loops ; in order to optimize the fragment repeated in both internal loops
; we save 15 bytes :) ; we save 15 bytes :)
InverseScreenByte InverseScreenByte
ldy magic ldy magic
sty temp sty temp
ldy #0 ldy #0
sty temp+1 sty temp+1
aslw temp aslw temp
rolw temp rolw temp
rolw temp rolw temp
lda temp lda temp
adc LineTableL,x adc LineTableL,x
sta temp sta temp
lda LineTableH,x lda LineTableH,x
adc temp+1 adc temp+1
sta temp+1 sta temp+1
lda (temp),y lda (temp),y
eor #$ff eor #$ff
sta (temp),y sta (temp),y
rts rts
.endp .endp
.ENDIF .ENDIF
+9 -9
View File
@@ -1,22 +1,22 @@
; @com.wudsn.ide.asm.mainsourcefile=scorch.asm ; @com.wudsn.ide.asm.mainsourcefile=scorch.asm
.IF *>0 ;this is a trick that prevents compiling this file alone .IF *>0 ;this is a trick that prevents compiling this file alone
DLIinterruptGraph = 0 DLIinterruptGraph = 0
;-------------------------------------------------- ;--------------------------------------------------
.macro SetDLI .macro SetDLI
; SetDLI #WORD ; SetDLI #WORD
; Initialises Display List Interrupts ; Initialises Display List Interrupts
LDY # <:1 LDY # <:1
LDX # >:1 LDX # >:1
jsr _SetDLIproc jsr _SetDLIproc
.endm .endm
.proc _SetDLIproc .proc _SetDLIproc
; LDA #$C0 ; LDA #$C0
; STY VDSLST ; STY VDSLST
; STX VDSLST+1 ; STX VDSLST+1
; STA NMIEN ; STA NMIEN
rts rts
.endp .endp
.ENDIF .ENDIF
+66 -66
View File
@@ -2,7 +2,7 @@
.IF *>0 .IF *>0
WeaponsListDL = 0 WeaponsListDL = 0
NamesOfLevels = 0 NamesOfLevels = 0
;---------------------------------------- ;----------------------------------------
@@ -20,68 +20,68 @@ NamesOfLevels = 0
; - and I am sure maxwind, gravity, no_of_rounds in a game, speed of shell flight ; - and I am sure maxwind, gravity, no_of_rounds in a game, speed of shell flight
ldx #$08 ldx #$08
@ lda Autoplay_OptionsTable,x @ lda Autoplay_OptionsTable,x
sta OptionsTable,x sta OptionsTable,x
dex dex
bpl @- bpl @-
rts rts
Autoplay_OptionsTable .by 4,4,2,2,4,1,3,2,4 Autoplay_OptionsTable .by 4,4,2,2,4,1,3,2,4
.endp .endp
.proc SelectNextGradient .proc SelectNextGradient
lda OptionsY ; if "Wind" option selected lda OptionsY ; if "Wind" option selected
cmp #$03 cmp #$03
bne NotWind bne NotWind
lda WindChangeInRound ; wind change after each turn (not round only) flag lda WindChangeInRound ; wind change after each turn (not round only) flag
eor #$1f ; '?' character eor #$1f ; '?' character
sta WindChangeInRound sta WindChangeInRound
rts rts
NotWind NotWind
ldy GradientNr ldy GradientNr
iny iny
cpy #$03 cpy #$03
bne NoGradientLoop bne NoGradientLoop
ldy #$00 ldy #$00
NoGradientLoop NoGradientLoop
sty GradientNr sty GradientNr
lda GradientAddrL,y lda GradientAddrL,y
sta GradientColors sta GradientColors
lda GradientAddrH,y lda GradientAddrH,y
sta GradientColors+1 sta GradientColors+1
rts rts
.endp .endp
;------------------------------------------- ;-------------------------------------------
; call of the purchase (and activate) screens for each tank ; call of the purchase (and activate) screens for each tank
.proc CallPurchaseForEveryTank .proc CallPurchaseForEveryTank
mva #0 TankNr mva #0 TankNr
sta isInventory sta isInventory
@ @
ldx TankNr ldx TankNr
lda SkillTable,x lda SkillTable,x
beq ManualPurchase beq ManualPurchase
jsr PurchaseAI ; remember to make ActivateAI :) !!! jsr PurchaseAI ; remember to make ActivateAI :) !!!
jmp AfterManualPurchase jmp AfterManualPurchase
ManualPurchase ManualPurchase
lda JoyNumber,x lda JoyNumber,x
sta JoystickNumber ; set joystick port for player sta JoystickNumber ; set joystick port for player
mva #0 isInventory mva #0 isInventory
jsr Purchase ; purchase weapons jsr Purchase ; purchase weapons
bit escFlag bit escFlag
spl:rts spl:rts
jsr DefensivesActivate ; activate weapons jsr DefensivesActivate ; activate weapons
bit escFlag bit escFlag
spl:rts spl:rts
AfterManualPurchase AfterManualPurchase
inc:lda TankNr inc:lda TankNr
cmp NumberOfPlayers cmp NumberOfPlayers
bne @- bne @-
rts rts
.endp .endp
;-------------------------------------------------- ;--------------------------------------------------
.proc DefensivesActivate .proc DefensivesActivate
@@ -92,7 +92,7 @@ AfterManualPurchase
mva #$ff IsInventory mva #$ff IsInventory
mva #%10000000 WhichList mva #%10000000 WhichList
; offensive weapon - 0, defensive - %10000000 ; offensive weapon - 0, defensive - %10000000
jmp Purchase.GoToActivation jmp Purchase.GoToActivation
.endp .endp
@@ -109,8 +109,8 @@ AfterManualPurchase
mva #$00 WhichList mva #$00 WhichList
; offensive weapon - 0, deffensive - %10000000 ; offensive weapon - 0, deffensive - %10000000
GoToActivation GoToActivation
rts rts
.endp .endp
; ----------------------------------------------------- ; -----------------------------------------------------
@@ -118,14 +118,14 @@ GoToActivation
;entering names of players ;entering names of players
mva #0 TankNr mva #0 TankNr
sta COLBAKS ; set color of background sta COLBAKS ; set color of background
@ tax @ tax
lda TankStatusColoursTable,x lda TankStatusColoursTable,x
sta COLOR2 ; set color of player name line sta COLOR2 ; set color of player name line
jsr EnterPlayerName jsr EnterPlayerName
bit escFlag bit escFlag
spl:rts spl:rts
jsr CheckTankCheat jsr CheckTankCheat
inc TankNr inc TankNr
lda TankNr lda TankNr
cmp NumberOfPlayers cmp NumberOfPlayers
@@ -151,12 +151,12 @@ EndOfNick
; level of the computer opponent goes to ; level of the computer opponent goes to
; the table of levels (difficulties) ; the table of levels (difficulties)
ldx tanknr ldx tanknr
lda #6 ; Spoiler lda #6 ; Spoiler
sta DifficultyLevel sta DifficultyLevel
sta skilltable,x sta skilltable,x
beq NotRobot beq NotRobot
lda #$03 ; shape for robotanks lda #$03 ; shape for robotanks
sta TankShape,x sta TankShape,x
NotRobot NotRobot
; storing name of the tank in the right space ; storing name of the tank in the right space
; (without cursor!) ; (without cursor!)
@@ -234,24 +234,24 @@ TooLittle000 dex
;rightnumber ;rightnumber
; displaying without leading zeroes (if zeroes exist then display space at this position) ; displaying without leading zeroes (if zeroes exist then display space at this position)
ldy #0 ldy #0
ldx #0 ; digit flag (cut leading zeroes) ldx #0 ; digit flag (cut leading zeroes)
displayloop displayloop
lda decimalresult,y lda decimalresult,y
cpx #0 cpx #0
bne noleading0 bne noleading0
cpy #4 cpy #4
beq noleading0 ; if 00000 - last 0 must stay beq noleading0 ; if 00000 - last 0 must stay
cmp zero cmp zero
bne noleading0 bne noleading0
lda #space lda #space
beq displaychar ; space = 0 ! beq displaychar ; space = 0 !
noleading0 noleading0
inx ; set flag (no leading zeroes to cut) inx ; set flag (no leading zeroes to cut)
displaychar displaychar
sta (displayposition),y sta (displayposition),y
nexdigit nexdigit
iny iny
cpy #5 cpy #5
bne displayloop bne displayloop
rts rts
@@ -313,7 +313,7 @@ displayloop1
;-------------------------------------------------- ;--------------------------------------------------
.proc GameOverScreen .proc GameOverScreen
;-------------------------------------------------- ;--------------------------------------------------
rts rts
.endp .endp
;------------------------------------------------- ;-------------------------------------------------
.proc PutTankNameOnScreen .proc PutTankNameOnScreen
+655 -655
View File
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+17 -17
View File
@@ -6,8 +6,8 @@ song_end
buffers buffers
.ds 256 * 9 .ds 256 * 9
POKEY2 = POKEY+$10 ; stereo POKEY2 = POKEY+$10 ; stereo
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Song Initialization - this runs in the first tick: ; Song Initialization - this runs in the first tick:
@@ -15,9 +15,9 @@ POKEY2 = POKEY+$10 ; stereo
.proc init_song .proc init_song
; pokeys init ; pokeys init
lda #3 ; stereo lda #3 ; stereo
sta POKEY+$0f ; stereo sta POKEY+$0f ; stereo
sta POKEY2+$0f ; stereo sta POKEY2+$0f ; stereo
mva #1 bit_data mva #1 bit_data
@@ -32,8 +32,8 @@ clear
; Read just init value and store into buffer and POKEY ; Read just init value and store into buffer and POKEY
jsr get_byte jsr get_byte
sta POKEY, x sta POKEY, x
sta POKEY2,x ; stereo sta POKEY2,x ; stereo
sta stereo_buff,x ; stereo sta stereo_buff,x ; stereo
sty chn_copy, x sty chn_copy, x
cbuf cbuf
sta buffers + 255 sta buffers + 255
@@ -62,12 +62,12 @@ delay
; Play one frame of the song ; Play one frame of the song
; ;
.proc play_frame .proc play_frame
ldx #8 ; stereo ldx #8 ; stereo
@ lda stereo_buff,x ; stereo @ lda stereo_buff,x ; stereo
sta POKEY2,x ; stereo sta POKEY2,x ; stereo
dex ;stereo dex ;stereo
bpl @- ; stereo bpl @- ; stereo
lda #>buffers lda #>buffers
sta bptr+1 sta bptr+1
@@ -110,7 +110,7 @@ do_copy_byte:
store: store:
ldy cur_pos ldy cur_pos
sta POKEY,x ; Store to output and buffer sta POKEY,x ; Store to output and buffer
sta stereo_buff,x ; stereo sta stereo_buff,x ; stereo
sta (bptr), y sta (bptr), y
skip_chn: skip_chn:
@@ -148,6 +148,6 @@ skip
rts rts
.endp .endp
stereo_buff ; stereo stereo_buff ; stereo
.ds 9 ; stereo .ds 9 ; stereo
+169 -169
View File
@@ -3,8 +3,8 @@
/* Mode: GED- (bitmap mode) */ /* Mode: GED- (bitmap mode) */
/***************************************/ /***************************************/
icl "splash.h" icl "splash.h"
; --- dmsc LZSS player routine on zero page ; --- dmsc LZSS player routine on zero page
org $80 org $80
@@ -17,172 +17,172 @@ chn_bits .ds 1
bit_data .ds 1 bit_data .ds 1
; --- ; ---
org $00 org $00
fcnt .ds 2 fcnt .ds 2
fadr .ds 2 fadr .ds 2
fhlp .ds 2 fhlp .ds 2
cloc .ds 1 cloc .ds 1
regA .ds 1 regA .ds 1
regX .ds 1 regX .ds 1
regY .ds 1 regY .ds 1
byt2 .ds 1 byt2 .ds 1
zc .ds ZCOLORS zc .ds ZCOLORS
* --- BASIC switch OFF * --- BASIC switch OFF
org $2000\ mva #$ff portb\ rts\ ini $2000 org $2000\ mva #$ff portb\ rts\ ini $2000
* --- MAIN PROGRAM * --- MAIN PROGRAM
org $2010 org $2010
IFT PIC_HEIGHT>=204 IFT PIC_HEIGHT>=204
scr ins "output.png.mic", 0, 8160 scr ins "output.png.mic", 0, 8160
:16 .byte 0 :16 .byte 0
ins "output.png.mic" , +8160 ins "output.png.mic" , +8160
ELS ELS
scr ins "output.png.mic" scr ins "output.png.mic"
EIF EIF
.ifdef nil_used .ifdef nil_used
nil :8*40 brk nil :8*40 brk
eif eif
.ALIGN $0400 .ALIGN $0400
ant ANTIC_PROGRAM scr,ant ant ANTIC_PROGRAM scr,ant
fnt fnt
ift USESPRITES ift USESPRITES
.ALIGN $0800 .ALIGN $0800
.ds $0300 .ds $0300
pmg SPRITES pmg SPRITES
eif eif
FontSplash FontSplash
ins '../../artwork/weapons_AW6_mod.fnt' ; 'artwork/weapons.fnt' ins '../../artwork/weapons_AW6_mod.fnt' ; 'artwork/weapons.fnt'
mother mother
; dta d" The Mother of All Games " ; dta d" The Mother of All Games "
dta d" Father Unknown of All Games " dta d" Father Unknown of All Games "
icl "lzss_player.asm" ; player (and data) for splash music icl "lzss_player.asm" ; player (and data) for splash music
main main
jsr init_song jsr init_song
* --- init PMG * --- init PMG
ift USESPRITES ift USESPRITES
mva >pmg pmbase ;missiles and players data address mva >pmg pmbase ;missiles and players data address
mva #$03 pmcntl ;enable players and missiles mva #$03 pmcntl ;enable players and missiles
eif eif
lda:cmp:req $14 ;wait 1 frame lda:cmp:req $14 ;wait 1 frame
sei ;stop interrups sei ;stop interrups
mva #$00 nmien ;stop all interrupts mva #$00 nmien ;stop all interrupts
mva #$fe portb ;switch off ROM to get 16k more ram mva #$fe portb ;switch off ROM to get 16k more ram
ZPINIT ZPINIT
//////////////////// ////////////////////
// RASTER PROGRAM // // RASTER PROGRAM //
//////////////////// ////////////////////
; jmp line239 ; jmp line239
jmp raster_program_end jmp raster_program_end
LOOP lda vcount ;synchronization for the first screen (picture) line LOOP lda vcount ;synchronization for the first screen (picture) line
cmp #$02 cmp #$02
;sta colpf0 ;sta colpf0
;sta colpm0 ;sta colpm0
;sta colbak ;sta colbak
bne LOOP bne LOOP
mva #%00111110 dmactl ;set new screen width mva #%00111110 dmactl ;set new screen width
mva <ant dlptr mva <ant dlptr
mva >ant dlptr+1 mva >ant dlptr+1
icl "output.png.rp.ini" icl "output.png.rp.ini"
;--- 16 lines down ---- !!! ;--- 16 lines down ---- !!!
:16 sta wsync :16 sta wsync
; wait 13 cycles !!! ; wait 13 cycles !!!
:4 nop :4 nop
inc byt2 inc byt2
;--- wait 18 cycles ;--- wait 18 cycles
; jsr _rts ; jsr _rts
; inc byt3 ; inc byt3
;--- set global offset (23 cycles) ;--- set global offset (23 cycles)
jsr _rts jsr _rts
cmp byt3\ pha:pla cmp byt3\ pha:pla
;--- empty line ;--- empty line
jsr wait54cycle jsr wait54cycle
inc byt2 inc byt2
icl "output.png.rp" icl "output.png.rp"
raster_program_end raster_program_end
lda >FontSplash lda >FontSplash
sta chbase sta chbase
c0 lda #$00 c0 lda #$00
sta colbak sta colbak
c1 lda #$00 c1 lda #$00
sta colpf0 sta colpf0
c2 lda #$02 c2 lda #$02
sta colpf1 sta colpf1
c3 lda #$08 c3 lda #$08
sta colpf2 sta colpf2
c4 lda #$00 c4 lda #$00
sta colpf3 sta colpf3
s0 lda #$03 s0 lda #$03
sta sizep0 sta sizep0
sta sizep1 sta sizep1
sta sizep2 sta sizep2
sta sizep3 sta sizep3
mva #$ff sizem mva #$ff sizem
sta grafm sta grafm
mva #$20 hposm0 mva #$20 hposm0
mva #$28 hposm1 mva #$28 hposm1
mva #$d0 hposm2 mva #$d0 hposm2
mva #$d8 hposm3 mva #$d8 hposm3
mva #$02 pmcntl mva #$02 pmcntl
lda #$14 lda #$14
sta gtictl sta gtictl
//-------------------- //--------------------
// EXIT // EXIT
//-------------------- //--------------------
lda trig0 ; FIRE #0 lda trig0 ; FIRE #0
beq stop beq stop
lda trig1 ; FIRE #1 lda trig1 ; FIRE #1
beq stop beq stop
lda consol ; START lda consol ; START
and #1 and #1
beq stop beq stop
lda skctl ; ANY KEY lda skctl ; ANY KEY
and #$04 and #$04
bne skp bne skp
stop mva #$00 pmcntl ;PMG disabled stop mva #$00 pmcntl ;PMG disabled
tax tax
sta:rne hposp0,x+ sta:rne hposp0,x+
; silent ; silent
lda #0 lda #0
ldx #8 ldx #8
@ sta POKEY,x @ sta POKEY,x
sta POKEY2,x ; stereo sta POKEY2,x ; stereo
dex dex
bpl @- bpl @-
@@ -192,90 +192,90 @@ stop mva #$00 pmcntl ;PMG disabled
sta $022F ;dmactls sta $022F ;dmactls
mva #$ff portb ;ROM switch on mva #$ff portb ;ROM switch on
mva #$40 nmien ;only NMI interrupts, DLI disabled mva #$40 nmien ;only NMI interrupts, DLI disabled
cli ;IRQ enabled cli ;IRQ enabled
rts ;return to ... DOS rts ;return to ... DOS
skp skp
//-------------------- //--------------------
jsr play_frame jsr play_frame
jmp LOOP jmp LOOP
;--- ;---
wait54cycle wait54cycle
:2 inc byt2 :2 inc byt2
wait44cycle wait44cycle
inc byt3 inc byt3
nop nop
wait36cycle wait36cycle
inc byt3 inc byt3
jsr _rts jsr _rts
wait18cycle wait18cycle
inc byt3 inc byt3
_rts rts _rts rts
byt3 brk byt3 brk
;--- ;---
.MACRO ANTIC_PROGRAM .MACRO ANTIC_PROGRAM
dta $70,$70 dta $70,$70
:+8 dta $4e,a(:1+$0000+#*40) :+8 dta $4e,a(:1+$0000+#*40)
:+8 dta $4e,a(:1+$0140+#*40) :+8 dta $4e,a(:1+$0140+#*40)
:+8 dta $4e,a(:1+$0280+#*40) :+8 dta $4e,a(:1+$0280+#*40)
:+8 dta $4e,a(:1+$03C0+#*40) :+8 dta $4e,a(:1+$03C0+#*40)
:+8 dta $4e,a(:1+$0500+#*40) :+8 dta $4e,a(:1+$0500+#*40)
:+8 dta $4e,a(:1+$0640+#*40) :+8 dta $4e,a(:1+$0640+#*40)
:+8 dta $4e,a(:1+$0780+#*40) :+8 dta $4e,a(:1+$0780+#*40)
:+8 dta $4e,a(:1+$08C0+#*40) :+8 dta $4e,a(:1+$08C0+#*40)
:+8 dta $4e,a(:1+$0A00+#*40) :+8 dta $4e,a(:1+$0A00+#*40)
:+8 dta $4e,a(:1+$0B40+#*40) :+8 dta $4e,a(:1+$0B40+#*40)
:+8 dta $4e,a(:1+$0C80+#*40) :+8 dta $4e,a(:1+$0C80+#*40)
:+8 dta $4e,a(:1+$0DC0+#*40) :+8 dta $4e,a(:1+$0DC0+#*40)
:+8 dta $4e,a(:1+$0F00+#*40) :+8 dta $4e,a(:1+$0F00+#*40)
:+8 dta $4e,a(:1+$1040+#*40) :+8 dta $4e,a(:1+$1040+#*40)
:+8 dta $4e,a(:1+$1180+#*40) :+8 dta $4e,a(:1+$1180+#*40)
:+8 dta $4e,a(:1+$12C0+#*40) :+8 dta $4e,a(:1+$12C0+#*40)
:+8 dta $4e,a(:1+$1400+#*40) :+8 dta $4e,a(:1+$1400+#*40)
:+8 dta $4e,a(:1+$1540+#*40) :+8 dta $4e,a(:1+$1540+#*40)
:+8 dta $4e,a(:1+$1680+#*40) :+8 dta $4e,a(:1+$1680+#*40)
:+8 dta $4e,a(:1+$17C0+#*40) :+8 dta $4e,a(:1+$17C0+#*40)
:+8 dta $4e,a(:1+$1900+#*40) :+8 dta $4e,a(:1+$1900+#*40)
:+8 dta $4e,a(:1+$1A40+#*40) :+8 dta $4e,a(:1+$1A40+#*40)
:+8 dta $4e,a(:1+$1B80+#*40) :+8 dta $4e,a(:1+$1B80+#*40)
:+8 dta $4e,a(:1+$1CC0+#*40) :+8 dta $4e,a(:1+$1CC0+#*40)
:+8 dta $4e,a(:1+$1E00+#*40) :+8 dta $4e,a(:1+$1E00+#*40)
; :+4 dta $4e,a(:1+$1F40+#*40) ; :+4 dta $4e,a(:1+$1F40+#*40)
; :+4 dta $4e,a(:1+$1FF0+#*40) ; :+4 dta $4e,a(:1+$1FF0+#*40)
; :+8 dta $4e,a(:1+$2090+#*40) ; :+8 dta $4e,a(:1+$2090+#*40)
; :+8 dta $4e,a(:1+$21D0+#*40) ; :+8 dta $4e,a(:1+$21D0+#*40)
; :+8 dta $4e,a(:1+$2310+#*40) ; :+8 dta $4e,a(:1+$2310+#*40)
; :+8 dta $4e,a(:1+$2450+#*40) ; :+8 dta $4e,a(:1+$2450+#*40)
dta $00 dta $00
dta $42,a(mother) dta $42,a(mother)
dta $41,a(:2) dta $41,a(:2)
.ENDM .ENDM
CL CL
.MACRO ZPINIT .MACRO ZPINIT
.ENDM .ENDM
ZCOLORS = 0 ZCOLORS = 0
;--- ;---
ini main ini main
;--- ;---
opt l- opt l-
.MACRO SPRITES .MACRO SPRITES
icl "output.png.pmg" icl "output.png.pmg"
.ENDM .ENDM
USESPRITES = 1 USESPRITES = 1
+345 -341
View File
@@ -32,18 +32,18 @@ LevelNameBeginH
.by >(NamesOfLevels+64),>(NamesOfLevels+74),>(NamesOfLevels+84) .by >(NamesOfLevels+64),>(NamesOfLevels+74),>(NamesOfLevels+84)
;-------------- ;--------------
TanksWeaponsTableL TanksWeaponsTableL
.REPT MaxPlayers, #+1 .REPT MaxPlayers, #+1
.by <TanksWeapon:1 .by <TanksWeapon:1
.ENDR .ENDR
TanksWeaponsTableH TanksWeaponsTableH
.REPT MaxPlayers, #+1 .REPT MaxPlayers, #+1
.by >TanksWeapon:1 .by >TanksWeapon:1
.ENDR .ENDR
;-------------- ;--------------
XtankOffsetGO_L XtankOffsetGO_L
.by 6,56,106,156,206,0 .by 6,56,106,156,206,0
XtankOffsetGO_H XtankOffsetGO_H
.by 0,0,0,0,0,1 .by 0,0,0,0,0,1
;-----4x4 texts----- ;-----4x4 texts-----
LineTop LineTop
dta d"(%%%%%%%%%%%%)" dta d"(%%%%%%%%%%%%)"
@@ -59,7 +59,12 @@ LineGameOver
seppukuText seppukuText
dta d"# SEPPUKU! #" dta d"# SEPPUKU! #"
areYouSureText areYouSureText
dta d"# SURE? Y/N #" .IF target != 5200
dta d"# SURE? Y/N #"
.ELSE
dta d"#END? Y-1/N-0#"
.ENDIF
lineClear lineClear
dta d" " dta d" "
@@ -68,17 +73,17 @@ TankColoursTable .BYTE $58,$2a,$96,$ca,$7a,$ed
TankStatusColoursTable .BYTE $74,$c4,$24,$e4,$54,$94 ; Adam's order TankStatusColoursTable .BYTE $74,$c4,$24,$e4,$54,$94 ; Adam's order
;----------- ;-----------
GradientAddrL GradientAddrL
.by <dliColorsFore, <dliColorsFore, <dliColorsFore2 .by <dliColorsFore, <dliColorsFore, <dliColorsFore2
GradientAddrH GradientAddrH
.by >dliColorsFore, >dliColorsFore, >dliColorsFore2 .by >dliColorsFore, >dliColorsFore, >dliColorsFore2
dliColorsFore2 ; colors for NTSC dliColorsFore2 ; colors for NTSC
.by $0a ; one mountains color .by $0a ; one mountains color
.by $7a,$7a,$7a,$6a,$6a,$5a,$5a,$4a,$4a,$3a .by $7a,$7a,$7a,$6a,$6a,$5a,$5a,$4a,$4a,$3a
.by $3a,$1a,$1a,$ea,$ea,$d8,$d8,$b8,$b8,$b8 .by $3a,$1a,$1a,$ea,$ea,$d8,$d8,$b8,$b8,$b8
dliColorsFore2PAL ; colors for PAL dliColorsFore2PAL ; colors for PAL
.by $0a ; one mountains color .by $0a ; one mountains color
.by $7a,$7a,$7a,$6a,$6a,$5a,$5a,$4a,$4a,$3a .by $7a,$7a,$7a,$6a,$6a,$5a,$5a,$4a,$4a,$3a
.by $3a,$1a,$1a,$ea,$ea,$c8,$c8,$a8,$a8,$a8 .by $3a,$1a,$1a,$ea,$ea,$c8,$c8,$a8,$a8,$a8
;----------- ;-----------
pmtableL ; addressess of the P/M memory for 6 tanks pmtableL ; addressess of the P/M memory for 6 tanks
@@ -222,113 +227,114 @@ SlideLeftTableLen = *-SlideLeftTable
TanksNamesDefault TanksNamesDefault
dta d"1st.Tank" dta d"1st.Tank"
dta d"2nd.Tank" dta d"2nd.Tank"
.REPT MaxPlayers-2, #+3 dta d"3rd.Tank"
dta d":1rd.Tank" .REPT MaxPlayers-3, #+4
dta d":1th.Tank"
.ENDR .ENDR
;------------------------------------------------- ;-------------------------------------------------
TankShapesTable .BYTE char_tank1___________ TankShapesTable .BYTE char_tank1
.BYTE char_tank2___________ .BYTE char_tank2
.BYTE char_tank3___________ .BYTE char_tank3
.BYTE char_tank4___________ .BYTE char_tank4
;------------------------------------------------- ;-------------------------------------------------
WeaponPriceH ; weapons prices (tables with prices of weapons) WeaponPriceH ; weapons prices (tables with prices of weapons)
.by >price_Baby_Missile___ .by >price_Baby_Missile
.by >price_Missile________ .by >price_Missile
.by >price_Baby_Nuke______ .by >price_Baby_Nuke
.by >price_Nuke___________ .by >price_Nuke
.by >price_LeapFrog_______ .by >price_LeapFrog
.by >price_Funky_Bomb_____ .by >price_Funky_Bomb
.by >price_MIRV___________ .by >price_MIRV
.by >price_Death_s_Head___ .by >price_Death_s_Head
.by >price_Napalm_________ .by >price_Napalm
.by >price_Hot_Napalm_____ .by >price_Hot_Napalm
.by >price_Tracer_________ .by >price_Tracer
.by >price_Smoke_Tracer___ .by >price_Smoke_Tracer
.by >price_Baby_Roller____ .by >price_Baby_Roller
.by >price_Roller_________ .by >price_Roller
.by >price_Heavy_Roller___ .by >price_Heavy_Roller
.by >price_Riot_Charge____ .by >price_Riot_Charge
.by >price_Riot_Blast_____ .by >price_Riot_Blast
.by >price_Riot_Bomb______ .by >price_Riot_Bomb
.by >price_Heavy_Riot_Bomb .by >price_Heavy_Riot_Bomb
.by >price_Baby_Digger____ .by >price_Baby_Digger
.by >price_Digger_________ .by >price_Digger
.by >price_Heavy_Digger___ .by >price_Heavy_Digger
.by >price_Baby_Sandhog___ .by >price_Baby_Sandhog
.by >price_Sandhog________ .by >price_Sandhog
.by >price_Heavy_Sandhog__ .by >price_Heavy_Sandhog
.by >price_Dirt_Clod______ .by >price_Dirt_Clod
.by >price_Dirt_Ball______ .by >price_Dirt_Ball
.by >price_Ton_of_Dirt____ .by >price_Ton_of_Dirt
.by >price_Liquid_Dirt____ .by >price_Liquid_Dirt
.by >price_Dirt_Charge____ .by >price_Dirt_Charge
.by >price_Buy_me_________ .by >price_Buy_me
.by >price_Laser__________ .by >price_Laser
.by >price_White_Flag_____ .by >price_White_Flag
.by >price_Battery________ .by >price_Battery
.by >price_Hovercraft_____ .by >price_Hovercraft
.by >price_Parachute______ .by >price_Parachute
.by >price_StrongParachute .by >price_StrongParachute
.by >price_Mag_Deflector__ .by >price_Mag_Deflector
.by >price_Shield_________ .by >price_Shield
.by >price_Heavy_Shield___ .by >price_Heavy_Shield
.by >price_Force_Shield___ .by >price_Force_Shield
.by >price_Bouncy_Castle__ .by >price_Bouncy_Castle
.by >price_Long_Barrel____ .by >price_Long_Barrel
.by >price_Nuclear_Winter_ .by >price_Nuclear_Winter_
.by >price_Lazy_Boy_______ .by >price_Lazy_Boy
.by >price_Lazy_Darwin____ .by >price_Lazy_Darwin
.by >price_Auto_Defense___ .by >price_Auto_Defense
.by >price_Spy_Hard_______ .by >price_Spy_Hard
WeaponPriceL WeaponPriceL
.by <price_Baby_Missile___ .by <price_Baby_Missile
.by <price_Missile________ .by <price_Missile
.by <price_Baby_Nuke______ .by <price_Baby_Nuke
.by <price_Nuke___________ .by <price_Nuke
.by <price_LeapFrog_______ .by <price_LeapFrog
.by <price_Funky_Bomb_____ .by <price_Funky_Bomb
.by <price_MIRV___________ .by <price_MIRV
.by <price_Death_s_Head___ .by <price_Death_s_Head
.by <price_Napalm_________ .by <price_Napalm
.by <price_Hot_Napalm_____ .by <price_Hot_Napalm
.by <price_Tracer_________ .by <price_Tracer
.by <price_Smoke_Tracer___ .by <price_Smoke_Tracer
.by <price_Baby_Roller____ .by <price_Baby_Roller
.by <price_Roller_________ .by <price_Roller
.by <price_Heavy_Roller___ .by <price_Heavy_Roller
.by <price_Riot_Charge____ .by <price_Riot_Charge
.by <price_Riot_Blast_____ .by <price_Riot_Blast
.by <price_Riot_Bomb______ .by <price_Riot_Bomb
.by <price_Heavy_Riot_Bomb .by <price_Heavy_Riot_Bomb
.by <price_Baby_Digger____ .by <price_Baby_Digger
.by <price_Digger_________ .by <price_Digger
.by <price_Heavy_Digger___ .by <price_Heavy_Digger
.by <price_Baby_Sandhog___ .by <price_Baby_Sandhog
.by <price_Sandhog________ .by <price_Sandhog
.by <price_Heavy_Sandhog__ .by <price_Heavy_Sandhog
.by <price_Dirt_Clod______ .by <price_Dirt_Clod
.by <price_Dirt_Ball______ .by <price_Dirt_Ball
.by <price_Ton_of_Dirt____ .by <price_Ton_of_Dirt
.by <price_Liquid_Dirt____ .by <price_Liquid_Dirt
.by <price_Dirt_Charge____ .by <price_Dirt_Charge
.by <price_Buy_me_________ .by <price_Buy_me
.by <price_Laser__________ .by <price_Laser
.by <price_White_Flag_____ .by <price_White_Flag
.by <price_Battery________ .by <price_Battery
.by <price_Hovercraft_____ .by <price_Hovercraft
.by <price_Parachute______ .by <price_Parachute
.by <price_StrongParachute .by <price_StrongParachute
.by <price_Mag_Deflector__ .by <price_Mag_Deflector
.by <price_Shield_________ .by <price_Shield
.by <price_Heavy_Shield___ .by <price_Heavy_Shield
.by <price_Force_Shield___ .by <price_Force_Shield
.by <price_Bouncy_Castle__ .by <price_Bouncy_Castle
.by <price_Long_Barrel____ .by <price_Long_Barrel
.by <price_Nuclear_Winter_ .by <price_Nuclear_Winter_
.by <price_Lazy_Boy_______ .by <price_Lazy_Boy
.by <price_Lazy_Darwin____ .by <price_Lazy_Darwin
.by <price_Auto_Defense___ .by <price_Auto_Defense
.by <price_Spy_Hard_______ .by <price_Spy_Hard
;------------------------------------------------- ;-------------------------------------------------
; how many units (bulletd) of a given weapon we get for a given price ; how many units (bulletd) of a given weapon we get for a given price
@@ -337,75 +343,75 @@ WeaponPriceL
; is not present in the game. ; is not present in the game.
; This is the slot for adding new weapons. ; This is the slot for adding new weapons.
WeaponUnits WeaponUnits
.by 10 ;Baby_Missile___;_00 .by 10 ;Baby_Missile ;_00
.by 5 ;Missile________;_01 .by 5 ;Missile ;_01
.by 2 ;Baby_Nuke______;_02 .by 2 ;Baby_Nuke ;_02
.by 1 ;Nuke___________;_03 .by 1 ;Nuke ;_03
.by 2 ;LeapFrog_______;_04 .by 2 ;LeapFrog ;_04
.by 3 ;Funky_Bomb_____;_05 .by 3 ;Funky_Bomb ;_05
.by 2 ;MIRV___________;_06 .by 2 ;MIRV ;_06
.by 1 ;Death_s_Head___;_07 .by 1 ;Death_s_Head ;_07
.by 4 ;Napalm_________;_08 .by 4 ;Napalm ;_08
.by 2 ;Hot_Napalm_____;_09 .by 2 ;Hot_Napalm ;_09
.by 20 ;Tracer_________;_10 .by 20 ;Tracer ;_10
.by 10 ;Smoke_Tracer___;_11 .by 10 ;Smoke_Tracer ;_11
.by 5 ;Baby_Roller____;_12 .by 5 ;Baby_Roller ;_12
.by 3 ;Roller_________;_13 .by 3 ;Roller ;_13
.by 2 ;Heavy_Roller___;_14 .by 2 ;Heavy_Roller ;_14
.by 5 ;Riot_Charge____;_15 .by 5 ;Riot_Charge ;_15
.by 2 ;Riot_Blast_____;_16 .by 2 ;Riot_Blast ;_16
.by 5 ;Riot_Bomb______;_17 .by 5 ;Riot_Bomb ;_17
.by 2 ;Heavy_Riot_Bomb;_18 .by 2 ;Heavy_Riot_Bomb;_18
.by 10 ;Baby_Digger____;_19 .by 10 ;Baby_Digger ;_19
.by 5 ;Digger_________;_20 .by 5 ;Digger ;_20
.by 2 ;Heavy_Digger___;_21 .by 2 ;Heavy_Digger ;_21
.by 10 ;Baby_Sandhog___;_22 .by 10 ;Baby_Sandhog ;_22
.by 5 ;Sandhog________;_23 .by 5 ;Sandhog ;_23
.by 2 ;Heavy_Sandhog__;_24 .by 2 ;Heavy_Sandhog ;_24
.by 5 ;Dirt_Clod______;_25 .by 5 ;Dirt_Clod ;_25
.by 3 ;Dirt_Ball______;_26 .by 3 ;Dirt_Ball ;_26
.by 1 ;Ton_of_Dirt____;_27 .by 1 ;Ton_of_Dirt ;_27
.by 4 ;Liquid_Dirt____;_28 .by 4 ;Liquid_Dirt ;_28
.by 2 ;Dirt_Charge____;_29 .by 2 ;Dirt_Charge ;_29
.by 1 ;Buy_me_________;_30 .by 1 ;Buy_me ;_30
.by 5 ;Laser__________;_31 .by 5 ;Laser ;_31
.by 1 ;White_Flag_____;_32 .by 1 ;White_Flag ;_32
.by 3 ;Battery________;_33 .by 3 ;Battery ;_33
.by 2 ;Floating_Tank__;_34 .by 2 ;Floating_Tank ;_34
.by 3 ;Parachute______;_35 .by 3 ;Parachute ;_35
.by 2 ;StrongParachute;_36 .by 2 ;StrongParachute;_36
.by 2 ;Mag_Deflector__;_37 .by 2 ;Mag_Deflector ;_37
.by 3 ;Shield_________;_38 .by 3 ;Shield ;_38
.by 2 ;Heavy_Shield___;_39 .by 2 ;Heavy_Shield ;_39
.by 3 ;Force_Shield___;_40 .by 3 ;Force_Shield ;_40
.by 1 ;Auto_Defense___;_41 .by 1 ;Auto_Defense ;_41
.by 2 ;Long_Barrel____;_42 .by 2 ;Long_Barrel ;_42
.by 1 ;Nuclear_Winter_;_43 .by 1 ;Nuclear_Winter_;_43
.by 2 ;Lazy_Boy_______;_44 .by 2 ;Lazy_Boy ;_44
.by 2 ;Lazy_Darwin____;_45 .by 2 ;Lazy_Darwin ;_45
.by 2 ;Auto_Defense___;_46 .by 2 ;Auto_Defense ;_46
.by 4 ;Spy_Hard_______;_47 .by 4 ;Spy_Hard ;_47
PurchaseMeTable ;weapons good to be purchased by the robot PurchaseMeTable ;weapons good to be purchased by the robot
;the comment is an index in the tables ;the comment is an index in the tables
; "Baby Missile ","Missile ","Baby Nuke ","Nuke " ; "Baby Missile ","Missile ","Baby Nuke ","Nuke "
; "LeapFrog ","Funky Bomb ","MIRV ","Death's Head " ; "LeapFrog ","Funky Bomb ","MIRV ","Death's Head "
.by %01111111 .by %01111111
; "Napalm ","Hot Napalm ","Tracer ","Smoke Tracer " ; "Napalm ","Hot Napalm ","Tracer ","Smoke Tracer "
; "Baby Roller ","Roller ","Heavy Roller ","Riot Charge " ; "Baby Roller ","Roller ","Heavy Roller ","Riot Charge "
.by %11001110 .by %11001110
; "Riot Blast ","Riot Bomb ","Heavy Riot Bomb ","Baby Digger " ; "Riot Blast ","Riot Bomb ","Heavy Riot Bomb ","Baby Digger "
; "Digger ","Heavy Digger ","Baby Sandhog ","Sandhog " ; "Digger ","Heavy Digger ","Baby Sandhog ","Sandhog "
.by %00000000 .by %00000000
; "Heavy Sandhog ","Dirt Clod ","Dirt Ball ","Ton of Dirt " ; "Heavy Sandhog ","Dirt Clod ","Dirt Ball ","Ton of Dirt "
; "Liquid Dirt ","Dirt Charge ","Buy me! ","Laser " ; "Liquid Dirt ","Dirt Charge ","Buy me! ","Laser "
.by %00000000 .by %00000000
; "White Flag ","Battery ","Hovercraft ","Parachute " ; "White Flag ","Battery ","Hovercraft ","Parachute "
; "Strong Parachute","Mag Deflector ","Shield ","Heavy Shield " ; "Strong Parachute","Mag Deflector ","Shield ","Heavy Shield "
.by %01011111 .by %01011111
; "Force Shield ","Bouncy Castle ","Long Barrel ","Nuclear Winter " ; "Force Shield ","Bouncy Castle ","Long Barrel ","Nuclear Winter "
; "Lazy Boy ","Lazy Darwin ","Auto Defense ","Spy Hard " ; "Lazy Boy ","Lazy Darwin ","Auto Defense ","Spy Hard "
.by %11000000 .by %11000000
PurchaseMeTable2 ;weapons good to be purchased by the robot (Cyborg) PurchaseMeTable2 ;weapons good to be purchased by the robot (Cyborg)
;the comment is an index in the tables ;the comment is an index in the tables
@@ -425,60 +431,60 @@ PurchaseMeTable2 ;weapons good to be purchased by the robot (Cyborg)
; "Strong Parachute","Mag Deflector ","Shield ","Heavy Shield " ; "Strong Parachute","Mag Deflector ","Shield ","Heavy Shield "
.by %01001101 .by %01001101
; "Force Shield ","Bouncy Castle ","Long Barrel ","Nuclear Winter " ; "Force Shield ","Bouncy Castle ","Long Barrel ","Nuclear Winter "
; "Lazy Boy ","Lazy Darwin ","Auto Defense ","Spy Hard " ; "Lazy Boy ","Lazy Darwin ","Auto Defense ","Spy Hard "
.by %11000000 .by %11000000
;------------------------------------------------- ;-------------------------------------------------
; Screen codes of icons (chars) representing a given weapon ; Screen codes of icons (chars) representing a given weapon
WeaponSymbols WeaponSymbols
.by $40 ;ind_Baby_Missile___ ;_00 .by $40 ;ind_Baby_Missile ;_00
.by $41 ;ind_Missile________ ;_01 .by $41 ;ind_Missile ;_01
.by $42 ;ind_Baby_Nuke______ ;_02 .by $42 ;ind_Baby_Nuke ;_02
.by $43 ;ind_Nuke___________ ;_03 .by $43 ;ind_Nuke ;_03
.by $44 ;ind_LeapFrog_______ ;_04 .by $44 ;ind_LeapFrog ;_04
.by $45 ;ind_Funky_Bomb_____ ;_05 .by $45 ;ind_Funky_Bomb ;_05
.by $46 ;ind_MIRV___________ ;_06 .by $46 ;ind_MIRV ;_06
.by $47 ;ind_Death_s_Head___ ;_07 .by $47 ;ind_Death_s_Head ;_07
.by $48 ;ind_Napalm_________ ;_08 .by $48 ;ind_Napalm ;_08
.by $49 ;ind_Hot_Napalm_____ ;_09 .by $49 ;ind_Hot_Napalm ;_09
.by $4a ;ind_Tracer_________ ;_10 .by $4a ;ind_Tracer ;_10
.by $4b ;ind_Smoke_Tracer___ ;_11 .by $4b ;ind_Smoke_Tracer ;_11
.by $4c ;ind_Baby_Roller____ ;_12 .by $4c ;ind_Baby_Roller ;_12
.by $4d ;ind_Roller_________ ;_13 .by $4d ;ind_Roller ;_13
.by $4e ;ind_Heavy_Roller___ ;_14 .by $4e ;ind_Heavy_Roller ;_14
.by $4f ;ind_Riot_Charge____ ;_15 .by $4f ;ind_Riot_Charge ;_15
.by $50 ;ind_Riot_Blast_____ ;_16 .by $50 ;ind_Riot_Blast ;_16
.by $51 ;ind_Riot_Bomb______ ;_17 .by $51 ;ind_Riot_Bomb ;_17
.by $52 ;ind_Heavy_Riot_Bomb ;_18 .by $52 ;ind_Heavy_Riot_Bomb ;_18
.by $53 ;ind_Baby_Digger____ ;_19 .by $53 ;ind_Baby_Digger ;_19
.by $54 ;ind_Digger_________ ;_20 .by $54 ;ind_Digger ;_20
.by $55 ;ind_Heavy_Digger___ ;_21 .by $55 ;ind_Heavy_Digger ;_21
.by $56 ;ind_Baby_Sandhog___ ;_22 .by $56 ;ind_Baby_Sandhog ;_22
.by $57 ;ind_Sandhog________ ;_23 .by $57 ;ind_Sandhog ;_23
.by $58 ;ind_Heavy_Sandhog__ ;_24 .by $58 ;ind_Heavy_Sandhog ;_24
.by $59 ;ind_Dirt_Clod______ ;_25 .by $59 ;ind_Dirt_Clod ;_25
.by $5a ;ind_Dirt_Ball______ ;_26 .by $5a ;ind_Dirt_Ball ;_26
.by $5b ;ind_Ton_of_Dirt____ ;_27 .by $5b ;ind_Ton_of_Dirt ;_27
.by $60 ;ind_Liquid_Dirt____ ;_28 .by $60 ;ind_Liquid_Dirt ;_28
.by $7b ;ind_Dirt_Charge____ ;_29 .by $7b ;ind_Dirt_Charge ;_29
.by $1f ;ind_Buy_me_________ ;_30 .by $1f ;ind_Buy_me ;_30
.by $20 ;ind_Laser__________ ;_31 .by $20 ;ind_Laser ;_31
.by $5f ;ind_White_Flag_____ ;_32 .by $5f ;ind_White_Flag ;_32
.by $1c ;ind_Battery________ ;_33 .by $1c ;ind_Battery ;_33
.by $06 ;ind_Floating_Tank__ ;_34 .by $06 ;ind_Floating_Tank ;_34
.by $1b ;ind_Parachute______ ;_35 .by $1b ;ind_Parachute ;_35
.by $1b ;ind_StrongParachute ;_36 .by $1b ;ind_StrongParachute ;_36
.by $1e ;ind_Mag_Deflector__ ;_37 .by $1e ;ind_Mag_Deflector ;_37
.by $3b ;ind_Shield_________ ;_38 .by $3b ;ind_Shield ;_38
.by $3d ;ind_Heavy_Shield___ ;_39 .by $3d ;ind_Heavy_Shield ;_39
.by $3c ;ind_Force_Shield___ ;_40 .by $3c ;ind_Force_Shield ;_40
.by $3f ;ind_Bouncy_Castle__ ;_41 .by $3f ;ind_Bouncy_Castle ;_41
.by $1d ;ind_Long_Barrel____ ;_42 .by $1d ;ind_Long_Barrel ;_42
.by $7d ;ind_Nuclear_Winter_ ;_43 .by $7d ;ind_Nuclear_Winter_ ;_43
.by $02 ;ind_Lazy_Boy_______ ;_44 .by $02 ;ind_Lazy_Boy ;_44
.by $03 ;ind_Lazy_Darwin____ ;_45 .by $03 ;ind_Lazy_Darwin ;_45
.by $5e ;ind_Auto_Defense___ ;_46 .by $5e ;ind_Auto_Defense ;_46
.by $7c ;ind_Spy_Hard_______ ;_47 .by $7c ;ind_Spy_Hard ;_47
; Names of weapons (16 chars long) ; Names of weapons (16 chars long)
NamesOfWeapons ;the comment is an index in the tables NamesOfWeapons ;the comment is an index in the tables
@@ -515,83 +521,83 @@ NamesOfWeapons ;the comment is an index in the tables
dta d"Best F...g Gifts" ; 30 dta d"Best F...g Gifts" ; 30
dta d"Laser " ; 31 dta d"Laser " ; 31
;------defensives ;------defensives
dta d"White Flag " ; 32 dta d"White Flag " ; 32
dta d"Battery " ; 33 dta d"Battery " ; 33
dta d"Hovercraft " ; 34 dta d"Hovercraft " ; 34
dta d"Parachute " ; 35 - no energy dta d"Parachute " ; 35 - no energy
dta d"Strong Parachute" ; 36 - with energy (earlier Battery) dta d"Strong Parachute" ; 36 - with energy (earlier Battery)
dta d"Mag Deflector " ; 37 - with shield and energy dta d"Mag Deflector " ; 37 - with shield and energy
dta d"Shield " ; 38 - shield for one shot - no energy dta d"Shield " ; 38 - shield for one shot - no energy
dta d"Heavy Shield " ; 39 - shield with energy dta d"Heavy Shield " ; 39 - shield with energy
dta d"Force Shield " ; 40 - shield with energy and parachute dta d"Force Shield " ; 40 - shield with energy and parachute
dta d"Bouncy Castle " ; 41 - with shield and energy dta d"Bouncy Castle " ; 41 - with shield and energy
dta d"Long Schlong " ; 42 dta d"Long Schlong " ; 42
dta d"Nuclear Winter " ; 43 dta d"Nuclear Winter " ; 43
dta d"Lazy Boy " ; 44 dta d"Lazy Boy " ; 44
dta d"Lazy Darwin " ; 45 dta d"Lazy Darwin " ; 45
dta d"Auto Defense " ; 46 dta d"Auto Defense " ; 46
dta d"Spy Hard " ; 47 dta d"Spy Hard " ; 47
DefensiveEnergy = *-(last_offensive_____ - first_offensive____ +1) ; to fake the table for ALL weapons DefensiveEnergy = *-(last_offensive - first_offensive +1) ; to fake the table for ALL weapons
.by 00 ; White Flag .by 00 ; White Flag
.by 00 ; Heat Guidance .by 00 ; Heat Guidance
.by 98 ; Let's go! .by 98 ; Let's go!
.by 00 ; Parachute .by 00 ; Parachute
.by 99 ; Strong Parachute .by 99 ; Strong Parachute
.by 99 ; Mag Deflector .by 99 ; Mag Deflector
.by 00 ; Shield .by 00 ; Shield
.by 99 ; Heavy Shield .by 99 ; Heavy Shield
.by 99 ; Force Shield .by 99 ; Force Shield
.by 99 ; Bouncy Castle .by 99 ; Bouncy Castle
.by 00 ; Long Barrel .by 00 ; Long Barrel
.by 00 ; Nuclear Winter .by 00 ; Nuclear Winter
.by 00 ; Lazy Boy .by 00 ; Lazy Boy
.by 00 ; Lazy Darwin .by 00 ; Lazy Darwin
.by 00 ; Auto Defense .by 00 ; Auto Defense
.by 00 ; Spy Hard .by 00 ; Spy Hard
weaponsOfDeath ; weapons used in tank death animations weaponsOfDeath ; weapons used in tank death animations
dta ind_Missile________ dta ind_Missile
dta ind_Baby_Nuke______ dta ind_Baby_Nuke
dta ind_Nuke___________ dta ind_Nuke
dta ind_Death_s_Head___ dta ind_Death_s_Head
dta ind_Hot_Napalm_____ ; why not? dta ind_Hot_Napalm ; why not?
dta ind_Riot_Bomb______ dta ind_Riot_Bomb
dta ind_Heavy_Riot_Bomb dta ind_Heavy_Riot_Bomb
dta ind_Baby_Digger____ dta ind_Baby_Digger
dta ind_Digger_________ dta ind_Digger
dta ind_Heavy_Digger___ dta ind_Heavy_Digger
dta ind_Baby_Sandhog___ dta ind_Baby_Sandhog
dta ind_Sandhog________ dta ind_Sandhog
dta ind_Heavy_Sandhog__ dta ind_Heavy_Sandhog
dta ind_Dirt_Clod______ dta ind_Dirt_Clod
dta ind_Dirt_Ball______ dta ind_Dirt_Ball
dta ind_Ton_of_Dirt____ dta ind_Ton_of_Dirt
weaponsOfDeathEnd weaponsOfDeathEnd
joyToKeyTable joyToKeyTable
.by $ff ;00 .by $ff ;00
.by $ff ;01 .by $ff ;01
.by $ff ;02 .by $ff ;02
.by $ff ;03 .by $ff ;03
.by $ff ;04 .by $ff ;04
.by $ff ;05 .by $ff ;05
.by $ff ;06 .by $ff ;06
.by @kbcode._right ;07 .by @kbcode._right ;07
.by $ff ;08 .by $ff ;08
.by $ff ;09 .by $ff ;09
.by $ff ;0a .by $ff ;0a
.by @kbcode._left ;0b .by @kbcode._left ;0b
.by $ff ;0c .by $ff ;0c
.by @kbcode._down ;0d .by @kbcode._down ;0d
.by @kbcode._up ;0e .by @kbcode._up ;0e
.by $ff ;0f .by $ff ;0f
;----------------------------------- ;-----------------------------------
keycodes ;tables for converting KeyCode to Screen Code (38 -1 characters) keycodes ;tables for converting KeyCode to Screen Code (38-1 characters)
.by $3f,$15,$12,$3a,$2a,$38,$3d,$39 .by $3f,$15,$12,$3a,$2a,$38,$3d,$39
.by $0d,$01,$05,$00,$25,$23,$08,$0a .by $0d,$01,$05,$00,$25,$23,$08,$0a
.by $2f,$28,$3e,$2d,$0b,$10,$2e,$16 .by $2f,$28,$3e,$2d,$0b,$10,$2e,$16
.by $2b,$17 .by $2b,$17
.by $32,$1f,$1e,$1a,$18,$1d,$1b .by $32,$1f,$1e,$1a,$18,$1d,$1b
.by $33,$35,$30,$22,$21 ;,$0e <-- hyphen removed from the table, sorry hyphen lovers .by $33,$35,$30,$22,$21 ;,$0e <-- hyphen removed from the table, sorry hyphen lovers
keycodesEnd keycodesEnd
scrcodes scrcodes
@@ -599,72 +605,70 @@ scrcodes
dta d"ijklmnop" dta d"ijklmnop"
dta d"qrstuvwx" dta d"qrstuvwx"
dta d"yz" dta d"yz"
;-------decimal constans + end of scrcodes
zero zero
digits ; decimal constans digits
dta d"0123456" dta d"0123456"
dta d"789. " ; "-" dta d"789. " ; "-"
;-------decimal constans
;zero
;digits dta d"0123456789"
;----------------------------------- ;-----------------------------------
gameOverSpritesTop gameOverSpritesTop
; end of the Gover sprites by number of players ; end of the GameOver sprites by number of players
; 1 2 3 4 5 6 ; 1 2 3 4 5 6
.by 130+7,130+7,136+7,142+7,148+7,154+7 .by 130+7,130+7,136+7,142+7,148+7,154+7
;------credits ;------credits
CreditsStart CreditsStart
dta d" "* dta d" "*
dta d"You were playin",d"g"* dta d"You were playin",d"g"*
dta d"Scorc",d"h"* dta d"Scorc",d"h"*
dta d"Warsaw, Miam",d"i"* dta d"Warsaw, Miam",d"i"*
dta d"2000-202",d"3"* dta d"2000-202",d"3"*
dta d" "* dta d" "*
dta d"Programmin",d"g"* dta d"Programmin",d"g"*
dta d"Tomasz 'Pecus' Peck",d"o"* dta d"Tomasz 'Pecus' Peck",d"o"*
dta d"Pawel 'pirx' Kalinowsk",d"i"* dta d"Pawel 'pirx' Kalinowsk",d"i"*
dta d" "* dta d" "*
dta d"SFX, Music and Suppor",d"t"* dta d"SFX, Music and Suppor",d"t"*
dta d"Michal 'Miker' Szpilowsk",d"i"* dta d"Michal 'Miker' Szpilowsk",d"i"*
dta d" "* dta d" "*
.IF target != 5200 .IF target != 5200
dta d"Additional Musi",d"c"* dta d"Additional Musi",d"c"*
dta d"Mario 'Emkay' Kri",d"x"* dta d"Mario 'Emkay' Kri",d"x"*
dta d" "* dta d" "*
.ENDIF .ENDIF
dta d"Code Optimizatio",d"n"* dta d"Code Optimizatio",d"n"*
dta d"Piotr '0xF' Fusi",d"k"* dta d"Piotr '0xF' Fusi",d"k"*
dta d" "* dta d" "*
dta d"Ar",d"t"* dta d"Ar",d"t"*
dta d"Adam Wachowsk",d"i"* dta d"Adam Wachowsk",d"i"*
.IF target != 5200 .IF target != 5200
dta d"Roman 'xorcerer' Fierfa",d"s"* dta d"Roman 'xorcerer' Fierfa",d"s"*
.ENDIF .ENDIF
dta d" "* dta d" "*
dta d"Ideas, help and Q",d"A"* dta d"Ideas, help and Q",d"A"*
dta d"Bocianu, Probabilitydragon",d","* dta d"Bocianu, Probabilitydragon",d","*
dta d"EnderDude, Dracon",d","* dta d"EnderDude, Dracon",d","*
dta d"Beeblebrox, KrzysRog, lopezpb",d","* dta d"Beeblebrox, KrzysRog, lopezpb",d","*
dta d"brad-colbert, archon800, nowy80",d","* dta d"brad-colbert, archon800, nowy80",d","*
dta d"Shaggy the Atarian, RetroBorsuk, ZPH" dta d"Shaggy the Atarian, RetroBorsuk, ZPH"
.IF target = 5200 .IF target = 5200
dta d","* dta d","*
dta d"x-usr(1536), Aking, JAC!, phaeron",d","* dta d"x-usr(1536), Aking, JAC!, phaeron",d","*
dta d"RB520",d"0"* dta d"RB520",d"0"*
.ELSE .ELSE
dta d" "* dta d" "*
.ENDIF .ENDIF
dta d" "* dta d" "*
dta d"Additional testin",d"g"* dta d"Additional testin",d"g"*
dta d"Arek and Alex Peck",d"o"* dta d"Arek and Alex Peck",d"o"*
dta d" "* dta d" "*
dta d"Special thank",d"s"* dta d"Special thank",d"s"*
dta d"Krzysztof 'Kaz' Ziembi",d"k"* dta d"Krzysztof 'Kaz' Ziembi",d"k"*
.IF target != 5200 .IF target != 5200
dta d" "* dta d" "*
dta d"Stay tuned for the FujiNet version",d"!"* dta d"Stay tuned for the FujiNet version",d"!"*
.ENDIF .ENDIF
dta d" "* dta d" "*
CreditsEnd CreditsEnd
.IF target = 5200 .IF target = 5200
CreditsLines=34 + 7; add 7 for scrollout CreditsLines=34 + 7; add 7 for scrollout
@@ -674,6 +678,6 @@ CreditsEnd
.IF target = 5200 .IF target = 5200
; Atari 5200 splash ; Atari 5200 splash
NewSplashText=* NewSplashText=*
dta d"copyright 2023 atari" dta d" 2023 atariage", $4e, "com " ; $4e - non blinking dot
.ENDIF .ENDIF
.endif .endif
+6 -6
View File
@@ -7,11 +7,11 @@ TanksPMOrder .BYTE 4,3,1,5,0,2 ; 0-3 = P0-P3 , 4 = M0+M1 , 5 = M2+M3
dliColorsBack dliColorsBack
:10 .by $02,$00 :10 .by $02,$00
dliColorsFore dliColorsFore
.by $0a ; one mountains color .by $0a ; one mountains color
; .by $0e,$0c,$0c,$0b,$0b,$0a,$0a,$09,$09,$08 ; mountains colors array ; .by $0e,$0c,$0c,$0b,$0b,$0a,$0a,$09,$09,$08 ; mountains colors array
; .by $08,$08,$07,$07,$07,$06,$06,$06,$06,$05 ; .by $08,$08,$07,$07,$07,$06,$06,$06,$06,$05
.by $0e,$0c,$0c,$0c,$0c,$0a,$0a,$0a,$0a,$08 ; mountains colors array new .by $0e,$0c,$0c,$0c,$0c,$0a,$0a,$0a,$0a,$08 ; mountains colors array new
.by $08,$08,$08,$06,$06,$06,$06,$06,$06,$04 .by $08,$08,$08,$06,$06,$06,$06,$06,$06,$04
CashOptionL ;(one zero less than on the screen) CashOptionL ;(one zero less than on the screen)
.by 0,<200,<800,<1200,<2000 .by 0,<200,<800,<1200,<2000
CashOptionH CashOptionH
@@ -22,4 +22,4 @@ RoundsTable .by 10,20,30,40,50
AIForceTable .wo 375,470,630,720,820 ; starting shoot forces for different gravity AIForceTable .wo 375,470,630,720,820 ; starting shoot forces for different gravity
flyDelayTable .by 255,150,75,35,1 flyDelayTable .by 255,150,75,35,1
seppukuTable .by 255, 45,25,15,9 seppukuTable .by 255, 45,25,15,9
.endif .ENDIF
+112 -112
View File
@@ -4,7 +4,7 @@ screenheight = 200
screenBytes = 40 screenBytes = 40
screenwidth = screenBytes*8 ; Max screenwidth = 512!!! screenwidth = screenBytes*8 ; Max screenwidth = 512!!!
TankWidth = 8 TankWidth = 8
;---------------------------------------------- ;----------------------------------------------
; Player/missile memory ; Player/missile memory
PMGraph = $1800 ; real PM start = PMGraph + $0300 PMGraph = $1800 ; real PM start = PMGraph + $0300
@@ -19,7 +19,7 @@ PMOffsetX = $2C ; P/M to graphics offset
PMOffsetY = $2A ; P/M to graphics offset PMOffsetY = $2A ; P/M to graphics offset
napalmRadius = 10 napalmRadius = 10
StandardBarrel = 6 ; standard tank barrel length StandardBarrel = 6 ; standard tank barrel length
LongBarrel = 20 ; long barrel length LongBarrel = 20 ; long barrel length
TextBackgroundColor = $02 ; REAL constans - use: LDA #TextBackgroundColor TextBackgroundColor = $02 ; REAL constans - use: LDA #TextBackgroundColor
TextForegroundColor = $0A TextForegroundColor = $0A
@@ -28,123 +28,123 @@ space = 0 ; space in screencodes
KeyRepeatSpeed = 10 ; (max 127 !!!) KeyRepeatSpeed = 10 ; (max 127 !!!)
;character codes for symbols (tank, parachute, etc. ) ;character codes for symbols (tank, parachute, etc. )
char_parachute_______ = $02 char_parachute = $02
char_flag____________ = $1e char_flag = $1e
char_flame___________ = $14 char_flame = $14
char_clear_flame_____ = $1c char_clear_flame = $1c
char_digger__________ = $04 char_digger = $04
char_sandhog_________ = $0c char_sandhog = $0c
char_sandhog_offset = char_sandhog_________ - char_digger__________ char_sandhog_offset = char_sandhog - char_digger
char_tank1___________ = $20 char_tank1 = $20
char_tank2___________ = $24 char_tank2 = $24
char_tank3___________ = $2c char_tank3 = $2c
char_tank4___________ = $28 ; robotank shape char_tank4 = $28 ; robotank shape
;Weapon prices (*10 on screen) ;Weapon prices (*10 on screen)
price_Baby_Missile___ = 0 ;_00 price_Baby_Missile = 0 ;_00
price_Missile________ = 96 ;_01 price_Missile = 96 ;_01
price_Baby_Nuke______ = 111 ;_02 price_Baby_Nuke = 111 ;_02
price_Nuke___________ = 144 ;_03 price_Nuke = 144 ;_03
price_LeapFrog_______ = 192 ;_04 price_LeapFrog = 192 ;_04
price_Funky_Bomb_____ = 293 ;_05 price_Funky_Bomb = 293 ;_05
price_MIRV___________ = 456 ;_06 price_MIRV = 456 ;_06
price_Death_s_Head___ = 337 ;_07 price_Death_s_Head = 337 ;_07
price_Napalm_________ = 125 ;_08 price_Napalm = 125 ;_08
price_Hot_Napalm_____ = 162 ;_09 price_Hot_Napalm = 162 ;_09
price_Tracer_________ = 102 ;_10 price_Tracer = 102 ;_10
price_Smoke_Tracer___ = 291 ;_11 price_Smoke_Tracer = 291 ;_11
price_Baby_Roller____ = 211 ;_12 price_Baby_Roller = 211 ;_12
price_Roller_________ = 244 ;_13 price_Roller = 244 ;_13
price_Heavy_Roller___ = 326 ;_14 price_Heavy_Roller = 326 ;_14
price_Riot_Charge____ = 230 ;_15 price_Riot_Charge = 230 ;_15
price_Riot_Blast_____ = 241 ;_16 price_Riot_Blast = 241 ;_16
price_Riot_Bomb______ = 259 ;_17 price_Riot_Bomb = 259 ;_17
price_Heavy_Riot_Bomb = 272 ;_18 price_Heavy_Riot_Bomb = 272 ;_18
price_Baby_Digger____ = 136 ;_19 price_Baby_Digger = 136 ;_19
price_Digger_________ = 176 ;_20 price_Digger = 176 ;_20
price_Heavy_Digger___ = 207 ;_21 price_Heavy_Digger = 207 ;_21
price_Baby_Sandhog___ = 158 ;_22 price_Baby_Sandhog = 158 ;_22
price_Sandhog________ = 191 ;_23 price_Sandhog = 191 ;_23
price_Heavy_Sandhog__ = 223 ;_24 price_Heavy_Sandhog = 223 ;_24
price_Dirt_Clod______ = 104 ;_25 price_Dirt_Clod = 104 ;_25
price_Dirt_Ball______ = 130 ;_26 price_Dirt_Ball = 130 ;_26
price_Ton_of_Dirt____ = 171 ;_27 price_Ton_of_Dirt = 171 ;_27
price_Liquid_Dirt____ = 330 ;_28 price_Liquid_Dirt = 330 ;_28
price_Dirt_Charge____ = 343 ;_29 price_Dirt_Charge = 343 ;_29
price_Buy_me_________ = 170 ;_30 price_Buy_me = 170 ;_30
price_Laser__________ = 277 ;_31 price_Laser = 277 ;_31
price_White_Flag_____ = $0 ;_32 price_White_Flag = $0 ;_32
price_Battery________ = 300 ;_33 price_Battery = 300 ;_33
price_Hovercraft_____ = 352 ;_34 price_Hovercraft = 352 ;_34
price_Parachute______ = 234 ;_35 price_Parachute = 234 ;_35
price_StrongParachute = 1000 ;_36 price_StrongParachute = 1000 ;_36
price_Mag_Deflector__ = 745 ;_37 price_Mag_Deflector = 745 ;_37
price_Shield_________ = 224 ;_38 price_Shield = 224 ;_38
price_Heavy_Shield___ = 628 ;_39 price_Heavy_Shield = 628 ;_39
price_Force_Shield___ = 1100 ;_40 price_Force_Shield = 1100 ;_40
price_Bouncy_Castle__ = 512 ;_41 price_Bouncy_Castle = 512 ;_41
price_Long_Barrel____ = 2100 ;_42 price_Long_Barrel = 2100 ;_42
price_Nuclear_Winter_ = 1000 ;_43 price_Nuclear_Winter_ = 1000 ;_43
price_Lazy_Boy_______ = 500 ;_44 price_Lazy_Boy = 500 ;_44
price_Lazy_Darwin____ = 730 ;_45 price_Lazy_Darwin = 730 ;_45
price_Auto_Defense___ = 250 ;_46 price_Auto_Defense = 250 ;_46
price_Spy_Hard_______ = 83 ;_47 price_Spy_Hard = 83 ;_47
;Weapon indexes (numbers) ;Weapon indexes (numbers)
ind_Baby_Missile___ = 0 ind_Baby_Missile = 0
first_offensive____ = ind_Baby_Missile___ first_offensive = ind_Baby_Missile
ind_Missile________ = 1 ind_Missile = 1
ind_Baby_Nuke______ = 2 ind_Baby_Nuke = 2
ind_Nuke___________ = 3 ind_Nuke = 3
ind_LeapFrog_______ = 4 ind_LeapFrog = 4
ind_Funky_Bomb_____ = 5 ind_Funky_Bomb = 5
ind_MIRV___________ = 6 ind_MIRV = 6
ind_Death_s_Head___ = 7 ind_Death_s_Head = 7
ind_Napalm_________ = 8 ind_Napalm = 8
ind_Hot_Napalm_____ = 9 ind_Hot_Napalm = 9
ind_Tracer_________ = 10 ind_Tracer = 10
ind_Smoke_Tracer___ = 11 ind_Smoke_Tracer = 11
ind_Baby_Roller____ = 12 ind_Baby_Roller = 12
ind_Roller_________ = 13 ind_Roller = 13
ind_Heavy_Roller___ = 14 ind_Heavy_Roller = 14
ind_Riot_Charge____ = 15 ind_Riot_Charge = 15
ind_Riot_Blast_____ = 16 ind_Riot_Blast = 16
ind_Riot_Bomb______ = 17 ind_Riot_Bomb = 17
ind_Heavy_Riot_Bomb = 18 ind_Heavy_Riot_Bomb = 18
ind_Baby_Digger____ = 19 ind_Baby_Digger = 19
ind_Digger_________ = 20 ind_Digger = 20
ind_Heavy_Digger___ = 21 ind_Heavy_Digger = 21
ind_Baby_Sandhog___ = 22 ind_Baby_Sandhog = 22
ind_Sandhog________ = 23 ind_Sandhog = 23
ind_Heavy_Sandhog__ = 24 ind_Heavy_Sandhog = 24
ind_Dirt_Clod______ = 25 ind_Dirt_Clod = 25
ind_Dirt_Ball______ = 26 ind_Dirt_Ball = 26
ind_Ton_of_Dirt____ = 27 ind_Ton_of_Dirt = 27
ind_Liquid_Dirt____ = 28 ind_Liquid_Dirt = 28
ind_Dirt_Charge____ = 29 ind_Dirt_Charge = 29
ind_Buy_me_________ = 30 ind_Buy_me = 30
ind_Laser__________ = 31 ind_Laser = 31
last_offensive_____ = ind_Laser__________ last_offensive = ind_Laser
ind_White_Flag_____ = 32 ind_White_Flag = 32
first_defensive____ = ind_White_Flag_____ first_defensive = ind_White_Flag
ind_Battery________ = 33 ind_Battery = 33
ind_Hovercraft_____ = 34 ind_Hovercraft = 34
ind_Parachute______ = 35 ind_Parachute = 35
ind_StrongParachute = 36 ind_StrongParachute = 36
ind_Mag_Deflector__ = 37 ind_Mag_Deflector = 37
ind_Shield_________ = 38 ind_Shield = 38
ind_Heavy_Shield___ = 39 ind_Heavy_Shield = 39
ind_Force_Shield___ = 40 ind_Force_Shield = 40
ind_Bouncy_Castle__ = 41 ind_Bouncy_Castle = 41
ind_Long_Barrel____ = 42 ind_Long_Barrel = 42
ind_Nuclear_Winter_ = 43 ind_Nuclear_Winter_ = 43
ind_Lazy_Boy_______ = 44 ind_Lazy_Boy = 44
ind_Lazy_Darwin____ = 45 ind_Lazy_Darwin = 45
ind_Auto_Defense___ = 46 ind_Auto_Defense = 46
ind_Spy_Hard_______ = 47 ind_Spy_Hard = 47
last_defensive_____ = ind_Spy_Hard_______ last_defensive = ind_Spy_Hard
last_real_defensive = ind_Bouncy_Castle__ last_real_defensive = ind_Bouncy_Castle
number_of_offensives = last_offensive_____ - first_offensive____+1 number_of_offensives = last_offensive - first_offensive +1
number_of_defensives = (last_defensive_____ - first_defensive____+1) number_of_defensives = (last_defensive - first_defensive +1)
number_of_weapons = number_of_offensives + number_of_defensives number_of_weapons = number_of_offensives + number_of_defensives
;-------------------------------- ;--------------------------------
; names of RMT instruments (sfx) ; names of RMT instruments (sfx)
@@ -180,9 +180,9 @@ sfx_liquid_dirt = $1b ;2
sfx_battery = $1c ;3 sfx_battery = $1c ;3
sfx_white_flag = $1d ;4 sfx_white_flag = $1d ;4
sfx_long_barrel = $1e sfx_long_barrel = $1e
sfx_tank_move = $1f sfx_tank_move = $1f
sfx_auto_defense= $2b sfx_auto_defense= $2b
sfx_lazy_boys = $2c sfx_lazy_boys = $2c
;-------------------------------- ;--------------------------------
; RMT songs (lines) ; RMT songs (lines)
;-------------------------------- ;--------------------------------
+237 -237
View File
@@ -3,37 +3,37 @@
; All main procedures of the game not dependent on hardware (I hope) :) ; All main procedures of the game not dependent on hardware (I hope) :)
START START
jsr MakeDarkScreen jsr MakeDarkScreen
; Startup sequence ; Startup sequence
jsr Initialize jsr Initialize
;jsr GameOverScreen ; only for test !!! ;jsr GameOverScreen ; only for test !!!
RMTSong song_main_menu RMTSong song_main_menu
jsr Options ;startup screen jsr Options ;startup screen
jsr SetVariablesFromOptions jsr SetVariablesFromOptions
jsr MakeDarkScreen jsr MakeDarkScreen
bit escFlag bit escFlag
bmi START bmi START
jsr EnterPlayerNames jsr EnterPlayerNames
jsr MakeDarkScreen jsr MakeDarkScreen
bit escFlag bit escFlag
bmi START bmi START
jsr RandomizeSequence jsr RandomizeSequence
; for the round #1 shooting sequence is random ; for the round #1 shooting sequence is random
MainGameLoop MainGameLoop
jsr SetWallsType jsr SetWallsType
; first set default barrel lengths (fix for Long Schlong activation :) ) ; first set default barrel lengths (fix for Long Schlong activation :) )
; we must do it before purchase/activate ; we must do it before purchase/activate
; and set Auto Defense to off ; and set Auto Defense to off
jsr SetStandardBarrels jsr SetStandardBarrels
jsr CallPurchaseForEveryTank jsr CallPurchaseForEveryTank
jsr MakeDarkScreen jsr MakeDarkScreen
bit escFlag bit escFlag
bmi START bmi START
@@ -43,19 +43,19 @@ MainGameLoop
jsr MainRoundLoop jsr MainRoundLoop
bit escFlag bit escFlag
jvs GoGameOver jvs GoGameOver
bmi START bmi START
jsr CalculateGains jsr CalculateGains
jsr SortSequence jsr SortSequence
mva #0 TankNr ; mva #0 TankNr ;
sta COLBAKS ; set background color to black sta COLBAKS ; set background color to black
sta JoystickNumber ; set joystick port for player sta JoystickNumber ; set joystick port for player
; Hide all (easier than hide last ;) ) tanks ; Hide all (easier than hide last ;) ) tanks
jsr cleartanks ; A=0 jsr cleartanks ; A=0
; here gains and losses should be displayed (dollars) ; here gains and losses should be displayed (dollars)
; finally we have changed our minds and money of players ; finally we have changed our minds and money of players
@@ -67,13 +67,13 @@ MainGameLoop
RmtSong song_round_over RmtSong song_round_over
jsr DisplayResults jsr DisplayResults
jsr DemoModeOrKey jsr DemoModeOrKey
jsr MakeDarkScreen jsr MakeDarkScreen
lda GameIsOver lda GameIsOver
beq NoGameOverYet beq NoGameOverYet
GoGameOver GoGameOver
jsr GameOverScreen jsr GameOverScreen
jmp START jmp START
NoGameOverYet NoGameOverYet
inc CurrentRoundNr inc CurrentRoundNr
@@ -96,15 +96,15 @@ NoGameOverYet
ldx NumberOfPlayers ldx NumberOfPlayers
dex dex
CalculateGainsLoop CalculateGainsLoop
; adding the remaining energy of the tank to gain ; adding the remaining energy of the tank to gain
; winner gets more ! :) ; winner gets more ! :)
lda Energy,x lda Energy,x
adc gainL,x adc gainL,x
sta gainL,x sta gainL,x
bcc @+ bcc @+
inc gainH,x inc gainH,x
@ @
; add gain * 2 ; add gain * 2
asl gainL,x asl gainL,x
rol gainH,x rol gainH,x
@@ -172,7 +172,7 @@ eskipzeroing
dex dex
jpl CalculateGainsLoop jpl CalculateGainsLoop
rts rts
.endp .endp
;-------------------------------------------------- ;--------------------------------------------------
.proc RoundInit .proc RoundInit
@@ -186,17 +186,17 @@ eskipzeroing
RmtSong song_ingame RmtSong song_ingame
jsr SetPMWidth ; A=0 jsr SetPMWidth ; A=0
lda #0 lda #0
sta AfterBFGflag ; reset BFG flag sta AfterBFGflag ; reset BFG flag
sta COLOR2 ; status line "off" sta COLOR2 ; status line "off"
sta COLOR1 sta COLOR1
tax tax
@ sta singleRoundVars,x @ sta singleRoundVars,x
inx inx
cpx #(singleRoundVarsEnd-singleRoundVars) cpx #(singleRoundVarsEnd-singleRoundVars)
bne @- bne @-
ldx #(MaxPlayers-1) ldx #(MaxPlayers-1)
SettingEnergies SettingEnergies
@@ -234,7 +234,7 @@ SettingEnergies
;generating the new landscape ;generating the new landscape
jsr PMoutofScreen ;let P/M disappear jsr PMoutofScreen ;let P/M disappear
jsr clearscreen ;let the screen be clean jsr clearscreen ;let the screen be clean
jsr ClearPMmemory jsr ClearPMmemory
jsr placetanks ;let the tanks be evenly placed jsr placetanks ;let the tanks be evenly placed
jsr calculatemountains ;let mountains be easy for the eye jsr calculatemountains ;let mountains be easy for the eye
;jsr calculatemountains0 ;only for tests - makes mountains flat and 0 height ;jsr calculatemountains0 ;only for tests - makes mountains flat and 0 height
@@ -251,10 +251,10 @@ SettingEnergies
jsr drawmountains ;draw them jsr drawmountains ;draw them
jsr drawtanks ;finally draw tanks jsr drawtanks ;finally draw tanks
mva #$00 TankSequencePointer mva #$00 TankSequencePointer
;---------round screen is ready--------- ;---------round screen is ready---------
mva #TextForegroundColor COLOR1 ; status line "on" mva #TextForegroundColor COLOR1 ; status line "on"
rts rts
.endp .endp
@@ -265,7 +265,7 @@ SettingEnergies
;-------------------------------------------------- ;--------------------------------------------------
ldy #0 ; in Y - number of tanks with energy greater than zero ldy #0 ; in Y - number of tanks with energy greater than zero
sty ATRACT ; reset atract mode sty ATRACT ; reset atract mode
ldx NumberOfPlayers ldx NumberOfPlayers
dex dex
CheckingIfRoundIsFinished CheckingIfRoundIsFinished
@@ -320,19 +320,19 @@ DoNotFinishTheRound
jmp Seppuku jmp Seppuku
@ @
; Auto Defense - activates defensives ; Auto Defense - activates defensives
ldx NumberOfPlayers ldx NumberOfPlayers
dex dex
CheckNextTankAD CheckNextTankAD
lda Energy,x ; only active players lda Energy,x ; only active players
beq @+ beq @+
lda AutoDefenseFlag,x ; with Auto Defence activated lda AutoDefenseFlag,x ; with Auto Defence activated
beq @+ beq @+
; run auto defense for tank in X ; run auto defense for tank in X
jsr AutoDefense jsr AutoDefense
@ dex @ dex
bpl CheckNextTankAD bpl CheckNextTankAD
jsr DrawTanks ; redraw tanks with new defences jsr DrawTanks ; redraw tanks with new defences
; ;
ldx TankSequencePointer ldx TankSequencePointer
lda TankSequence,x lda TankSequence,x
@@ -352,75 +352,75 @@ CheckNextTankAD
lda TankStatusColoursTable,x lda TankStatusColoursTable,x
sta COLOR2 ; set color of status line sta COLOR2 ; set color of status line
jsr PutTankNameOnScreen jsr PutTankNameOnScreen
; jsr DisplayStatus ; There is no need anymore, it is always after PutTankNameOnScreen ; jsr DisplayStatus ; There is no need anymore, it is always after PutTankNameOnScreen
lda SkillTable,x lda SkillTable,x
beq ManualShooting beq ManualShooting
RoboTanks RoboTanks
; robotanks shoot here ; robotanks shoot here
; TankNr still in X ; TankNr still in X
jsr ArtificialIntelligence jsr ArtificialIntelligence
;pause 30 ;pause 30
ldx TankNr ldx TankNr
jsr DisplayStatus ; to make visible AI selected defensive (and offensive :) ) jsr DisplayStatus ; to make visible AI selected defensive (and offensive :) )
jsr MoveBarrelToNewPosition jsr MoveBarrelToNewPosition
lda kbcode lda kbcode
cmp #@kbcode._esc ; 28 ; ESC cmp #@kbcode._esc ; 28 ; ESC
bne @+ bne @+
jsr AreYouSure jsr AreYouSure
@ bit escFlag @ bit escFlag
spl:rts ; keys Esc or O spl:rts ; keys Esc or O
jmp AfterManualShooting jmp AfterManualShooting
ManualShooting ManualShooting
lda JoyNumber,x lda JoyNumber,x
sta JoystickNumber ; set joystick port for player sta JoystickNumber ; set joystick port for player
jsr WaitForKeyRelease jsr WaitForKeyRelease
lda #%00000000 lda #%00000000
sta TestFlightFlag ; set "Test Fight" off sta TestFlightFlag ; set "Test Fight" off
jsr BeforeFire jsr BeforeFire
bit escFlag bit escFlag
spl:rts ; keys Esc or O spl:rts ; keys Esc or O
AfterManualShooting AfterManualShooting
mva #$00 plot4x4color mva #$00 plot4x4color
jsr DisplayTankNameAbove jsr DisplayTankNameAbove
; defensive weapons without flight handling ; defensive weapons without flight handling
ldx TankNr ldx TankNr
lda ActiveDefenceWeapon,x lda ActiveDefenceWeapon,x
cmp #ind_Hovercraft_____ cmp #ind_Hovercraft
beq GoFloat beq GoFloat
cmp #ind_White_Flag_____ ; White Flag cmp #ind_White_Flag ; White Flag
beq ShootWhiteFlag beq ShootWhiteFlag
cmp #ind_Nuclear_Winter_ cmp #ind_Nuclear_Winter_
bne StandardShoot bne StandardShoot
ShootAtomicWinter ShootAtomicWinter
; --- atomic winter --- ; --- atomic winter ---
jsr AtomicWinter jsr AtomicWinter
jmp NextPlayerShoots ; and we skip shoot jmp NextPlayerShoots ; and we skip shoot
ShootWhiteFlag ShootWhiteFlag
; --- white flag --- ; --- white flag ---
jsr WhiteFlag jsr WhiteFlag
jsr TankFlying.SoilDownAfterLanding ; Soildown like after Hovercraf landing :) jsr TankFlying.SoilDownAfterLanding ; Soildown like after Hovercraf landing :)
jmp NextPlayerShoots ; and we skip shoot jmp NextPlayerShoots ; and we skip shoot
GoFloat GoFloat
jsr TankFlying jsr TankFlying
lda #0 lda #0
sta ActiveDefenceWeapon,x ; deactivate after use sta ActiveDefenceWeapon,x ; deactivate after use
bit escFlag bit escFlag
bpl ManualShooting ; after floating tank can shoot bpl ManualShooting ; after floating tank can shoot
rts rts
StandardShoot StandardShoot
inc noDeathCounter inc noDeathCounter
jsr DecreaseWeaponBeforeShoot jsr DecreaseWeaponBeforeShoot
jsr DisplayStatus jsr DisplayStatus
; ldx TankNr ; ldx TankNr
dec Energy,x ; lower energy to eventually let tanks commit suicide dec Energy,x ; lower energy to eventually let tanks commit suicide
ShootNow ShootNow
jsr Shoot jsr Shoot
@@ -430,7 +430,7 @@ ShootNow
jsr DisplayOffensiveTextNr jsr DisplayOffensiveTextNr
bit escFlag bit escFlag
spl:rts ; keys Esc or O spl:rts ; keys Esc or O
lda HitFlag ;0 if missed lda HitFlag ;0 if missed
beq missed beq missed
@@ -440,16 +440,16 @@ ShootNow
continueMainRoundLoopAfterSeppuku continueMainRoundLoopAfterSeppuku
AfterExplode AfterExplode
jsr SoilDown2 ; allways jsr SoilDown2 ; allways
NoFallDown2 NoFallDown2
;here tanks are falling down ;here tanks are falling down
mva tankNr tempor2 mva tankNr tempor2
ldx NumberOfPlayers ldx NumberOfPlayers
dex dex
TanksFallDown TanksFallDown
stx TankNr stx TankNr
lda eXistenZ,x lda eXistenZ,x
beq NoExistNoFall beq NoExistNoFall
jsr TankFalls jsr TankFalls
NoExistNoFall NoExistNoFall
dex dex
@@ -477,8 +477,8 @@ NextPlayerShoots
SeteXistenZ SeteXistenZ
lda Energy,x lda Energy,x
sta eXistenZ,x sta eXistenZ,x
jsr MaxForceCalculate jsr MaxForceCalculate
dex dex
bpl SeteXistenZ bpl SeteXistenZ
@@ -519,17 +519,17 @@ NoPlayerNoDeath
inc:lda TankSequencePointer inc:lda TankSequencePointer
cmp NumberOfPlayers cmp NumberOfPlayers
bne NotLastPlayerInRound bne NotLastPlayerInRound
mva #0 TankSequencePointer mva #0 TankSequencePointer
lda WindChangeInRound lda WindChangeInRound
beq NoWindChangeNow beq NoWindChangeNow
jsr GetRandomWind ; wind change after each turn (not round only) jsr GetRandomWind ; wind change after each turn (not round only)
NoWindChangeNow NoWindChangeNow
NotLastPlayerInRound NotLastPlayerInRound
jmp MainRoundLoop jmp MainRoundLoop
.endp .endp
;--------------------------------- ;---------------------------------
.proc PlayerXdeath .proc PlayerXdeath
; this tank should not explode anymore: ; this tank should not explode anymore:
@@ -551,30 +551,30 @@ NotLastPlayerInRound
; in X there is a number of tank that died ; in X there is a number of tank that died
lda #78 ; mumber of defensive text after BFG! ("VERY FUNNY.") lda #78 ; mumber of defensive text after BFG! ("VERY FUNNY.")
bit AfterBFGflag ; check BFG flag bit AfterBFGflag ; check BFG flag
bmi TextAfterBFG bmi TextAfterBFG
; if BFG then no points for dead tanks ... ; if BFG then no points for dead tanks ...
lda CurrentResult lda CurrentResult
clc clc
adc ResultsTable,x adc ResultsTable,x
sta ResultsTable,x sta ResultsTable,x
;inc CurrentResult ;inc CurrentResult
; RandomizeDeffensiveText ; RandomizeDeffensiveText
randomize talk.NumberOfOffensiveTexts (talk.NumberOfDeffensiveTexts+talk.NumberOfOffensiveTexts-1) randomize talk.NumberOfOffensiveTexts (talk.NumberOfDeffensiveTexts+talk.NumberOfOffensiveTexts-1)
TextAfterBFG TextAfterBFG
sta TextNumberOff sta TextNumberOff
inc CurrentResult ; ... but increase result of winner (BFG) inc CurrentResult ; ... but increase result of winner (BFG)
ldy TankTempY ldy TankTempY
mva #$ff plot4x4color mva #$ff plot4x4color
jsr DisplayOffensiveTextNr jsr DisplayOffensiveTextNr
; tank flash ; tank flash
ldy TankTempY ldy TankTempY
mva TankNr temp2 ; not elegant, and probably unnecessary mva TankNr temp2 ; not elegant, and probably unnecessary
sty TankNr sty TankNr
jsr FlashTank ; blinking and pausing (like PAUSE 72 - 18x(2+2) ) jsr FlashTank ; blinking and pausing (like PAUSE 72 - 18x(2+2) )
mva temp2 TankNr mva temp2 TankNr
;Deffensive text cleanup ;Deffensive text cleanup
;here we clear Deffensive text (after a shoot) ;here we clear Deffensive text (after a shoot)
@@ -609,26 +609,26 @@ TextAfterBFG
MetodOfDeath MetodOfDeath
lda random lda random
and #%00011111 ; range 0-31 and #%00011111 ; range 0-31
cmp #(weaponsOfDeathEnd-weaponsOfDeath) ; we have 20 weapons in table (from 0 to 19) cmp #(weaponsOfDeathEnd-weaponsOfDeath) ; we have 20 weapons in table (from 0 to 19)
bcs MetodOfDeath bcs MetodOfDeath
tay tay
lda weaponsOfDeath,y lda weaponsOfDeath,y
jsr ExplosionDirect jsr ExplosionDirect
mva #sfx_silencer sfx_effect mva #sfx_silencer sfx_effect
; Clear current Shooter settings. After that, Shooter will "search" for the target again ; Clear current Shooter settings. After that, Shooter will "search" for the target again
ldx NumberOfPlayers ldx NumberOfPlayers
dex dex
@ lda skillTable,x @ lda skillTable,x
cmp #2 ; clear variables only if Shooter cmp #2 ; clear variables only if Shooter
bne NotShooter bne NotShooter
lda #0 lda #0
sta PreviousAngle,x sta PreviousAngle,x
sta PreviousEnergyL,x sta PreviousEnergyL,x
sta PreviousEnergyH,x sta PreviousEnergyH,x
NotShooter NotShooter
dex dex
bpl @- bpl @-
; jump to after explosion routines (soil fallout, etc.) ; jump to after explosion routines (soil fallout, etc.)
; After going through these routines we are back ; After going through these routines we are back
@@ -682,20 +682,20 @@ NotNegativeEnergy
; rest of the energy - to decrease tank energy ; rest of the energy - to decrease tank energy
;-------------------------------------------------- ;--------------------------------------------------
sty EnergyDecrease sty EnergyDecrease
ldy #0 ; if Shield survive then no decrease tank anergy ldy #0 ; if Shield survive then no decrease tank anergy
; Energy cannot be less than 0 ; Energy cannot be less than 0
lda ShieldEnergy,x lda ShieldEnergy,x
cmp EnergyDecrease cmp EnergyDecrease
bcc UseAllShieldEnergy bcc UseAllShieldEnergy
;sec ;sec
sbc EnergyDecrease sbc EnergyDecrease
bpl NotNegativeShieldEnergy ; jump allways bpl NotNegativeShieldEnergy ; jump allways
UseAllShieldEnergy UseAllShieldEnergy
; now calculate rest of energy for future tank energy decrease ; now calculate rest of energy for future tank energy decrease
sec sec
lda EnergyDecrease lda EnergyDecrease
sbc ShieldEnergy,x sbc ShieldEnergy,x
tay tay
lda #0 lda #0
NotNegativeShieldEnergy NotNegativeShieldEnergy
sta ShieldEnergy,x sta ShieldEnergy,x
@@ -751,8 +751,8 @@ NotNegativeShieldEnergy
; calculates max force for tank (tanknr in X) ; calculates max force for tank (tanknr in X)
; Energy of tank X in A ; Energy of tank X in A
;-------------------------------------------------- ;--------------------------------------------------
sta L1 sta L1
;DATA L1,L2 ;DATA L1,L2
;Multiplication 8bit*8bit, ;Multiplication 8bit*8bit,
;result 16bit ;result 16bit
@@ -774,7 +774,7 @@ B0 dey
sta MaxForceTableH,x sta MaxForceTableH,x
lda L1 lda L1
sta MaxForceTableL,x sta MaxForceTableL,x
rts rts
.endp .endp
;-------------------------------------------------- ;--------------------------------------------------
@@ -784,15 +784,15 @@ B0 dey
;-------------------------------------------------- ;--------------------------------------------------
ldx #(number_of_weapons - 1) ldx #(number_of_weapons - 1)
@ lda #$0 @ lda #$0
cpx #ind_White_Flag_____ ; White Flag cpx #ind_White_Flag ; White Flag
bne no99 bne no99
set99 lda #99 set99 lda #99
no99 no99
.REPT MaxPlayers, #+1 .REPT MaxPlayers, #+1
sta TanksWeapon:1,x sta TanksWeapon:1,x
.ENDR .ENDR
dex dex
beq set99 ; Baby Missile (index=0) beq set99 ; Baby Missile (index=0)
bpl @- bpl @-
rts rts
.endp .endp
@@ -807,7 +807,7 @@ deletePtr = temp
; clean variables ; clean variables
lda #0 lda #0
sta escFlag sta escFlag
sta JoystickNumber sta JoystickNumber
tay tay
mwa #variablesStart deletePtr mwa #variablesStart deletePtr
@ tya @ tya
@@ -816,21 +816,21 @@ deletePtr = temp
cpw deletePtr #variablesEnd cpw deletePtr #variablesEnd
bne @- bne @-
; ser initial shapes for each tank (tanks 0-5 has shape 0 now) ; ser initial shapes for each tank (tanks 0-5 has shape 0 now)
ldy #1 ldy #1
sty TankShape+1 sty TankShape+1
sty TankShape+4 sty TankShape+4
iny iny
sty TankShape+2 sty TankShape+2
sty TankShape+5 sty TankShape+5
mwa #1024 RandBoundaryHigh mwa #1024 RandBoundaryHigh
mva #$ff LastWeapon mva #$ff LastWeapon
sta HowMuchToFall sta HowMuchToFall
mva #1 color mva #1 color
jsr SetStandardBarrels jsr SetStandardBarrels
jsr WeaponCleanup jsr WeaponCleanup
mva #>WeaponFont chbas mva #>WeaponFont chbas
@@ -844,7 +844,7 @@ SetunPlots
sta oldplotH,x sta oldplotH,x
lda #0 lda #0
sta oldply,x sta oldply,x
lda #$ff lda #$ff
sta oldora,x sta oldora,x
dex dex
bpl SetunPlots bpl SetunPlots
@@ -854,7 +854,7 @@ SetunPlots
sta pmbase sta pmbase
lda #$03 ; P/M on lda #$03 ; P/M on
sta GRACTL sta GRACTL
jsr SetPMWidth jsr SetPMWidth
lda #%00100001 ; P/M priorities (multicolor players on) - prior=1 lda #%00100001 ; P/M priorities (multicolor players on) - prior=1
sta GPRIOR sta GPRIOR
jsr PMoutofScreen jsr PMoutofScreen
@@ -878,13 +878,13 @@ MakeTanksVisible
; for all tanks ; for all tanks
;-------------------------------------------------- ;--------------------------------------------------
ldx #maxPlayers-1 ldx #maxPlayers-1
@ lda #StandardBarrel ; standard barrel length @ lda #StandardBarrel ; standard barrel length
sta BarrelLength,x sta BarrelLength,x
lda #$00 ; deactivate Auto Defense lda #$00 ; deactivate Auto Defense
sta AutoDefenseFlag,x sta AutoDefenseFlag,x
dex dex
bpl @- bpl @-
rts rts
.endp .endp
;---------------------------------------------- ;----------------------------------------------
/* .proc RandomizeSequence0 /* .proc RandomizeSequence0
@@ -973,7 +973,7 @@ UsageLoop
lda RANDOM lda RANDOM
and #%00000011 ;(0..1023) and #%00000011 ;(0..1023)
sta temp2+1 sta temp2+1
cpw RandBoundaryLow temp2 cpw RandBoundaryLow temp2
seq:bcs RandomizeForce seq:bcs RandomizeForce
@@ -1007,45 +1007,45 @@ LimitForce
;---------------------------------------------- ;----------------------------------------------
.proc Table2Force .proc Table2Force
;---------------------------------------------- ;----------------------------------------------
lda ForceTableL,x lda ForceTableL,x
sta Force sta Force
lda ForceTableH,x lda ForceTableH,x
sta Force+1 sta Force+1
rts rts
.endp .endp
;---------------------------------------------- ;----------------------------------------------
.proc MoveBarrelToNewPosition .proc MoveBarrelToNewPosition
;---------------------------------------------- ;----------------------------------------------
mva #1 Erase mva #1 Erase
jsr DrawTankNr.BarrelChange jsr DrawTankNr.BarrelChange
mva #0 Erase mva #0 Erase
MoveBarrel MoveBarrel
mva #sfx_set_power_2 sfx_effect mva #sfx_set_power_2 sfx_effect
jsr DrawTankNr jsr DrawTankNr
jsr DisplayStatus.displayAngle jsr DisplayStatus.displayAngle
; ;
jsr CheckExitKeys jsr CheckExitKeys
spl:rts ;---Exit key pressed-quit game--- spl:rts ;---Exit key pressed-quit game---
ldx TankNr ldx TankNr
; ;
mva #1 Erase mva #1 Erase
jsr WaitOneFrame jsr WaitOneFrame
jsr DrawTankNr.BarrelChange jsr DrawTankNr.BarrelChange
mva #0 Erase mva #0 Erase
lda NewAngle lda NewAngle
cmp AngleTable,x cmp AngleTable,x
beq BarrelPositionIsFine beq BarrelPositionIsFine
bcc rotateLeft bcc rotateLeft
rotateRight ; older is lower rotateRight ; older is lower
inc angleTable,x inc angleTable,x
jmp MoveBarrel jmp MoveBarrel
rotateLeft ; older is bigger rotateLeft ; older is bigger
dec angleTable,x dec angleTable,x
jmp MoveBarrel jmp MoveBarrel
BarrelPositionIsFine BarrelPositionIsFine
jsr DrawTankNr jsr DrawTankNr
rts rts
.endp .endp
;---------------------------------------------- ;----------------------------------------------
@@ -1091,39 +1091,39 @@ SequenceStart
Bubble Bubble
ldx #0 ;i=x ldx #0 ;i=x
stx temp2 ; sortflag=temp2 stx temp2 ; sortflag=temp2
inx ; because NumberOfPlayers start from 1 (not 0) inx ; because NumberOfPlayers start from 1 (not 0)
BubbleBobble BubbleBobble
ldy TankSequence-1,x ; x count from 1 to NumberOfPlayers (we need cout from 0 to NumberOfPlayers-1) ldy TankSequence-1,x ; x count from 1 to NumberOfPlayers (we need cout from 0 to NumberOfPlayers-1)
lda ResultsTable,y lda ResultsTable,y
ldy TankSequence,x ldy TankSequence,x
cmp ResultsTable,y cmp ResultsTable,y
bcc nextishigher bcc nextishigher
bne swapvalues bne swapvalues
nextisequal nextisequal
; if results are equal, check Direct Hits ; if results are equal, check Direct Hits
ldy TankSequence-1,x ldy TankSequence-1,x
lda DirectHits,y lda DirectHits,y
ldy TankSequence,x ldy TankSequence,x
cmp DirectHits,y cmp DirectHits,y
bcc nextishigher bcc nextishigher
bne swapvalues bne swapvalues
nextisequal2 nextisequal2
; if results are equal, check money (H) ; if results are equal, check money (H)
ldy TankSequence-1,x ldy TankSequence-1,x
lda EarnedMoneyH,y lda EarnedMoneyH,y
ldy TankSequence,x ldy TankSequence,x
cmp EarnedMoneyH,y cmp EarnedMoneyH,y
bcc nextishigher bcc nextishigher
bne swapvalues bne swapvalues
nextisequal2b nextisequal2b
; if results are equal, check money (L) ; if results are equal, check money (L)
ldy TankSequence-1,x ldy TankSequence-1,x
lda EarnedMoneyL,y lda EarnedMoneyL,y
ldy TankSequence,x ldy TankSequence,x
cmp EarnedMoneyL,y cmp EarnedMoneyL,y
; ;
beq nextishigher ; this is to block hangs when 2 equal values meet beq nextishigher ; this is to block hangs when 2 equal values meet
bcc nextishigher bcc nextishigher
;here we must swap values ;here we must swap values
;because next is smaller than previous ;because next is smaller than previous
@@ -1149,20 +1149,20 @@ nextishigher
;-------------------------------------------------- ;--------------------------------------------------
.proc SetWallsType .proc SetWallsType
;-------------------------------------------------- ;--------------------------------------------------
mva #0 WallsType mva #0 WallsType
lda OptionsTable+8 lda OptionsTable+8
cmp #4 cmp #4
beq SetRandomWalls beq SetRandomWalls
lsr lsr
ror WallsType ror WallsType
lsr lsr
ror WallsType ror WallsType
rts rts
SetRandomWalls SetRandomWalls
lda random lda random
and #%11000000 and #%11000000
sta WallsType sta WallsType
rts rts
.endp .endp
; -------------------------------------- ; --------------------------------------
; Sets the appropriate variables based on the options table ; Sets the appropriate variables based on the options table
@@ -1321,7 +1321,7 @@ ResultOfTheNextPlayer
; overwrite the second digit of the points (max 255) ; overwrite the second digit of the points (max 255)
;it means ":" ;it means ":"
mva #26 ResultLineBuffer+9 mva #26 ResultLineBuffer+9
ldx #0 ldx #0
lda TankNr lda TankNr
asl asl
@@ -1337,7 +1337,7 @@ TankNameCopyLoop
iny iny
cpx #8 ; end of name cpx #8 ; end of name
bne TankNameCopyLoop bne TankNameCopyLoop
; last letter of tank name overwrites first digit of the points (max 255) ; last letter of tank name overwrites first digit of the points (max 255)
;just after the digits ;just after the digits
+413 -413
View File
File diff suppressed because it is too large Load Diff
+193 -191
View File
@@ -1,4 +1,4 @@
; @com.wudsn.ide.asm.mainsourcefile=scorch.asm ; @com.wudsn.ide.asm.mainsourcefile=scorch.asm
;Atari 8-bit Scorched Earth source code ;Atari 8-bit Scorched Earth source code
;--------------------------------------------------- ;---------------------------------------------------
;by Tomasz 'pecus' Pecko and Pawel 'pirx' Kalinowski ;by Tomasz 'pecus' Pecko and Pawel 'pirx' Kalinowski
@@ -6,7 +6,9 @@
;Miami & Warsaw 2022, 2023 ;Miami & Warsaw 2022, 2023
;--------------------------------------------------- ;---------------------------------------------------
.def TARGET = 800 ; 5200 ; or 800 .IFNDEF TARGET
.def TARGET = 800 ; 5200 ; or 64
.ENDIF
;atari800 -5200 -cart ${outputFilePath} -cart-type 4 ;atari800 -5200 -cart ${outputFilePath} -cart-type 4
;atari800 -run ${outputFilePath} ;atari800 -run ${outputFilePath}
;--------------------------------------------------- ;---------------------------------------------------
@@ -17,11 +19,11 @@
; (direct writes to screen memory - atari only :) ) ; (direct writes to screen memory - atari only :) )
;--------------------------------------------------- ;---------------------------------------------------
;OPT r+ ; saves 12 bytes :O ; OPT r+ ; saves 12 bytes :O
;--------------------------------------------------- ;---------------------------------------------------
.macro build .macro build
dta d"1.30" ; number of this build (4 bytes) dta d"1.30" ; number of this build (4 bytes)
.endm .endm
.macro RMTSong .macro RMTSong
@@ -34,14 +36,14 @@
;--------------------------------------------------- ;---------------------------------------------------
FirstZpageVariable = $57 FirstZpageVariable = $57
.zpvar DliColorBack .byte = FirstZpageVariable .zpvar DliColorBack .byte = FirstZpageVariable
.zpvar GradientNr .byte .zpvar GradientNr .byte
.zpvar GradientColors .word .zpvar GradientColors .word
.zpvar WindChangeInRound .byte ; wind change after each turn (not round only) flag - (0 - round only, >0 - each turn) .zpvar WindChangeInRound .byte ; wind change after each turn (not round only) flag - (0 - round only, >0 - each turn)
.zpvar JoystickNumber .byte .zpvar JoystickNumber .byte
.zpvar LazyFlag .byte ; 7 bit - run Lazy Darwin, 6 bit - run Lazy Boy or Darwin (!) after inventory, 0 - nothing .zpvar LazyFlag .byte ; 7 bit - run Lazy Darwin, 6 bit - run Lazy Boy or Darwin (!) after inventory, 0 - nothing
.zpvar SpyHardFlag .byte ; >$7f - run SpyHard after inventory .zpvar SpyHardFlag .byte ; >$7f - run SpyHard after inventory
.zpvar Vdebug .byte ; "visual debug" flag ($00 - off, $ff - on) .zpvar Vdebug .byte ; "visual debug" flag ($00 - off, $ff - on)
.zpvar xdraw .word ;= $64 ;variable X for plot .zpvar xdraw .word ;= $64 ;variable X for plot
.zpvar ydraw .word ;variable Y for plot (like in Atari Basic - Y=0 in upper right corner of the screen) .zpvar ydraw .word ;variable Y for plot (like in Atari Basic - Y=0 in upper right corner of the screen)
.zpvar xbyte .word .zpvar xbyte .word
@@ -59,7 +61,7 @@ FirstZpageVariable = $57
.zpvar xtempDRAW .word ;same as above for XDRAW routine .zpvar xtempDRAW .word ;same as above for XDRAW routine
.zpvar ytempDRAW .word ;same as above for XDRAW routine .zpvar ytempDRAW .word ;same as above for XDRAW routine
.zpvar tempor2 .word .zpvar tempor2 .word
.zpvar CreditsVScrol .byte .zpvar CreditsVScrol .byte
;--------------temps used in circle routine ;--------------temps used in circle routine
.zpvar xi .word ;X (word) in draw routine .zpvar xi .word ;X (word) in draw routine
.zpvar fx .byte .zpvar fx .byte
@@ -74,21 +76,21 @@ FirstZpageVariable = $57
.zpvar di .word .zpvar di .word
.zpvar dp .word .zpvar dp .word
;---------------------------- ;----------------------------
.zpvar UnderTank1 .byte .zpvar UnderTank1 .byte
.zpvar UnderTank2 .byte .zpvar UnderTank2 .byte
;---------------------------- ;----------------------------
.zpvar TestFlightFlag .byte ; For AI test flights ($ff - test, $00 - standard shoot flight) .zpvar TestFlightFlag .byte ; For AI test flights ($ff - test, $00 - standard shoot flight)
.zpvar weaponPointer .word .zpvar weaponPointer .word
.zpvar dliCounter .byte .zpvar dliCounter .byte
.zpvar pressTimer .byte .zpvar pressTimer .byte
.zpvar NTSCcounter .byte .zpvar NTSCcounter .byte
.zpvar IsEndOfTheFallFlag .byte ; for small speedup ground falling .zpvar IsEndOfTheFallFlag .byte ; for small speedup ground falling
.zpvar sfx_effect .byte .zpvar sfx_effect .byte
.zpvar RMT_blocked .byte .zpvar RMT_blocked .byte
.zpvar ScrollFlag .byte .zpvar ScrollFlag .byte
.zpvar SkStatSimulator .byte .zpvar SkStatSimulator .byte
.zpvar FloatingAlt .byte ; floating tank altitude .zpvar FloatingAlt .byte ; floating tank altitude
.zpvar OverTankDir .byte ; (0 go right, $ff go left) direction of bypassing tanks on screen .zpvar OverTankDir .byte ; (0 go right, $ff go left) direction of bypassing tanks on screen
; --------------OPTIMIZATION VARIABLES-------------- ; --------------OPTIMIZATION VARIABLES--------------
.zpvar Force .word .zpvar Force .word
@@ -103,7 +105,7 @@ FirstZpageVariable = $57
.zpvar NumberOfPlayers .byte ;current number of players (counted from 1) .zpvar NumberOfPlayers .byte ;current number of players (counted from 1)
.zpvar Counter .byte ;temporary Counter for outside loops .zpvar Counter .byte ;temporary Counter for outside loops
.zpvar ExplosionRadius .byte .zpvar ExplosionRadius .byte
.zpvar FunkyBombCounter .byte .zpvar FunkyBombCounter .byte
.zpvar ResultY .byte .zpvar ResultY .byte
.zpvar xcircle .word .zpvar xcircle .word
.zpvar ycircle .word .zpvar ycircle .word
@@ -126,10 +128,10 @@ FirstZpageVariable = $57
.zpvar RangeLeft .word .zpvar RangeLeft .word
.zpvar RangeRight .word .zpvar RangeRight .word
.zpvar NewAngle .byte .zpvar NewAngle .byte
.zpvar escFlag .byte ; 7 bit - Exit game, 6 bit - Exit to GameOver (cleared - exit to Menu), 0 - nothing .zpvar escFlag .byte ; 7 bit - Exit game, 6 bit - Exit to GameOver (cleared - exit to Menu), 0 - nothing
.zpvar LineYdraw .byte .zpvar LineYdraw .byte
.zpvar LineXdraw .word .zpvar LineXdraw .word
.zpvar plot4x4color .byte ; $00 / $ff .zpvar plot4x4color .byte ; $00 / $ff
.zpvar Multiplier .word .zpvar Multiplier .word
.zpvar Multiplier_ .byte ; 3 bytes .zpvar Multiplier_ .byte ; 3 bytes
.zpvar HowToDraw .byte .zpvar HowToDraw .byte
@@ -141,7 +143,7 @@ FirstZpageVariable = $57
.zpvar goleft .byte .zpvar goleft .byte
.zpvar OffsetDL1 .byte .zpvar OffsetDL1 .byte
.zpvar L1 .byte .zpvar L1 .byte
HotNapalmFlag = FunkyBombCounter ; reuse variable! HotNapalmFlag = FunkyBombCounter ; reuse variable!
;* RMT ZeroPage addresses in artwork/sfx/rmtplayr.a65 ;* RMT ZeroPage addresses in artwork/sfx/rmtplayr.a65
displayposition = modify displayposition = modify
@@ -187,14 +189,14 @@ FirstZpageVariable = $57
_del = $fc ;$0c ;not used in 5200 _del = $fc ;$0c ;not used in 5200
_M = $0d _M = $0d
_S = $0e _S = $0e
_atari = $fd ; not used in 5200 _atari = $fd ; not used in 5200
_none = $0f _none = $0f
.ende .ende
.ELSE .ELSE
icl 'Atari/lib/ATARISYS.ASM' icl 'Atari/lib/ATARISYS.ASM'
icl 'Atari/lib/MACRO.ASM' icl 'Atari/lib/MACRO.ASM'
icl 'artwork/splash_v2/splash.asm' ; splash screen and musix ; icl 'artwork/splash_v2/splash.asm' ; splash screen and musix
.ENDIF .ENDIF
;----------------------------------------------- ;-----------------------------------------------
@@ -283,83 +285,83 @@ rom2joy
; modify the text ; modify the text
splash_text = $3c80 ; '.scorch.supersystem.copyright.19xx.atari' splash_text = $3c80 ; '.scorch.supersystem.copyright.19xx.atari'
splash_year = splash_text + $1e splash_year = splash_text + $1e
splash_copyright = splash_text + $14 splash_copyright = splash_text + $14
ldy #19 ; 20 characters ldy #19 ; 20 characters
@ lda NewSplashText,y @ lda NewSplashText,y
sta splash_copyright,y sta splash_copyright,y
dey dey
bpl @- bpl @-
; splash screen delay. maybe add fire to speed up? ; splash screen delay. maybe add fire to speed up?
@ cpx RTCLOK+1 @ cpx RTCLOK+1
bne @- bne @-
no5200splash no5200splash
.ENDIF .ENDIF
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
@ sta OneTimeZeroVariables,y @ sta OneTimeZeroVariables,y
dey dey
bpl @- bpl @-
; one time zero variables in RAM (zero page) ; one time zero variables in RAM (zero page)
ldy #FirstZpageVariable ldy #FirstZpageVariable
@ sta $0000,y @ sta $0000,y
iny iny
bne @- bne @-
; initialize variables in RAM (non zero page) ; initialize variables in RAM (non zero page)
ldy #initialvaluesCount-1 ldy #initialvaluesCount-1
@ lda initialvaluesStart,y @ lda initialvaluesStart,y
sta variablesToInitialize,y sta variablesToInitialize,y
dey dey
bpl @- bpl @-
; set gradient to the full LGBTIQQAAPP+ flag on start ; set gradient to the full LGBTIQQAAPP+ flag on start
mva #0 GradientNr ; #1 to set gradient number 2 :) (next one) mva #0 GradientNr ; #1 to set gradient number 2 :) (next one)
jsr SelectNextGradient.NotWind jsr SelectNextGradient.NotWind
; generate linetables ; generate linetables
jsr GenerateLineTable jsr GenerateLineTable
.IF TARGET = 800 .IF TARGET = 800
; pokeys init ; pokeys init
lda #3 ; stereo lda #3 ; stereo
sta POKEY+$0f ; stereo sta POKEY+$0f ; stereo
sta POKEY+$1f ; stereo sta POKEY+$1f ; stereo
lda PAL lda PAL
and #%00001110 and #%00001110
bne NoRMT_PALchange bne NoRMT_PALchange
;it is PAL here ;it is PAL here
; Change RMT to PAL version ; Change RMT to PAL version
; 5 values in RMT file ; 5 values in RMT file
; not elegant :( ; not elegant :(
mva #$06 MODUL-6+$967 ; $07 > $06 mva #$06 MODUL-6+$967 ; $07 > $06
;mva #$06 MODUL-6+$bc3 ; $07 > $06 ;mva #$06 MODUL-6+$bc3 ; $07 > $06
;mva #$06 MODUL-6+$e69 ; $08 > $06 ;mva #$06 MODUL-6+$e69 ; $08 > $06
;mva #$06 MODUL-6+$ebc ; $08 > $06 ;mva #$06 MODUL-6+$ebc ; $08 > $06
sta MODUL-6+$bc3 ; $07 > $06 sta MODUL-6+$bc3 ; $07 > $06
sta MODUL-6+$e69 ; $08 > $06 sta MODUL-6+$e69 ; $08 > $06
sta MODUL-6+$ebc ; $08 > $06 sta MODUL-6+$ebc ; $08 > $06
mva #$10 MODUL-6+$a69 ; $12 > $10 mva #$10 MODUL-6+$a69 ; $12 > $10
mva #$04 MODUL-6+$bf8 ; $05 > $04 mva #$04 MODUL-6+$bf8 ; $05 > $04
mva #$08 MODUL-6+$e3d ; $0a > $08 mva #$08 MODUL-6+$e3d ; $0a > $08
; and mountains colors table address ; and mountains colors table address
mva #<dliColorsFore2PAL GradientAddrL+2 mva #<dliColorsFore2PAL GradientAddrL+2
mva #>dliColorsFore2PAL GradientAddrH+2 mva #>dliColorsFore2PAL GradientAddrH+2
; mva #$c4 dliColorsFore2+16 ; mva #$c4 dliColorsFore2+16
; mva #$c6 dliColorsFore2+17 ; mva #$c6 dliColorsFore2+17
; mva #$a4 dliColorsFore2+18 ; mva #$a4 dliColorsFore2+18
; mva #$a6 dliColorsFore2+19 ; mva #$a6 dliColorsFore2+19
; sta dliColorsFore2+20 ; sta dliColorsFore2+20
NoRMT_PALchange NoRMT_PALchange
.ELSE .ELSE
mva #$7f SkStatSimulator mva #$7f SkStatSimulator
.ENDIF .ENDIF
@@ -377,16 +379,16 @@ NoRMT_PALchange
mva #$04 CONSOL5200 ;Speaker off, Pots enabled, port #1 selected mva #$04 CONSOL5200 ;Speaker off, Pots enabled, port #1 selected
mwa #kb_continue VKEYCNT ;Keyboard handler mwa #kb_continue VKEYCNT ;Keyboard handler
.ENDIF .ENDIF
VMAIN VBLinterrupt,7 ;jsr SetVBL VMAIN VBLinterrupt,7 ;jsr SetVBL
mva #2 chactl ; necessary for 5200 mva #2 chactl ; necessary for 5200
;-------------------------------------------------- ;--------------------------------------------------
; Main program of the game ; Main program of the game
icl 'game.asm' icl 'game.asm'
;-------------------------------------------------- ;--------------------------------------------------
;-------------------------------------------------- ;--------------------------------------------------
.proc GetKey .proc GetKey
; waits for pressing a key and returns pressed value in A ; waits for pressing a key and returns pressed value in A
@@ -401,10 +403,10 @@ NoRMT_PALchange
beq checkJoyGetKey ; key not pressed, check Joy beq checkJoyGetKey ; key not pressed, check Joy
cmp #$f7 ; SHIFT cmp #$f7 ; SHIFT
beq checkJoyGetKey beq checkJoyGetKey
.ELSE .ELSE
lda SkStatSimulator lda SkStatSimulator
and #%11111110 and #%11111110
bne checkJoyGetKey ; key not pressed, check Joy bne checkJoyGetKey ; key not pressed, check Joy
.ENDIF .ENDIF
lda kbcode lda kbcode
cmp #@kbcode._none cmp #@kbcode._none
@@ -428,30 +430,30 @@ checkJoyGetKey
bne getkeyend bne getkeyend
notpressedJoyGetKey notpressedJoyGetKey
;fire ;fire
lda STRIG0 lda STRIG0
beq JoyButton beq JoyButton
.IF TARGET = 800 ; Select and Option key only on A800 .IF TARGET = 800 ; Select and Option key only on A800
bne checkSelectKey bne checkSelectKey
checkSelectKey checkSelectKey
lda CONSOL lda CONSOL
and #%00000010 ; Select and #%00000010 ; Select
beq SelectPressed beq SelectPressed
lda CONSOL lda CONSOL
and #%00000100 ; Option and #%00000100 ; Option
.ENDIF .ENDIF
bne @- bne @-
OptionPressed OptionPressed
lda #@kbcode._atari ; Option key lda #@kbcode._atari ; Option key
bne getkeyend bne getkeyend
SelectPressed SelectPressed
lda #@kbcode._tab ; Select key lda #@kbcode._tab ; Select key
bne getkeyend bne getkeyend
JoyButton JoyButton
lda #@kbcode._ret ;Return key lda #@kbcode._ret ;Return key
getkeyend getkeyend
ldy #0 ldy #0
sty ATRACT ; reset atract mode sty ATRACT ; reset atract mode
mvy #sfx_keyclick sfx_effect mvy #sfx_keyclick sfx_effect
rts rts
.endp .endp
@@ -468,10 +470,10 @@ getkeyend
;-------------------------------------------------- ;--------------------------------------------------
.proc WaitForKeyRelease .proc WaitForKeyRelease
;-------------------------------------------------- ;--------------------------------------------------
mva #128-KeyRepeatSpeed pressTimer ; tricky mva #128-KeyRepeatSpeed pressTimer ; tricky
StillWait StillWait
bit pressTimer bit pressTimer
bmi KeyReleased bmi KeyReleased
lda STICK0 lda STICK0
and #$0f and #$0f
cmp #$0f cmp #$0f
@@ -483,13 +485,13 @@ StillWait
cmp #$ff cmp #$ff
bne StillWait bne StillWait
lda CONSOL lda CONSOL
and #%00000110 ; Select and Option only and #%00000110 ; Select and Option only
cmp #%00000110 cmp #%00000110
bne StillWait bne StillWait
.ELSE .ELSE
lda SkStatSimulator lda SkStatSimulator
and #%11111110 and #%11111110
beq StillWait beq StillWait
.ENDIF .ENDIF
KeyReleased KeyReleased
rts rts
@@ -498,12 +500,12 @@ KeyReleased
.proc IsKeyPressed .proc IsKeyPressed
; result: A=0 - yes , A>0 - no ; result: A=0 - yes , A>0 - no
;-------------------------------------------------- ;--------------------------------------------------
lda SKSTAT lda SKSTAT
and #%00000100 and #%00000100
beq @+ beq @+
lda #1 lda #1
@ and STRIG0 @ and STRIG0
rts rts
.endp .endp
;-------------------------------------------------- ;--------------------------------------------------
.proc DemoModeOrKey .proc DemoModeOrKey
@@ -530,15 +532,15 @@ peopleAreHere
;-------------------------------------------------- ;--------------------------------------------------
MakeDarkScreen MakeDarkScreen
;-------------------------------------------------- ;--------------------------------------------------
jsr PMoutofScreen ; hide P/M 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 lda CONSOL
and #%00000001 ; START KEY and #%00000001 ; START KEY
seq:wait ; or waitRTC ? seq:wait ; or waitRTC ?
rts rts
.endp .endp
@@ -563,10 +565,10 @@ MakeDarkScreen
; If 'Esc' key is pressed - displays "Are you sure?" and - exit to Menu screen ; If 'Esc' key is pressed - displays "Are you sure?" and - exit to Menu screen
; Just setting the right flags!!! ; Just setting the right flags!!!
; Select and Option ; Select and Option
lda CONSOL lda CONSOL
and #%00000101 ; Start + Option and #%00000101 ; Start + Option
beq QuitToGameover beq QuitToGameover
lda SKSTAT lda SKSTAT
cmp #$ff cmp #$ff
jeq nokeys jeq nokeys
@@ -578,12 +580,12 @@ MakeDarkScreen
cmp #@kbcode._O ; $08 ; O cmp #@kbcode._O ; $08 ; O
bne CheckEsc bne CheckEsc
jsr AreYouSure jsr AreYouSure
bit escFlag bit escFlag
bpl nokeys bpl nokeys
;---O pressed-quit game to game over screen--- ;---O pressed-quit game to game over screen---
QuitToGameover QuitToGameover
mva #$C0 escFlag ; bits 7 and 6 set mva #$C0 escFlag ; bits 7 and 6 set
rts rts
CheckEsc CheckEsc
cmp #@kbcode._esc ; 28 ; ESC cmp #@kbcode._esc ; 28 ; ESC
@@ -592,16 +594,16 @@ DisplayAreYouSure
jsr AreYouSure jsr AreYouSure
;---esc pressed-quit game--- ;---esc pressed-quit game---
nokeys nokeys
bit escFlag bit escFlag
rts rts
; ;
.endp .endp
;-------------------------------------------------- ;--------------------------------------------------
.proc ShellDelay .proc ShellDelay
;-------------------------------------------------- ;--------------------------------------------------
lda CONSOL lda CONSOL
and #%00000001 ; START KEY and #%00000001 ; START KEY
beq noShellDelay beq noShellDelay
ldx flyDelay ldx flyDelay
DelayLoop DelayLoop
lda VCOUNT lda VCOUNT
@@ -617,17 +619,17 @@ noShellDelay
.proc RmtSongSelect .proc RmtSongSelect
; starting song line 0-255 to A reg ; starting song line 0-255 to A reg
;-------------------------------------------------- ;--------------------------------------------------
cmp #song_ingame cmp #song_ingame
bne noingame ; noMusic blocks only ingame song bne noingame ; noMusic blocks only ingame song
bit noMusic bit noMusic
spl:lda #song_silencio spl:lda #song_silencio
noingame noingame
mvx #$ff RMT_blocked mvx #$ff RMT_blocked
ldx #<MODUL ;low byte of RMT module to X reg ldx #<MODUL ;low byte of RMT module to X reg
ldy #>MODUL ;hi byte of RMT module to Y reg ldy #>MODUL ;hi byte of RMT module to Y reg
jsr RASTERMUSICTRACKER ;Init jsr RASTERMUSICTRACKER ;Init
mva #0 RMT_blocked mva #0 RMT_blocked
rts rts
.endp .endp
;------------------------------------------------- ;-------------------------------------------------
.proc CopyFromROM .proc CopyFromROM
@@ -653,7 +655,7 @@ noingame
rts rts
.endp .endp
;-------------------------------------------------- ;--------------------------------------------------
icl 'Atari/interrupts.asm' icl 'Atari/interrupts.asm'
;---------------------------------------------- ;----------------------------------------------
icl 'constants.asm' icl 'constants.asm'
;---------------------------------------------- ;----------------------------------------------
@@ -669,7 +671,7 @@ noingame
icl 'artwork/talk.asm' icl 'artwork/talk.asm'
;---------------------------------------------- ;----------------------------------------------
TankFont TankFont
ins 'artwork/tanksv4.fnt',+0,384 ; 48 characters only ins 'artwork/tanksv4.fnt',+0,384 ; 48 characters only
;---------------------------------------------- ;----------------------------------------------
font4x4 font4x4
ins 'artwork/font4x4s.bmp',+62 ins 'artwork/font4x4s.bmp',+62
@@ -686,60 +688,60 @@ font4x4
tax tax
@ @
lda CheatName,y lda CheatName,y
sec sec
sbc tanksnames,x sbc tanksnames,x
cmp #$27 cmp #$27
bne NoCheat bne NoCheat
inx inx
dey dey
bpl @- bpl @-
YesCheat YesCheat
ldx TankNr ldx TankNr
lda TanksWeaponsTableL,x lda TanksWeaponsTableL,x
sta temp sta temp
lda TanksWeaponsTableH,x lda TanksWeaponsTableH,x
sta temp+1 sta temp+1
lda #99 lda #99
@ iny @ iny
sta (temp),y sta (temp),y
cpy #(number_of_weapons - 1) cpy #(number_of_weapons - 1)
bne @- bne @-
NoCheat NoCheat
rts rts
.endp .endp
CheatName CheatName
dta d" 008.T"+$27 dta d" 008.T"+$27
;---------------------------------------------- ;----------------------------------------------
.proc DLIinterruptBFG .proc DLIinterruptBFG
pha pha
lda dliCounter lda dliCounter
bne EndofBFGDLI bne EndofBFGDLI
lda dliColorsFore lda dliColorsFore
bit random bit random
bmi @+ bmi @+
lda DliColorBack lda DliColorBack
@ sta COLPF2 @ sta COLPF2
lda dliColorsFore lda dliColorsFore
bit random bit random
bmi @+ bmi @+
lda DliColorBack lda DliColorBack
@ sta COLPF1 @ sta COLPF1
EndofBFGDLI EndofBFGDLI
inc dliCounter inc dliCounter
pla pla
rti rti
.endp .endp
; ------------------------ ; ------------------------
.proc BFGblink .proc BFGblink
SetDLI DLIinterruptBFG ; blinking on SetDLI DLIinterruptBFG ; blinking on
ldy #50 ldy #50
jsr PauseYFrames jsr PauseYFrames
SetDLI DLIinterruptGraph ; blinking off SetDLI DLIinterruptGraph ; blinking off
rts rts
.endp .endp
;-------------------------------------------------- ;--------------------------------------------------
.IF * > MODUL-1 .IF * > MODUL-1
.ECHO * .ECHO *
.ERROR 'Code and data too long' .ERROR 'Code and data too long'
.ENDIF .ENDIF
.ECHO "Bytes left: ",$b000-* .ECHO "Bytes left: ",$b000-*
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
+112 -112
View File
@@ -1,4 +1,4 @@
; @com.wudsn.ide.asm.mainsourcefile=scorch.asm ; @com.wudsn.ide.asm.mainsourcefile=scorch.asm
;C64 8-bit Scorched Earth source code ;C64 8-bit Scorched Earth source code
;--------------------------------------------------- ;---------------------------------------------------
;by Tomasz 'pecus' Pecko and Pawel 'pirx' Kalinowski ;by Tomasz 'pecus' Pecko and Pawel 'pirx' Kalinowski
@@ -20,15 +20,15 @@
org $801 org $801
org [a($801)],$801 org [a($801)],$801
basic_start(FirstSTART) basic_start(FirstSTART)
;--------------------------------------------------- ;---------------------------------------------------
.macro build .macro build
dta d"1.28" ; number of this build (4 bytes) dta d"1.28" ; number of this build (4 bytes)
.endm .endm
.macro RMTSong .macro RMTSong
lda #:1 ; do nothing in C64 lda #:1 ; do nothing in C64
.endm .endm
;--------------------------------------------------- ;---------------------------------------------------
@@ -36,14 +36,14 @@
;--------------------------------------------------- ;---------------------------------------------------
FirstZpageVariable = $58 ; $57 FirstZpageVariable = $58 ; $57
.zpvar DliColorBack .byte = FirstZpageVariable .zpvar DliColorBack .byte = FirstZpageVariable
.zpvar GradientNr .byte .zpvar GradientNr .byte
.zpvar GradientColors .word .zpvar GradientColors .word
.zpvar WindChangeInRound .byte ; wind change after each turn (not round only) flag - (0 - round only, >0 - each turn) .zpvar WindChangeInRound .byte ; wind change after each turn (not round only) flag - (0 - round only, >0 - each turn)
.zpvar JoystickNumber .byte .zpvar JoystickNumber .byte
.zpvar LazyFlag .byte ; 7 bit - run Lazy Darwin, 6 bit - run Lazy Boy or Darwin (!) after inventory, 0 - nothing .zpvar LazyFlag .byte ; 7 bit - run Lazy Darwin, 6 bit - run Lazy Boy or Darwin (!) after inventory, 0 - nothing
.zpvar SpyHardFlag .byte ; >$7f - run SpyHard after inventory .zpvar SpyHardFlag .byte ; >$7f - run SpyHard after inventory
.zpvar Vdebug .byte ; "visual debug" flag ($00 - off, $ff - on) .zpvar Vdebug .byte ; "visual debug" flag ($00 - off, $ff - on)
.zpvar xdraw .word ;= $64 ;variable X for plot .zpvar xdraw .word ;= $64 ;variable X for plot
.zpvar ydraw .word ;variable Y for plot (like in Atari Basic - Y=0 in upper right corner of the screen) .zpvar ydraw .word ;variable Y for plot (like in Atari Basic - Y=0 in upper right corner of the screen)
.zpvar xbyte .word .zpvar xbyte .word
@@ -61,7 +61,7 @@ FirstZpageVariable = $58 ; $57
.zpvar xtempDRAW .word ;same as above for XDRAW routine .zpvar xtempDRAW .word ;same as above for XDRAW routine
.zpvar ytempDRAW .word ;same as above for XDRAW routine .zpvar ytempDRAW .word ;same as above for XDRAW routine
.zpvar tempor2 .word .zpvar tempor2 .word
.zpvar CreditsVScrol .byte .zpvar CreditsVScrol .byte
;--------------temps used in circle routine ;--------------temps used in circle routine
.zpvar xi .word ;X (word) in draw routine .zpvar xi .word ;X (word) in draw routine
.zpvar fx .byte .zpvar fx .byte
@@ -76,21 +76,21 @@ FirstZpageVariable = $58 ; $57
.zpvar di .word .zpvar di .word
.zpvar dp .word .zpvar dp .word
;---------------------------- ;----------------------------
.zpvar UnderTank1 .byte .zpvar UnderTank1 .byte
.zpvar UnderTank2 .byte .zpvar UnderTank2 .byte
;---------------------------- ;----------------------------
.zpvar TestFlightFlag .byte ; For AI test flights ($ff - test, $00 - standard shoot flight) .zpvar TestFlightFlag .byte ; For AI test flights ($ff - test, $00 - standard shoot flight)
.zpvar weaponPointer .word .zpvar weaponPointer .word
.zpvar dliCounter .byte .zpvar dliCounter .byte
.zpvar pressTimer .byte .zpvar pressTimer .byte
.zpvar NTSCcounter .byte .zpvar NTSCcounter .byte
.zpvar IsEndOfTheFallFlag .byte ; for small speedup ground falling .zpvar IsEndOfTheFallFlag .byte ; for small speedup ground falling
.zpvar sfx_effect .byte .zpvar sfx_effect .byte
.zpvar RMT_blocked .byte .zpvar RMT_blocked .byte
.zpvar ScrollFlag .byte .zpvar ScrollFlag .byte
.zpvar SkStatSimulator .byte .zpvar SkStatSimulator .byte
.zpvar FloatingAlt .byte ; floating tank altitude .zpvar FloatingAlt .byte ; floating tank altitude
.zpvar OverTankDir .byte ; (0 go right, $ff go left) direction of bypassing tanks on screen .zpvar OverTankDir .byte ; (0 go right, $ff go left) direction of bypassing tanks on screen
; --------------OPTIMIZATION VARIABLES-------------- ; --------------OPTIMIZATION VARIABLES--------------
.zpvar Force .word .zpvar Force .word
@@ -105,7 +105,7 @@ FirstZpageVariable = $58 ; $57
.zpvar NumberOfPlayers .byte ;current number of players (counted from 1) .zpvar NumberOfPlayers .byte ;current number of players (counted from 1)
.zpvar Counter .byte ;temporary Counter for outside loops .zpvar Counter .byte ;temporary Counter for outside loops
.zpvar ExplosionRadius .byte .zpvar ExplosionRadius .byte
.zpvar FunkyBombCounter .byte .zpvar FunkyBombCounter .byte
.zpvar ResultY .byte .zpvar ResultY .byte
.zpvar xcircle .word .zpvar xcircle .word
.zpvar ycircle .word .zpvar ycircle .word
@@ -128,10 +128,10 @@ FirstZpageVariable = $58 ; $57
.zpvar RangeLeft .word .zpvar RangeLeft .word
.zpvar RangeRight .word .zpvar RangeRight .word
.zpvar NewAngle .byte .zpvar NewAngle .byte
.zpvar escFlag .byte ; 7 bit - Exit game, 6 bit - Exit to GameOver (cleared - exit to Menu), 0 - nothing .zpvar escFlag .byte ; 7 bit - Exit game, 6 bit - Exit to GameOver (cleared - exit to Menu), 0 - nothing
.zpvar LineYdraw .byte .zpvar LineYdraw .byte
.zpvar LineXdraw .word .zpvar LineXdraw .word
.zpvar plot4x4color .byte ; $00 / $ff .zpvar plot4x4color .byte ; $00 / $ff
.zpvar Multiplier .word .zpvar Multiplier .word
.zpvar Multiplier_ .byte ; 3 bytes .zpvar Multiplier_ .byte ; 3 bytes
.zpvar HowToDraw .byte .zpvar HowToDraw .byte
@@ -143,7 +143,7 @@ FirstZpageVariable = $58 ; $57
.zpvar goleft .byte .zpvar goleft .byte
.zpvar OffsetDL1 .byte .zpvar OffsetDL1 .byte
.zpvar L1 .byte .zpvar L1 .byte
HotNapalmFlag = FunkyBombCounter ; reuse variable! HotNapalmFlag = FunkyBombCounter ; reuse variable!
;* RMT ZeroPage addresses in artwork/sfx/rmtplayr.a65 ;* RMT ZeroPage addresses in artwork/sfx/rmtplayr.a65
displayposition = modify displayposition = modify
@@ -172,18 +172,18 @@ WeaponFont
; Game Code ; Game Code
;-------------------------------------------------- ;--------------------------------------------------
FirstSTART FirstSTART
DL = 0 DL = 0
StatusBufferROM = 0 StatusBufferROM = 0
;StatusBufferCopy = 0 ;StatusBufferCopy = 0
StatusBufferCopyEnd = 0 StatusBufferCopyEnd = 0
TRACKS = 4 TRACKS = 4
DisplayCopyPurchaseEnd = 0 DisplayCopyPurchaseEnd = 0
DisplayCopyPurchaseStart = 0 DisplayCopyPurchaseStart = 0
displayC64 = $2000 ; graphics screen memory start displayC64 = $2000 ; graphics screen memory start
SEI ; disable IRQ SEI ; disable IRQ
LDA #$36 LDA #$36
STA $0001 ; Turn Off BASIC ROM STA $0001 ; Turn Off BASIC ROM
LDA #<NMI ; LDA #<NMI ;
STA $0318 ; change NMI vector STA $0318 ; change NMI vector
LDA #>NMI ; to our routine LDA #>NMI ; to our routine
@@ -199,43 +199,43 @@ FirstSTART
; from here on NMI is disabled ; 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
@ sta OneTimeZeroVariables,y @ sta OneTimeZeroVariables,y
dey dey
bpl @- bpl @-
; one time zero variables in RAM (zero page) ; one time zero variables in RAM (zero page)
ldy #FirstZpageVariable ldy #FirstZpageVariable
@ sta $0000,y @ sta $0000,y
iny iny
bne @- bne @-
; initialize variables in RAM (non zero page) ; initialize variables in RAM (non zero page)
ldy #initialvaluesCount-1 ldy #initialvaluesCount-1
@ lda initialvaluesStart,y @ lda initialvaluesStart,y
sta variablesToInitialize,y sta variablesToInitialize,y
dey dey
bpl @- bpl @-
; generate linetables ; generate linetables
jsr GenerateLineTable jsr GenerateLineTable
; Random INIT ; Random INIT
InitializeSIDrnd InitializeSIDrnd
;-------------------------------------------------- ;--------------------------------------------------
; Main program of the game ; Main program of the game
icl 'game.asm' icl 'game.asm'
;-------------------------------------------------- ;--------------------------------------------------
;-------------------------------------------------- ;--------------------------------------------------
.proc GetKey .proc GetKey
; waits for pressing a key and returns pressed value in A ; waits for pressing a key and returns pressed value in A
@@ -243,9 +243,9 @@ FirstSTART
; result: A=keycode ; result: A=keycode
;-------------------------------------------------- ;--------------------------------------------------
jsr WaitForKeyRelease jsr WaitForKeyRelease
lda #0 lda #0
sta escFlag sta escFlag
lda #$ff lda #$ff
rts rts
.endp .endp
@@ -268,8 +268,8 @@ StillWait
.proc IsKeyPressed .proc IsKeyPressed
; result: A=0 - yes , A>0 - no ; result: A=0 - yes , A>0 - no
;-------------------------------------------------- ;--------------------------------------------------
lda #1 lda #1
rts rts
.endp .endp
;-------------------------------------------------- ;--------------------------------------------------
.proc DemoModeOrKey .proc DemoModeOrKey
@@ -296,12 +296,12 @@ peopleAreHere
;-------------------------------------------------- ;--------------------------------------------------
MakeDarkScreen MakeDarkScreen
;-------------------------------------------------- ;--------------------------------------------------
; mva #0 dmactls ; dark screen ; mva #0 dmactls ; dark screen
; and wait one frame :) ; and wait one frame :)
;-------------------------------------------------- ;--------------------------------------------------
.proc WaitOneFrame .proc WaitOneFrame
;-------------------------------------------------- ;--------------------------------------------------
wait ; or waitRTC ? wait ; or waitRTC ?
rts rts
.endp .endp
@@ -348,20 +348,20 @@ noShellDelay
.proc RmtSongSelect .proc RmtSongSelect
; starting song line 0-255 to A reg ; starting song line 0-255 to A reg
;-------------------------------------------------- ;--------------------------------------------------
rts rts
.endp .endp
.proc CopyFromRom .proc CopyFromRom
rts rts
.endp .endp
;-------------------------------------------------- ;--------------------------------------------------
icl 'C64/interrupts.asm' icl 'C64/interrupts.asm'
;---------------------------------------------- ;----------------------------------------------
icl 'constants.asm' icl 'constants.asm'
;---------------------------------------------- ;----------------------------------------------
icl 'C64/textproc.asm' icl 'C64/textproc.asm'
;---------------------------------------------- ;----------------------------------------------
icl 'grafproc.asm' icl 'grafproc.asm'
icl 'C64/gr_basics.asm' icl 'C64/gr_basics.asm'
;---------------------------------------------- ;----------------------------------------------
icl 'weapons.asm' icl 'weapons.asm'
;---------------------------------------------- ;----------------------------------------------
@@ -370,7 +370,7 @@ noShellDelay
icl 'artwork/talk.asm' icl 'artwork/talk.asm'
;---------------------------------------------- ;----------------------------------------------
TankFont TankFont
ins 'artwork/tanksv4.fnt',+0,384 ; 48 characters only ins 'artwork/tanksv4.fnt',+0,384 ; 48 characters only
;---------------------------------------------- ;----------------------------------------------
font4x4 font4x4
ins 'artwork/font4x4s.bmp',+62 ins 'artwork/font4x4s.bmp',+62
@@ -384,56 +384,56 @@ font4x4
tax tax
@ @
lda CheatName,y lda CheatName,y
sec sec
sbc tanksnames,x sbc tanksnames,x
cmp #$27 cmp #$27
bne NoCheat bne NoCheat
inx inx
dey dey
bpl @- bpl @-
YesCheat YesCheat
ldx TankNr ldx TankNr
lda TanksWeaponsTableL,x lda TanksWeaponsTableL,x
sta temp sta temp
lda TanksWeaponsTableH,x lda TanksWeaponsTableH,x
sta temp+1 sta temp+1
lda #99 lda #99
@ iny @ iny
sta (temp),y sta (temp),y
cpy #(number_of_weapons - 1) cpy #(number_of_weapons - 1)
bne @- bne @-
NoCheat NoCheat
rts rts
.endp .endp
CheatName CheatName
dta d" 008.T"+$27 dta d" 008.T"+$27
;---------------------------------------------- ;----------------------------------------------
.proc DLIinterruptBFG .proc DLIinterruptBFG
pha pha
lda dliCounter lda dliCounter
bne EndofBFGDLI bne EndofBFGDLI
lda dliColorsFore lda dliColorsFore
bit random bit random
bmi @+ bmi @+
lda DliColorBack lda DliColorBack
@ sta COLPF2 @ sta COLPF2
lda dliColorsFore lda dliColorsFore
bit random bit random
bmi @+ bmi @+
lda DliColorBack lda DliColorBack
@ sta COLPF1 @ sta COLPF1
EndofBFGDLI EndofBFGDLI
inc dliCounter inc dliCounter
pla pla
rti rti
.endp .endp
; ------------------------ ; ------------------------
.proc BFGblink .proc BFGblink
; SetDLI DLIinterruptBFG ; blinking on ; SetDLI DLIinterruptBFG ; blinking on
ldy #50 ldy #50
jsr PauseYFrames jsr PauseYFrames
; SetDLI DLIinterruptGraph ; blinking off ; SetDLI DLIinterruptGraph ; blinking off
rts rts
.endp .endp
;---------------------------------------------- ;----------------------------------------------
icl 'constants_top.asm' icl 'constants_top.asm'
+17 -17
View File
@@ -1,4 +1,4 @@
; @com.wudsn.ide.asm.mainsourcefile=scorch.asm ; @com.wudsn.ide.asm.mainsourcefile=scorch.asm
.IF *>0 ;this is a trick that prevents compiling this file alone .IF *>0 ;this is a trick that prevents compiling this file alone
;===================================================== ;=====================================================
@@ -18,7 +18,7 @@ noMusic .ds 1 ;.by 0 ; 0 - play music, $ff - do not play music
noSfx .ds 1 ;.by 0 ; 0 - play SFX, $ff - do not play SFX noSfx .ds 1 ;.by 0 ; 0 - play SFX, $ff - do not play SFX
;---------------------------------------------------- ;----------------------------------------------------
; Color table for Game Over Screen (created in a gameover routine) ; Color table for Game Over Screen (created in a gameover routine)
.ds 1 ;.by $00 ; labels line color .ds 1 ;.by $00 ; labels line color
GameOverColoursTable .ds MaxPlayers; .BYTE $80,$40,$c4,$20,$c0,$e4 GameOverColoursTable .ds MaxPlayers; .BYTE $80,$40,$c4,$20,$c0,$e4
;---------------------------------------------------- ;----------------------------------------------------
TanksNames ; DO NOT ZERO ON GAME RESTART - ticket #24 TanksNames ; DO NOT ZERO ON GAME RESTART - ticket #24
@@ -102,7 +102,7 @@ ResultsTable ;the results in the gameeeeee
.DS MaxPlayers .DS MaxPlayers
TempResults TempResults
.DS MaxPlayers .DS MaxPlayers
;DirectHitsH ; one byte enough ;DirectHitsH ; one byte enough
; .DS MaxPlayers ; .DS MaxPlayers
DirectHits DirectHits
.DS MaxPlayers .DS MaxPlayers
@@ -149,7 +149,7 @@ WindOrientation .DS 1 ;(0-right,1-left)
;---------------------------------------------------- ;----------------------------------------------------
;Counter .DS 1 ;temporary Counter for outside loops ;Counter .DS 1 ;temporary Counter for outside loops
;HitFlag .DS 1 ;$ff when missile hit ground, $00 when no hit, $01-$06 tank index+1 when hit tank ;HitFlag .DS 1 ;$ff when missile hit ground, $00 when no hit, $01-$06 tank index+1 when hit tank
WallsType .ds 1 ; bits 6 and 7: 00 - none, 01 - bump, 10 - wrap, 11 - boxy WallsType .ds 1 ; bits 6 and 7: 00 - none, 01 - bump, 10 - wrap, 11 - boxy
;---------------------------------------------------- ;----------------------------------------------------
xtankstableL ;X positions of tanks (lower left point) xtankstableL ;X positions of tanks (lower left point)
.DS MaxPlayers .DS MaxPlayers
@@ -159,15 +159,15 @@ ytankstable ;Y positions of tanks (lower left point)
.DS MaxPlayers .DS MaxPlayers
LowResDistances ; coarse tank positions divided by 4 (to be in just one byte) LowResDistances ; coarse tank positions divided by 4 (to be in just one byte)
.DS MaxPlayers .DS MaxPlayers
JoyNumber ; Joystick port number (from 0 to 3) JoyNumber ; Joystick port number (from 0 to 3)
.DS MaxPlayers .DS MaxPlayers
TankShape ; Tank shape number (from 0 to 2) TankShape ; Tank shape number (from 0 to 2)
.DS MaxPlayers .DS MaxPlayers
;---------------------------------------------------- ;----------------------------------------------------
TargetTankNr ; Target tank index (for AI routines) TargetTankNr ; Target tank index (for AI routines)
.DS 1 .DS 1
SecondTryFlag ; For precise AI aiming SecondTryFlag ; For precise AI aiming
.DS 1 .DS 1
;---------------------------------------------------- ;----------------------------------------------------
;Erase .DS 1 ; if 1 only mask of the character is printed ;Erase .DS 1 ; if 1 only mask of the character is printed
; on the graphics screen. if 0 character is printed normally ; on the graphics screen. if 0 character is printed normally
@@ -218,8 +218,8 @@ FallingSoundBit .DS 1
PreviousFall .DS 1 PreviousFall .DS 1
EndOfTheFallFlag .DS 1 ; in case of the infinite fall EndOfTheFallFlag .DS 1 ; in case of the infinite fall
;Parachute .DS 1 ; are you insured with parachute? ;Parachute .DS 1 ; are you insured with parachute?
;FloatingAlt .DS 1 ; floating tank altitude ;FloatingAlt .DS 1 ; floating tank altitude
FunkyWallFlag = FloatingAlt ; reuse this variable in different weapon (Funky Bomb)! FunkyWallFlag = FloatingAlt ; reuse this variable in different weapon (Funky Bomb)!
PreferHumansFlag = FloatingAlt ; second reuse in AI Aim proc PreferHumansFlag = FloatingAlt ; second reuse in AI Aim proc
;---------------------------------------------------- ;----------------------------------------------------
;Flight ;Flight
@@ -235,7 +235,7 @@ MirvDown .DS [5] ; is given missile down?
MirvMissileCounter .DS 1 ; missile Counter (mainly for X) MirvMissileCounter .DS 1 ; missile Counter (mainly for X)
SmokeTracerFlag .DS 1 ; if Smoketracer SmokeTracerFlag .DS 1 ; if Smoketracer
LaserFlag .DS 1 ; $ff if Laser LaserFlag .DS 1 ; $ff if Laser
XposFlag .DS 1 ; bullet positon X (0 - on screen , %1000000 - off-screen) XposFlag .DS 1 ; bullet positon X (0 - on screen , %1000000 - off-screen)
YposFlag .DS 1 ; bullet positon Y (0 - on screen , %1000000 - over the screen , %0100000 - under the screen) YposFlag .DS 1 ; bullet positon Y (0 - on screen , %1000000 - over the screen , %0100000 - under the screen)
;---------------------------------------------------- ;----------------------------------------------------
;CheckCollisionWithTank ;CheckCollisionWithTank
@@ -287,9 +287,9 @@ AfterBFGflag .DS 1
; tables with indexes of weapons on the right lists ; tables with indexes of weapons on the right lists
; OK (2022) so, L1 is list of offensive weapons, L2 - defensive ; OK (2022) so, L1 is list of offensive weapons, L2 - defensive
IndexesOfWeaponsL1 IndexesOfWeaponsL1
.ds (last_offensive_____ - first_offensive____+1) .ds (last_offensive - first_offensive +1)
IndexesOfWeaponsL2 IndexesOfWeaponsL2
.ds (last_defensive_____ - first_defensive____+1) .ds (last_defensive - first_defensive +1)
;---------------------------------------------------- ;----------------------------------------------------
; variables storing amount of weapons on the first and second ; variables storing amount of weapons on the first and second
+975 -975
View File
File diff suppressed because it is too large Load Diff