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