Merge pull request #167 from pkali/develop

v1.48
This commit is contained in:
2024-03-11 16:11:49 -04:00
committed by GitHub
37 changed files with 996 additions and 2678 deletions
+1 -1
View File
@@ -9,7 +9,7 @@
OptionsScreen
dta d"Welcome to Scorch v. "
build ; 4 bytes from scorch.asm (fancy method) :)
dta d" (un)2000-2023"
dta d" (un)2000-2024"
.IF TARGET = 800
dta d" Please select option with "
+18 -9
View File
@@ -109,6 +109,8 @@ EndOfUnPlot
.proc plot ;plot (xdraw, ydraw, color)
; color == 1 --> put pixel
; color == 0 --> erase pixel
; xdraw (word) - X coordinate
; ydraw (word) - Y coordinate
; this is one of the most important routines in the whole
; game. If you are going to speed up the game, start with
; plot - it is used by every single effect starting from explosions
@@ -165,9 +167,11 @@ ClearPlot
.proc ExPlot ;ExPlot (EplotX, EplotY)
; EOR plot:
; Inverts color of a pixel
; EplotX (word) - X coordinate
; EplotY (byte) - Y coordinate
; Note: No coordinate control!!!
; With off-screen coordinates, it can damage main program.
; only for ingame meteors
; only for ingame meteors - for Atari only
; -----------------------------------------
; let's calculate coordinates from xdraw and ydraw
;xbyte = xbyte/8
@@ -195,8 +199,10 @@ ClearPlot
; -----------------------------------------
.proc point_plot
; -----------------------------------------
; checks state of the pixel (coordinates in xdraw and ydraw)
; result is in A (zero or appropriate bit is set)
; checks state of the pixel (coordinates in xdraw and ydraw)
; xdraw (word) - X coordinate
; ydraw (word) - Y coordinate
; result is in A (0 - point is set; appropriate bit is set - point is clear) INVERTED!
; let's calculate coordinates from xdraw and ydraw
@@ -220,13 +226,15 @@ ClearPlot
ldx xdraw ; optimization (256 bytes long bittable)
lda (xbyte),y
eor #$ff
and bittable1_long,x
rts
.endp
;--------------------------------------------------
.proc drawmountains
;--------------------------------------------------
; draw mountains from mountaintable
; ClearSky - $ff Crear sky during drawmountains, 0 - no clear sky
mwa #0 xdraw
mwa #mountaintable modify ; mountaintable pointer
mva #1 color
@@ -424,7 +432,7 @@ NothingToFall
;--------------------------------------------------
.proc SoilDownTurbo
;--------------------------------------------------
; fast SoilDown froc - test
; fast SoilDown proc
jsr ClearTanks
NoClearTanks
jsr CalcAndDrawMountains
@@ -463,20 +471,21 @@ Fast ; Put char without coordinates check!
; and 8 bytes to the table
ldy #7
ldx #$ff ; otimization - thanks @Irgendwer
CopyChar
txa ; $ff
sta char2,y
lda (fontind),y
eor #$ff
sta char1,y
lda #$ff
sta char2,y
dey
bpl CopyChar
; and 8 subsequent bytes as a mask
adw fontind #8
ldy #7
CopyMask
lda (fontind),y
eor #$ff
txa ; $ff
eor (fontind),y
sta mask1,y
lda #$00
sta mask2,y
+216
View File
@@ -0,0 +1,216 @@
;--------------------------------------------------
.proc GetKey
; waits for pressing a key and returns pressed value in A
; when [ESC] is pressed, escFlag is set
; result: A=keycode
;--------------------------------------------------
jsr WaitForKeyRelease
getKeyAfterWait
jsr GetKeyFast
cmp #@kbcode._none
beq getKeyAfterWait
ldy #0
sty ATRACT ; reset atract mode
mvy #sfx_keyclick sfx_effect
rts
.endp
;--------------------------------------------------
.proc GetKeyFast
; returns pressed value in A - no waits for press
; when [ESC] is pressed, escFlag is set
; result: A=keycode ($ff - no key pressed)
;--------------------------------------------------
.IF TARGET = 800
lda SKSTAT
cmp #$ff
beq checkJoyGetKey ; key not pressed, check Joy
cmp #$f7 ; SHIFT
beq checkJoyGetKey
.ELIF TARGET = 5200
lda SkStatSimulator
and #%11111110
bne checkJoyGetKey ; key not pressed, check Joy
.ENDIF
lda kbcode
cmp #@kbcode._none
beq checkJoyGetKey
pha
and #$3f ; CTRL and SHIFT ellimination
cmp #@kbcode._esc ; 28 ; ESC
beq EscPressed
pla
jmp getkeyend
EscPressed
pla
mvy #$80 escFlag
bne getkeyend
checkJoyGetKey
;------------JOY-------------
;happy happy joy joy
;check for joystick now
lda STICK0
and #$0f
cmp #$0f
beq notpressedJoyGetKey
tay
lda joyToKeyTable,y
bne getkeyend
notpressedJoyGetKey
;fire
lda STRIG0
beq JoyButton
.IF TARGET = 800 ; Second joy button , Select and Option key only on A800
jsr Check2button
bcc SecondButton
bne checkSelectKey
checkSelectKey
lda CONSOL
and #%00000010 ; Select
beq SelectPressed
lda CONSOL
and #%00000100 ; Option
beq OptionPressed
.ENDIF
lda #@kbcode._none
bne getkeyend
OptionPressed
lda #@kbcode._atari ; Option key
bne getkeyend
SecondButton
SelectPressed
lda #@kbcode._tab ; Select key
bne getkeyend
JoyButton
lda #@kbcode._ret ; Return key
getkeyend
rts
; ----
.IF TARGET = 800 ; Second joy button only on A800
Check2button
lda PADDL0
and #$c0
eor #$C0
cmp PaddleState
sta PaddleState
rts
.ENDIF
.endp
;--------------------------------------------------
.proc getkeynowait
;--------------------------------------------------
jsr WaitForKeyRelease
lda kbcode
and #$3f ; CTRL and SHIFT ellimination
rts
.endp
;--------------------------------------------------
.proc WaitForLongPress
;--------------------------------------------------
lda #0
sta pressTimer ; reset
jsr WaitForKeyRelease.StillWait
lda pressTimer
cmp #25 ; 1/2s
rts ; if CARRY is set then long press
.endp
;--------------------------------------------------
.proc WaitForKeyRelease
;--------------------------------------------------
lda #128-KeyRepeatSpeed ; tricky
sec
sbc FirstKeypressDelay ; tricky 2 :)
sta pressTimer
StillWait
bit pressTimer
bmi KeyAutoReleased
lda STICK0
and #$0f
cmp #$0f
bne StillWait
lda STRIG0
beq StillWait
.IF TARGET = 800
lda SKSTAT
cmp #$ff
bne StillWait
lda CONSOL
and #%00000110 ; Select and Option only
cmp #%00000110
bne StillWait
.ELIF TARGET = 5200
lda SkStatSimulator
and #%11111110
beq StillWait
.ENDIF
KeyReleased
mva #FirstKeySpeed FirstKeypressDelay
rts
KeyAutoReleased ; autorepeat
mva #0 FirstKeypressDelay
rts
.endp
/* ;--------------------------------------------------
.proc IsKeyPressed
; result: A=0 - yes , A>0 - no
;--------------------------------------------------
lda SKSTAT
and #%00000100
beq @+
lda STRIG0
@ rts
.endp */
;--------------------------------------------------
.proc CheckStartKey
;--------------------------------------------------
lda CONSOL ; turbo mode
and #%00000001 ; START KEY
rts
.endp
;--------------------------------------------------
.proc CheckExitKeys
;--------------------------------------------------
; Checks keyboard and sets appropriate flags for exit procedures
; If START+OPTION is pressed - exit to GameOver screen
; If 'O' key is pressed - displays "Are you sure?" and - exit to GameOver screen
; 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
lda SKSTAT
cmp #$ff
jeq nokeys
cmp #$f7 ; SHIFT
jeq nokeys
lda kbcode
and #%10111111 ; SHIFT elimination
cmp #@kbcode._O ; $08 ; O
bne CheckEsc
jsr AreYouSure
bit escFlag
bpl nokeys
;---O pressed-quit game to game over screen---
QuitToGameover
mva #$C0 escFlag ; bits 7 and 6 set
rts
CheckEsc
cmp #@kbcode._esc ; 28 ; ESC
bne nokeys
DisplayAreYouSure
jsr AreYouSure
;---esc pressed-quit game---
nokeys
bit escFlag
rts
;
.endp
+10
View File
@@ -139,6 +139,16 @@
pla
tay
.endm
;-------------------------------------
.macro txy
txa
tay
.endm
;-------------------------------------
.macro tyx
tya
tax
.endm
;-------------------------------------
.macro pause
;waits :1 number (byte) of frames
+66 -64
View File
@@ -67,12 +67,12 @@ PHINIV EQU $E48C ;UPLOADED HANDLER INIT
;
; COMMAND CODES FOR IOCBS
;
OPEN EQU $03 ;OPEN FOR I/O
_OPEN EQU $03 ;OPEN FOR I/O
GETREC EQU $05 ;GET RECORD (TEXT)
GETCHR EQU $07 ;GET CHARACTER(S)
PUTREC EQU $09 ;PUT RECORD (TEXT)
PUTCHR EQU $0B ;PUT CHARACTER(S)
CLOSE EQU $0C ;CLOSE DEVICE
_CLOSE EQU $0C ;CLOSE DEVICE
STATIS EQU $0D ;STATUS REQUEST
SPECIL EQU $0E ;SPECIAL ENTRY COMMAND
;
@@ -135,6 +135,7 @@ DERRER EQU $90 ;PERIPHRAL DEVICE ERR
BADMOD EQU $91 ;BAD SCREEN MODE #
FNCNOT EQU $92 ;NONEXISTANT FUNCTION
SCRMEM EQU $93 ;SCREEN MEM TOO SMALL
FILENF EQU $AA ;FILE NOT FOUND
;
; PAGE ZERO RAM ASSIGNMENTS
;
@@ -376,7 +377,7 @@ CBAUDL EQU $02EE ;CASSETTE BAUD RATE
CBAUDH EQU $02EF
CRSINH EQU $02F0 ;CURSOR INHIBIT 0=ON
KEYDEL EQU $02F1 ;KEY DELAY
CH1 EQU $02F2 ;PRIOR KB CHAR CODE
CH1 EQU $02F2 ;PRIOR KB CHAR CODE
CHACT EQU $02F3 ;CHACTL REGISTER RAM
CHBAS EQU $02F4 ;CHBAS REGISTER RAM
NEWROW EQU $02F5 ;POINT DRAW GOES TO
@@ -593,11 +594,11 @@ PBCTL EQU PIA+3
; ---------------------------------------------------------------------------
;
JUMP EQU $01 ; display list jump instruction (3 byte)
JVB EQU $41 ; display list jump and wait for vblank instruction (3)
JVB EQU $41 ; display list jump and wait for vblank instruction (3)
;
SCH EQU $10 ; display list horizontal scrolling
SCV EQU $20 ; display list vertical scrolling
LMS EQU $40 ; display list load memory scan instruction (3 byte)
SCH EQU $10 ; display list horizontal scrolling
SCV EQU $20 ; display list vertical scrolling
LMS EQU $40 ; display list load memory scan instruction (3 byte)
DLII EQU $80 ; display list interrupt instruction
;
SKIP1 EQU $00 ; display list skip 1 scan line instruction
@@ -656,67 +657,68 @@ scr32 = @dmactl(narrow|dma|players|missiles|lineX1)
; KBCODEs
; ---------------------------------------------------------------------------
.enum @kbcode
_none = 255
_esc = 28
_1 = 31
_2 = 30
_3 = 26
_4 = 24
_5 = 29
_6 = 27
_7 = 51
_8 = 53
_9 = 48
_0 = 50
_lt = 54
_gt = 55
_del = 52
_tab = 44
_Q = 47
_W = 46
_E = 42
_R = 40
_T = 45
_Y = 43
_U = 11
_I = 13
_O = 8
_P = 10
_min = 14
_up = 14 ; cursor function
_eq = 15
_down = 15 ; cursor function
_ret = 12
_A = 63
_S = 62
_D = 58
_F = 56
_G = 61
_H = 57
_J = 1
_K = 5
_L = 0
_none = 255
_esc = 28
_1 = 31
_2 = 30
_3 = 26
_4 = 24
_5 = 29
_6 = 27
_7 = 51
_8 = 53
_9 = 48
_0 = 50
_lt = 54
_gt = 55
_del = 52
_tab = 44
_Q = 47
_W = 46
_E = 42
_R = 40
_T = 45
_Y = 43
_U = 11
_I = 13
_O = 8
_P = 10
_min = 14
_up = 14 ; cursor function
_eq = 15
_down = 15 ; cursor function
_ret = 12
_A = 63
_S = 62
_D = 58
_F = 56
_G = 61
_H = 57
_J = 1
_K = 5
_L = 0
_semicolon = 2
_plus = 6
_left = 6 ; cursor function
_plus = 6
_left = 6 ; cursor function
_asterisk = 7
_right = 7 ; cursor function
_caps = 60
_Z = 23
_X = 22
_C = 18
_V = 16
_B = 21
_N = 36
_M = 37
_caps = 60
_Z = 23
_X = 22
_C = 18
_V = 16
_B = 21
_N = 36
_M = 37
_comma = 32
_dot = 34
_dot = 34
_slash = 38
_atari = 39
_help = 17
_F1 = 3
_F2 = 4
_F3 = 19
_F4 = 20
_help = 17
_F1 = 3
_F2 = 4
_F3 = 19
_F4 = 20
_space = 33
.ende
.ende
EOL = $9b
+10
View File
@@ -160,6 +160,16 @@
pla
tay
.endm
;-------------------------------------
.macro txy
txa
tay
.endm
;-------------------------------------
.macro tyx
tya
tax
.endm
;-------------------------------------
.macro pause
;waits :1 number (byte) of frames
+1 -1
View File
@@ -1,6 +1,6 @@
X_LOADER_START = $0700;
X_BANK = $074E;
X_SRC = $07CA;
X_SRC = $07D0;
X_CLRSTART = $071D;
X_CLREND = $0728;
X_PORTB = $0707;
+20 -7
View File
@@ -78,7 +78,7 @@
OptionsMainLoop
jsr OptionsInversion
jsr getkey
jsr GetKey
bit escFlag
spl:rts
@@ -124,11 +124,16 @@ OptionsNoLeft
OptionsNoRight
cmp #@kbcode._ret ; $c ;Return key
bne OptionsNoReturn
; wait for long press
jsr WaitForLongPress
bcs TabPressed ; if long press (fire or Return)
EndOfOptions
rts ; options selected
OptionsNoReturn
cmp #@kbcode._tab ; Tab key
bne OptionsNoTab
TabPressed
jsr SelectNextGradient
OptionsNoTab
jmp OptionsMainLoop
@@ -409,7 +414,13 @@ ChoosingItemForPurchase
cmp #@kbcode._left ; $06 ; cursor left
jeq ListChange
cmp #@kbcode._ret ; $0c ; Return
sne:rts
bne NoReturn
jsr WaitForLongPress
bcc exitthismenu ; short press
jmp PurchaseWeaponNow ; long press
exitthismenu
rts
NoReturn
cmp #@kbcode._up ; $e
beq PurchaseKeyUp
cmp #@kbcode._down ; $f
@@ -872,13 +883,14 @@ NotBarrel
bne NotWhiteFlag
cmp ActiveDefenceWeapon,x
bne NoDeactivateWhiteFlag
mva #sfx_white_flag sfx_effect
lda #$00 ; if try to activate activated White Flag then deactivate Defence
NoDeactivateWhiteFlag
; Activate White Flag (or deactivate if A=0)
sta ActiveDefenceWeapon,x
sta ShieldEnergy,x
beq DefActivationEnd
mva #sfx_white_flag sfx_effect
bne DefActivationEnd
NotWhiteFlag
NoDeactivateWhiteFlag
; activate new defensive
sta ActiveDefenceWeapon,x
; set defensive energy
@@ -1727,8 +1739,9 @@ FastTank
; ldx TankNr
dex
bpl AllTanksFloatingDown
jsr IsKeyPressed
bne MainTanksFloatingLoop ; neverending loop
jsr GetKeyFast
cmp #@kbcode._none
beq MainTanksFloatingLoop ; neverending loop
mva #$00 ScrollFlag ; credits scroll off
jmp MakeDarkScreen
; jsr GameOverResultsClear
+54 -9
View File
@@ -101,6 +101,8 @@ EndOfUnPlot
.proc plot ;plot (xdraw, ydraw, color)
; color == 1 --> put pixel
; color == 0 --> erase pixel
; xdraw (word) - X coordinate
; ydraw (word) - Y coordinate
; this is one of the most important routines in the whole
; game. If you are going to speed up the game, start with
; plot - it is used by every single effect starting from explosions
@@ -154,8 +156,10 @@ ClearPlot
; -----------------------------------------
.proc point_plot
; -----------------------------------------
; checks state of the pixel (coordinates in xdraw and ydraw)
; result is in A (zero or appropriate bit is set)
; checks state of the pixel (coordinates in xdraw and ydraw)
; xdraw (word) - X coordinate
; ydraw (word) - Y coordinate
; result is in A (0 - point is set; appropriate bit is set - point is clear) INVERTED!
; let's calculate coordinates from xdraw and ydraw
@@ -178,13 +182,14 @@ ClearPlot
ldy #0
lda (xbyte),y
eor #$ff
and bittable1_long,x
rts
.endp
;--------------------------------------------------
.proc drawmountains
;--------------------------------------------------
; draw mountains from mountaintable
; ClearSky - $ff Crear sky during drawmountains, 0 - no clear sky
mwa #0 xdraw
mwa #mountaintable modify
mva #1 color
@@ -212,6 +217,29 @@ NotLower
bpl @-
sta temp2
inc temp2 ; this is our minimum
bit ClearSky
bpl NoClearSky
; Clear Sky
mwa #0 ydraw
jsr plot.MakePlot ; after plot we have: (xbyte),y - addres of screen byte
@ lda #$ff
sta (xbyte),y
adw xbyte #screenBytes ; next line
inc ydraw
lda xdraw
ldy ydraw
clc
adc linetableL,y
sta xbyte
lda linetableH,y
adc xdraw+1
sta xbyte+1
tya
cmp #screenheight
beq NoClearSky
cmp temp2 ; our minimum height od sky
bne @-
NoClearSky
MinCalculated
ldy #0
lda (modify),y
@@ -284,6 +312,22 @@ MinCalculated
bne @-
NotFillBytes
.ELSE
bit ClearSky
bpl NoClearSky
; Clear Sky
ldy #0
lda (modify),y
sta ydraw
sty ydraw+1
sty color
clearline
jsr plot.MakePlot
dec ydraw
lda ydraw
cmp #$ff
bne clearline
mva #1 color
NoClearSky
ldy #0
lda (modify),y
cmp #screenheight
@@ -305,10 +349,10 @@ NoMountain
;--------------------------------------------------
.proc SoilDownTurbo
;--------------------------------------------------
; fast SoilDown froc - test
; fast SoilDown proc
jsr ClearTanks
NoClearTanks
; jsr CalcAndDrawMountains
; jsr CalcAndDrawMountains - to do (now Atari only)
jmp DrawTanks
;rts
.endp
@@ -344,20 +388,21 @@ Fast ; Put char without coordinates check!
; and 8 bytes to the table
ldy #7
ldx #$ff ; otimization - thanks @Irgendwer
CopyChar
txa ; $ff
sta char2,y
lda (fontind),y
eor #$ff
sta char1,y
lda #$ff
sta char2,y
dey
bpl CopyChar
; and 8 subsequent bytes as a mask
adw fontind #8
ldy #7
CopyMask
lda (fontind),y
eor #$ff
txa ; $ff
eor (fontind),y
sta mask1,y
lda #$00
sta mask2,y
+74
View File
@@ -0,0 +1,74 @@
;--------------------------------------------------
.proc GetKey
; waits for pressing a key and returns pressed value in A
; when [ESC] is pressed, escFlag is set
; result: A=keycode
;--------------------------------------------------
jsr WaitForKeyRelease
jsr GetKeyFast
ldy #0
sty escFlag
rts
.endp
;--------------------------------------------------
.proc GetKeyFast
; returns pressed value in A - no wait for press
; when [ESC] is pressed, escFlag is set
; result: A=keycode
;--------------------------------------------------
lda #$ff
rts
.endp
;--------------------------------------------------
.proc getkeynowait
;--------------------------------------------------
jsr WaitForKeyRelease
lda kbcode
and #$3f ;CTRL and SHIFT ellimination
rts
.endp
;--------------------------------------------------
.proc WaitForLongPress
;--------------------------------------------------
lda #0
sta pressTimer ; reset
jsr WaitForKeyRelease.StillWait
lda pressTimer
cmp #25 ; 1/2s
rts ; if CARRY is set then long press
.endp
;--------------------------------------------------
.proc WaitForKeyRelease
;--------------------------------------------------
StillWait
rts
.endp
;--------------------------------------------------
.proc IsKeyPressed
; result: A=0 - yes , A>0 - no
;--------------------------------------------------
lda #1
rts
.endp
;--------------------------------------------------
.proc CheckStartKey
;--------------------------------------------------
lda #%00000001 ; START KEY not pressed
rts
.endp
;--------------------------------------------------
.proc CheckExitKeys
;--------------------------------------------------
; Checks keyboard and sets appropriate flags for exit procedures
; If START+OPTION is pressed - exit to GameOver screen
; If 'O' key is pressed - displays "Are you sure?" and - exit to GameOver screen
; If 'Esc' key is pressed - displays "Are you sure?" and - exit to Menu screen
; Just setting the right flags!!!
mva #$00 escFlag ; flag cleared
rts
;
.endp
+10
View File
@@ -278,6 +278,16 @@ upstartEnd
pla
tay
.endm
;-------------------------------------
.macro txy
txa
tay
.endm
;-------------------------------------
.macro tyx
tya
tax
.endm
;-------------------------------------
.MACRO WAIT
; WAIT
Binary file not shown.
+10 -10
View File
@@ -39,7 +39,7 @@ On the first screen, you can configure gameplay options:
Select options with cursor keys or a joystick.
The **TAB**, **SELECT**, or second joystick button (supported Joy 2B+ standard or compatible), and on the Atari 5200 console, the **5** controller key changes the color of the mountains (3 versions to choose from).
The **TAB**, **SELECT**, long press of first joystick button or second joystick button (supported Joy 2B+ standard or compatible), and on the Atari 5200 console, the **5** controller key changes the color of the mountains (3 versions to choose from).
If the cursor indicates the wind strength selection option **Wind**, pressing **TAB** changes the way the wind strength is drawn from "every round" to "every turn" and vice versa. Drawing every turn is indicated by the **?** sign next to the word **Wind**.
@@ -71,7 +71,7 @@ If a name is not entered, it will be supplemented with the default one.
## 3. Shopping screen (before each round)
![Shopping offensives screen.](images/PurOffensive.png)
![Shopping defensives screen.](images/PurDefensive.png)
On this screen, you can make purchases of offensive and defensive weapons. Only those weapons that the player can afford are visible, along with information about the price and the number of units of a given weapon that will be obtained for that price. You move through the lists with the cursor keys (up and down) or with the joystick, the **TAB** key or the left arrow, the left joystick tilt or second joystick button changes the screen to defensive or offensive weapons, the **SPACE** key or the right arrow and also the joystick to the right does the purchase of the indicated weapon.
On this screen, you can make purchases of offensive and defensive weapons. Only those weapons that the player can afford are visible, along with information about the price and the number of units of a given weapon that will be obtained for that price. You move through the lists with the cursor keys (up and down) or with the joystick, the **TAB** key or the left arrow, the left joystick tilt or second joystick button changes the screen to defensive or offensive weapons, the **SPACE** key, the right arrow, long press of first joystick button and also the joystick to the right does the purchase of the indicated weapon.
The **RETURN** key or the joystick button press switches to the defensive weapon activation screen. Here you can activate previously bought defensive (or offensive after switching with **TAB**, etc) weapons.
@@ -231,7 +231,6 @@ And here are the values of maximum energy loss for individual weapons. If a weap
| Riot Blast | 0 (↓) |
| Riot Bomb | 0 (↓) |
| Heavy Riot Bomb | 0 (↓) |
| Baby Digger | 0 (↓) |
| Digger | 0 (↓) |
| Heavy Digger | 0 (↓) |
| Sandhog | 0 (↓) |
@@ -241,6 +240,7 @@ And here are the values of maximum energy loss for individual weapons. If a weap
| Ton of Dirt | 0 (↓) |
| Liquid Dirt | 0 (↓) |
| Dirt Charge | 0 (↓) |
| Propaganda | 0 (↓) |
| Stomp | 0 (↓) |
| Laser | 100 (↓) |
@@ -257,11 +257,9 @@ Remarks:
* **Heavy Riot Bomb** as in **Riot Bomb**, but the explosion radius is 29 pixels from the point of impact - as in the case of **Nuke**
* **Baby Digger** - no energy is subtracted, but a portion of the soil is dug in a radius of 60 pixels from the point of impact.
* **Digger** - no energy is subtracted, but a portion of the soil is dug in a radius of 60 pixels from the point of impact.
* **Digger** - as above - more digging.
* **Heavy Digger** - as above - even more digging.
* **Heavy Digger** - as above - more digging.
* **Sandhog** - as above - another way of digging
@@ -275,6 +273,8 @@ Remarks:
* **Liquid Dirt** - (floods the ground at the point of hit with liquid soil, filling in the depressions.
* **Propaganda** - no energy is subtracted, but the point of the hit is covered with propaganda texts.
* **Stomp** - no energy is subtracted, but all tanks within a radius depending on the force of the shot are pushed back, and after being pushed back they may fall or be buried. With a maximum force of 990 units, the radius of action is about 60 pixels.
* **Laser** - 100 energy units deducted, but only in the case of a direct hit - that is, the hit tank always dies.
@@ -302,7 +302,7 @@ Remarks:
* **Nuclear Winter** - adds nothing, takes nothing away :) - in fact, it is not so much a defensive weapon as a double-edged one. It floods the area with "radioactive" fallout, which is ordinary soil. If you do not have at hand any weapon that digs up the terrain, and for that a shield (preferably disposable), then after such "fallout" you will have to shoot yourself - because being underground is otherwise impossible. Alternatively, **White Flag** always remains.
* **Long Schlong** - a special weapon :) - Costs a lot, doesn't help with anything (except possibly digging yourself out but only when slightly buried but it has a cool name and looks cool :) - It can be activated independently of other defensive weapons and remains active until the end of the round (it cannot be deactivated).
* **Long Schlong** - a special weapon :) - Costs a lot, doesn't help with anything (except possibly digging yourself out but only when slightly buried but it has a cool name and looks cool :) - It can be activated independently of other defensive weapons and remains active until the end of the round (it cannot be deactivated). This weapon has a depressing effect on computer-controlled opponents at **Poolshark** level and above.
* **Lazy Boy** - it is not a defensive weapon. It is an aiming aid. When it is activated, the tank tries to aim at the nearest enemy and automatically adjusts the power of the shot and angle. If it has too little energy, it can sometimes aim wrong (it uses a method like **Cyborg** to aim). Like **Battery**, it does not deactivate other defensive weapons when used. Note: There is no point in activating this weapon before the round, targeting will not take place because there is nothing to target yet.
@@ -397,9 +397,9 @@ In a hopeless situation, self-destruction might be a better option than waving t
**Long Schlong** has got serious intimidating power. Become the alpha tank and fear not.
As a last resort, you can always become a Terminator (the standard model, not T-1000 :) ).
Robo-tanks do not possess **Autodefense**, so their defenses activate only directly before their shot. A concentrated attack by several players on one robo tank guarantees success.
As a last resort, you can always become a Terminator (the standard model, not T-1000 :) ).
Break a barrel or two.
Binary file not shown.
+10 -10
View File
@@ -39,7 +39,7 @@ Na pierwszym ekranie możemy skonfigurować opcje rozgrywki:
Wybór opcji klawiszami kursora lub joystickiem.
Klawisz **TAB**, **SELECT** lub drugi przycisk joysticka (wspierany standard Joy 2B+ lub zgodny) zmieniają kolor gór (3 wersje do wyboru).
Klawisz **TAB**, **SELECT**, dłuższe przytrzymanie pierwszego przycisku joysticka lub drugi przycisk joysticka (wspierany standard Joy 2B+ lub zgodny) zmieniają kolor gór (3 wersje do wyboru).
Jeśli kursor wskazuje opcję wyboru siły wiatru **Wind**, wciśnięcie **TAB** zmienia sposób losowania siły wiatru z "co rundę" na "co turę" i odwrotnie. Losowanie co turę jest sygnalizowane znakiem "?" przy słowie **Wind**.
@@ -72,7 +72,7 @@ Jeśli nazwa nie zostanie wpisana, to zostanie uzupełniona nazwą domyślną.
## 3. Ekran zakupów (przed każdą rundą).
![Ekran zakupów broni ofensywnych.](images/PurOffensive.png)
![Ekran zakupów broni defensywnych.](images/PurDefensive.png)
Na tym ekranie można dokonywać zakupów broni ofensywnych i defensywnych. Widoczne są tylko te bronie, na które gracza stać wraz z informacją o cenie i ilości jednostek danej broni, którą za tę cenę otrzymamy. Informacje na ekranie nie wymagają chyba więcej opisu. Po listach poruszamy się klawiszami kursora (góra i dół) lub joystickiem, klawisz **TAB** lub strzałka w lewo, czy też ruch joystickiem w lewo lub drugi przycisk joysticka zmieniają ekran na bronie defensywne lub ofensywne, klawisz **SPACJA** lub strzałka w prawo, a także joystick w prawo realizują zakup wskazanej broni.
Na tym ekranie można dokonywać zakupów broni ofensywnych i defensywnych. Widoczne są tylko te bronie, na które gracza stać wraz z informacją o cenie i ilości jednostek danej broni, którą za tę cenę otrzymamy. Informacje na ekranie nie wymagają chyba więcej opisu. Po listach poruszamy się klawiszami kursora (góra i dół) lub joystickiem, klawisz **TAB** lub strzałka w lewo, czy też ruch joystickiem w lewo lub drugi przycisk joysticka zmieniają ekran na bronie defensywne lub ofensywne, klawisz **SPACJA** , strzałka w prawo, dłuższe przytrzymanie przycisku joysticka, a także joystick w prawo realizują zakup wskazanej broni.
Klawisz **RETURN** lub przycisk joysticka przechodzi do ekranu aktywacji broni defensywnych.
@@ -229,7 +229,6 @@ A oto wartości maksymalnego ubytku energii dla poszczególnych broni. Jeśli br
| Riot Blast | 0 (↓)|
| Riot Bomb | 0 (↓)|
| Heavy Riot Bomb | 0 (↓)|
| Baby Digger | 0 (↓)|
| Digger | 0 (↓)|
| Heavy Digger | 0 (↓)|
| Sandhog | 0 (↓)|
@@ -239,6 +238,7 @@ A oto wartości maksymalnego ubytku energii dla poszczególnych broni. Jeśli br
| Ton of Dirt | 0 (↓)|
| Liquid Dirt | 0 (↓)|
| Dirt Charge | 0 (↓)|
| Propaganda | 0 (↓)|
| Stomp | 0 (↓)|
| Laser | 100 (↓)|
@@ -255,11 +255,9 @@ Uwagi:
* **Heavy Riot Bomb** - jak w Riot Bomb, ale promień eksplozji to 29 pikseli od punktu trafienia - tak jak w wypadku **Nuke**.
* **Baby Digger** - nie jest odejmowana energia, ale podkopywana jest część gruntu promieniu 60 pikseli od punktu trafienia.
* **Digger** - nie jest odejmowana energia, ale podkopywana jest część gruntu promieniu 60 pikseli od punktu trafienia.
* **Digger** - jak wyżej - większy podkop.
* **Heavy Digger** - jak wyżej - największy podkop.
* **Heavy Digger** - jak wyżej - większy podkop.
* **Sandhog** - jak wyżej - inny sposób podkopywania.
@@ -275,6 +273,8 @@ Uwagi:
* **Dirt Charge** - nie jest odejmowana energia, ale usypywany jest dodatkowy grunt w górę od punktu trafienia w promieniu 61 pikseli. Broń przydatna do zakopywania przeciwnika.
* **Propaganda** - nie jest odejmowana energia, miejsce trafienia zostaje zasypane propagandowymi tekstami.
* **Stomp** - nie jest odejmowana energia, ale wszystkie czołgi w promieniu zależnym od siły strzału zostają odepchnięte, a po odepchnięciu mogą spaść lub zostać zasypane. Przy maksymalnej sile 990 jednostek promień działania to około 60 pikseli.
* **Laser** - tu także jest inaczej - równo 100 tylko w przypadku bezpośredniego trafienia po prostu odejmujemy 100 jednostek energii - czyli czołg zawsze ginie.
@@ -304,7 +304,7 @@ Uwagi:
* **Nuclear Winter** - nic nie dodaje, nic nie zabiera :) - w zasadzie to broń nie tyle defensywna, co obosieczna. Zasypuje teren opadem "radioaktywnym", który jest zwyczajną glebą. Jeśli nie mamy pod ręką żadnej broni odkopującej teren i do tego osłony (najlepiej jednorazowej), to po takim "opadzie" będzie trzeba strzelić do siebie - bo będąc pod ziemią inaczej się nie da. Ewentualnie pozostaje zawsze White Flag.
* **Long Schlong** - broń specjalna :) - kosztuje dużo, nie bardzo w czymkolwiek pomaga (poza ewentualnym odkopaniem się - tylko przy niewielkim przysypaniu - ale fajnie się nazywa i wygląda :) - Można ją aktywować niezależnie od innych broni defensywnych i pozostaje aktywna do końca rundy (nie da się jej dezaktywować).
* **Long Schlong** - broń specjalna :) - kosztuje dużo, nie bardzo w czymkolwiek pomaga (poza ewentualnym odkopaniem się - tylko przy niewielkim przysypaniu - ale fajnie się nazywa i wygląda :) - Można ją aktywować niezależnie od innych broni defensywnych i pozostaje aktywna do końca rundy (nie da się jej dezaktywować). Broń ta działa deprymująco na przeciwników sterowanych przez komputer na poziomie **Poolshark** i wyższych.
* **Lazy Boy** - nie jest to właściwie broń defensywna. Jest to wspomaganie celowania. Po jej aktywacji czołg stara się wycelować w najbliższego przeciwnika i automatycznie ustawia siłę strzału oraz kąt. W przypadku posiadania zbyt małej ilości energii może czasem wycelować źle (do celowania stosuje metodę taką jak **Cyborg**). Tak jak **Battery** nie dezaktywuje innych broni defensywnych w przypadku jej użycia. Uwaga! Nie ma sensu aktywacja tej broni przed rundą, celowanie nie odbędzie się, bo nie ma jeszcze do czego celować.
@@ -400,8 +400,8 @@ W sytuacji beznadziejnej smobójstwo może być lepsze od **White Flag**. Jeśli
**Long Schlong** potrafi znacząco onieśmielić przeciwników. Bądź alfa-czołgiem i porzuć wszelkie lęki.
W ostateczności możesz zostać Terminatorem (model standardowy, nie T-1000 :) )
Roboczołgi nie mają **Autodefense**, więc defensywy aktywują tylko bezpośrednio przed swoim strzałem. Zmasowany atak kilku graczy na jednego roboczołga gwarantuje sukces.
W ostateczności możesz zostać Terminatorem (model standardowy, nie T-1000 :) )
Połamania luf życzą autorzy.
File diff suppressed because it is too large Load Diff
+4 -4
View File
@@ -8,7 +8,7 @@
screen_height = 26
screen_width = 40
screen = $1000 ; start - 40*screen_height
screen = $0900 ; start - 40*screen_height
KeyRepeatSpeed = 15 ; (max 127 !!!)
@@ -414,9 +414,6 @@ NTSC
rts
.endp
icl "music/rmtplayr.a65"
dl
:2 .byte SKIP8
.byte LMS+MODE2
@@ -451,6 +448,8 @@ ticksPerSecond .byte 0
fake_pokey :9 .byte 0
pressTimer .byte 0
icl "music/rmtplayr.a65"
man_text
.if LANG = "PL"
@@ -460,6 +459,7 @@ man_text
.endif
man_text_end
.by $ff, $ff
.ECHO *
opt h- ;RMT module is standard Atari binary file already
ins "music/czytaczu1_stripped.rmt" ;include music RMT module
Binary file not shown.
Binary file not shown.
+1 -1
View File
@@ -27,7 +27,7 @@ TRACKS equ 8
TRACKS equ 4
EIF
;*
PLAYER equ $3400
PLAYER equ $2400
;*
;* RMT FEATures definitions file
;* For optimizations of RMT player routine to concrete RMT modul only!
+11 -3
View File
@@ -38,16 +38,24 @@ Compilation: (requires mads newer than 2023-09-13)
Game source code is split into several parts:
- `scorch.asm` is the main game startup code
- `scorchC64.asm` is the main game startup code for Commodore 64
- `game.asm` - it all happens here
- `grafproc.asm` - graphics routines like line or circle
- `textproc.asm` - text routines like list of weapons and shop
- `variables.asm` - all non-zero page variables
- `constants.asm` - various tables of constants
- `display_*.asm` - display lists and text screen definitions
- `constants.asm` and `constants_top.asm` - various tables of constants
- `ai.asm` - artificial stupidity of computer opponents
- `weapons.asm` - general arsenal of tankies
- `definitions.asm` - label definitions, moved to make it work better with Altirra debug (it doesn't).
Hardware dependent code (In the corresponding folders - 'Atari', 'C64', ...):
- `display_*.asm` - display lists and text screen definitions
- `gr_basic.asm` - graphics primitives (plot, point, soildown, drawmountains, etc.) for faster drawing
- `inputs.asm` - keyboard and joystick routines
- `interrupts.asm` - interrupts routines (DLI on Atari, music and SFX, timers)
- `textproc.asm` - text routines for menus and shop
We were trying to use macros, pseudo-ops, and simple graphics primitives as much as possible. This way, it should be relatively easy to port this code to, for example, the C64.
After working on this piece of code for N years, we are sure it would be much wiser to write it in C, Action!, or MadPascal. On the other hand, it is so much fun to type 150 characters when all you want to have is y = a * x + b. :)
@@ -62,7 +70,7 @@ With the advent of [fujinet](https://fujinet.online/) we are thinking about maki
2023-12-07
Physical release version.
We are extremely pleased to inform you that our humble game was released on a physical media by [Mq](mailto:mq666xx@gmail.com) (Atari 8-bit version) and 5200 [atariage.com](https://atariage.com).
We are extremely pleased to inform you that our humble game was released on a physical media by [Mq](mailto:mq666xx@gmail.com) (Atari 8-bit version) and 5200 [atariage.com](https://atariage.com/store/index.php?l=product_detail&p=1305).
![Scorch physical release](Manuals/images/scorch_physical.jpg)
+3 -2
View File
@@ -246,6 +246,7 @@ LowBatteries
jsr ClearTankNr ; we must hide tank to erase shields (issue #138)
lda #ind_White_Flag
sta ActiveDefenceWeapon,x
mva #sfx_white_flag sfx_effect
jsr PutTankNr ; and draw tank witch Flag
EnoughEnergy
; jsr DisplayStatus.DisplayEnergy ; not necessary - status update after othher defensives
@@ -449,6 +450,7 @@ ItIsHuman
beq lowestIsEqual
bcc lowestIsHigher
; if lower
bcs lowestIsLower
lowestIsEqual
; if equal then select random (of two tanks)
bit RANDOM
@@ -787,8 +789,7 @@ SetStartAndFlight ; set start point (virtual barrel end :) ) and make test fl
sta ytraj+1
mva #0 ytraj+2
mva NewAngle Angle
lda CONSOL
and #%00000001 ; START KEY
jsr CheckStartKey ; START KEY
beq @speedup
jsr MoveBarrelToNewPosition
bit escFlag
+21 -17
View File
@@ -1,34 +1,40 @@
.proc talk
; Maximum text length is 63 characters!!!
dta d"CYKA BLAT"^
dta d"DIE!"^
dta d"FUR DEUTSCHLAND!"^
dta d"YOU'RE DEAD MEAT."^
dta d"DIE COMMIE PIG!"^
dta d"VICTORY!"^
dta d"DIE, ALIEN SWINE!"^
dta d"AWRUK!!!"^
dta d"CYKA BLAT"^
dta d"TAKE THIS!"^
dta d"EAT MY SHORTS!"^
dta d"YOU'RE TOAST!"^
dta d"BANZAI!"^
dta d"FROM HELL'S HEART I STAB AT THEE..."^
dta d"DO YOU FEEL LUCKY, TANK?"^
dta d"TAKE A HIKE!"^
dta d"YOU'RE DEAD MEAT."^
dta d"MAKE MY DAY."^
dta d"OPEN WIDE!"^
dta d"HA HA HA."^
dta d"CHARGE!"^
dta d"ATTACK!"^
dta d"DIE, TANK-SCUM!"^
dta d"IN YOUR FACE!"^
dta d"TAKE A HIKE!"^
dta d"MAKE MY DAY."^
dta d"KNOCK, KNOCK."^
; end of Propaganda :)
dta d"FROM HELL'S HEART I STAB AT THEE..."^
dta d"DO YOU FEEL LUCKY, TANK?"^
dta d"YOU'RE OUTTA HERE."^
dta d"WATTSA MATTA YOU?"^
dta d"FREEZE, OR I'LL SHOOT!"^
dta d"HA HA HA."^
dta d"WE COME IN PEACE - SHOOT TO KILL!"^
dta d"IN YOUR FACE!"^
dta d"DIE COMMIE PIG!"^
dta d"I LOVE THE SMELL OF NAPALM IN THE MORNING."^
dta d"VICTORY!"^
dta d"SHOW SOME RESPECT."^
dta d"JUST WHO DO YOU THINK YOU ARE?"^
dta d"LOOK OUT BELOW!"^
dta d"KNOCK, KNOCK."^
dta d"LOOK OVER THERE."^
dta d"GUESS WHAT'S COMING FOR DINNER?"^
dta d"MERRY CHRISTMAS."^
dta d"OPEN WIDE!"^
dta d"HERE GOES NOTHING..."^
dta d"DON'T WORRY, IT ISN'T A LIVE ROUND."^
dta d"BLOOD, PAIN, VIOLENCE!"^
@@ -44,12 +50,8 @@
dta d"DON'T FORGET ABOUT ME!"^
dta d"HASTA LA VISTA, BABY!"^
dta d"THIS IS YOUR BRAIN ON SCORCH."^
dta d"TAKE THIS!"^
dta d"THIS SCREEN AIN'T BIG ENOUGH FOR US."^
dta d"DIE, ALIEN SWINE!"^
dta d"AWRUK!!!"^
dta d"I SHALL OIL MY TURRET WITH YOUR BLOOD."^
dta d"DIE, TANK-SCUM!"^
dta d"I'M GONNA BREAK YOUR FACE!"^
dta d"MAMA SAID KNOCK YOU OUT!"^
dta d"I HOPE YOU ENJOY PAIN!"^
@@ -118,8 +120,10 @@
dta d"CALL 1-900-SUE-TANK."^
dta d"YOU BIG DUMMY!"^ ;(sanford and son)
LEND
NumberOfOffensiveTexts=54
NumberOfOffensiveTexts=55
NumberOfDeffensiveTexts=62
NumberOfPropagandaTexts=21
VeryFunnyText=79
.endp
hoverFull dta d"MY HOVERCRAFT IS FULL OF EELS!"^
hoverFullEnd
Binary file not shown.
+44 -44
View File
@@ -250,7 +250,6 @@ WeaponPriceH ; weapons prices (tables with prices of weapons)
.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_Sandhog
@@ -260,6 +259,7 @@ WeaponPriceH ; weapons prices (tables with prices of weapons)
.by >price_Ton_of_Dirt
.by >price_Liquid_Dirt
.by >price_Dirt_Charge
.by >price_Propaganda
.by >price_Punch
.by >price_Buy_me
.by >price_Laser
@@ -299,7 +299,6 @@ WeaponPriceL
.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_Sandhog
@@ -309,6 +308,7 @@ WeaponPriceL
.by <price_Ton_of_Dirt
.by <price_Liquid_Dirt
.by <price_Dirt_Charge
.by <price_Propaganda
.by <price_Punch
.by <price_Buy_me
.by <price_Laser
@@ -355,16 +355,16 @@ WeaponUnits
.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 5 ;Sandhog ;_22
.by 2 ;Heavy_Sandhog ;_23
.by 5 ;Dirt_Clod ;_24
.by 3 ;Dirt_Ball ;_25
.by 1 ;Ton_of_Dirt ;_26
.by 4 ;Liquid_Dirt ;_27
.by 2 ;Dirt_Charge ;_28
.by 5 ;Digger ;_19
.by 2 ;Heavy_Digger ;_20
.by 5 ;Sandhog ;_21
.by 2 ;Heavy_Sandhog ;_22
.by 5 ;Dirt_Clod ;_23
.by 3 ;Dirt_Ball ;_24
.by 1 ;Ton_of_Dirt ;_25
.by 4 ;Liquid_Dirt ;_26
.by 2 ;Dirt_Charge ;_27
.by 4 ;Propaganda ;_28
.by 2 ;Punch ;_29
.by 1 ;Buy_me ;_30
.by 5 ;Laser ;_31
@@ -393,11 +393,11 @@ PurchaseMeTable ;weapons good to be purchased by the robot
; "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 ","Sandhog ","Heavy Sandhog "
; "Riot Blast ","Riot Bomb ","Heavy Riot Bomb ","Digger "
; "Heavy Digger ","Sandhog ","Heavy Sandhog ","Dirt Clod "
.by %00000000
; "Dirt Clod ","Dirt Ball ","Ton of Dirt ","Liquid Dirt "
; "Dirt Charge ","Punch ","Buy me! ","Laser "
; "Dirt Ball ","Ton of Dirt ","Liquid Dirt ","Dirt Charge "
; "Propaganda ","Punch ","Buy me! ","Laser "
.by %00000000
; "White Flag ","Battery ","Hovercraft ","Parachute "
; "Strong Parachute","Mag Deflector ","Shield ","Heavy Shield "
@@ -414,11 +414,11 @@ PurchaseMeTable2 ;weapons good to be purchased by the robot (Cyborg)
; "Napalm ","Hot Napalm ","Tracer ","Smoke Tracer "
; "Baby Roller ","Roller ","Heavy Roller ","Riot Charge "
.by %01000000
; "Riot Blast ","Riot Bomb ","Heavy Riot Bomb ","Baby Digger "
; "Digger ","Heavy Digger ","Sandhog ","Heavy Sandhog "
; "Riot Blast ","Riot Bomb ","Heavy Riot Bomb ","Digger "
; "Heavy Digger ","Sandhog ","Heavy Sandhog ","Dirt Clod "
.by %00000000
; "Dirt Clod ","Dirt Ball ","Ton of Dirt ","Liquid Dirt "
; "Dirt Charge ","Punch ","Buy me! ","Laser "
; "Dirt Ball ","Ton of Dirt ","Liquid Dirt ","Dirt Charge "
; "Propaganda ","Punch ","Buy me! ","Laser "
.by %00000000
; "White Flag ","Battery ","Hovercraft ","Parachute "
; "Strong Parachute","Mag Deflector ","Shield ","Heavy Shield "
@@ -449,16 +449,16 @@ WeaponSymbols
.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 $57 ;ind_Sandhog ;_22
.by $58 ;ind_Heavy_Sandhog ;_23
.by $59 ;ind_Dirt_Clod ;_24
.by $5a ;ind_Dirt_Ball ;_25
.by $5b ;ind_Ton_of_Dirt ;_26
.by $60 ;ind_Liquid_Dirt ;_27
.by $7b ;ind_Dirt_Charge ;_28
.by $54 ;ind_Digger ;_19
.by $55 ;ind_Heavy_Digger ;_20
.by $57 ;ind_Sandhog ;_21
.by $58 ;ind_Heavy_Sandhog ;_22
.by $59 ;ind_Dirt_Clod ;_23
.by $5a ;ind_Dirt_Ball ;_24
.by $5b ;ind_Ton_of_Dirt ;_25
.by $60 ;ind_Liquid_Dirt ;_26
.by $7b ;ind_Dirt_Charge ;_27
.by $53 ;ind_Propaganda ;_28
.by $56 ;ind_Punch ;_29
.by $1f ;ind_Buy_me ;_30
.by $20 ;ind_Laser ;_31
@@ -500,16 +500,16 @@ NamesOfWeapons ;the comment is an index in the tables
dta d"Riot Blast"^ ; 16
dta d"Riot Bomb"^ ; 17
dta d"Heavy Riot Bomb"^ ; 18
dta d"Baby Digger"^ ; 19
dta d"Digger"^ ; 20
dta d"Heavy Digger"^ ; 21
dta d"Sandhog"^ ; 22
dta d"Heavy Sandhog"^ ; 23
dta d"Dirt Clod"^ ; 24
dta d"Dirt Ball"^ ; 25
dta d"Ton of Dirt"^ ; 26
dta d"Liquid Dirt"^ ; 27
dta d"Dirt Charge"^ ; 28
dta d"Digger"^ ; 19
dta d"Heavy Digger"^ ; 20
dta d"Sandhog"^ ; 21
dta d"Heavy Sandhog"^ ; 22
dta d"Dirt Clod"^ ; 23
dta d"Dirt Ball"^ ; 24
dta d"Ton of Dirt"^ ; 25
dta d"Liquid Dirt"^ ; 26
dta d"Dirt Charge"^ ; 27
dta d"Propaganda"^ ; 28
dta d"Stomp"^ ; 29
dta d"Best F...g Gifts"^ ; 30
dta d"Laser"^ ; 31
@@ -556,7 +556,7 @@ weaponsOfDeath ; weapons used in tank death animations
dta ind_Hot_Napalm ; why not?
dta ind_Riot_Bomb
dta ind_Heavy_Riot_Bomb
dta ind_Baby_Digger
dta ind_Propaganda
dta ind_Digger
dta ind_Heavy_Digger
dta ind_Sandhog
@@ -614,7 +614,7 @@ CreditsStart
dta d"You were playing"^
dta d"Scorch"^
dta d"Warsaw, Miami"^
dta d"2000-2023"^
dta d"2000-2024"^
dta d" "*
dta d"Programming"^
dta d"Tomasz 'Pecus' Pecko"^
@@ -672,13 +672,13 @@ CreditsEnd
.IF TARGET = 800
CreditsLines=39 + 7 ; add 7 for scrollout
.ELIF TARGET = 5200
CreditsLines=33 + 7; add 7 for scrollout
CreditsLines=33 + 7 ; add 7 for scrollout
.ENDIF
.IF TARGET = 5200
; Atari 5200 splash
NewSplashText=*
dta d" 2023 atariage", $4e, "com " ; $4e - non blinking dot
dta d" 2024 atariage", $4e, "com " ; $4e - non blinking dot
.ENDIF
.endif ; .IF *>0
+22 -20
View File
@@ -27,6 +27,8 @@ space = 0 ; space in screencodes
KeyRepeatSpeed = 8 ; (max 127 !!!)
FirstKeySpeed = 8 ; additional delay for first keypress
VuMeterTime = 12 ; Time of inactivity for VU Meter (1=5sec)
;character codes for symbols (tank, parachute, etc. )
; characters from tanks.fnt (graphics screen)
char_parachute = $02
@@ -69,16 +71,16 @@ 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_Sandhog = 191 ;_22
price_Heavy_Sandhog = 223 ;_23
price_Dirt_Clod = 104 ;_24
price_Dirt_Ball = 130 ;_25
price_Ton_of_Dirt = 171 ;_26
price_Liquid_Dirt = 330 ;_27
price_Dirt_Charge = 343 ;_28
price_Digger = 176 ;_19
price_Heavy_Digger = 207 ;_20
price_Sandhog = 191 ;_21
price_Heavy_Sandhog = 223 ;_22
price_Dirt_Clod = 104 ;_23
price_Dirt_Ball = 130 ;_24
price_Ton_of_Dirt = 171 ;_25
price_Liquid_Dirt = 330 ;_26
price_Dirt_Charge = 343 ;_27
price_Propaganda = 234 ;_28
price_Punch = 208 ;_29
price_Buy_me = 170 ;_30
price_Laser = 277 ;_31
@@ -119,16 +121,16 @@ 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_Sandhog = 22
ind_Heavy_Sandhog = 23
ind_Dirt_Clod = 24
ind_Dirt_Ball = 25
ind_Ton_of_Dirt = 26
ind_Liquid_Dirt = 27
ind_Dirt_Charge = 28
ind_Digger = 19
ind_Heavy_Digger = 20
ind_Sandhog = 21
ind_Heavy_Sandhog = 22
ind_Dirt_Clod = 23
ind_Dirt_Ball = 24
ind_Ton_of_Dirt = 25
ind_Liquid_Dirt = 26
ind_Dirt_Charge = 27
ind_Propaganda = 28
ind_Punch = 29
ind_Buy_me = 30
ind_Laser = 31
+126 -70
View File
@@ -16,8 +16,7 @@ START
jsr MakeDarkScreen
bit escFlag
bpl @+
lda CONSOL
and #%00000001 ; START KEY
jsr CheckStartKey ; START KEY
bne START
jmp StartAfterSplash ; reset all game option if Start key pressed (and Esc)
@
@@ -124,24 +123,23 @@ CalculateGainsLoop
; if lose is greater than money then zero money
lda moneyH,x
cmp loseH,x
bcc zeromoney
bne substractlose
bne @+
lda moneyL,x
cmp loseL,x
bcc zeromoney
@ bcs substractlose
zeromoney
lda #0
sta moneyL,x
sta moneyH,x
beq skipzeroing
substractlose
sec
; sec ; C is allways set at this point
lda moneyL,x
sbc loseL,x
sta moneyL,x
lda moneyH,x
sbc loseH,x
sta moneyH,x
jmp skipzeroing
zeromoney
lda #0
sta moneyL,x
sta moneyH,x
skipzeroing
; and earned money for summary
clc
@@ -155,24 +153,23 @@ skipzeroing
; if lose is greater than money then zero money
lda EarnedMoneyH,x
cmp loseH,x
bcc ezeromoney
bne esubstractlose
bne @+
lda EarnedMoneyL,x
cmp loseL,x
bcc ezeromoney
@ bcs esubstractlose
ezeromoney
lda #0
sta EarnedMoneyL,x
sta EarnedMoneyH,x
beq eskipzeroing
esubstractlose
sec
; sec ; C is allways set at this point
lda EarnedMoneyL,x
sbc loseL,x
sta EarnedMoneyL,x
lda EarnedMoneyH,x
sbc loseH,x
sta EarnedMoneyH,x
jmp eskipzeroing
ezeromoney
lda #0
sta EarnedMoneyL,x
sta EarnedMoneyH,x
eskipzeroing
dex
@@ -385,11 +382,7 @@ RoboTanks
;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
jsr CheckExitKeys
spl:rts ; keys Esc or O
@@ -585,7 +578,7 @@ NotLastPlayerInRound
; in X there is a number of tank that died
lda #78 ; mumber of defensive text after BFG! ("VERY FUNNY.")
lda #talk.VeryFunnyText ; mumber of defensive text after BFG! ("VERY FUNNY.")
bit AfterBFGflag ; check BFG flag
bmi TextAfterBFG
; if BFG then no points for dead tanks ...
@@ -732,14 +725,13 @@ NotNegativeShieldEnergy
.proc Seppuku
;---------------------------------
lda #0
sta ydraw+1
; get position of the tank
ldx TankNr
; lda #0 ; turn off defense weapons when hara-kiring
sta ActiveDefenceWeapon,x
sta ShieldEnergy,x
jsr SetupXYdraw
lda #1 ; Missile
lda #ind_Missile ; Missile
jsr ExplosionDirect
jmp MainRoundLoop.continueMainRoundLoopAfterSeppuku
.endp
@@ -764,11 +756,14 @@ NotNegativeShieldEnergy
lda random
bmi @+
sec ; Wind = -Wind
.rept 4
.rept 2
lda #$00
sbc Wind+#
sta Wind+#
.endr
lda #$ff
sta Wind+2
sta Wind+3
@ rts
.endp
;--------------------------------------------------
@@ -777,25 +772,16 @@ NotNegativeShieldEnergy
; Energy of tank X in A
;--------------------------------------------------
sta L1
;DATA L1,L2
;Multiplication 8bit*8bit,
;result 16bit
;this algiorithm is a little longer than one in Ruszczyc 6502 book
;but it is faster
ldy #8
lda #0
ldy #9
clc
LP0 ror
CYK ror
ror L1
bcc B0
bcc NIE
clc
adc #10 ; (L2) multiplication by 10
B0 dey
bne LP0
ror
ror L1
adc #10 ; multiplication by 10
NIE dey
bne CYK
sta MaxForceTableH,x
lda L1
sta MaxForceTableL,x
@@ -934,26 +920,21 @@ MakeTanksVisible
; repeat untill NumberOfPlayers
ldx #0
GetRandomAgain0
lda RANDOM
and #$07 ;NumberOfPlayers < 7
cmp NumberOfPlayers
bcs GetRandomAgain0
sta TankSequence,x
;now first slot is ready, nexts slots are handled
;in a more complicated way
GetRandomAgainX
txy ; destroy A!
dey
lda RANDOM
and #$07 ;NumberOfPlayers < 7
cmp NumberOfPlayers
bcs GetRandomAgainX
cpx #0
bne NotFirstSlot
sta TankSequence,x ;now first slot is ready
inx
bne GetRandomAgainX
NotFirstSlot
;now we have to check if the value was not used
;in previous slots
stx temp
ldy temp
UsageLoop
cmp TankSequence,y
beq GetRandomAgainX ;apparently we have already used this value
@@ -961,14 +942,11 @@ UsageLoop
bpl UsageLoop
;well, looks like this value is new!
inx
sta TankSequence,x
inx
stx temp
inc:lda temp ;x+1
cmp NumberOfPlayers
bne GetRandomAgainX
cpx NumberOfPlayers
bcc GetRandomAgainX
rts
.endp
;----------------------------------------------
@@ -979,9 +957,7 @@ UsageLoop
;----------------------------------------------
; lets randomize someting between 0 and 180
lda RANDOM
cmp #180
bcs RandomizeAngle
randomize 0 180
rts
.endp
;----------------------------------------------
@@ -1044,10 +1020,9 @@ LimitForce
;----------------------------------------------
mva #1 Erase
jsr DrawTankNr.BarrelChange
mva #0 Erase
MoveBarrel
mva #sfx_set_power_2 sfx_effect
jsr DrawTankNr
jsr PutTankNr ; and Erase = 0
jsr DisplayStatus.displayAngle
;
jsr CheckExitKeys
@@ -1060,7 +1035,6 @@ MoveBarrel
jsr WaitOneFrame
AIaim
jsr DrawTankNr.BarrelChange
mva #0 Erase
lda NewAngle
cmp AngleTable,x
beq BarrelPositionIsFine
@@ -1072,11 +1046,32 @@ rotateLeft ; older is bigger
dec angleTable,x
jmp MoveBarrel
BarrelPositionIsFine
jmp DrawTankNr
jmp PutTankNr ; and Erase = 0
; rts
.endp
;--------------------------------------------------
.proc DemoModeOrKey
; Waits for the key pressed if at least one human is playing.
; Otherwise, waits 3 seconds (demo mode).
;--------------------------------------------------
;check demo mode
ldx numberOfPlayers
dex
checkForHuman ; if all in skillTable other than 0 then switch to DEMO MODE
lda skillTable,x
beq peopleAreHere
dex
bpl checkForHuman
; no people, just wait a bit
ldy #75
jmp PauseYFrames
; rts
peopleAreHere
jmp getkey ; jsr:rts
.endp
;----------------------------------------------
.proc SortSequence ;
;----------------------------------------------
@@ -1429,4 +1424,65 @@ FinishResultDisplay
jmp TypeLine4x4 ; jsr:rts
.endp
.IF VU_METER = 1
.proc VUMeter
; No VUMeter if key pressed
jsr GetKeyFast
cmp #@kbcode._none
bne EndMeter
; check timer
; Atari 800 has 3 bytes clock, but 5200 only 2 bytes
.IF TARGET = 800
LDA RTCLOK+1
.ELIF TARGET = 5200
lda RTCLOK
.ENDIF
cmp #VuMeterTime
bcc EndMeter
; store all angles
ldx NumberOfPlayers
@ lda AngleTable,x
sta previousAngle,x
dex
bpl @-
; let's go!
Meter
jsr ClearTanks
ldx NumberOfPlayers
@ txa
and #%00000001
tay
lda trackn_audc+2,y
:4 asl
sta AngleTable,x
dex
bpl @-
jsr drawtanks
jsr WaitOneFrame
jsr GetKeyFast
cmp #@kbcode._none
beq Meter
; restore all angles
jsr ClearTanks
ldx NumberOfPlayers
@ lda previousAngle,x
sta AngleTable,x
dex
bpl @-
jsr drawtanks
jsr drawtanknr
EndMeterAndReset
lda #0
; only older byte
.IF TARGET = 800
sta RTCLOK+1
.ELIF TARGET = 5200
sta RTCLOK
.ENDIF
EndMeter
rts
.endp
.ENDIF
.ENDIF
+79 -78
View File
@@ -362,11 +362,12 @@ not_endcircleloop
lda ycircle
adc YC
sta ydraw
sta tempcir
sta ytempDRAW
lda ycircle+1
adc #$00
sta ydraw+1
sta tempcir+1
sta ytempDRAW+1
; plot xcircle+XC,ycircle+YC
jsr plot
sec
@@ -376,6 +377,7 @@ not_endcircleloop
lda ycircle+1
sbc #$00
sta ydraw+1
; plot xcircle+XC,ycircle-YC
jsr plot
sec
@@ -385,54 +387,60 @@ not_endcircleloop
lda xcircle+1
sbc #0
sta xdraw+1
; plot xcircle-XC,ycircle-YC
jsr plot
lda tempcir
lda ytempDRAW
sta ydraw
lda tempcir+1
lda ytempDRAW+1
sta ydraw+1
; plot xcircle-XC,ycircle+YC
jsr plot
;---
clc
lda xcircle
adc yC
adc YC
sta xdraw
lda xcircle+1
adc #0
sta xdraw+1
;clc
lda ycircle
adc xC
adc XC
sta ydraw
sta tempcir
sta ytempDRAW
lda ycircle+1
adc #$00
sta ydraw+1
sta tempcir+1
sta ytempDRAW+1
; plot xcircle+YC,ycircle+XC
jsr plot
sec
lda ycircle
sbc xC
sbc XC
sta ydraw
lda ycircle+1
sbc #$00
sta ydraw+1
; plot xcircle+YC,ycircle-XC
jsr plot
sec
lda xcircle
sbc yC
sbc YC
sta xdraw
lda xcircle+1
sbc #0
sta xdraw+1
; plot xcircle-YC,ycircle-XC
jsr plot
lda tempcir
lda ytempDRAW
sta ydraw
lda tempcir+1
lda ytempDRAW+1
sta ydraw+1
; plot xcircle-YC,ycircle+XC
jsr plot
;-----
@@ -450,7 +458,7 @@ not_endcircleloop
sbc FX
sbc #4
sta FS
jmp endif01
jmp circleloop ; endif01
else01
dec YC
sec
@@ -468,7 +476,7 @@ else01
endif01
jmp circleloop
.endp
;-------------------------------*------------------
;--------------------------------------------------
.proc placetanks
;--------------------------------------------------
ldx #(MaxPlayers-1) ;maxNumberOfPlayers-1
@@ -584,35 +592,38 @@ UnequalTanks
;-------------------------------------------------
.proc ClearTanks
jsr PMoutofScreen
mva #1 Erase ; erase tanks flag
lda #1 ; erase tanks flag
bne drawtanks.era
.endp
;-------------------------------------------------
.proc drawtanks
;-------------------------------------------------
lda #0 ; no erase tanks flag
era sta Erase
lda TankNr
pha
ldx #$00
ldx NumberOfPlayers
dex
stx TankNr
DrawNextTank
jsr drawtanknr
inc TankNr
dec TankNr
ldx TankNr
Cpx NumberOfPlayers
bne DrawNextTank
bpl DrawNextTank
pla
sta TankNr
mva #0 Erase ; no erase tanks flag
rts
.endp
;---------
ClearTankNr
mva #1 Erase
bne DrawTankNr
lda #1 ; erase tank flag
bne @er
PutTankNr
mva #0 Erase
lda #0 ; no erase tank flag
@er sta Erase
.proc DrawTankNr
ldx tankNr
; let's check the energy
@@ -797,8 +808,7 @@ DoNotDrawTankNr
; number of blinking tank in TankNr
mva #18 fs ; temp, how many times flash the tank
tankflash_loop
lda CONSOL ; turbo mode
and #%00000001 ; START KEY
jsr CheckStartKey ; START KEY
sne:mva #1 fs ; finish it
mva #1 Erase
ldx TankNr
@@ -975,27 +985,25 @@ ToHighToParachute
;
; this proc change xdraw, ydraw and temp!
;--------------------------------------------------
lda XtankstableL,x
sta xdraw
lda XtankstableH,x
sta xdraw+1
; one pixel under tank
clc
lda Ytankstable,x
adc #1
sta ydraw
mva #0 ydraw+1
lda XtankstableL,x
sta xdraw
lda XtankstableH,x
sta xdraw+1
; plot one (first - clear) and 6 random color pixels
mvy #7 temp
; clear first pixel under tank
mva #0 color
jsr plot
inw xdraw
; plot 6 random color pixels
mva #6 temp
bne @pl ; A=0
@ lda Erase
eor #%00000001
and random
and #%00000001
sta color
@pl sta color
jsr plot
inw xdraw
dec temp
@@ -1064,7 +1072,7 @@ DoNotClearParachute
sta temp ; Loop Counter
ByteBelowTank
jsr point_plot
beq EmptyPoint2
bne EmptyPoint2
sec
ror UnderTank2
sec
@@ -1310,8 +1318,7 @@ NoClearTanks
.IF TARGET >= 800
lda FastSoilDown
bne GoFast
lda CONSOL
and #%00000001 ; START KEY
jsr CheckStartKey ; START KEY
bne @+
GoFast
jmp SoilDownTurbo.NoClearTanks
@@ -1331,18 +1338,14 @@ NextColumn1
mwa #0 ydraw
NextPoint1
jsr point_plot
beq StillNothing
ldy #0
lda ydraw
sta (tempor2),y
sta (temp),y
jmp FoundPeek1
beq FoundFirstPoint
StillNothing
inc ydraw
lda ydraw
cmp #screenheight
bne NextPoint1
; no pixels on whole column !!!
FoundFirstPoint
ldy #0
lda ydraw
sta (tempor2),y
@@ -1352,16 +1355,14 @@ FoundPeek1
inw temp
inw xdraw
;vcmp xdraw,screenwidth,NextColumn1
cpw xdraw RangeRight
bcc NextColumn1
beq NextColumn1
cpw RangeRight xdraw
bcs NextColumn1
; we have both tables filled with starting values
; main loop starts here
MainFallout2
.IF TARGET >= 800
lda CONSOL
and #%00000001 ; START KEY
jsr CheckStartKey ; START KEY
bne NoFastDown
jmp SoilDownTurbo.NoClearTanks
NoFastDown
@@ -1389,7 +1390,7 @@ FalloutOfLine
; and checking if there is a pixel there
sta ydraw
jsr point_plot
bne ThereIsPixelHere
beq ThereIsPixelHere
; if no pixel we plot it
mva #1 color
jsr plot.MakePlot
@@ -1410,9 +1411,8 @@ ColumnIsReady
inw tempor2
inw xdraw
;vcmp xdraw,screenwidth,FalloutOfLine
cpw xdraw RangeRight
bcc FalloutOfLine
beq FalloutOfLine
cpw RangeRight xdraw
bcs FalloutOfLine
jsr CheckExitKeys ; Check for O, Esc or Start+Option keys
spl:rts ; exit if pressed 'Exit keys'
@@ -1421,7 +1421,7 @@ ColumnIsReady
; level of the mountains
jeq MainFallout2
; now correct heights are in the mountaintable
sta color ; Pozor! :) we know - now A=1
;sta color ; Pozor! :) we know - now A=1 ... but DrawTanks set color to 1
NothingToFall
jmp DrawTanks
; rts
@@ -1433,7 +1433,7 @@ NothingToFall
mwa #0 xdraw
; starting point
getrandomY ;getting random Y coordinate
/* getrandomY ;getting random Y coordinate
; sec ; ???
lda random
cmp #screenheight-(margin*4) ;it means that max line=199
@@ -1441,8 +1441,8 @@ getrandomY ;getting random Y coordinate
; clc ; C is clear
adc #(margin*2)
sta ydraw
sta yfloat+1
mva #0 yfloat ;yfloat equals to e.g. 140.0
sta yfloat+1 */
sta yfloat ;yfloat equals to e.g. 140.0 (A=0)
mva #screenheight-margin-5 yfloat+1
sta ydraw
@@ -1460,23 +1460,21 @@ NextPart
sta delta+1 ; before the dot (delta+1.delta)
lda random
and #$01 ;random sign (+/- or up/down)
; and #$01 ;random sign (+/- or up/down)
sta UpNdown
; theoretically we have here ready
; fixed-point delta value
; (-1*(UpNdown))*(delta+1.delta)
; (-1*(UpNdown.7th.bit))*(delta+1.delta)
;loop drawing one line
ChangingDirection
lda random ;length of the line
and #$0f ;max line length
tax
inx
inx
inx
stx deltaX
clc
adc #3
sta deltaX
OnePart
jsr placeTanks.CheckTank
@@ -1493,8 +1491,8 @@ OnePart
sta (modify),y
; Up or Down
lda UpNdown
beq ToBottom
bit UpNdown
bpl ToBottom
ToTop ;it means substracting
;sbw yfloat delta
@@ -1509,8 +1507,8 @@ ToTop ;it means substracting
cmp #margin
bcs @+
; if smaller than 10
ldx #$00
stx UpNdown
; ldy #$00
sty UpNdown ; Y=0
jmp @+
ToBottom
@@ -1526,8 +1524,8 @@ ToBottom
cmp #screenheight-margin
bcc @+
; if higher than screen
ldx #$01
stx UpNdown
dey ; Y=0
sty UpNdown ; Y=$ff
@
sta ydraw
@@ -1646,8 +1644,15 @@ notZero
sta temp
lda xtankstableH,y
sta temp+1
;now we should substract length of the text-1
;temp2 = (fx-1)*2
jsr Calculate4x4TextPosition
jmp TypeLine4x4.noLengthNoColor ; rts
.endp
;--------------------------------------------------------
.proc Calculate4x4TextPosition
; we have X coordinate of center of text in temp
; now we should substract length of the text-1
; temp2 = (fx-1)*2
ldy fx
dey
tya
@@ -1742,11 +1747,8 @@ DOTOldLowestValue
lda temp2
sbc #(4+9) ;9 pixels above ground (and tanks...)
sta LineYdraw
jmp TypeLine4x4.noLengthNoColor ; rts
rts
.endp
;--------------------------------------------------------
.proc DisplayTankNameAbove ; TankNr in X
txa ; TankNr
@@ -1870,8 +1872,7 @@ quit_areyousure
mva #20 fs ; temp, how many times blink the billboard
seppuku_loop
lda CONSOL ; turbo mode
and #%00000001 ; START KEY
jsr CheckStartKey ; START KEY
sne:mva #1 fs ; finish it
mva #4 ResultY ; where seppuku text starts Y-wise on the screen
+50 -223
View File
@@ -4,33 +4,44 @@
;---------------------------------------------------
;by Tomasz 'pecus' Pecko and Pawel 'pirx' Kalinowski
;Warsaw 2000, 2001, 2002, 2003, 2009, 2012, 2013
;Miami & Warsaw 2022, 2023
;Miami & Warsaw 2022, 2023, 2024
;WARNING! requires mads compiled on 2023-09-13 or later
;WUDSN run settings:
;atari800 -5200 -cart ${outputFilePath} -cart-type 4
;atari800 -run ${outputFilePath}
;WARNING! requires mads compiled on 2023-09-13 or later
;compilation:
;mads scorch.asm -o:scorch.bin -d:TARGET=5200
;mads scorch.asm -o:scorch.xex -d:TARGET=800
;mads scorch.asm -o:scorch.xex -d:TARGET=800 -d:SPLASH=1 #xex version with splash
;mads scorch.asm -o:scorch.xex -d:TARGET=800 -d:SPLASH=1 -d:CART_VERSION=1 #xex version for cart
;---------------------------------------------------
.IFNDEF TARGET
.def TARGET = 800 ; 5200
.ENDIF
;---------------------------------------------------
.def CART_VERSION = 0
; if 1 - dual splash screen
.def METEORS = 1
; if 1 - meteors on game
.def XCORRECTION_FOR_PM = 0
; if 1 - active x position of tanks correction fo PMG
.def FASTER_GRAF_PROCS = 1
; if 1 - activates faster graphics routines
; (direct writes to screen memory - atari only :) )
.ifndef SPLASH
.def SPLASH = 0 ; if 0 - no splash screens
.endif
.ifndef CART_VERSION
.def CART_VERSION = 0 ; if 1 - dual splash screen
.endif
.def METEORS = 1 ; if 1 - meteors on game
.def VU_METER = 1 ; if 1 - VU Meter on game
.def XCORRECTION_FOR_PM = 0 ; if 1 - active x position of tanks correction fo PMG
.def FASTER_GRAF_PROCS = 1 ; if 1 - activates faster graphics routines
; (direct writes to screen memory - atari only :) )
;---------------------------------------------------
OPT r+ ; saves 10 bytes, and probably works :) https://github.com/tebe6502/Mad-Assembler/issues/10
;---------------------------------------------------
.macro build
dta d"1.43" ; number of this build (4 bytes)
dta d"1.48" ; number of this build (4 bytes)
.endm
.macro RMTSong
@@ -186,11 +197,22 @@ FirstZpageVariable = $50
.IF TARGET = 800
icl 'Atari/lib/ATARISYS.ASM'
icl 'Atari/lib/MACRO.ASM'
icl 'artwork/splash_v2/splash.asm' ; new splash screen and musix
.IF CART_VERSION
icl 'artwork/splash_v1/splash.asm' ; old splash screen (plays music from new splash)
.ENDIF
; icl 'Atari/Manual/manual.asm' ; manuals display
.IF SPLASH = 1
icl 'artwork/splash_v2/splash.asm' ; new splash screen and musix
.IF CART_VERSION = 1
icl 'artwork/splash_v1/splash.asm' ; old splash screen (plays music from new splash)
.ENDIF
.ELSE
; no splash.... dark screean and BASIC off
ORG $2000
mva #0 dmactls ; dark screen
mva #$ff portb
; and wait one frame :)
seq:wait ; or waitRTC ?
mva #$ff portb ; BASIC off
rts
ini $2000
.ENDIF
.ELIF TARGET = 5200
OPT h-f+ ; no headers, single block --> cart bin file
icl 'Atari/lib/5200SYS.ASM'
@@ -212,7 +234,7 @@ FirstZpageVariable = $50
_M = $0d
_S = $0e
_atari = $fd ; not used in 5200
_ret = $fd ; not used in 5200
_ret = $0c ; fire in 5200
_none = $0f
.ende
.ENDIF
@@ -336,7 +358,11 @@ StartAfterSplash
.IF CART_VERSION = 1
mva #$ff GradientNr ; #1 to set gradient number 2 :) (next one) - 0 (B/W)
.ELSE
mva #0 GradientNr ; #1 to set gradient number 2 :) (next one) - 1 (polish rainbow)
.IF TARGET=5200
mva #1 GradientNr
.ELSE
mva #0 GradientNr ; #1 to set gradient number 2 :) (next one) - 1 (polish rainbow)
.ENDIF
.ENDIF
jsr SelectNextGradient.NotWind
@@ -404,169 +430,12 @@ NoRMT_PALchange
sta JoystickNumber
.IF TARGET = 800 ; second joy button state update only on A800
jsr WaitOneFrame ; is necessary for update shadow registers (PADDL0) in VBI
jmp GetKey.Check2button ; update state second joy button
jmp GetKeyFast.Check2button ; update state second joy button
.ELSE
rts
.ENDIF
.endp
;--------------------------------------------------
.proc GetKey
; waits for pressing a key and returns pressed value in A
; when [ESC] is pressed, escFlag is set
; result: A=keycode
;--------------------------------------------------
jsr WaitForKeyRelease
getKeyAfterWait
.IF TARGET = 800
lda SKSTAT
cmp #$ff
beq checkJoyGetKey ; key not pressed, check Joy
cmp #$f7 ; SHIFT
beq checkJoyGetKey
.ELIF TARGET = 5200
lda SkStatSimulator
and #%11111110
bne checkJoyGetKey ; key not pressed, check Joy
.ENDIF
lda kbcode
cmp #@kbcode._none
beq checkJoyGetKey
and #$3f ; CTRL and SHIFT ellimination
cmp #@kbcode._esc ; 28 ; ESC
bne getkeyend
mvy #$80 escFlag
bne getkeyend
checkJoyGetKey
;------------JOY-------------
;happy happy joy joy
;check for joystick now
lda STICK0
and #$0f
cmp #$0f
beq notpressedJoyGetKey
tay
lda joyToKeyTable,y
bne getkeyend
notpressedJoyGetKey
;fire
lda STRIG0
beq JoyButton
.IF TARGET = 800 ; Second joy button , Select and Option key only on A800
jsr Check2button
bcc SecondButton
bne checkSelectKey
checkSelectKey
lda CONSOL
and #%00000010 ; Select
beq SelectPressed
lda CONSOL
and #%00000100 ; Option
.ENDIF
bne getKeyAfterWait
OptionPressed
lda #@kbcode._atari ; Option key
bne getkeyend
SecondButton
SelectPressed
lda #@kbcode._tab ; Select key
bne getkeyend
JoyButton
lda #@kbcode._ret ; Return key
getkeyend
ldy #0
sty ATRACT ; reset atract mode
mvy #sfx_keyclick sfx_effect
rts
.IF TARGET = 800 ; Second joy button only on A800
Check2button
lda PADDL0
and #$c0
eor #$C0
cmp PaddleState
sta PaddleState
rts
.ENDIF
.endp
;--------------------------------------------------
.proc getkeynowait
;--------------------------------------------------
jsr WaitForKeyRelease
lda kbcode
and #$3f ; CTRL and SHIFT ellimination
rts
.endp
;--------------------------------------------------
.proc WaitForKeyRelease
;--------------------------------------------------
lda #128-KeyRepeatSpeed ; tricky
sec
sbc FirstKeypressDelay ; tricky 2 :)
sta pressTimer
StillWait
bit pressTimer
bmi KeyAutoReleased
lda STICK0
and #$0f
cmp #$0f
bne StillWait
lda STRIG0
beq StillWait
.IF TARGET = 800
lda SKSTAT
cmp #$ff
bne StillWait
lda CONSOL
and #%00000110 ; Select and Option only
cmp #%00000110
bne StillWait
.ELIF TARGET = 5200
lda SkStatSimulator
and #%11111110
beq StillWait
.ENDIF
KeyReleased
mva #FirstKeySpeed FirstKeypressDelay
rts
KeyAutoReleased ; autorepeat
mva #0 FirstKeypressDelay
rts
.endp
;--------------------------------------------------
.proc IsKeyPressed
; result: A=0 - yes , A>0 - no
;--------------------------------------------------
lda SKSTAT
and #%00000100
beq @+
lda #1
@ and STRIG0
rts
.endp
;--------------------------------------------------
.proc DemoModeOrKey
; Waits for the key pressed if at least one human is playing.
; Otherwise, waits 3 seconds (demo mode).
;--------------------------------------------------
;check demo mode
ldx numberOfPlayers
dex
checkForHuman ; if all in skillTable other than 0 then switch to DEMO MODE
lda skillTable,x
beq peopleAreHere
dex
bpl checkForHuman
; no people, just wait a bit
ldy #75
jmp PauseYFrames
; rts
peopleAreHere
jmp getkey ; jsr:rts
.endp
;--------------------------------------------------
MakeDarkScreen
@@ -577,8 +446,7 @@ MakeDarkScreen
;--------------------------------------------------
.proc WaitOneFrame
;--------------------------------------------------
lda CONSOL
and #%00000001 ; START KEY
jsr CheckStartKey ; START KEY
seq:wait ; or waitRTC ?
rts
.endp
@@ -595,54 +463,11 @@ MakeDarkScreen
rts
.endp
;--------------------------------------------------
.proc CheckExitKeys
;--------------------------------------------------
; Checks keyboard and sets appropriate flags for exit procedures
; If START+OPTION is pressed - exit to GameOver screen
; If 'O' key is pressed - displays "Are you sure?" and - exit to GameOver screen
; 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
lda SKSTAT
cmp #$ff
jeq nokeys
cmp #$f7 ; SHIFT
jeq nokeys
lda kbcode
and #%10111111 ; SHIFT elimination
cmp #@kbcode._O ; $08 ; O
bne CheckEsc
jsr AreYouSure
bit escFlag
bpl nokeys
;---O pressed-quit game to game over screen---
QuitToGameover
mva #$C0 escFlag ; bits 7 and 6 set
rts
CheckEsc
cmp #@kbcode._esc ; 28 ; ESC
bne nokeys
DisplayAreYouSure
jsr AreYouSure
;---esc pressed-quit game---
nokeys
bit escFlag
rts
;
.endp
;--------------------------------------------------
.proc ShellDelay
;--------------------------------------------------
ldy flyDelay
Y lda CONSOL
and #%00000001 ; START KEY
Y jsr CheckStartKey ; START KEY
beq noShellDelay
DelayLoop
lda VCOUNT
@@ -693,6 +518,8 @@ noingame
bne @-
rts
.endp
;--------------------------------------------------
icl 'Atari/inputs.asm'
;--------------------------------------------------
icl 'Atari/interrupts.asm'
;----------------------------------------------
BIN
View File
Binary file not shown.
Binary file not shown.
BIN
View File
Binary file not shown.
+11 -74
View File
@@ -3,7 +3,7 @@
;---------------------------------------------------
;by Tomasz 'pecus' Pecko and Pawel 'pirx' Kalinowski
;Warsaw 2000, 2001, 2002, 2003, 2009, 2012, 2013
;Miami & Warsaw 2022, 2023
;Miami & Warsaw 2022, 2023, 2024
;---------------------------------------------------
.def TARGET = 64 ; :)
@@ -14,6 +14,7 @@
; if 1 - activates faster graphics routines
; (direct writes to screen memory - C64 only :) )
;---------------------------------------------------
.def VU_METER = 0 ; allways 0! (works only on Atari)
opt h-f+
@@ -24,7 +25,7 @@
;---------------------------------------------------
.macro build
dta d"1.43" ; number of this build (4 bytes)
dta d"1.48" ; number of this build (4 bytes)
.endm
.macro RMTSong
@@ -35,8 +36,9 @@
icl 'definitions.asm'
;---------------------------------------------------
FirstZpageVariable = $52 ; $57
FirstZpageVariable = $51 ; $57
.zpvar DliColorBack .byte = FirstZpageVariable
.zpvar ClearSky .byte ; $ff - Crear sky during drawmountains, 0 - no clear sky
.zpvar MeteorsFlag .byte ; set 7th bit - block meteors
.zpvar MeteorsRound .byte ; set 7th bit - block meteors in round
.zpvar GradientNr .byte
@@ -246,63 +248,6 @@ StartAfterSplash
rts
.endp
;--------------------------------------------------
.proc GetKey
; waits for pressing a key and returns pressed value in A
; when [ESC] is pressed, escFlag is set
; result: A=keycode
;--------------------------------------------------
jsr WaitForKeyRelease
lda #0
sta escFlag
lda #$ff
rts
.endp
;--------------------------------------------------
.proc getkeynowait
;--------------------------------------------------
jsr WaitForKeyRelease
lda kbcode
and #$3f ;CTRL and SHIFT ellimination
rts
.endp
;--------------------------------------------------
.proc WaitForKeyRelease
;--------------------------------------------------
StillWait
rts
.endp
;--------------------------------------------------
.proc IsKeyPressed
; result: A=0 - yes , A>0 - no
;--------------------------------------------------
lda #1
rts
.endp
;--------------------------------------------------
.proc DemoModeOrKey
; Waits for the key pressed if at least one human is playing.
; Otherwise, waits 3 seconds (demo mode).
;--------------------------------------------------
;check demo mode
ldx numberOfPlayers
dex
checkForHuman ; if all in skillTable other than 0 then switch to DEMO MODE
lda skillTable,x
beq peopleAreHere
dex
bpl checkForHuman
; no people, just wait a bit
;pause 150
ldy #75
jmp PauseYFrames
; rts
peopleAreHere
jmp getkey ; jsr:rts
.endp
;--------------------------------------------------
MakeDarkScreen
;--------------------------------------------------
@@ -311,7 +256,8 @@ MakeDarkScreen
;--------------------------------------------------
.proc WaitOneFrame
;--------------------------------------------------
wait ; or waitRTC ?
jsr CheckStartKey ; START KEY
seq:wait ; or waitRTC ?
rts
.endp
@@ -327,22 +273,11 @@ MakeDarkScreen
rts
.endp
;--------------------------------------------------
.proc CheckExitKeys
;--------------------------------------------------
; Checks keyboard and sets appropriate flags for exit procedures
; If START+OPTION is pressed - exit to GameOver screen
; If 'O' key is pressed - displays "Are you sure?" and - exit to GameOver screen
; If 'Esc' key is pressed - displays "Are you sure?" and - exit to Menu screen
; Just setting the right flags!!!
rts
;
.endp
;--------------------------------------------------
.proc ShellDelay
ldy flyDelay
Y
Y jsr CheckStartKey ; START KEY
beq noShellDelay
DelayLoop
lda $d012
@ cmp $d012
@@ -364,6 +299,8 @@ noShellDelay
.proc CopyFromRom
rts
.endp
;--------------------------------------------------
icl 'C64/inputs.asm'
;--------------------------------------------------
icl 'C64/interrupts.asm'
;----------------------------------------------
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
+7 -5
View File
@@ -28,6 +28,9 @@ TanksNames ; DO NOT ZERO ON GAME RESTART - ticket #24
skilltable ; computer controlled players' skills (1-8), 0 - human (no cleaning, ticket #30)
.DS MaxPlayers
;----------------------------------------------------
JoyNumber ; Joystick port number (from 0 to 3)
.DS MaxPlayers
;----------------------------------------------------
variablesToInitialize
;Options DO NOT ZERO ON RESTART GAME - ticket #27
OptionsTable .ds maxOptions ;.by 0,1,2,2,0,1,3,2,0
@@ -155,10 +158,6 @@ 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
;----------------------------------------------------
TargetTankNr ; Target tank index (for AI routines)
.DS 1
@@ -170,6 +169,8 @@ SecondTryFlag ; For precise AI aiming
;Erase .DS 1 ; if 1 only mask of the character is printed
; on the graphics screen. if 0 character is printed normally
TankShape ; Tank shape number (from 0 to 2)
.DS MaxPlayers
;----------------------------------------------------
;RangeLeft .DS 2 ;range of the soil to be fallen down
;RangeRight .DS 2 ;it is being set by all Explosions
@@ -210,7 +211,7 @@ YHit .DS 2
;radius .DS 1
;xcircle .DS 2
;ycircle .DS 2
tempcir .DS 2
;tempcir .DS 2
;TankFalls
FallingSoundBit .DS 1
PreviousFall .DS 1
@@ -219,6 +220,7 @@ EndOfTheFallFlag .DS 1 ; in case of the infinite fall
;FloatingAlt .DS 1 ; floating tank altitude
FunkyWallFlag = FloatingAlt ; reuse this variable in different weapon (Funky Bomb)!
PreferHumansFlag = FloatingAlt ; second reuse in AI Aim proc
;PreferHumansFlag .DS 1
;----------------------------------------------------
;Flight
;variables for 5 missiles (used for mirv)
+117 -114
View File
@@ -41,16 +41,16 @@ ExplosionRoutines
.word riotblast-1 ;Riot_Blast ;_16
.word riotbomb-1 ;Riot_Bomb ;_17
.word heavyriotbomb-1 ;Heavy_Riot_Bomb;_18
.word babydigger-1 ;Baby_Digger ;_19
.word digger-1 ;Digger ;_20
.word heavydigger-1 ;Heavy_Digger ;_21
.word sandhog-1 ;Sandhog ;_22
.word heavysandhog-1 ;Heavy_Sandhog ;_23
.word dirtclod-1 ;Dirt_Clod ;_24
.word dirtball-1 ;Dirt_Ball ;_25
.word tonofdirt-1 ;Ton_of_Dirt ;_26
.word liquiddirt-1 ;Liquid_Dirt ;_27
.word dirtcharge-1 ;Dirt_Charge ;_28
.word digger-1 ;Digger ;_19
.word heavydigger-1 ;Heavy_Digger ;_20
.word sandhog-1 ;Sandhog ;_21
.word heavysandhog-1 ;Heavy_Sandhog ;_22
.word dirtclod-1 ;Dirt_Clod ;_23
.word dirtball-1 ;Dirt_Ball ;_24
.word tonofdirt-1 ;Ton_of_Dirt ;_25
.word liquiddirt-1 ;Liquid_Dirt ;_26
.word dirtcharge-1 ;Dirt_Charge ;_27
.word propaganda-1 ;Propaganda ;_28
.word punch-1 ;Baby_Sandhog ;_29
.word BFG-1 ;Buy_me ;_30
.word laser-1 ;Laser ;_31
@@ -380,9 +380,73 @@ GoRiotBomb
; jmp xriotbomb
.endp
; ------------------------
.proc babydigger
lda #1 ; diggery ; how many branches (-1)
GoBabydiggerSFX
.proc propaganda
; It floods the target with propaganda texts.
lda #80 ; max text width with additional margins (left/right edges of the screen)
sta ExplosionRadius ; set soildown range
jsr CalculateExplosionRange
mwa xdraw tempXROLLER ; save X coordinate of hitpoint
mva #11 TempXfill ; number of text to display
nexttext
; play SFX
mva #sfx_digger sfx_effect
@ lda random ; randomize propaganda messege
cmp #talk.NumberOfPropagandaTexts
bcs @-
sta TextNumberOff
; all text start from `talk` and end with an inverse.
; we go through the `talk`, count number of inverses.
; if equal to TextNumberOff, it is our text, printit
lda #$ff
sta plot4x4color
mwa #talk LineAddress4x4
jsr _calc_inverse_display
; now find length of the text
@ iny
lda (LineAddress4x4),y
bpl @-
iny
sty fx
mwa tempXROLLER temp ; X coordinate of hitpoint
; calculate position of message
jsr Calculate4x4TextPosition
; and randomize Y coordinate (+/- 16pixels)
lda random
and #%00011111
adc LineYdraw
sbc #16
sta LineYdraw
; randomize X coordinate (+/- 8 pixels)
lda random
and #%00000111
clc
adc LineXdraw
sta LineXdraw
bcc @+
inc LineXdraw+1
@ sec
sbc #4
sta LineXdraw
bcs DisplayMessage
dec LineXdraw+1
DisplayMessage
; display propaganda message
jsr TypeLine4x4.noLengthNoColor
ldy #7
jsr PauseYFrames
dec TempXfill
bne nexttext
rts
.endp
; ------------------------
.proc digger ;
lda #3 ; diggery ; how many branches (-1)
GoDiggerSFX
sta diggery
mva #sfx_digger sfx_effect
mva #0 sandhogflag
@@ -390,14 +454,9 @@ GoBabydiggerSFX
bne xdigger
.endp
; ------------------------
.proc digger ;
lda #3 ; diggery ; how many branches (-1)
bne babydigger.GoBabydiggerSFX
.endp
; ------------------------
.proc heavydigger
lda #7 ; diggery ; how many branches (-1)
bne babydigger.GoBabydiggerSFX
bne digger.GoDiggerSFX
.endp
; ------------------------
.proc babysandhog
@@ -1218,29 +1277,22 @@ ContinueToCheckMaxForce2
; $FB - any key
; $f7 - shift
; $f3 - shift+key
.IF VU_METER = 1
jsr VUMeter.EndMeterAndReset
.ENDIF
notpressed
jsr CheckExitKeys ; Check for O, Esc or Start+Option keys
spl:rts ; exit if pressed 'Exit keys'
.IF VU_METER = 1
jsr VUMeter
.ENDIF
ldx TankNr ; for optimize
; Select and Option
lda CONSOL
tay
and #%00000100
beq callActivation ; Option key
tya
and #%00000010
jeq pressedTAB ; Select key
lda SKSTAT
cmp #$ff
jeq checkJoy
cmp #$f7 ; SHIFT
jeq checkJoy
lda kbcode
jsr GetKeyFast
mvy #00 EscFlag ; prevent for set EscFalg in GetKey! we checking this in CheckExitKeys!
and #%10111111 ; SHIFT elimination
cmp #@kbcode._atari ; Option key
beq callActivation
cmp #@kbcode._A ; $3f ; A
bne @+
callActivation
@@ -1276,12 +1328,12 @@ NoSpyHard
mva #0 escFlag
jmp ReleaseAndLoop
@
cmp #$80|@kbcode._up
/*o cmp #$80|@kbcode._up
jeq CTRLPressedUp
cmp #$80|@kbcode._down
jeq CTRLPressedDown
cmp #$80|@kbcode._tab
jeq CTRLPressedTAB
jeq CTRLPressedTAB */
jumpFromStick
.IF TARGET = 800
@@ -1290,10 +1342,7 @@ jumpFromStick
.ELSE
cmp #@kbcode._help ; Help (# in A5200)
bne NoVdebugSwitch
sta pressTimer ; reset 0+@kbcode._help (tricky)
jsr WaitForKeyRelease.StillWait
lda pressTimer
cmp #(25+@kbcode._help) ; 1/2s - long press only
jsr WaitForLongPress
bcc NoVdebugSwitch
.ENDIF
lda Vdebug
@@ -1303,6 +1352,7 @@ jumpFromStick
jmp ReleaseAndLoop
NoVdebugSwitch
mvy #1 Erase ; optimization
and #$3f ;CTRL and SHIFT ellimination
cmp #@kbcode._up ; $e
jeq pressedUp
@@ -1314,6 +1364,8 @@ NoVdebugSwitch
jeq pressedRight
cmp #@kbcode._space ; $21
jeq pressedSpace
cmp #@kbcode._ret ; Fire (Joy)
jeq pressedSpace
cmp #@kbcode._tab ; $2c
jeq pressedTAB
cmp #@kbcode._M ; $25 ; M
@@ -1327,30 +1379,8 @@ NoVdebugSwitch
jmp ReleaseAndLoop
.ENDIF
EndKeys
mva #$80 pressTimer
jmp notpressed
checkJoy
;------------JOY-------------
;happy happy joy joy
;check for joystick now
lda STICK0
and #$0f
cmp #$0f
beq notpressedJoy
tay
mva #0 ATRACT ; reset atract mode
lda joyToKeyTable,y
jmp jumpFromStick
notpressedJoy
.IF TARGET = 800
;second fire only Atari 800
jsr GetKey.Check2button
jcc pressedTAB
.ENDIF
;fire
lda STRIG0
jeq pressedSpace
mva #$ff pressTimer ; stop counting frames
jmp notpressed
;
pressedUp
@@ -1402,8 +1432,6 @@ pressedDown
cmp #25 ; 1/2s
bcs CTRLPressedDown
mva #sfx_set_power_1 sfx_effect
;ldx TankNr ; optimized
dec ForceTableL,x
lda ForceTableL,x
@@ -1416,6 +1444,7 @@ ForceGoesZero
sta ForceTableH,x
sta ForceTableL,x
@
mva #sfx_set_power_1 sfx_effect
jmp BeforeFire
CTRLPressedDown
@@ -1429,7 +1458,7 @@ CTRLPressedDown
jcs BeforeFire
dec ForceTableH,x
bmi ForceGoesZero
jmp BeforeFire
bpl @-
pressedRight
;ldx TankNr ; optimized
@@ -1438,30 +1467,30 @@ pressedRight
cmp #25 ; 1/2s
bcs CTRLPressedRight
mva #sfx_set_power_2 sfx_effect
mva #1 Erase
; mva #1 Erase
jsr DrawTankNr.BarrelChange
dec:lda AngleTable,x
cmp #255 ; -1
jne BeforeFire
bne @+
lda #180
sta AngleTable,x
@
mva #sfx_set_power_2 sfx_effect
jmp BeforeFire
CTRLPressedRight
;ldx TankNr ; optimized
mva #sfx_set_power_2 sfx_effect
mva #1 Erase
; mva #1 Erase
jsr DrawTankNr.BarrelChange
lda AngleTable,x
sec
sbc #4
sta AngleTable,x
cmp #4 ; smallest angle for speed rotating
jcs BeforeFire
bcs @-
lda #180
sta AngleTable,x
jmp BeforeFire
bne @-
pressedLeft
@@ -1471,31 +1500,31 @@ pressedLeft
cmp #25 ; 1/2s
bcs CTRLPressedLeft
mva #sfx_set_power_2 sfx_effect
mva #1 Erase
; mva #1 Erase
jsr DrawTankNr.BarrelChange
INC AngleTable,x
lda AngleTable,x
cmp #180
jcc BeforeFire
bcc @+
lda #0
sta AngleTable,x
@
mva #sfx_set_power_2 sfx_effect
jmp BeforeFire
CTRLPressedLeft
;ldx TankNr ; optimized
mva #sfx_set_power_2 sfx_effect
mva #1 Erase
; mva #1 Erase
jsr DrawTankNr.BarrelChange
lda AngleTable,x
clc
adc #4
sta AngleTable,x
cmp #180-4
jcc BeforeFire
bcc @-
lda #0
sta AngleTable,x
jmp BeforeFire
beq @-
pressedTAB
mva #sfx_purchase sfx_effect
@@ -1544,6 +1573,7 @@ pressedS
eor:sta noSfx
ReleaseAndLoop
jsr WaitForKeyRelease
; mva #$80 pressTimer
jmp BeforeFire
pressedSpace
@@ -1551,12 +1581,9 @@ pressedSpace
;we shoot here!!!
lda #0
sta ATRACT ; reset atract mode
sta pressTimer ; reset
jsr WaitForKeyRelease.StillWait
lda pressTimer
cmp #25 ; 1/2s
bcc fire
jmp callInventory
jsr WaitForLongPress
bcc fire ; short press
jmp callInventory ; long press
fire
RTS
.endp
@@ -2754,41 +2781,17 @@ notpressed
jsr DrawTankEngine
; enimation ends
lda SKSTAT
cmp #$ff
jeq checkJoy
cmp #$f7 ; SHIFT
jeq checkJoy
lda kbcode
and #%00111111 ; CTRL and SHIFT elimination
jumpFromStick
jsr GetKeyFast
cmp #@kbcode._left ; $6
jeq pressedLeft
cmp #@kbcode._right ; $7
jeq pressedRight
cmp #@kbcode._space ; $21
jeq pressedSpace
jmp notpressed
checkJoy
;------------JOY-------------
;happy happy joy joy
;check for joystick now
lda STICK0
and #$0f
cmp #$0f
beq notpressedJoy
tay
lda joyToKeyTable,y
jmp jumpFromStick
notpressedJoy
;fire
lda STRIG0
cmp #@kbcode._ret ; Fire (Joy)
jeq pressedSpace
jmp notpressed
pressedRight
lda ShieldEnergy,x
jeq pressedSpace