Compare commits

...

74 Commits

Author SHA1 Message Date
Pirx 3794089698 Spanish talk for Expo Atari Chile 2024 2024-06-17 23:09:12 -04:00
Pecusx 12eebaedec Update README.md 2024-03-16 23:33:15 +01:00
Pirx 9e8446abe4 Merge pull request #168 from pkali/develop
v1.50
2024-03-15 16:54:29 -04:00
Pirx 324b42855a readme updt 2024-03-15 16:41:34 -04:00
Pirx 81e3de877b readme updt 2024-03-15 16:27:39 -04:00
Pirx 2333a5d6bc WUDSN header 2024-03-15 16:04:48 -04:00
Pirx 20fd262fbd readme updt 2024-03-15 16:04:48 -04:00
Pecusx 8980ba2ee2 Cart flasher added 2024-03-15 20:55:22 +01:00
Pecusx 0e699ce41a Strong port flaut fixed! Again :)
And better wind speed display.
2024-03-14 19:47:23 +01:00
Pecusx 630c5eaa1a Strong port flaut fixed! 2024-03-13 22:42:09 +01:00
Pecusx ce741f05dd The great return of Ctrl+TAB 2024-03-13 19:43:27 +01:00
Pecusx a52c48bb25 VUmeter for dead people fix. 2024-03-13 12:52:55 +01:00
Pecusx 06298c856b Better VUmeter :) 2024-03-13 10:14:18 +01:00
Pecusx 9e8187fc0d VUmeter bug fix and Oooopty! 2024-03-12 20:49:40 +01:00
Pecusx 72c9d7952b Invisible Napalm bug fixed! 2024-03-12 09:56:57 +01:00
Pirx a307059107 Merge pull request #167 from pkali/develop
v1.48
2024-03-11 16:11:49 -04:00
Pecusx 26b0fae5d1 Update version number - 1.48 2024-03-11 18:22:38 +01:00
Pecusx c029db1718 Two different VU meters :) 2024-03-10 21:49:16 +01:00
Pecusx 1fb0f39d1f Cyborgs prefer humans again! 2024-03-09 19:28:00 +01:00
Pecusx 736b822c90 Update README.md
Smol fix
2024-03-05 20:47:50 +01:00
Pecusx f406c7f02f Update README.md 2024-03-05 20:46:33 +01:00
Pecusx 8540fb5746 Update Cartridge image. 2024-03-05 10:48:43 +01:00
Pirx 4babab5135 manuals.xex update 2024-03-04 18:40:37 -05:00
Pirx 05f304ef60 manual.xex WIP 2024-03-04 18:35:04 -05:00
Pecusx 6ad0ecdd50 RTCLOK fix! 2024-03-04 22:47:38 +01:00
Pecusx f0fb32d405 Manuals update (Long Schlong) 2024-03-04 10:34:53 +01:00
Pecusx f39c9fd289 Manuals update and new cartridge image file. 2024-03-03 19:30:23 +01:00
Pecusx 09a5459930 Fixet Esc bug (A5200) and VU meters timer set to 1minute 2024-03-03 17:03:02 +01:00
Pecusx 6312dec69e Opty!
VU Meters and Meteors work together
2024-03-02 00:28:08 +01:00
Pecusx 75fd6c494a VU Meter after 10s. :) 2024-03-01 14:16:26 +01:00
Pecusx 2d1c50bf97 DrawMountains with ClearSky on C64
not tested :)
2024-02-29 14:34:57 +01:00
Pecusx 5852b8f318 Smol opty 2024-02-29 12:58:24 +01:00
Pecusx d25419c353 Tanks sequence randomization opty 2024-02-29 12:43:36 +01:00
Pecusx 3ce3539d0e Hovercraft opty (11 bytes :) ) 2024-02-28 19:20:59 +01:00
Pirx 29a1561a4a 5200 purchase link 2024-02-02 21:35:49 -05:00
Pirx f83a44c3d9 Merge branch 'master' into develop 2024-02-02 20:41:29 -05:00
Pirx 0807f1f2b7 bin updt 2024-02-02 20:38:39 -05:00
Pirx d82304ad84 5200 cart updt 2024-02-02 20:37:02 -05:00
Pecusx 77d6e7113f Correct AI purchase 2024-01-30 10:48:01 +01:00
Pecusx ccd30e3700 Better place for propaganda! 2024-01-30 10:41:28 +01:00
Pecusx a15f342cb7 Better descriptions of "propaganda" weapon. 2024-01-30 09:16:09 +01:00
Pecusx a6d95b4f8e C64 soildown works! 2024-01-29 21:58:38 +01:00
Pecusx c24e5823fa Happy New Year
C64 version failed! ??
2024-01-29 09:29:44 +01:00
Pirx e1460da157 price we pay for propaganda 2024-01-27 14:31:59 -05:00
Pecusx 0b165a1338 X randomize in Propaganda 2024-01-27 18:57:09 +01:00
Pirx 76eceb77ca moar propaganda :O 2024-01-27 10:36:38 -05:00
Pecusx c51b0b8659 Propaganda works 2024-01-27 16:12:52 +01:00
Pecusx 0c83afc9c0 Ops... 2024-01-27 15:46:42 +01:00
Pecusx c2936e1d4c Merge branch 'develop' of https://github.com/pkali/scorch_src into develop 2024-01-27 15:42:47 +01:00
Pecusx 8fa0ad1112 Bettar propaganda texts 2024-01-27 15:42:33 +01:00
Pirx 73e2f0d7f9 fur deutschland 2024-01-27 09:34:29 -05:00
Pirx db2c85565f propaganda reshuffle 2024-01-27 09:29:10 -05:00
Pecusx 6d4274b1b9 Propaganda SFX 2024-01-27 15:24:04 +01:00
Pecusx 210fc0bfc4 Propaganda (test) 2024-01-27 14:55:42 +01:00
Pecusx 5901af397d Money calculations opty. 2023-12-28 18:34:01 +01:00
Pecusx 84b5904f44 A slightly faster SoilDown. 2023-11-15 19:14:18 +01:00
Pecusx 9c6816685c SoilDown opty. 2023-11-15 17:36:49 +01:00
Pecusx 47efa6292e Faster Circle 2023-11-15 15:06:40 +01:00
Pecusx 19caf28ac5 C64 code update 2023-11-08 11:24:35 +01:00
Pecusx dfef25c7b2 Added support for long button press in the main menu (like Tab) and in the activation menu (activation). 2023-11-08 09:48:44 +01:00
Pecusx 44610ec89e Fixed WhiteFlag bug and added remembering selected joy port between games 2023-11-07 09:32:33 +01:00
Pecusx 939365a009 Splash is optional now. 2023-11-06 14:31:52 +01:00
Pecusx aed31b821e All inputs (keyboard and joy) in separate module 2023-10-27 14:27:05 +02:00
Pecusx c8e8573104 Opty 2023-10-27 13:54:40 +02:00
Pecusx 0420ec20c6 Opty and prepare for turbo in C64 2023-10-27 09:55:07 +02:00
Pecusx 0320b000b3 Option key fix and opty 2023-10-27 08:47:50 +02:00
Pecusx 2c0132fd9f Another smol opty 2023-10-26 20:21:20 +02:00
Pecusx bd6418ce88 Opty - thanks @Irgendwer 2023-10-26 19:51:27 +02:00
Pecusx fa43529e92 More memory - opty 2023-10-26 19:18:15 +02:00
Pecusx dc60a1dd52 It works! 2023-10-26 18:50:51 +02:00
Pecusx c8e671ffb8 Fire button fixed 2023-10-26 16:19:55 +02:00
Pecusx 1d31b63ecf Keyboard and Joys - GetKey works 2023-10-26 16:04:33 +02:00
Pecusx 1791ab9869 Better GetKey but..... 2023-10-26 15:45:37 +02:00
Pecusx 803dfdf9a3 Allways use GetKey 2023-10-26 14:19:03 +02:00
39 changed files with 1229 additions and 2730 deletions
+1 -1
View File
@@ -9,7 +9,7 @@
OptionsScreen OptionsScreen
dta d"Welcome to Scorch v. " dta d"Welcome to Scorch v. "
build ; 4 bytes from scorch.asm (fancy method) :) build ; 4 bytes from scorch.asm (fancy method) :)
dta d" (un)2000-2023" dta d" (un)2000-2024"
.IF TARGET = 800 .IF TARGET = 800
dta d" Please select option with " dta d" Please select option with "
+18 -9
View File
@@ -109,6 +109,8 @@ EndOfUnPlot
.proc plot ;plot (xdraw, ydraw, color) .proc plot ;plot (xdraw, ydraw, color)
; color == 1 --> put pixel ; color == 1 --> put pixel
; color == 0 --> erase pixel ; color == 0 --> erase pixel
; xdraw (word) - X coordinate
; ydraw (word) - Y coordinate
; this is one of the most important routines in the whole ; this is one of the most important routines in the whole
; game. If you are going to speed up the game, start with ; game. If you are going to speed up the game, start with
; plot - it is used by every single effect starting from explosions ; plot - it is used by every single effect starting from explosions
@@ -165,9 +167,11 @@ ClearPlot
.proc ExPlot ;ExPlot (EplotX, EplotY) .proc ExPlot ;ExPlot (EplotX, EplotY)
; EOR plot: ; EOR plot:
; Inverts color of a pixel ; Inverts color of a pixel
; EplotX (word) - X coordinate
; EplotY (byte) - Y coordinate
; Note: No coordinate control!!! ; Note: No coordinate control!!!
; With off-screen coordinates, it can damage main program. ; 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 ; let's calculate coordinates from xdraw and ydraw
;xbyte = xbyte/8 ;xbyte = xbyte/8
@@ -195,8 +199,10 @@ ClearPlot
; ----------------------------------------- ; -----------------------------------------
.proc point_plot .proc point_plot
; ----------------------------------------- ; -----------------------------------------
; checks state of the pixel (coordinates in xdraw and ydraw) ; checks state of the pixel (coordinates in xdraw and ydraw)
; result is in A (zero or appropriate bit is set) ; 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 ; let's calculate coordinates from xdraw and ydraw
@@ -220,13 +226,15 @@ ClearPlot
ldx xdraw ; optimization (256 bytes long bittable) ldx xdraw ; optimization (256 bytes long bittable)
lda (xbyte),y lda (xbyte),y
eor #$ff
and bittable1_long,x and bittable1_long,x
rts rts
.endp .endp
;-------------------------------------------------- ;--------------------------------------------------
.proc drawmountains .proc drawmountains
;-------------------------------------------------- ;--------------------------------------------------
; draw mountains from mountaintable
; ClearSky - $ff Crear sky during drawmountains, 0 - no clear sky
mwa #0 xdraw mwa #0 xdraw
mwa #mountaintable modify ; mountaintable pointer mwa #mountaintable modify ; mountaintable pointer
mva #1 color mva #1 color
@@ -424,7 +432,7 @@ NothingToFall
;-------------------------------------------------- ;--------------------------------------------------
.proc SoilDownTurbo .proc SoilDownTurbo
;-------------------------------------------------- ;--------------------------------------------------
; fast SoilDown froc - test ; fast SoilDown proc
jsr ClearTanks jsr ClearTanks
NoClearTanks NoClearTanks
jsr CalcAndDrawMountains jsr CalcAndDrawMountains
@@ -463,20 +471,21 @@ Fast ; Put char without coordinates check!
; and 8 bytes to the table ; and 8 bytes to the table
ldy #7 ldy #7
ldx #$ff ; otimization - thanks @Irgendwer
CopyChar CopyChar
txa ; $ff
sta char2,y
lda (fontind),y lda (fontind),y
eor #$ff eor #$ff
sta char1,y sta char1,y
lda #$ff
sta char2,y
dey dey
bpl CopyChar bpl CopyChar
; and 8 subsequent bytes as a mask ; and 8 subsequent bytes as a mask
adw fontind #8 adw fontind #8
ldy #7 ldy #7
CopyMask CopyMask
lda (fontind),y txa ; $ff
eor #$ff eor (fontind),y
sta mask1,y sta mask1,y
lda #$00 lda #$00
sta mask2,y 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 pla
tay tay
.endm .endm
;-------------------------------------
.macro txy
txa
tay
.endm
;-------------------------------------
.macro tyx
tya
tax
.endm
;------------------------------------- ;-------------------------------------
.macro pause .macro pause
;waits :1 number (byte) of frames ;waits :1 number (byte) of frames
+65 -63
View File
@@ -67,12 +67,12 @@ PHINIV EQU $E48C ;UPLOADED HANDLER INIT
; ;
; COMMAND CODES FOR IOCBS ; COMMAND CODES FOR IOCBS
; ;
OPEN EQU $03 ;OPEN FOR I/O _OPEN EQU $03 ;OPEN FOR I/O
GETREC EQU $05 ;GET RECORD (TEXT) GETREC EQU $05 ;GET RECORD (TEXT)
GETCHR EQU $07 ;GET CHARACTER(S) GETCHR EQU $07 ;GET CHARACTER(S)
PUTREC EQU $09 ;PUT RECORD (TEXT) PUTREC EQU $09 ;PUT RECORD (TEXT)
PUTCHR EQU $0B ;PUT CHARACTER(S) PUTCHR EQU $0B ;PUT CHARACTER(S)
CLOSE EQU $0C ;CLOSE DEVICE _CLOSE EQU $0C ;CLOSE DEVICE
STATIS EQU $0D ;STATUS REQUEST STATIS EQU $0D ;STATUS REQUEST
SPECIL EQU $0E ;SPECIAL ENTRY COMMAND SPECIL EQU $0E ;SPECIAL ENTRY COMMAND
; ;
@@ -135,6 +135,7 @@ DERRER EQU $90 ;PERIPHRAL DEVICE ERR
BADMOD EQU $91 ;BAD SCREEN MODE # BADMOD EQU $91 ;BAD SCREEN MODE #
FNCNOT EQU $92 ;NONEXISTANT FUNCTION FNCNOT EQU $92 ;NONEXISTANT FUNCTION
SCRMEM EQU $93 ;SCREEN MEM TOO SMALL SCRMEM EQU $93 ;SCREEN MEM TOO SMALL
FILENF EQU $AA ;FILE NOT FOUND
; ;
; PAGE ZERO RAM ASSIGNMENTS ; PAGE ZERO RAM ASSIGNMENTS
; ;
@@ -376,7 +377,7 @@ CBAUDL EQU $02EE ;CASSETTE BAUD RATE
CBAUDH EQU $02EF CBAUDH EQU $02EF
CRSINH EQU $02F0 ;CURSOR INHIBIT 0=ON CRSINH EQU $02F0 ;CURSOR INHIBIT 0=ON
KEYDEL EQU $02F1 ;KEY DELAY 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 CHACT EQU $02F3 ;CHACTL REGISTER RAM
CHBAS EQU $02F4 ;CHBAS REGISTER RAM CHBAS EQU $02F4 ;CHBAS REGISTER RAM
NEWROW EQU $02F5 ;POINT DRAW GOES TO NEWROW EQU $02F5 ;POINT DRAW GOES TO
@@ -593,11 +594,11 @@ PBCTL EQU PIA+3
; --------------------------------------------------------------------------- ; ---------------------------------------------------------------------------
; ;
JUMP EQU $01 ; display list jump instruction (3 byte) 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 SCH EQU $10 ; display list horizontal scrolling
SCV EQU $20 ; display list vertical scrolling SCV EQU $20 ; display list vertical scrolling
LMS EQU $40 ; display list load memory scan instruction (3 byte) LMS EQU $40 ; display list load memory scan instruction (3 byte)
DLII EQU $80 ; display list interrupt instruction DLII EQU $80 ; display list interrupt instruction
; ;
SKIP1 EQU $00 ; display list skip 1 scan line instruction SKIP1 EQU $00 ; display list skip 1 scan line instruction
@@ -656,67 +657,68 @@ scr32 = @dmactl(narrow|dma|players|missiles|lineX1)
; KBCODEs ; KBCODEs
; --------------------------------------------------------------------------- ; ---------------------------------------------------------------------------
.enum @kbcode .enum @kbcode
_none = 255 _none = 255
_esc = 28 _esc = 28
_1 = 31 _1 = 31
_2 = 30 _2 = 30
_3 = 26 _3 = 26
_4 = 24 _4 = 24
_5 = 29 _5 = 29
_6 = 27 _6 = 27
_7 = 51 _7 = 51
_8 = 53 _8 = 53
_9 = 48 _9 = 48
_0 = 50 _0 = 50
_lt = 54 _lt = 54
_gt = 55 _gt = 55
_del = 52 _del = 52
_tab = 44 _tab = 44
_Q = 47 _Q = 47
_W = 46 _W = 46
_E = 42 _E = 42
_R = 40 _R = 40
_T = 45 _T = 45
_Y = 43 _Y = 43
_U = 11 _U = 11
_I = 13 _I = 13
_O = 8 _O = 8
_P = 10 _P = 10
_min = 14 _min = 14
_up = 14 ; cursor function _up = 14 ; cursor function
_eq = 15 _eq = 15
_down = 15 ; cursor function _down = 15 ; cursor function
_ret = 12 _ret = 12
_A = 63 _A = 63
_S = 62 _S = 62
_D = 58 _D = 58
_F = 56 _F = 56
_G = 61 _G = 61
_H = 57 _H = 57
_J = 1 _J = 1
_K = 5 _K = 5
_L = 0 _L = 0
_semicolon = 2 _semicolon = 2
_plus = 6 _plus = 6
_left = 6 ; cursor function _left = 6 ; cursor function
_asterisk = 7 _asterisk = 7
_right = 7 ; cursor function _right = 7 ; cursor function
_caps = 60 _caps = 60
_Z = 23 _Z = 23
_X = 22 _X = 22
_C = 18 _C = 18
_V = 16 _V = 16
_B = 21 _B = 21
_N = 36 _N = 36
_M = 37 _M = 37
_comma = 32 _comma = 32
_dot = 34 _dot = 34
_slash = 38 _slash = 38
_atari = 39 _atari = 39
_help = 17 _help = 17
_F1 = 3 _F1 = 3
_F2 = 4 _F2 = 4
_F3 = 19 _F3 = 19
_F4 = 20 _F4 = 20
_space = 33 _space = 33
.ende .ende
EOL = $9b
+10
View File
@@ -160,6 +160,16 @@
pla pla
tay tay
.endm .endm
;-------------------------------------
.macro txy
txa
tay
.endm
;-------------------------------------
.macro tyx
tya
tax
.endm
;------------------------------------- ;-------------------------------------
.macro pause .macro pause
;waits :1 number (byte) of frames ;waits :1 number (byte) of frames
+1 -1
View File
@@ -1,6 +1,6 @@
X_LOADER_START = $0700; X_LOADER_START = $0700;
X_BANK = $074E; X_BANK = $074E;
X_SRC = $07CA; X_SRC = $07D0;
X_CLRSTART = $071D; X_CLRSTART = $071D;
X_CLREND = $0728; X_CLREND = $0728;
X_PORTB = $0707; X_PORTB = $0707;
+30 -20
View File
@@ -78,7 +78,7 @@
OptionsMainLoop OptionsMainLoop
jsr OptionsInversion jsr OptionsInversion
jsr getkey jsr GetKey
bit escFlag bit escFlag
spl:rts spl:rts
@@ -124,11 +124,16 @@ OptionsNoLeft
OptionsNoRight OptionsNoRight
cmp #@kbcode._ret ; $c ;Return key cmp #@kbcode._ret ; $c ;Return key
bne OptionsNoReturn bne OptionsNoReturn
; wait for long press
jsr WaitForLongPress
bcs TabPressed ; if long press (fire or Return)
EndOfOptions
rts ; options selected rts ; options selected
OptionsNoReturn OptionsNoReturn
cmp #@kbcode._tab ; Tab key cmp #@kbcode._tab ; Tab key
bne OptionsNoTab bne OptionsNoTab
TabPressed
jsr SelectNextGradient jsr SelectNextGradient
OptionsNoTab OptionsNoTab
jmp OptionsMainLoop jmp OptionsMainLoop
@@ -409,7 +414,13 @@ ChoosingItemForPurchase
cmp #@kbcode._left ; $06 ; cursor left cmp #@kbcode._left ; $06 ; cursor left
jeq ListChange jeq ListChange
cmp #@kbcode._ret ; $0c ; Return 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 cmp #@kbcode._up ; $e
beq PurchaseKeyUp beq PurchaseKeyUp
cmp #@kbcode._down ; $f cmp #@kbcode._down ; $f
@@ -872,13 +883,14 @@ NotBarrel
bne NotWhiteFlag bne NotWhiteFlag
cmp ActiveDefenceWeapon,x cmp ActiveDefenceWeapon,x
bne NoDeactivateWhiteFlag bne NoDeactivateWhiteFlag
mva #sfx_white_flag sfx_effect
lda #$00 ; if try to activate activated White Flag then deactivate Defence 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 ActiveDefenceWeapon,x
sta ShieldEnergy,x sta ShieldEnergy,x
beq DefActivationEnd mva #sfx_white_flag sfx_effect
bne DefActivationEnd
NotWhiteFlag NotWhiteFlag
NoDeactivateWhiteFlag
; activate new defensive ; activate new defensive
sta ActiveDefenceWeapon,x sta ActiveDefenceWeapon,x
; set defensive energy ; set defensive energy
@@ -1727,8 +1739,9 @@ FastTank
; ldx TankNr ; ldx TankNr
dex dex
bpl AllTanksFloatingDown bpl AllTanksFloatingDown
jsr IsKeyPressed jsr GetKeyFast
bne MainTanksFloatingLoop ; neverending loop cmp #@kbcode._none
beq MainTanksFloatingLoop ; neverending loop
mva #$00 ScrollFlag ; credits scroll off mva #$00 ScrollFlag ; credits scroll off
jmp MakeDarkScreen jmp MakeDarkScreen
; jsr GameOverResultsClear ; jsr GameOverResultsClear
@@ -1953,27 +1966,24 @@ NoShieldEnergy
;========================= ;=========================
mwa Wind temp mwa Wind temp
lda #space lda #space
bit Wind+3 ; highest byte of 4 byte wind
bmi DisplayLeftWind
sta statusBuffer+80+17 ; (space) char sta statusBuffer+80+17 ; (space) char
lda #char_TAB ; (tab) char
sta statusBuffer+80+20
bne DisplayWindValue
DisplayLeftWind
sta statusBuffer+80+20 ; (space) char sta statusBuffer+80+20 ; (space) char
:4 lsrw temp ;divide by 16 to have a nice value on a screen
lda temp
beq DisplayWindValuex
bit Wind+3 ; highest byte of 4 byte wind
bmi DisplayLeftWindx
ldx #char_TAB ; (tab) char
stx statusBuffer+80+20
bne DisplayWindValuex
DisplayLeftWindx
lda #char_DEL ;(del) char lda #char_DEL ;(del) char
sta statusBuffer+80+17 sta statusBuffer+80+17
sec ; Wind = -Wind sec ; Wind = -Wind
lda #$00 lda #$00
sbc temp sbc temp
sta temp sta temp
lda #$00 DisplayWindValuex
sbc temp+1
sta temp+1
DisplayWindValue
:4 lsrw temp ;divide by 16 to have a nice value on a screen
lda temp
;sta decimal
mwx #statusBuffer+80+18 displayposition mwx #statusBuffer+80+18 displayposition
jsr displaybyte jsr displaybyte
+54 -9
View File
@@ -101,6 +101,8 @@ EndOfUnPlot
.proc plot ;plot (xdraw, ydraw, color) .proc plot ;plot (xdraw, ydraw, color)
; color == 1 --> put pixel ; color == 1 --> put pixel
; color == 0 --> erase pixel ; color == 0 --> erase pixel
; xdraw (word) - X coordinate
; ydraw (word) - Y coordinate
; this is one of the most important routines in the whole ; this is one of the most important routines in the whole
; game. If you are going to speed up the game, start with ; game. If you are going to speed up the game, start with
; plot - it is used by every single effect starting from explosions ; plot - it is used by every single effect starting from explosions
@@ -154,8 +156,10 @@ ClearPlot
; ----------------------------------------- ; -----------------------------------------
.proc point_plot .proc point_plot
; ----------------------------------------- ; -----------------------------------------
; checks state of the pixel (coordinates in xdraw and ydraw) ; checks state of the pixel (coordinates in xdraw and ydraw)
; result is in A (zero or appropriate bit is set) ; 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 ; let's calculate coordinates from xdraw and ydraw
@@ -178,13 +182,14 @@ ClearPlot
ldy #0 ldy #0
lda (xbyte),y lda (xbyte),y
eor #$ff
and bittable1_long,x and bittable1_long,x
rts rts
.endp .endp
;-------------------------------------------------- ;--------------------------------------------------
.proc drawmountains .proc drawmountains
;-------------------------------------------------- ;--------------------------------------------------
; draw mountains from mountaintable
; ClearSky - $ff Crear sky during drawmountains, 0 - no clear sky
mwa #0 xdraw mwa #0 xdraw
mwa #mountaintable modify mwa #mountaintable modify
mva #1 color mva #1 color
@@ -212,6 +217,29 @@ NotLower
bpl @- bpl @-
sta temp2 sta temp2
inc temp2 ; this is our minimum 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 MinCalculated
ldy #0 ldy #0
lda (modify),y lda (modify),y
@@ -284,6 +312,22 @@ MinCalculated
bne @- bne @-
NotFillBytes NotFillBytes
.ELSE .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 ldy #0
lda (modify),y lda (modify),y
cmp #screenheight cmp #screenheight
@@ -305,10 +349,10 @@ NoMountain
;-------------------------------------------------- ;--------------------------------------------------
.proc SoilDownTurbo .proc SoilDownTurbo
;-------------------------------------------------- ;--------------------------------------------------
; fast SoilDown froc - test ; fast SoilDown proc
jsr ClearTanks jsr ClearTanks
NoClearTanks NoClearTanks
; jsr CalcAndDrawMountains ; jsr CalcAndDrawMountains - to do (now Atari only)
jmp DrawTanks jmp DrawTanks
;rts ;rts
.endp .endp
@@ -344,20 +388,21 @@ Fast ; Put char without coordinates check!
; and 8 bytes to the table ; and 8 bytes to the table
ldy #7 ldy #7
ldx #$ff ; otimization - thanks @Irgendwer
CopyChar CopyChar
txa ; $ff
sta char2,y
lda (fontind),y lda (fontind),y
eor #$ff eor #$ff
sta char1,y sta char1,y
lda #$ff
sta char2,y
dey dey
bpl CopyChar bpl CopyChar
; and 8 subsequent bytes as a mask ; and 8 subsequent bytes as a mask
adw fontind #8 adw fontind #8
ldy #7 ldy #7
CopyMask CopyMask
lda (fontind),y txa ; $ff
eor #$ff eor (fontind),y
sta mask1,y sta mask1,y
lda #$00 lda #$00
sta mask2,y 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 pla
tay tay
.endm .endm
;-------------------------------------
.macro txy
txa
tay
.endm
;-------------------------------------
.macro tyx
tya
tax
.endm
;------------------------------------- ;-------------------------------------
.MACRO WAIT .MACRO WAIT
; 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. 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**. 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) ## 3. Shopping screen (before each round)
![Shopping offensives screen.](images/PurOffensive.png) ![Shopping offensives screen.](images/PurOffensive.png)
![Shopping defensives screen.](images/PurDefensive.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. 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 Blast | 0 (↓) |
| Riot Bomb | 0 (↓) | | Riot Bomb | 0 (↓) |
| Heavy Riot Bomb | 0 (↓) | | Heavy Riot Bomb | 0 (↓) |
| Baby Digger | 0 (↓) |
| Digger | 0 (↓) | | Digger | 0 (↓) |
| Heavy Digger | 0 (↓) | | Heavy Digger | 0 (↓) |
| Sandhog | 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 (↓) | | Ton of Dirt | 0 (↓) |
| Liquid Dirt | 0 (↓) | | Liquid Dirt | 0 (↓) |
| Dirt Charge | 0 (↓) | | Dirt Charge | 0 (↓) |
| Propaganda | 0 (↓) |
| Stomp | 0 (↓) | | Stomp | 0 (↓) |
| Laser | 100 (↓) | | 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** * **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 - more digging.
* **Heavy Digger** - as above - even more digging.
* **Sandhog** - as above - another way of 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. * **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. * **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. * **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. * **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. * **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. **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. 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. 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. 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**. 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ą). ## 3. Ekran zakupów (przed każdą rundą).
![Ekran zakupów broni ofensywnych.](images/PurOffensive.png) ![Ekran zakupów broni ofensywnych.](images/PurOffensive.png)
![Ekran zakupów broni defensywnych.](images/PurDefensive.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. 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 Blast | 0 (↓)|
| Riot Bomb | 0 (↓)| | Riot Bomb | 0 (↓)|
| Heavy Riot Bomb | 0 (↓)| | Heavy Riot Bomb | 0 (↓)|
| Baby Digger | 0 (↓)|
| Digger | 0 (↓)| | Digger | 0 (↓)|
| Heavy Digger | 0 (↓)| | Heavy Digger | 0 (↓)|
| Sandhog | 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 (↓)| | Ton of Dirt | 0 (↓)|
| Liquid Dirt | 0 (↓)| | Liquid Dirt | 0 (↓)|
| Dirt Charge | 0 (↓)| | Dirt Charge | 0 (↓)|
| Propaganda | 0 (↓)|
| Stomp | 0 (↓)| | Stomp | 0 (↓)|
| Laser | 100 (↓)| | 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**. * **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 - większy podkop.
* **Heavy Digger** - jak wyżej - największy podkop.
* **Sandhog** - jak wyżej - inny sposób podkopywania. * **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. * **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. * **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. * **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. * **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ć. * **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. **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. 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. 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_height = 26
screen_width = 40 screen_width = 40
screen = $1000 ; start - 40*screen_height screen = $0900 ; start - 40*screen_height
KeyRepeatSpeed = 15 ; (max 127 !!!) KeyRepeatSpeed = 15 ; (max 127 !!!)
@@ -414,9 +414,6 @@ NTSC
rts rts
.endp .endp
icl "music/rmtplayr.a65"
dl dl
:2 .byte SKIP8 :2 .byte SKIP8
.byte LMS+MODE2 .byte LMS+MODE2
@@ -451,6 +448,8 @@ ticksPerSecond .byte 0
fake_pokey :9 .byte 0 fake_pokey :9 .byte 0
pressTimer .byte 0 pressTimer .byte 0
icl "music/rmtplayr.a65"
man_text man_text
.if LANG = "PL" .if LANG = "PL"
@@ -460,6 +459,7 @@ man_text
.endif .endif
man_text_end man_text_end
.by $ff, $ff .by $ff, $ff
.ECHO *
opt h- ;RMT module is standard Atari binary file already opt h- ;RMT module is standard Atari binary file already
ins "music/czytaczu1_stripped.rmt" ;include music RMT module 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 TRACKS equ 4
EIF EIF
;* ;*
PLAYER equ $3400 PLAYER equ $2400
;* ;*
;* RMT FEATures definitions file ;* RMT FEATures definitions file
;* For optimizations of RMT player routine to concrete RMT modul only! ;* For optimizations of RMT player routine to concrete RMT modul only!
+54 -5
View File
@@ -5,7 +5,7 @@ Scorch is a multi-player, turn-based, artillery video game. Tanks do turn-based
by Tomasz 'Pecus' Pecko and Pawel 'pirx' Kalinowski by Tomasz 'Pecus' Pecko and Pawel 'pirx' Kalinowski
Warsaw, Miami 2000, 2001, 2002, 2003, 2009, 2012, 2013, 2022, 2023 Warsaw, Miami 2000, 2001, 2002, 2003, 2009, 2012, 2013, 2022, 2023, 2024
[Game manual in PDF (layout by Bocianu)](Manuals/scorch_manual_en.pdf) [Game manual in PDF (layout by Bocianu)](Manuals/scorch_manual_en.pdf)
@@ -35,19 +35,36 @@ Compilation: (requires mads newer than 2023-09-13)
- `mads scorch.asm -o:scorch.bin -d:TARGET=5200` for Atari 5200 version - `mads scorch.asm -o:scorch.bin -d:TARGET=5200` for Atari 5200 version
- `mads scorchC64.asm -o:scorchC64.prg` for C64 version (WIP, not playable yet) - `mads scorchC64.asm -o:scorchC64.prg` for C64 version (WIP, not playable yet)
Update of the official Atari 8-bit cartridge from Mq:
- boot `scorch_fl.atr` from e.g. SIO2SD, SIO2PC or a large floppy
- insert the cartridge
- do what the flasher application says on the screen.
- do not despair if something goes wrong, just reboot, the reinsert cart, etc.
- it is smoother with QMeg OS, because there you can insert the cart, turn on your Atari, jump to the QMeg menu and boot the `scorch_fl.atr` from there. No need to insert the cart to the running Atari.
WARNING | ADVERTENCIA |警告 | AVERTISSEMENT | चेतावनी | WARNUNG | ПРЕДУПРЕЖДЕНИЕ | UWAGA | POZOR !!!
This is not an official cart manufacturer's (Mq) flasher, it is a collective and separate community effort. Be responsible, don't drink and flash your car(t). Better yet, do not flash it at all. In fact, to preserve the historical value of the artifact we strongly discourage from opening the game box and inserting the cartridge anywhere, especially into unauthorized orifices.
Game source code is split into several parts: Game source code is split into several parts:
- `scorch.asm` is the main game startup code - `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 - `game.asm` - it all happens here
- `grafproc.asm` - graphics routines like line or circle - `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 - `variables.asm` - all non-zero page variables
- `constants.asm` - various tables of constants - `constants.asm` and `constants_top.asm` - various tables of constants
- `display_*.asm` - display lists and text screen definitions
- `ai.asm` - artificial stupidity of computer opponents - `ai.asm` - artificial stupidity of computer opponents
- `weapons.asm` - general arsenal of tankies - `weapons.asm` - general arsenal of tankies
- `definitions.asm` - label definitions, moved to make it work better with Altirra debug (it doesn't). - `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. 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. :) 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. :)
@@ -58,11 +75,43 @@ With the advent of [fujinet](https://fujinet.online/) we are thinking about maki
## Changelog: ## Changelog:
###### Version 1.50
2024-03-15
Atari 8-bit cart flasher and bug fixes!
@RB5200 provided us with a very good bug reports so the new version was inevitable. Additionally, we have used [cart flasher](https://github.com/jhusak/jataricart/tree/master/various_flashers/1MBscorch) from @jhusak to prepare the .atr with flasher.
Fixes and changes:
- Napalm and Hot Napalm animations were not playing.
- Wind of force 0 and left direction was wrapping arithmetic and caused very strong left shoots.
- Now 0 force wind has got no direction (no negative zeroes anymore!)
- CTRL+Tab was non functional for some time, returned
- Much nicer easter egg visualization.
###### Version 1.48
2024-03-11
New cart image, bugfixes and easter eggs.
In preparation for the festive season we have squeezed the code a bit more, fixed some buggies and added an easter egg or two :)
Most important changes:
- Cyborgs prefer attacking human players again! Due to unforeseen circumstances Cyborgs were a bit shy and not as vicious as planned. Fixed.
- A new weapon "Propaganda". In the spirit of a ["Phoney War"](https://en.wikipedia.org/wiki/Phoney_War) instead of dropping bombs we drop a bunch of leaflets. This will show them!
- Robotanks were making suboptimal purchase decisions. Fixed.
- Updated binary manuals.
- ... _redacted_
- ... _redacted for egg season_
- A new physical cart image - you can update carts and have even more fun now!
###### Version 1.43 ###### Version 1.43
2023-12-07 2023-12-07
Physical release version. 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) ![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) jsr ClearTankNr ; we must hide tank to erase shields (issue #138)
lda #ind_White_Flag lda #ind_White_Flag
sta ActiveDefenceWeapon,x sta ActiveDefenceWeapon,x
mva #sfx_white_flag sfx_effect
jsr PutTankNr ; and draw tank witch Flag jsr PutTankNr ; and draw tank witch Flag
EnoughEnergy EnoughEnergy
; jsr DisplayStatus.DisplayEnergy ; not necessary - status update after othher defensives ; jsr DisplayStatus.DisplayEnergy ; not necessary - status update after othher defensives
@@ -449,6 +450,7 @@ ItIsHuman
beq lowestIsEqual beq lowestIsEqual
bcc lowestIsHigher bcc lowestIsHigher
; if lower ; if lower
bcs lowestIsLower
lowestIsEqual lowestIsEqual
; if equal then select random (of two tanks) ; if equal then select random (of two tanks)
bit RANDOM bit RANDOM
@@ -787,8 +789,7 @@ SetStartAndFlight ; set start point (virtual barrel end :) ) and make test fl
sta ytraj+1 sta ytraj+1
mva #0 ytraj+2 mva #0 ytraj+2
mva NewAngle Angle mva NewAngle Angle
lda CONSOL jsr CheckStartKey ; START KEY
and #%00000001 ; START KEY
beq @speedup beq @speedup
jsr MoveBarrelToNewPosition jsr MoveBarrelToNewPosition
bit escFlag bit escFlag
+131
View File
@@ -0,0 +1,131 @@
.proc talk
; Maximum text length is 63 characters!!!
dta d"MUERE!"^
dta d"CON GARRA!"^
dta d"ESTAS MUERTO!"^
dta d"MUERE PUERCO COMUNISTA!"^
dta d"VICTORIA!"^
dta d"MUERE, CERDO EXTRANJERO!"^
dta d"DUELE?!!!"^
dta d"PERDEDOR"^
dta d"TOMA!"^
dta d"COMETE ESTO!"^
dta d"ESTAS FRITO!"^
dta d"VIVAI!"^
dta d"ABRE!"^
dta d"JA JA JA."^
dta d"AVANZA!"^
dta d"ATACA!"^
dta d"MUERE, ESCORIA!"^
dta d"EN TU CARA!"^
dta d"A VOLAR!"^
dta d"ALEGRAME EL DIA."^
dta d"TOC, TOC."^
; end of Propaganda :)
dta d"DESDE EL AVERNO TE MATO..."^
dta d"DONDE QUEDO TU SUERTE?"^
dta d"ADIOS!."^
dta d"QUE TE PASA?"^
dta d"ALTO O DISPARO!"^
dta d"VENIMOS EN PAZ - DISPARA A MATAR!"^
dta d"AMO EL OLOR A NAPALM TAN TEMPRANO."^
dta d"RESPETA!"^
dta d"QUIEN DIABLOS TE CREES?"^
dta d"CUIDADO ABAJO!"^
dta d"CUIDADO!"^
dta d"ADIVINA QUIEN VIENE A CENAR?"^
dta d"FELIZ NAVIDAD."^
dta d"ALLA VOY..."^
dta d"CALMA, NO ES UNA BALA REAL."^
dta d"SANGRE, DOLOR, VIOLENCIA!"^
dta d"TOMA, MARICA!"^
dta d"TE APLASTARE!"^
dta d"ACABARE TU FEO TANQUE!"^
dta d"QUE HARA ESTE BOTON?"^
dta d"NADA PERSONAL."^
dta d"TE ENOJARA ESTO?"^
dta d"DEJA EN PAZ A MI HERMANA!"^
dta d"TE PERDONARIA, PERO POR QUE?"^
dta d"MI BOMBA ES MAS GRANDE QUE LA TUYA."^
dta d"ME LAS PAGARAS!"^
dta d"HASTA LA VISTA, BABY!"^
dta d"ASI QUEDAS BAJO FUEGO."^
dta d"NO HAY SUFICIENTE ESPACIO PARA LOS DOS."^
dta d"ENGRASARE MI ARMA CON TU SANGRE."^
dta d"TE ROMPERE LA CARA!"^
dta d"MAMA ME DIJO QUE TE PEGUE!"^
dta d"DISFRUTA EL DOLOR!"^
dta d"NO QUE ME IBA A DOLER?"^
;----------------------------
dta d"DECIR ADIOS EN TAN DULCE... COMO NO"^
dta d"UGH!"^
dta d"AARGH!"^
dta d"AYUDAAA!"^
dta d"AUXILIO!!!"^
dta d"NOO..."^
dta d"OH!"^
dta d"EEEH!"^
dta d"AUCH!"^
dta d"MALDICION!"^
dta d"SE PUDRIO TODO."^
dta d"OH NO!"^
dta d"NO A MI!"^
dta d"AY."^
dta d"OH NO, DE NUEVO."^
dta d"OTRO QUE MUERE EL POLVO."^
dta d"BAIS."^
dta d"S.O.S!"^
dta d"ADIOS, MUNDO CRUEL."^
dta d"GERONIMOOO!"^
dta d"OH MAN!"^
dta d"DOOUGH!"^
dta d"OTRO DIA, OTRA BOMBA."^
dta d"SE ACABO, AMIGO MIO."^
dta d"AH, GRACIOSO."^
dta d"TERMINA CUANDO ACABA."^
dta d"POR QUE A MI?"^
dta d"ECHEN PAJA!"^
dta d"TENGO UN MAL PRESENTIMIENTO."^
dta d"A LA M..."^
dta d"PUM!"^
dta d"PIN!"^
dta d"BAM!"^
dta d"CARAJ...!"^
dta d"DEBI ESCUCHARTE, MAMA."^
dta d"VOY RUMBO AL VALLE DE SOMBRAS..."^
dta d"QUE FUE ESE RUIDO?"^
dta d"SIEMPRE SUPE QUE HABRIA DIAS ASI."^
dta d"ES UNO DE ESOS DIAS..."^
dta d"VEO UNA LUZ BRILLAR..."^
dta d"MAMA? ERES TU?"^
dta d"ME DEJE GANAR!"^
dta d"QUE CHIRIPASO!"^
dta d"IGUAL, NO QUERIA GANAR."^
dta d"-<BUU>-"^
dta d"VAYA QUE ESTUVO CERCA!"^
dta d"UNETE AL EJERCITO, YA!."^
dta d"NO FUE SOLO TRABAJO, FUE POR DIVERSION!"^
dta d"NUNCA ME GUSTO LA VIOLENCIA!"^
dta d"PENSE QUE TE AGRADABA"^
dta d"NOS VEMOS."^
dta d"ESTE TIPO ES MEDIO LOCO."^
dta d"ASI YA NO JUEGO."^
dta d"MORIR NO ES CHEVERE."^
dta d"ER... GRACIAS."^
dta d"HE CAIDO EN DESGRACIA!"^
dta d"ALO, 911?"^
dta d"YA VALIMOS V3RG4!"^
dta d"YA VUELVO..."^
dta d"TE DEMANDARE!"^
dta d"Y MIS ABOGADOS?"^
dta d"INFELIZ!"^ ;(sanford and son)
LEND
NumberOfOffensiveTexts=55
NumberOfDeffensiveTexts=62
NumberOfPropagandaTexts=21
VeryFunnyText=79
.endp
hoverFull dta d"ME C4G0 EN LA M13RD4!"^
hoverFullEnd
hoverEmpty dta d"UNA MAS Y NOS VAMOS"^
hoverEmptyEnd
+21 -17
View File
@@ -1,34 +1,40 @@
.proc talk .proc talk
; Maximum text length is 63 characters!!! ; Maximum text length is 63 characters!!!
dta d"CYKA BLAT"^
dta d"DIE!"^ 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"EAT MY SHORTS!"^
dta d"YOU'RE TOAST!"^ dta d"YOU'RE TOAST!"^
dta d"BANZAI!"^ dta d"BANZAI!"^
dta d"FROM HELL'S HEART I STAB AT THEE..."^ dta d"OPEN WIDE!"^
dta d"DO YOU FEEL LUCKY, TANK?"^ dta d"HA HA HA."^
dta d"TAKE A HIKE!"^
dta d"YOU'RE DEAD MEAT."^
dta d"MAKE MY DAY."^
dta d"CHARGE!"^ dta d"CHARGE!"^
dta d"ATTACK!"^ 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"YOU'RE OUTTA HERE."^
dta d"WATTSA MATTA YOU?"^ dta d"WATTSA MATTA YOU?"^
dta d"FREEZE, OR I'LL SHOOT!"^ dta d"FREEZE, OR I'LL SHOOT!"^
dta d"HA HA HA."^
dta d"WE COME IN PEACE - SHOOT TO KILL!"^ 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"I LOVE THE SMELL OF NAPALM IN THE MORNING."^
dta d"VICTORY!"^
dta d"SHOW SOME RESPECT."^ dta d"SHOW SOME RESPECT."^
dta d"JUST WHO DO YOU THINK YOU ARE?"^ dta d"JUST WHO DO YOU THINK YOU ARE?"^
dta d"LOOK OUT BELOW!"^ dta d"LOOK OUT BELOW!"^
dta d"KNOCK, KNOCK."^
dta d"LOOK OVER THERE."^ dta d"LOOK OVER THERE."^
dta d"GUESS WHAT'S COMING FOR DINNER?"^ dta d"GUESS WHAT'S COMING FOR DINNER?"^
dta d"MERRY CHRISTMAS."^ dta d"MERRY CHRISTMAS."^
dta d"OPEN WIDE!"^
dta d"HERE GOES NOTHING..."^ dta d"HERE GOES NOTHING..."^
dta d"DON'T WORRY, IT ISN'T A LIVE ROUND."^ dta d"DON'T WORRY, IT ISN'T A LIVE ROUND."^
dta d"BLOOD, PAIN, VIOLENCE!"^ dta d"BLOOD, PAIN, VIOLENCE!"^
@@ -44,12 +50,8 @@
dta d"DON'T FORGET ABOUT ME!"^ dta d"DON'T FORGET ABOUT ME!"^
dta d"HASTA LA VISTA, BABY!"^ dta d"HASTA LA VISTA, BABY!"^
dta d"THIS IS YOUR BRAIN ON SCORCH."^ dta d"THIS IS YOUR BRAIN ON SCORCH."^
dta d"TAKE THIS!"^
dta d"THIS SCREEN AIN'T BIG ENOUGH FOR US."^ 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"I SHALL OIL MY TURRET WITH YOUR BLOOD."^
dta d"DIE, TANK-SCUM!"^
dta d"I'M GONNA BREAK YOUR FACE!"^ dta d"I'M GONNA BREAK YOUR FACE!"^
dta d"MAMA SAID KNOCK YOU OUT!"^ dta d"MAMA SAID KNOCK YOU OUT!"^
dta d"I HOPE YOU ENJOY PAIN!"^ dta d"I HOPE YOU ENJOY PAIN!"^
@@ -118,8 +120,10 @@
dta d"CALL 1-900-SUE-TANK."^ dta d"CALL 1-900-SUE-TANK."^
dta d"YOU BIG DUMMY!"^ ;(sanford and son) dta d"YOU BIG DUMMY!"^ ;(sanford and son)
LEND LEND
NumberOfOffensiveTexts=54 NumberOfOffensiveTexts=55
NumberOfDeffensiveTexts=62 NumberOfDeffensiveTexts=62
NumberOfPropagandaTexts=21
VeryFunnyText=79
.endp .endp
hoverFull dta d"MY HOVERCRAFT IS FULL OF EELS!"^ hoverFull dta d"MY HOVERCRAFT IS FULL OF EELS!"^
hoverFullEnd 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_Blast
.by >price_Riot_Bomb .by >price_Riot_Bomb
.by >price_Heavy_Riot_Bomb .by >price_Heavy_Riot_Bomb
.by >price_Baby_Digger
.by >price_Digger .by >price_Digger
.by >price_Heavy_Digger .by >price_Heavy_Digger
.by >price_Sandhog .by >price_Sandhog
@@ -260,6 +259,7 @@ WeaponPriceH ; weapons prices (tables with prices of weapons)
.by >price_Ton_of_Dirt .by >price_Ton_of_Dirt
.by >price_Liquid_Dirt .by >price_Liquid_Dirt
.by >price_Dirt_Charge .by >price_Dirt_Charge
.by >price_Propaganda
.by >price_Punch .by >price_Punch
.by >price_Buy_me .by >price_Buy_me
.by >price_Laser .by >price_Laser
@@ -299,7 +299,6 @@ WeaponPriceL
.by <price_Riot_Blast .by <price_Riot_Blast
.by <price_Riot_Bomb .by <price_Riot_Bomb
.by <price_Heavy_Riot_Bomb .by <price_Heavy_Riot_Bomb
.by <price_Baby_Digger
.by <price_Digger .by <price_Digger
.by <price_Heavy_Digger .by <price_Heavy_Digger
.by <price_Sandhog .by <price_Sandhog
@@ -309,6 +308,7 @@ WeaponPriceL
.by <price_Ton_of_Dirt .by <price_Ton_of_Dirt
.by <price_Liquid_Dirt .by <price_Liquid_Dirt
.by <price_Dirt_Charge .by <price_Dirt_Charge
.by <price_Propaganda
.by <price_Punch .by <price_Punch
.by <price_Buy_me .by <price_Buy_me
.by <price_Laser .by <price_Laser
@@ -355,16 +355,16 @@ WeaponUnits
.by 2 ;Riot_Blast ;_16 .by 2 ;Riot_Blast ;_16
.by 5 ;Riot_Bomb ;_17 .by 5 ;Riot_Bomb ;_17
.by 2 ;Heavy_Riot_Bomb;_18 .by 2 ;Heavy_Riot_Bomb;_18
.by 10 ;Baby_Digger ;_19 .by 5 ;Digger ;_19
.by 5 ;Digger ;_20 .by 2 ;Heavy_Digger ;_20
.by 2 ;Heavy_Digger ;_21 .by 5 ;Sandhog ;_21
.by 5 ;Sandhog ;_22 .by 2 ;Heavy_Sandhog ;_22
.by 2 ;Heavy_Sandhog ;_23 .by 5 ;Dirt_Clod ;_23
.by 5 ;Dirt_Clod ;_24 .by 3 ;Dirt_Ball ;_24
.by 3 ;Dirt_Ball ;_25 .by 1 ;Ton_of_Dirt ;_25
.by 1 ;Ton_of_Dirt ;_26 .by 4 ;Liquid_Dirt ;_26
.by 4 ;Liquid_Dirt ;_27 .by 2 ;Dirt_Charge ;_27
.by 2 ;Dirt_Charge ;_28 .by 4 ;Propaganda ;_28
.by 2 ;Punch ;_29 .by 2 ;Punch ;_29
.by 1 ;Buy_me ;_30 .by 1 ;Buy_me ;_30
.by 5 ;Laser ;_31 .by 5 ;Laser ;_31
@@ -393,11 +393,11 @@ PurchaseMeTable ;weapons good to be purchased by the robot
; "Napalm ","Hot Napalm ","Tracer ","Smoke Tracer " ; "Napalm ","Hot Napalm ","Tracer ","Smoke Tracer "
; "Baby Roller ","Roller ","Heavy Roller ","Riot Charge " ; "Baby Roller ","Roller ","Heavy Roller ","Riot Charge "
.by %11001110 .by %11001110
; "Riot Blast ","Riot Bomb ","Heavy Riot Bomb ","Baby Digger " ; "Riot Blast ","Riot Bomb ","Heavy Riot Bomb ","Digger "
; "Digger ","Heavy Digger ","Sandhog ","Heavy Sandhog " ; "Heavy Digger ","Sandhog ","Heavy Sandhog ","Dirt Clod "
.by %00000000 .by %00000000
; "Dirt Clod ","Dirt Ball ","Ton of Dirt ","Liquid Dirt " ; "Dirt Ball ","Ton of Dirt ","Liquid Dirt ","Dirt Charge "
; "Dirt Charge ","Punch ","Buy me! ","Laser " ; "Propaganda ","Punch ","Buy me! ","Laser "
.by %00000000 .by %00000000
; "White Flag ","Battery ","Hovercraft ","Parachute " ; "White Flag ","Battery ","Hovercraft ","Parachute "
; "Strong Parachute","Mag Deflector ","Shield ","Heavy Shield " ; "Strong Parachute","Mag Deflector ","Shield ","Heavy Shield "
@@ -414,11 +414,11 @@ PurchaseMeTable2 ;weapons good to be purchased by the robot (Cyborg)
; "Napalm ","Hot Napalm ","Tracer ","Smoke Tracer " ; "Napalm ","Hot Napalm ","Tracer ","Smoke Tracer "
; "Baby Roller ","Roller ","Heavy Roller ","Riot Charge " ; "Baby Roller ","Roller ","Heavy Roller ","Riot Charge "
.by %01000000 .by %01000000
; "Riot Blast ","Riot Bomb ","Heavy Riot Bomb ","Baby Digger " ; "Riot Blast ","Riot Bomb ","Heavy Riot Bomb ","Digger "
; "Digger ","Heavy Digger ","Sandhog ","Heavy Sandhog " ; "Heavy Digger ","Sandhog ","Heavy Sandhog ","Dirt Clod "
.by %00000000 .by %00000000
; "Dirt Clod ","Dirt Ball ","Ton of Dirt ","Liquid Dirt " ; "Dirt Ball ","Ton of Dirt ","Liquid Dirt ","Dirt Charge "
; "Dirt Charge ","Punch ","Buy me! ","Laser " ; "Propaganda ","Punch ","Buy me! ","Laser "
.by %00000000 .by %00000000
; "White Flag ","Battery ","Hovercraft ","Parachute " ; "White Flag ","Battery ","Hovercraft ","Parachute "
; "Strong Parachute","Mag Deflector ","Shield ","Heavy Shield " ; "Strong Parachute","Mag Deflector ","Shield ","Heavy Shield "
@@ -449,16 +449,16 @@ WeaponSymbols
.by $50 ;ind_Riot_Blast ;_16 .by $50 ;ind_Riot_Blast ;_16
.by $51 ;ind_Riot_Bomb ;_17 .by $51 ;ind_Riot_Bomb ;_17
.by $52 ;ind_Heavy_Riot_Bomb ;_18 .by $52 ;ind_Heavy_Riot_Bomb ;_18
.by $53 ;ind_Baby_Digger ;_19 .by $54 ;ind_Digger ;_19
.by $54 ;ind_Digger ;_20 .by $55 ;ind_Heavy_Digger ;_20
.by $55 ;ind_Heavy_Digger ;_21 .by $57 ;ind_Sandhog ;_21
.by $57 ;ind_Sandhog ;_22 .by $58 ;ind_Heavy_Sandhog ;_22
.by $58 ;ind_Heavy_Sandhog ;_23 .by $59 ;ind_Dirt_Clod ;_23
.by $59 ;ind_Dirt_Clod ;_24 .by $5a ;ind_Dirt_Ball ;_24
.by $5a ;ind_Dirt_Ball ;_25 .by $5b ;ind_Ton_of_Dirt ;_25
.by $5b ;ind_Ton_of_Dirt ;_26 .by $60 ;ind_Liquid_Dirt ;_26
.by $60 ;ind_Liquid_Dirt ;_27 .by $7b ;ind_Dirt_Charge ;_27
.by $7b ;ind_Dirt_Charge ;_28 .by $53 ;ind_Propaganda ;_28
.by $56 ;ind_Punch ;_29 .by $56 ;ind_Punch ;_29
.by $1f ;ind_Buy_me ;_30 .by $1f ;ind_Buy_me ;_30
.by $20 ;ind_Laser ;_31 .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 Blast"^ ; 16
dta d"Riot Bomb"^ ; 17 dta d"Riot Bomb"^ ; 17
dta d"Heavy Riot Bomb"^ ; 18 dta d"Heavy Riot Bomb"^ ; 18
dta d"Baby Digger"^ ; 19 dta d"Digger"^ ; 19
dta d"Digger"^ ; 20 dta d"Heavy Digger"^ ; 20
dta d"Heavy Digger"^ ; 21 dta d"Sandhog"^ ; 21
dta d"Sandhog"^ ; 22 dta d"Heavy Sandhog"^ ; 22
dta d"Heavy Sandhog"^ ; 23 dta d"Dirt Clod"^ ; 23
dta d"Dirt Clod"^ ; 24 dta d"Dirt Ball"^ ; 24
dta d"Dirt Ball"^ ; 25 dta d"Ton of Dirt"^ ; 25
dta d"Ton of Dirt"^ ; 26 dta d"Liquid Dirt"^ ; 26
dta d"Liquid Dirt"^ ; 27 dta d"Dirt Charge"^ ; 27
dta d"Dirt Charge"^ ; 28 dta d"Propaganda"^ ; 28
dta d"Stomp"^ ; 29 dta d"Stomp"^ ; 29
dta d"Best F...g Gifts"^ ; 30 dta d"Best F...g Gifts"^ ; 30
dta d"Laser"^ ; 31 dta d"Laser"^ ; 31
@@ -556,7 +556,7 @@ weaponsOfDeath ; weapons used in tank death animations
dta ind_Hot_Napalm ; why not? dta ind_Hot_Napalm ; why not?
dta ind_Riot_Bomb dta ind_Riot_Bomb
dta ind_Heavy_Riot_Bomb dta ind_Heavy_Riot_Bomb
dta ind_Baby_Digger dta ind_Propaganda
dta ind_Digger dta ind_Digger
dta ind_Heavy_Digger dta ind_Heavy_Digger
dta ind_Sandhog dta ind_Sandhog
@@ -614,7 +614,7 @@ CreditsStart
dta d"You were playing"^ dta d"You were playing"^
dta d"Scorch"^ dta d"Scorch"^
dta d"Warsaw, Miami"^ dta d"Warsaw, Miami"^
dta d"2000-2023"^ dta d"2000-2024"^
dta d" "* dta d" "*
dta d"Programming"^ dta d"Programming"^
dta d"Tomasz 'Pecus' Pecko"^ dta d"Tomasz 'Pecus' Pecko"^
@@ -672,13 +672,13 @@ CreditsEnd
.IF TARGET = 800 .IF TARGET = 800
CreditsLines=39 + 7 ; add 7 for scrollout CreditsLines=39 + 7 ; add 7 for scrollout
.ELIF TARGET = 5200 .ELIF TARGET = 5200
CreditsLines=33 + 7; add 7 for scrollout CreditsLines=33 + 7 ; add 7 for scrollout
.ENDIF .ENDIF
.IF TARGET = 5200 .IF TARGET = 5200
; Atari 5200 splash ; Atari 5200 splash
NewSplashText=* NewSplashText=*
dta d" 2023 atariage", $4e, "com " ; $4e - non blinking dot dta d" 2024 atariage", $4e, "com " ; $4e - non blinking dot
.ENDIF .ENDIF
.endif ; .IF *>0 .endif ; .IF *>0
+22 -20
View File
@@ -27,6 +27,8 @@ space = 0 ; space in screencodes
KeyRepeatSpeed = 8 ; (max 127 !!!) KeyRepeatSpeed = 8 ; (max 127 !!!)
FirstKeySpeed = 8 ; additional delay for first keypress FirstKeySpeed = 8 ; additional delay for first keypress
VuMeterTime = 12 ; Time of inactivity for VU Meter (1=5sec)
;character codes for symbols (tank, parachute, etc. ) ;character codes for symbols (tank, parachute, etc. )
; characters from tanks.fnt (graphics screen) ; characters from tanks.fnt (graphics screen)
char_parachute = $02 char_parachute = $02
@@ -69,16 +71,16 @@ price_Riot_Charge = 230 ;_15
price_Riot_Blast = 241 ;_16 price_Riot_Blast = 241 ;_16
price_Riot_Bomb = 259 ;_17 price_Riot_Bomb = 259 ;_17
price_Heavy_Riot_Bomb = 272 ;_18 price_Heavy_Riot_Bomb = 272 ;_18
price_Baby_Digger = 136 ;_19 price_Digger = 176 ;_19
price_Digger = 176 ;_20 price_Heavy_Digger = 207 ;_20
price_Heavy_Digger = 207 ;_21 price_Sandhog = 191 ;_21
price_Sandhog = 191 ;_22 price_Heavy_Sandhog = 223 ;_22
price_Heavy_Sandhog = 223 ;_23 price_Dirt_Clod = 104 ;_23
price_Dirt_Clod = 104 ;_24 price_Dirt_Ball = 130 ;_24
price_Dirt_Ball = 130 ;_25 price_Ton_of_Dirt = 171 ;_25
price_Ton_of_Dirt = 171 ;_26 price_Liquid_Dirt = 330 ;_26
price_Liquid_Dirt = 330 ;_27 price_Dirt_Charge = 343 ;_27
price_Dirt_Charge = 343 ;_28 price_Propaganda = 234 ;_28
price_Punch = 208 ;_29 price_Punch = 208 ;_29
price_Buy_me = 170 ;_30 price_Buy_me = 170 ;_30
price_Laser = 277 ;_31 price_Laser = 277 ;_31
@@ -119,16 +121,16 @@ ind_Riot_Charge = 15
ind_Riot_Blast = 16 ind_Riot_Blast = 16
ind_Riot_Bomb = 17 ind_Riot_Bomb = 17
ind_Heavy_Riot_Bomb = 18 ind_Heavy_Riot_Bomb = 18
ind_Baby_Digger = 19 ind_Digger = 19
ind_Digger = 20 ind_Heavy_Digger = 20
ind_Heavy_Digger = 21 ind_Sandhog = 21
ind_Sandhog = 22 ind_Heavy_Sandhog = 22
ind_Heavy_Sandhog = 23 ind_Dirt_Clod = 23
ind_Dirt_Clod = 24 ind_Dirt_Ball = 24
ind_Dirt_Ball = 25 ind_Ton_of_Dirt = 25
ind_Ton_of_Dirt = 26 ind_Liquid_Dirt = 26
ind_Liquid_Dirt = 27 ind_Dirt_Charge = 27
ind_Dirt_Charge = 28 ind_Propaganda = 28
ind_Punch = 29 ind_Punch = 29
ind_Buy_me = 30 ind_Buy_me = 30
ind_Laser = 31 ind_Laser = 31
+164 -76
View File
@@ -1,3 +1,5 @@
; @com.wudsn.ide.asm.mainsourcefile=scorch.asm
.IF *>0 ;this is a trick that prevents compiling this file alone .IF *>0 ;this is a trick that prevents compiling this file alone
; All main procedures of the game not dependent on hardware (I hope) :) ; All main procedures of the game not dependent on hardware (I hope) :)
@@ -16,8 +18,7 @@ START
jsr MakeDarkScreen jsr MakeDarkScreen
bit escFlag bit escFlag
bpl @+ bpl @+
lda CONSOL jsr CheckStartKey ; START KEY
and #%00000001 ; START KEY
bne START bne START
jmp StartAfterSplash ; reset all game option if Start key pressed (and Esc) jmp StartAfterSplash ; reset all game option if Start key pressed (and Esc)
@ @
@@ -124,24 +125,23 @@ CalculateGainsLoop
; if lose is greater than money then zero money ; if lose is greater than money then zero money
lda moneyH,x lda moneyH,x
cmp loseH,x cmp loseH,x
bcc zeromoney bne @+
bne substractlose
lda moneyL,x lda moneyL,x
cmp loseL,x cmp loseL,x
bcc zeromoney @ bcs substractlose
zeromoney
lda #0
sta moneyL,x
sta moneyH,x
beq skipzeroing
substractlose substractlose
sec ; sec ; C is allways set at this point
lda moneyL,x lda moneyL,x
sbc loseL,x sbc loseL,x
sta moneyL,x sta moneyL,x
lda moneyH,x lda moneyH,x
sbc loseH,x sbc loseH,x
sta moneyH,x sta moneyH,x
jmp skipzeroing
zeromoney
lda #0
sta moneyL,x
sta moneyH,x
skipzeroing skipzeroing
; and earned money for summary ; and earned money for summary
clc clc
@@ -155,24 +155,23 @@ skipzeroing
; if lose is greater than money then zero money ; if lose is greater than money then zero money
lda EarnedMoneyH,x lda EarnedMoneyH,x
cmp loseH,x cmp loseH,x
bcc ezeromoney bne @+
bne esubstractlose
lda EarnedMoneyL,x lda EarnedMoneyL,x
cmp loseL,x cmp loseL,x
bcc ezeromoney @ bcs esubstractlose
ezeromoney
lda #0
sta EarnedMoneyL,x
sta EarnedMoneyH,x
beq eskipzeroing
esubstractlose esubstractlose
sec ; sec ; C is allways set at this point
lda EarnedMoneyL,x lda EarnedMoneyL,x
sbc loseL,x sbc loseL,x
sta EarnedMoneyL,x sta EarnedMoneyL,x
lda EarnedMoneyH,x lda EarnedMoneyH,x
sbc loseH,x sbc loseH,x
sta EarnedMoneyH,x sta EarnedMoneyH,x
jmp eskipzeroing
ezeromoney
lda #0
sta EarnedMoneyL,x
sta EarnedMoneyH,x
eskipzeroing eskipzeroing
dex dex
@@ -385,11 +384,7 @@ RoboTanks
;ldx TankNr ;ldx TankNr
jsr DisplayStatus ; to make visible AI selected defensive (and offensive :) ) jsr DisplayStatus ; to make visible AI selected defensive (and offensive :) )
jsr MoveBarrelToNewPosition jsr MoveBarrelToNewPosition
lda kbcode jsr CheckExitKeys
cmp #@kbcode._esc ; 28 ; ESC
bne @+
jsr AreYouSure
@ bit escFlag
spl:rts ; keys Esc or O spl:rts ; keys Esc or O
@@ -585,7 +580,7 @@ NotLastPlayerInRound
; in X there is a number of tank that died ; in X there is a number of tank that died
lda #78 ; mumber of defensive text after BFG! ("VERY FUNNY.") lda #talk.VeryFunnyText ; mumber of defensive text after BFG! ("VERY FUNNY.")
bit AfterBFGflag ; check BFG flag bit AfterBFGflag ; check BFG flag
bmi TextAfterBFG bmi TextAfterBFG
; if BFG then no points for dead tanks ... ; if BFG then no points for dead tanks ...
@@ -732,14 +727,13 @@ NotNegativeShieldEnergy
.proc Seppuku .proc Seppuku
;--------------------------------- ;---------------------------------
lda #0 lda #0
sta ydraw+1
; get position of the tank ; get position of the tank
ldx TankNr ldx TankNr
; lda #0 ; turn off defense weapons when hara-kiring ; lda #0 ; turn off defense weapons when hara-kiring
sta ActiveDefenceWeapon,x sta ActiveDefenceWeapon,x
sta ShieldEnergy,x sta ShieldEnergy,x
jsr SetupXYdraw jsr SetupXYdraw
lda #1 ; Missile lda #ind_Missile ; Missile
jsr ExplosionDirect jsr ExplosionDirect
jmp MainRoundLoop.continueMainRoundLoopAfterSeppuku jmp MainRoundLoop.continueMainRoundLoopAfterSeppuku
.endp .endp
@@ -750,26 +744,32 @@ NotNegativeShieldEnergy
;out: Wind (word) ;out: Wind (word)
;uses: _ ;uses: _
;-------------------------------------------------- ;--------------------------------------------------
lda random
cmp MaxWind
bcs GetRandomWind ; if more than MaxWind then randomize again
sta Wind
mva #$00 Wind+1 mva #$00 Wind+1
sta Wind+2 sta Wind+2
sta Wind+3 sta Wind+3
@ lda random
sta Wind
beq noWind ; if 0 then nothing to do
cmp MaxWind
bcs @- ; if more than MaxWind then randomize again
; multiply Wind by 16 ; multiply Wind by 16
; two bytes of Wind are treated as a decimal part of vx variable ; two bytes of Wind are treated as a decimal part of vx variable
:4 aslw Wind :4 aslw Wind
; decide the direction ; decide the direction
lda random lda random
bmi @+ bmi noWindDirectionChange
sec ; Wind = -Wind sec ; Wind = -Wind
.rept 4 .rept 2
lda #$00 lda #$00
sbc Wind+# sbc Wind+#
sta Wind+# sta Wind+#
.endr .endr
@ rts lda #$ff
sta Wind+2
sta Wind+3
noWind
noWindDirectionChange
rts
.endp .endp
;-------------------------------------------------- ;--------------------------------------------------
.proc MaxForceCalculate .proc MaxForceCalculate
@@ -777,25 +777,16 @@ NotNegativeShieldEnergy
; Energy of tank X in A ; Energy of tank X in A
;-------------------------------------------------- ;--------------------------------------------------
sta L1 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 lda #0
ldy #9
clc clc
LP0 ror CYK ror
ror L1 ror L1
bcc B0 bcc NIE
clc clc
adc #10 ; (L2) multiplication by 10 adc #10 ; multiplication by 10
B0 dey NIE dey
bne LP0 bne CYK
ror
ror L1
sta MaxForceTableH,x sta MaxForceTableH,x
lda L1 lda L1
sta MaxForceTableL,x sta MaxForceTableL,x
@@ -934,26 +925,21 @@ MakeTanksVisible
; repeat untill NumberOfPlayers ; repeat untill NumberOfPlayers
ldx #0 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 GetRandomAgainX
txy ; destroy A!
dey
lda RANDOM lda RANDOM
and #$07 ;NumberOfPlayers < 7
cmp NumberOfPlayers cmp NumberOfPlayers
bcs GetRandomAgainX 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 ;now we have to check if the value was not used
;in previous slots ;in previous slots
stx temp
ldy temp
UsageLoop UsageLoop
cmp TankSequence,y cmp TankSequence,y
beq GetRandomAgainX ;apparently we have already used this value beq GetRandomAgainX ;apparently we have already used this value
@@ -961,14 +947,11 @@ UsageLoop
bpl UsageLoop bpl UsageLoop
;well, looks like this value is new! ;well, looks like this value is new!
inx
sta TankSequence,x sta TankSequence,x
inx
stx temp cpx NumberOfPlayers
inc:lda temp ;x+1 bcc GetRandomAgainX
cmp NumberOfPlayers
bne GetRandomAgainX
rts rts
.endp .endp
;---------------------------------------------- ;----------------------------------------------
@@ -979,9 +962,7 @@ UsageLoop
;---------------------------------------------- ;----------------------------------------------
; lets randomize someting between 0 and 180 ; lets randomize someting between 0 and 180
lda RANDOM randomize 0 180
cmp #180
bcs RandomizeAngle
rts rts
.endp .endp
;---------------------------------------------- ;----------------------------------------------
@@ -1044,10 +1025,9 @@ LimitForce
;---------------------------------------------- ;----------------------------------------------
mva #1 Erase mva #1 Erase
jsr DrawTankNr.BarrelChange jsr DrawTankNr.BarrelChange
mva #0 Erase
MoveBarrel MoveBarrel
mva #sfx_set_power_2 sfx_effect mva #sfx_set_power_2 sfx_effect
jsr DrawTankNr jsr PutTankNr ; and Erase = 0
jsr DisplayStatus.displayAngle jsr DisplayStatus.displayAngle
; ;
jsr CheckExitKeys jsr CheckExitKeys
@@ -1060,7 +1040,6 @@ MoveBarrel
jsr WaitOneFrame jsr WaitOneFrame
AIaim AIaim
jsr DrawTankNr.BarrelChange jsr DrawTankNr.BarrelChange
mva #0 Erase
lda NewAngle lda NewAngle
cmp AngleTable,x cmp AngleTable,x
beq BarrelPositionIsFine beq BarrelPositionIsFine
@@ -1072,11 +1051,32 @@ rotateLeft ; older is bigger
dec angleTable,x dec angleTable,x
jmp MoveBarrel jmp MoveBarrel
BarrelPositionIsFine BarrelPositionIsFine
jmp DrawTankNr jmp PutTankNr ; and Erase = 0
; rts ; rts
.endp .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 ; .proc SortSequence ;
;---------------------------------------------- ;----------------------------------------------
@@ -1429,4 +1429,92 @@ FinishResultDisplay
jmp TypeLine4x4 ; jsr:rts jmp TypeLine4x4 ; jsr:rts
.endp .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
; Let's go!
jsr ClearTanks
; store all angles
ldx NumberOfPlayers
dex
@ lda AngleTable,x
sta previousAngle,x
lda #0
sta AngleTable,x
dex
bpl @-
jsr DrawTanks
; let's go!
Meter
mva #1 Erase
jsr drawbarrels ; clear barrels
ldx NumberOfPlayers
@ txa
and #%00000001
tay
lda trackn_audc+2,y
:4 asl
sta AngleTable,x
dex
bpl @-
mva #0 Erase
jsr drawbarrels ; draw barrels
jsr WaitOneFrame
jsr GetKeyFast
cmp #@kbcode._none
beq Meter
; restore all angles
jsr ClearTanks
ldx NumberOfPlayers
dex
@ 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
;-----------
drawbarrels
lda TankNr
pha
ldx NumberOfPlayers
dex
stx TankNr
DrawNextTank
lda eXistenZ,x
beq nobarrel ; if energy=0 then no tank
jsr drawtanknr.BarrelChange
nobarrel
dec TankNr
ldx TankNr
bpl DrawNextTank
pla
sta TankNr
rts
.endp
.ENDIF
.ENDIF .ENDIF
+79 -78
View File
@@ -362,11 +362,12 @@ not_endcircleloop
lda ycircle lda ycircle
adc YC adc YC
sta ydraw sta ydraw
sta tempcir sta ytempDRAW
lda ycircle+1 lda ycircle+1
adc #$00 adc #$00
sta ydraw+1 sta ydraw+1
sta tempcir+1 sta ytempDRAW+1
; plot xcircle+XC,ycircle+YC
jsr plot jsr plot
sec sec
@@ -376,6 +377,7 @@ not_endcircleloop
lda ycircle+1 lda ycircle+1
sbc #$00 sbc #$00
sta ydraw+1 sta ydraw+1
; plot xcircle+XC,ycircle-YC
jsr plot jsr plot
sec sec
@@ -385,54 +387,60 @@ not_endcircleloop
lda xcircle+1 lda xcircle+1
sbc #0 sbc #0
sta xdraw+1 sta xdraw+1
; plot xcircle-XC,ycircle-YC
jsr plot jsr plot
lda tempcir lda ytempDRAW
sta ydraw sta ydraw
lda tempcir+1 lda ytempDRAW+1
sta ydraw+1 sta ydraw+1
; plot xcircle-XC,ycircle+YC
jsr plot jsr plot
;--- ;---
clc clc
lda xcircle lda xcircle
adc yC adc YC
sta xdraw sta xdraw
lda xcircle+1 lda xcircle+1
adc #0 adc #0
sta xdraw+1 sta xdraw+1
;clc ;clc
lda ycircle lda ycircle
adc xC adc XC
sta ydraw sta ydraw
sta tempcir sta ytempDRAW
lda ycircle+1 lda ycircle+1
adc #$00 adc #$00
sta ydraw+1 sta ydraw+1
sta tempcir+1 sta ytempDRAW+1
; plot xcircle+YC,ycircle+XC
jsr plot jsr plot
sec sec
lda ycircle lda ycircle
sbc xC sbc XC
sta ydraw sta ydraw
lda ycircle+1 lda ycircle+1
sbc #$00 sbc #$00
sta ydraw+1 sta ydraw+1
; plot xcircle+YC,ycircle-XC
jsr plot jsr plot
sec sec
lda xcircle lda xcircle
sbc yC sbc YC
sta xdraw sta xdraw
lda xcircle+1 lda xcircle+1
sbc #0 sbc #0
sta xdraw+1 sta xdraw+1
; plot xcircle-YC,ycircle-XC
jsr plot jsr plot
lda tempcir lda ytempDRAW
sta ydraw sta ydraw
lda tempcir+1 lda ytempDRAW+1
sta ydraw+1 sta ydraw+1
; plot xcircle-YC,ycircle+XC
jsr plot jsr plot
;----- ;-----
@@ -450,7 +458,7 @@ not_endcircleloop
sbc FX sbc FX
sbc #4 sbc #4
sta FS sta FS
jmp endif01 jmp circleloop ; endif01
else01 else01
dec YC dec YC
sec sec
@@ -468,7 +476,7 @@ else01
endif01 endif01
jmp circleloop jmp circleloop
.endp .endp
;-------------------------------*------------------ ;--------------------------------------------------
.proc placetanks .proc placetanks
;-------------------------------------------------- ;--------------------------------------------------
ldx #(MaxPlayers-1) ;maxNumberOfPlayers-1 ldx #(MaxPlayers-1) ;maxNumberOfPlayers-1
@@ -584,35 +592,38 @@ UnequalTanks
;------------------------------------------------- ;-------------------------------------------------
.proc ClearTanks .proc ClearTanks
jsr PMoutofScreen jsr PMoutofScreen
mva #1 Erase ; erase tanks flag lda #1 ; erase tanks flag
bne drawtanks.era
.endp .endp
;------------------------------------------------- ;-------------------------------------------------
.proc drawtanks .proc drawtanks
;------------------------------------------------- ;-------------------------------------------------
lda #0 ; no erase tanks flag
era sta Erase
lda TankNr lda TankNr
pha pha
ldx #$00 ldx NumberOfPlayers
dex
stx TankNr stx TankNr
DrawNextTank DrawNextTank
jsr drawtanknr jsr drawtanknr
inc TankNr dec TankNr
ldx TankNr ldx TankNr
Cpx NumberOfPlayers bpl DrawNextTank
bne DrawNextTank
pla pla
sta TankNr sta TankNr
mva #0 Erase ; no erase tanks flag
rts rts
.endp .endp
;--------- ;---------
ClearTankNr ClearTankNr
mva #1 Erase lda #1 ; erase tank flag
bne DrawTankNr bne @er
PutTankNr PutTankNr
mva #0 Erase lda #0 ; no erase tank flag
@er sta Erase
.proc DrawTankNr .proc DrawTankNr
ldx tankNr ldx tankNr
; let's check the energy ; let's check the energy
@@ -797,8 +808,7 @@ DoNotDrawTankNr
; number of blinking tank in TankNr ; number of blinking tank in TankNr
mva #18 fs ; temp, how many times flash the tank mva #18 fs ; temp, how many times flash the tank
tankflash_loop tankflash_loop
lda CONSOL ; turbo mode jsr CheckStartKey ; START KEY
and #%00000001 ; START KEY
sne:mva #1 fs ; finish it sne:mva #1 fs ; finish it
mva #1 Erase mva #1 Erase
ldx TankNr ldx TankNr
@@ -975,27 +985,25 @@ ToHighToParachute
; ;
; this proc change xdraw, ydraw and temp! ; this proc change xdraw, ydraw and temp!
;-------------------------------------------------- ;--------------------------------------------------
lda XtankstableL,x
sta xdraw
lda XtankstableH,x
sta xdraw+1
; one pixel under tank ; one pixel under tank
clc clc
lda Ytankstable,x lda Ytankstable,x
adc #1 adc #1
sta ydraw sta ydraw
mva #0 ydraw+1 mva #0 ydraw+1
lda XtankstableL,x ; plot one (first - clear) and 6 random color pixels
sta xdraw mvy #7 temp
lda XtankstableH,x
sta xdraw+1
; clear first pixel under tank ; clear first pixel under tank
mva #0 color bne @pl ; A=0
jsr plot
inw xdraw
; plot 6 random color pixels
mva #6 temp
@ lda Erase @ lda Erase
eor #%00000001 eor #%00000001
and random and random
and #%00000001 and #%00000001
sta color @pl sta color
jsr plot jsr plot
inw xdraw inw xdraw
dec temp dec temp
@@ -1064,7 +1072,7 @@ DoNotClearParachute
sta temp ; Loop Counter sta temp ; Loop Counter
ByteBelowTank ByteBelowTank
jsr point_plot jsr point_plot
beq EmptyPoint2 bne EmptyPoint2
sec sec
ror UnderTank2 ror UnderTank2
sec sec
@@ -1310,8 +1318,7 @@ NoClearTanks
.IF TARGET >= 800 .IF TARGET >= 800
lda FastSoilDown lda FastSoilDown
bne GoFast bne GoFast
lda CONSOL jsr CheckStartKey ; START KEY
and #%00000001 ; START KEY
bne @+ bne @+
GoFast GoFast
jmp SoilDownTurbo.NoClearTanks jmp SoilDownTurbo.NoClearTanks
@@ -1331,18 +1338,14 @@ NextColumn1
mwa #0 ydraw mwa #0 ydraw
NextPoint1 NextPoint1
jsr point_plot jsr point_plot
beq StillNothing beq FoundFirstPoint
ldy #0
lda ydraw
sta (tempor2),y
sta (temp),y
jmp FoundPeek1
StillNothing StillNothing
inc ydraw inc ydraw
lda ydraw lda ydraw
cmp #screenheight cmp #screenheight
bne NextPoint1 bne NextPoint1
; no pixels on whole column !!! ; no pixels on whole column !!!
FoundFirstPoint
ldy #0 ldy #0
lda ydraw lda ydraw
sta (tempor2),y sta (tempor2),y
@@ -1352,16 +1355,14 @@ FoundPeek1
inw temp inw temp
inw xdraw inw xdraw
;vcmp xdraw,screenwidth,NextColumn1 ;vcmp xdraw,screenwidth,NextColumn1
cpw xdraw RangeRight cpw RangeRight xdraw
bcc NextColumn1 bcs NextColumn1
beq NextColumn1
; we have both tables filled with starting values ; we have both tables filled with starting values
; main loop starts here ; main loop starts here
MainFallout2 MainFallout2
.IF TARGET >= 800 .IF TARGET >= 800
lda CONSOL jsr CheckStartKey ; START KEY
and #%00000001 ; START KEY
bne NoFastDown bne NoFastDown
jmp SoilDownTurbo.NoClearTanks jmp SoilDownTurbo.NoClearTanks
NoFastDown NoFastDown
@@ -1389,7 +1390,7 @@ FalloutOfLine
; and checking if there is a pixel there ; and checking if there is a pixel there
sta ydraw sta ydraw
jsr point_plot jsr point_plot
bne ThereIsPixelHere beq ThereIsPixelHere
; if no pixel we plot it ; if no pixel we plot it
mva #1 color mva #1 color
jsr plot.MakePlot jsr plot.MakePlot
@@ -1410,9 +1411,8 @@ ColumnIsReady
inw tempor2 inw tempor2
inw xdraw inw xdraw
;vcmp xdraw,screenwidth,FalloutOfLine ;vcmp xdraw,screenwidth,FalloutOfLine
cpw xdraw RangeRight cpw RangeRight xdraw
bcc FalloutOfLine bcs FalloutOfLine
beq FalloutOfLine
jsr CheckExitKeys ; Check for O, Esc or Start+Option keys jsr CheckExitKeys ; Check for O, Esc or Start+Option keys
spl:rts ; exit if pressed 'Exit keys' spl:rts ; exit if pressed 'Exit keys'
@@ -1421,7 +1421,7 @@ ColumnIsReady
; level of the mountains ; level of the mountains
jeq MainFallout2 jeq MainFallout2
; now correct heights are in the mountaintable ; 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 NothingToFall
jmp DrawTanks jmp DrawTanks
; rts ; rts
@@ -1433,7 +1433,7 @@ NothingToFall
mwa #0 xdraw mwa #0 xdraw
; starting point ; starting point
getrandomY ;getting random Y coordinate /* getrandomY ;getting random Y coordinate
; sec ; ??? ; sec ; ???
lda random lda random
cmp #screenheight-(margin*4) ;it means that max line=199 cmp #screenheight-(margin*4) ;it means that max line=199
@@ -1441,8 +1441,8 @@ getrandomY ;getting random Y coordinate
; clc ; C is clear ; clc ; C is clear
adc #(margin*2) adc #(margin*2)
sta ydraw sta ydraw
sta yfloat+1 sta yfloat+1 */
mva #0 yfloat ;yfloat equals to e.g. 140.0 sta yfloat ;yfloat equals to e.g. 140.0 (A=0)
mva #screenheight-margin-5 yfloat+1 mva #screenheight-margin-5 yfloat+1
sta ydraw sta ydraw
@@ -1460,23 +1460,21 @@ NextPart
sta delta+1 ; before the dot (delta+1.delta) sta delta+1 ; before the dot (delta+1.delta)
lda random lda random
and #$01 ;random sign (+/- or up/down) ; and #$01 ;random sign (+/- or up/down)
sta UpNdown sta UpNdown
; theoretically we have here ready ; theoretically we have here ready
; fixed-point delta value ; fixed-point delta value
; (-1*(UpNdown))*(delta+1.delta) ; (-1*(UpNdown.7th.bit))*(delta+1.delta)
;loop drawing one line ;loop drawing one line
ChangingDirection ChangingDirection
lda random ;length of the line lda random ;length of the line
and #$0f ;max line length and #$0f ;max line length
tax clc
inx adc #3
inx sta deltaX
inx
stx deltaX
OnePart OnePart
jsr placeTanks.CheckTank jsr placeTanks.CheckTank
@@ -1493,8 +1491,8 @@ OnePart
sta (modify),y sta (modify),y
; Up or Down ; Up or Down
lda UpNdown bit UpNdown
beq ToBottom bpl ToBottom
ToTop ;it means substracting ToTop ;it means substracting
;sbw yfloat delta ;sbw yfloat delta
@@ -1509,8 +1507,8 @@ ToTop ;it means substracting
cmp #margin cmp #margin
bcs @+ bcs @+
; if smaller than 10 ; if smaller than 10
ldx #$00 ; ldy #$00
stx UpNdown sty UpNdown ; Y=0
jmp @+ jmp @+
ToBottom ToBottom
@@ -1526,8 +1524,8 @@ ToBottom
cmp #screenheight-margin cmp #screenheight-margin
bcc @+ bcc @+
; if higher than screen ; if higher than screen
ldx #$01 dey ; Y=0
stx UpNdown sty UpNdown ; Y=$ff
@ @
sta ydraw sta ydraw
@@ -1646,8 +1644,15 @@ notZero
sta temp sta temp
lda xtankstableH,y lda xtankstableH,y
sta temp+1 sta temp+1
;now we should substract length of the text-1 jsr Calculate4x4TextPosition
;temp2 = (fx-1)*2 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 ldy fx
dey dey
tya tya
@@ -1742,11 +1747,8 @@ DOTOldLowestValue
lda temp2 lda temp2
sbc #(4+9) ;9 pixels above ground (and tanks...) sbc #(4+9) ;9 pixels above ground (and tanks...)
sta LineYdraw sta LineYdraw
rts
jmp TypeLine4x4.noLengthNoColor ; rts
.endp .endp
;-------------------------------------------------------- ;--------------------------------------------------------
.proc DisplayTankNameAbove ; TankNr in X .proc DisplayTankNameAbove ; TankNr in X
txa ; TankNr txa ; TankNr
@@ -1870,8 +1872,7 @@ quit_areyousure
mva #20 fs ; temp, how many times blink the billboard mva #20 fs ; temp, how many times blink the billboard
seppuku_loop seppuku_loop
lda CONSOL ; turbo mode jsr CheckStartKey ; START KEY
and #%00000001 ; START KEY
sne:mva #1 fs ; finish it sne:mva #1 fs ; finish it
mva #4 ResultY ; where seppuku text starts Y-wise on the screen mva #4 ResultY ; where seppuku text starts Y-wise on the screen
+51 -224
View File
@@ -4,33 +4,44 @@
;--------------------------------------------------- ;---------------------------------------------------
;by Tomasz 'pecus' Pecko and Pawel 'pirx' Kalinowski ;by Tomasz 'pecus' Pecko and Pawel 'pirx' Kalinowski
;Warsaw 2000, 2001, 2002, 2003, 2009, 2012, 2013 ;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 -5200 -cart ${outputFilePath} -cart-type 4
;atari800 -run ${outputFilePath} ;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 .IFNDEF TARGET
.def TARGET = 800 ; 5200 .def TARGET = 800 ; 5200
.ENDIF .ENDIF
;--------------------------------------------------- ;---------------------------------------------------
.def CART_VERSION = 0 .ifndef SPLASH
; if 1 - dual splash screen .def SPLASH = 0 ; if 0 - no splash screens
.def METEORS = 1 .endif
; if 1 - meteors on game .ifndef CART_VERSION
.def XCORRECTION_FOR_PM = 0 .def CART_VERSION = 0 ; if 1 - dual splash screen
; if 1 - active x position of tanks correction fo PMG .endif
.def FASTER_GRAF_PROCS = 1 .def METEORS = 1 ; if 1 - meteors on game
; if 1 - activates faster graphics routines .def VU_METER = 1 ; if 1 - VU Meter on game
; (direct writes to screen memory - atari only :) ) .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 OPT r+ ; saves 10 bytes, and probably works :) https://github.com/tebe6502/Mad-Assembler/issues/10
;--------------------------------------------------- ;---------------------------------------------------
.macro build .macro build
dta d"1.43" ; number of this build (4 bytes) dta d"S.50" ; number of this build (4 bytes)
.endm .endm
.macro RMTSong .macro RMTSong
@@ -186,11 +197,22 @@ FirstZpageVariable = $50
.IF TARGET = 800 .IF TARGET = 800
icl 'Atari/lib/ATARISYS.ASM' icl 'Atari/lib/ATARISYS.ASM'
icl 'Atari/lib/MACRO.ASM' icl 'Atari/lib/MACRO.ASM'
icl 'artwork/splash_v2/splash.asm' ; new splash screen and musix .IF SPLASH = 1
.IF CART_VERSION icl 'artwork/splash_v2/splash.asm' ; new splash screen and musix
icl 'artwork/splash_v1/splash.asm' ; old splash screen (plays music from new splash) .IF CART_VERSION = 1
.ENDIF icl 'artwork/splash_v1/splash.asm' ; old splash screen (plays music from new splash)
; icl 'Atari/Manual/manual.asm' ; manuals display .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 .ELIF TARGET = 5200
OPT h-f+ ; no headers, single block --> cart bin file OPT h-f+ ; no headers, single block --> cart bin file
icl 'Atari/lib/5200SYS.ASM' icl 'Atari/lib/5200SYS.ASM'
@@ -212,7 +234,7 @@ FirstZpageVariable = $50
_M = $0d _M = $0d
_S = $0e _S = $0e
_atari = $fd ; not used in 5200 _atari = $fd ; not used in 5200
_ret = $fd ; not used in 5200 _ret = $0c ; fire in 5200
_none = $0f _none = $0f
.ende .ende
.ENDIF .ENDIF
@@ -336,7 +358,11 @@ StartAfterSplash
.IF CART_VERSION = 1 .IF CART_VERSION = 1
mva #$ff GradientNr ; #1 to set gradient number 2 :) (next one) - 0 (B/W) mva #$ff GradientNr ; #1 to set gradient number 2 :) (next one) - 0 (B/W)
.ELSE .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 .ENDIF
jsr SelectNextGradient.NotWind jsr SelectNextGradient.NotWind
@@ -404,169 +430,12 @@ NoRMT_PALchange
sta JoystickNumber sta JoystickNumber
.IF TARGET = 800 ; second joy button state update only on A800 .IF TARGET = 800 ; second joy button state update only on A800
jsr WaitOneFrame ; is necessary for update shadow registers (PADDL0) in VBI 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 .ELSE
rts rts
.ENDIF .ENDIF
.endp .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 MakeDarkScreen
@@ -577,8 +446,7 @@ MakeDarkScreen
;-------------------------------------------------- ;--------------------------------------------------
.proc WaitOneFrame .proc WaitOneFrame
;-------------------------------------------------- ;--------------------------------------------------
lda CONSOL jsr CheckStartKey ; START KEY
and #%00000001 ; START KEY
seq:wait ; or waitRTC ? seq:wait ; or waitRTC ?
rts rts
.endp .endp
@@ -595,54 +463,11 @@ MakeDarkScreen
rts rts
.endp .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 .proc ShellDelay
;-------------------------------------------------- ;--------------------------------------------------
ldy flyDelay ldy flyDelay
Y lda CONSOL Y jsr CheckStartKey ; START KEY
and #%00000001 ; START KEY
beq noShellDelay beq noShellDelay
DelayLoop DelayLoop
lda VCOUNT lda VCOUNT
@@ -693,6 +518,8 @@ noingame
bne @- bne @-
rts rts
.endp .endp
;--------------------------------------------------
icl 'Atari/inputs.asm'
;-------------------------------------------------- ;--------------------------------------------------
icl 'Atari/interrupts.asm' icl 'Atari/interrupts.asm'
;---------------------------------------------- ;----------------------------------------------
@@ -707,7 +534,7 @@ noingame
;---------------------------------------------- ;----------------------------------------------
icl 'ai.asm' icl 'ai.asm'
;---------------------------------------------- ;----------------------------------------------
icl 'artwork/talk.asm' icl 'artwork/scorch-spanish-talk.asm'
;---------------------------------------------- ;----------------------------------------------
TankFont TankFont
ins 'artwork/tanksv4.fnt',+0,384 ; 48 characters only ins 'artwork/tanksv4.fnt',+0,384 ; 48 characters only
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 ;by Tomasz 'pecus' Pecko and Pawel 'pirx' Kalinowski
;Warsaw 2000, 2001, 2002, 2003, 2009, 2012, 2013 ;Warsaw 2000, 2001, 2002, 2003, 2009, 2012, 2013
;Miami & Warsaw 2022, 2023 ;Miami & Warsaw 2022, 2023, 2024
;--------------------------------------------------- ;---------------------------------------------------
.def TARGET = 64 ; :) .def TARGET = 64 ; :)
@@ -14,6 +14,7 @@
; if 1 - activates faster graphics routines ; if 1 - activates faster graphics routines
; (direct writes to screen memory - C64 only :) ) ; (direct writes to screen memory - C64 only :) )
;--------------------------------------------------- ;---------------------------------------------------
.def VU_METER = 0 ; allways 0! (works only on Atari)
opt h-f+ opt h-f+
@@ -24,7 +25,7 @@
;--------------------------------------------------- ;---------------------------------------------------
.macro build .macro build
dta d"1.43" ; number of this build (4 bytes) dta d"1.50" ; number of this build (4 bytes)
.endm .endm
.macro RMTSong .macro RMTSong
@@ -35,8 +36,9 @@
icl 'definitions.asm' icl 'definitions.asm'
;--------------------------------------------------- ;---------------------------------------------------
FirstZpageVariable = $52 ; $57 FirstZpageVariable = $51 ; $57
.zpvar DliColorBack .byte = FirstZpageVariable .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 MeteorsFlag .byte ; set 7th bit - block meteors
.zpvar MeteorsRound .byte ; set 7th bit - block meteors in round .zpvar MeteorsRound .byte ; set 7th bit - block meteors in round
.zpvar GradientNr .byte .zpvar GradientNr .byte
@@ -246,63 +248,6 @@ StartAfterSplash
rts rts
.endp .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 MakeDarkScreen
;-------------------------------------------------- ;--------------------------------------------------
@@ -311,7 +256,8 @@ MakeDarkScreen
;-------------------------------------------------- ;--------------------------------------------------
.proc WaitOneFrame .proc WaitOneFrame
;-------------------------------------------------- ;--------------------------------------------------
wait ; or waitRTC ? jsr CheckStartKey ; START KEY
seq:wait ; or waitRTC ?
rts rts
.endp .endp
@@ -327,22 +273,11 @@ MakeDarkScreen
rts rts
.endp .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 .proc ShellDelay
ldy flyDelay ldy flyDelay
Y Y jsr CheckStartKey ; START KEY
beq noShellDelay
DelayLoop DelayLoop
lda $d012 lda $d012
@ cmp $d012 @ cmp $d012
@@ -364,6 +299,8 @@ noShellDelay
.proc CopyFromRom .proc CopyFromRom
rts rts
.endp .endp
;--------------------------------------------------
icl 'C64/inputs.asm'
;-------------------------------------------------- ;--------------------------------------------------
icl 'C64/interrupts.asm' icl 'C64/interrupts.asm'
;---------------------------------------------- ;----------------------------------------------
BIN
View File
Binary file not shown.
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) skilltable ; computer controlled players' skills (1-8), 0 - human (no cleaning, ticket #30)
.DS MaxPlayers .DS MaxPlayers
;---------------------------------------------------- ;----------------------------------------------------
JoyNumber ; Joystick port number (from 0 to 3)
.DS MaxPlayers
;----------------------------------------------------
variablesToInitialize variablesToInitialize
;Options DO NOT ZERO ON RESTART GAME - ticket #27 ;Options DO NOT ZERO ON RESTART GAME - ticket #27
OptionsTable .ds maxOptions ;.by 0,1,2,2,0,1,3,2,0 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 .DS MaxPlayers
LowResDistances ; coarse tank positions divided by 4 (to be in just one byte) LowResDistances ; coarse tank positions divided by 4 (to be in just one byte)
.DS MaxPlayers .DS MaxPlayers
JoyNumber ; Joystick port number (from 0 to 3)
.DS MaxPlayers
TankShape ; Tank shape number (from 0 to 2)
.DS MaxPlayers
;---------------------------------------------------- ;----------------------------------------------------
TargetTankNr ; Target tank index (for AI routines) TargetTankNr ; Target tank index (for AI routines)
.DS 1 .DS 1
@@ -170,6 +169,8 @@ SecondTryFlag ; For precise AI aiming
;Erase .DS 1 ; if 1 only mask of the character is printed ;Erase .DS 1 ; if 1 only mask of the character is printed
; on the graphics screen. if 0 character is printed normally ; on the graphics screen. if 0 character is printed normally
TankShape ; Tank shape number (from 0 to 2)
.DS MaxPlayers
;---------------------------------------------------- ;----------------------------------------------------
;RangeLeft .DS 2 ;range of the soil to be fallen down ;RangeLeft .DS 2 ;range of the soil to be fallen down
;RangeRight .DS 2 ;it is being set by all Explosions ;RangeRight .DS 2 ;it is being set by all Explosions
@@ -210,7 +211,7 @@ YHit .DS 2
;radius .DS 1 ;radius .DS 1
;xcircle .DS 2 ;xcircle .DS 2
;ycircle .DS 2 ;ycircle .DS 2
tempcir .DS 2 ;tempcir .DS 2
;TankFalls ;TankFalls
FallingSoundBit .DS 1 FallingSoundBit .DS 1
PreviousFall .DS 1 PreviousFall .DS 1
@@ -219,6 +220,7 @@ EndOfTheFallFlag .DS 1 ; in case of the infinite fall
;FloatingAlt .DS 1 ; floating tank altitude ;FloatingAlt .DS 1 ; floating tank altitude
FunkyWallFlag = FloatingAlt ; reuse this variable in different weapon (Funky Bomb)! FunkyWallFlag = FloatingAlt ; reuse this variable in different weapon (Funky Bomb)!
PreferHumansFlag = FloatingAlt ; second reuse in AI Aim proc PreferHumansFlag = FloatingAlt ; second reuse in AI Aim proc
;PreferHumansFlag .DS 1
;---------------------------------------------------- ;----------------------------------------------------
;Flight ;Flight
;variables for 5 missiles (used for mirv) ;variables for 5 missiles (used for mirv)
+127 -144
View File
@@ -41,16 +41,16 @@ ExplosionRoutines
.word riotblast-1 ;Riot_Blast ;_16 .word riotblast-1 ;Riot_Blast ;_16
.word riotbomb-1 ;Riot_Bomb ;_17 .word riotbomb-1 ;Riot_Bomb ;_17
.word heavyriotbomb-1 ;Heavy_Riot_Bomb;_18 .word heavyriotbomb-1 ;Heavy_Riot_Bomb;_18
.word babydigger-1 ;Baby_Digger ;_19 .word digger-1 ;Digger ;_19
.word digger-1 ;Digger ;_20 .word heavydigger-1 ;Heavy_Digger ;_20
.word heavydigger-1 ;Heavy_Digger ;_21 .word sandhog-1 ;Sandhog ;_21
.word sandhog-1 ;Sandhog ;_22 .word heavysandhog-1 ;Heavy_Sandhog ;_22
.word heavysandhog-1 ;Heavy_Sandhog ;_23 .word dirtclod-1 ;Dirt_Clod ;_23
.word dirtclod-1 ;Dirt_Clod ;_24 .word dirtball-1 ;Dirt_Ball ;_24
.word dirtball-1 ;Dirt_Ball ;_25 .word tonofdirt-1 ;Ton_of_Dirt ;_25
.word tonofdirt-1 ;Ton_of_Dirt ;_26 .word liquiddirt-1 ;Liquid_Dirt ;_26
.word liquiddirt-1 ;Liquid_Dirt ;_27 .word dirtcharge-1 ;Dirt_Charge ;_27
.word dirtcharge-1 ;Dirt_Charge ;_28 .word propaganda-1 ;Propaganda ;_28
.word punch-1 ;Baby_Sandhog ;_29 .word punch-1 ;Baby_Sandhog ;_29
.word BFG-1 ;Buy_me ;_30 .word BFG-1 ;Buy_me ;_30
.word laser-1 ;Laser ;_31 .word laser-1 ;Laser ;_31
@@ -261,6 +261,7 @@ RepeatNapalm ; external loop (for fire animation)
mwa xcircle xdraw mwa xcircle xdraw
sbw xdraw #(napalmRadius) ; 10 pixels on left side hit point sbw xdraw #(napalmRadius) ; 10 pixels on left side hit point
ldy #0 ldy #0
sty Erase ; becouse Erase flag is set!
sty magic+1 sty magic+1
RepeatFlame ; internal loop (draw flames) RepeatFlame ; internal loop (draw flames)
ldy #0 ldy #0
@@ -380,9 +381,73 @@ GoRiotBomb
; jmp xriotbomb ; jmp xriotbomb
.endp .endp
; ------------------------ ; ------------------------
.proc babydigger .proc propaganda
lda #1 ; diggery ; how many branches (-1) ; It floods the target with propaganda texts.
GoBabydiggerSFX 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 sta diggery
mva #sfx_digger sfx_effect mva #sfx_digger sfx_effect
mva #0 sandhogflag mva #0 sandhogflag
@@ -390,14 +455,9 @@ GoBabydiggerSFX
bne xdigger bne xdigger
.endp .endp
; ------------------------ ; ------------------------
.proc digger ;
lda #3 ; diggery ; how many branches (-1)
bne babydigger.GoBabydiggerSFX
.endp
; ------------------------
.proc heavydigger .proc heavydigger
lda #7 ; diggery ; how many branches (-1) lda #7 ; diggery ; how many branches (-1)
bne babydigger.GoBabydiggerSFX bne digger.GoDiggerSFX
.endp .endp
; ------------------------ ; ------------------------
.proc babysandhog .proc babysandhog
@@ -1188,19 +1248,9 @@ DeadTank
ldx TankNr ldx TankNr
;Checking the maximal force ;Check and set the maximal force
lda MaxForceTableH,x jsr RandomizeForce.LimitForce ; only limit (no randomize)
cmp ForceTableH,x
bne ContinueToCheckMaxForce2
lda MaxForceTableL,x
cmp ForceTableL,x
ContinueToCheckMaxForce2
bcs @+
lda MaxForceTableH,x
sta ForceTableH,x
lda MaxForceTableL,x
sta ForceTableL,x
@
jsr PutTankNameOnScreen jsr PutTankNameOnScreen
; jsr DisplayStatus ; There is no need anymore, it is always after PutTankNameOnScreen ; jsr DisplayStatus ; There is no need anymore, it is always after PutTankNameOnScreen
@@ -1212,35 +1262,29 @@ ContinueToCheckMaxForce2
bpl @+ bpl @+
jsr Shoot.AfterOffensiveText ; Lazy Darwin - aiming visualisation jsr Shoot.AfterOffensiveText ; Lazy Darwin - aiming visualisation
@ @
.IF VU_METER = 1
; VU meter timer reset
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
;keyboard reading ;keyboard reading
; KBCODE keeps code of last keybi ; KBCODE keeps code of last keybi
; SKSTAT $ff - nothing pressed ; SKSTAT $ff - nothing pressed
; $FB - any key ; $FB - any key
; $f7 - shift ; $f7 - shift
; $f3 - shift+key ; $f3 - shift+key
notpressed
jsr CheckExitKeys ; Check for O, Esc or Start+Option keys
spl:rts ; exit if pressed 'Exit keys'
ldx TankNr ; for optimize ldx TankNr ; for optimize
; Select and Option jsr GetKeyFast
lda CONSOL mvy #00 EscFlag ; prevent for set EscFalg in GetKey! we checking this in CheckExitKeys!
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
and #%10111111 ; SHIFT elimination and #%10111111 ; SHIFT elimination
cmp #@kbcode._atari ; Option key
beq callActivation
cmp #@kbcode._A ; $3f ; A cmp #@kbcode._A ; $3f ; A
bne @+ bne @+
callActivation callActivation
@@ -1276,10 +1320,11 @@ NoSpyHard
mva #0 escFlag mva #0 escFlag
jmp ReleaseAndLoop jmp ReleaseAndLoop
@ @
cmp #$80|@kbcode._up /* cmp #$80|@kbcode._up
jeq CTRLPressedUp jeq CTRLPressedUp
cmp #$80|@kbcode._down cmp #$80|@kbcode._down
jeq CTRLPressedDown jeq CTRLPressedDown */
cmp #$80|@kbcode._tab cmp #$80|@kbcode._tab
jeq CTRLPressedTAB jeq CTRLPressedTAB
@@ -1290,10 +1335,7 @@ jumpFromStick
.ELSE .ELSE
cmp #@kbcode._help ; Help (# in A5200) cmp #@kbcode._help ; Help (# in A5200)
bne NoVdebugSwitch bne NoVdebugSwitch
sta pressTimer ; reset 0+@kbcode._help (tricky) jsr WaitForLongPress
jsr WaitForKeyRelease.StillWait
lda pressTimer
cmp #(25+@kbcode._help) ; 1/2s - long press only
bcc NoVdebugSwitch bcc NoVdebugSwitch
.ENDIF .ENDIF
lda Vdebug lda Vdebug
@@ -1303,6 +1345,7 @@ jumpFromStick
jmp ReleaseAndLoop jmp ReleaseAndLoop
NoVdebugSwitch NoVdebugSwitch
mvy #1 Erase ; optimization
and #$3f ;CTRL and SHIFT ellimination and #$3f ;CTRL and SHIFT ellimination
cmp #@kbcode._up ; $e cmp #@kbcode._up ; $e
jeq pressedUp jeq pressedUp
@@ -1314,6 +1357,8 @@ NoVdebugSwitch
jeq pressedRight jeq pressedRight
cmp #@kbcode._space ; $21 cmp #@kbcode._space ; $21
jeq pressedSpace jeq pressedSpace
cmp #@kbcode._ret ; Fire (Joy)
jeq pressedSpace
cmp #@kbcode._tab ; $2c cmp #@kbcode._tab ; $2c
jeq pressedTAB jeq pressedTAB
cmp #@kbcode._M ; $25 ; M cmp #@kbcode._M ; $25 ; M
@@ -1327,30 +1372,8 @@ NoVdebugSwitch
jmp ReleaseAndLoop jmp ReleaseAndLoop
.ENDIF .ENDIF
EndKeys EndKeys
mva #$80 pressTimer
jmp notpressed 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 pressedUp
@@ -1369,20 +1392,7 @@ pressedUp
CheckingMaxForce CheckingMaxForce
mva #sfx_set_power_1 sfx_effect mva #sfx_set_power_1 sfx_effect
; checking is at the beginning of the procedure !!
lda MaxForceTableH,x
cmp ForceTableH,x
bne FurtherCheckMaxForce
lda MaxForceTableL,x
cmp ForceTableL,x
FurtherCheckMaxForce
jcs BeforeFire
lda MaxForceTableH,x
sta ForceTableH,x
lda MaxForceTableL,x
sta ForceTableL,x
jmp BeforeFire jmp BeforeFire
CTRLPressedUp CTRLPressedUp
@@ -1402,8 +1412,6 @@ pressedDown
cmp #25 ; 1/2s cmp #25 ; 1/2s
bcs CTRLPressedDown bcs CTRLPressedDown
mva #sfx_set_power_1 sfx_effect
;ldx TankNr ; optimized ;ldx TankNr ; optimized
dec ForceTableL,x dec ForceTableL,x
lda ForceTableL,x lda ForceTableL,x
@@ -1416,6 +1424,7 @@ ForceGoesZero
sta ForceTableH,x sta ForceTableH,x
sta ForceTableL,x sta ForceTableL,x
@ @
mva #sfx_set_power_1 sfx_effect
jmp BeforeFire jmp BeforeFire
CTRLPressedDown CTRLPressedDown
@@ -1429,7 +1438,7 @@ CTRLPressedDown
jcs BeforeFire jcs BeforeFire
dec ForceTableH,x dec ForceTableH,x
bmi ForceGoesZero bmi ForceGoesZero
jmp BeforeFire bpl @-
pressedRight pressedRight
;ldx TankNr ; optimized ;ldx TankNr ; optimized
@@ -1438,30 +1447,30 @@ pressedRight
cmp #25 ; 1/2s cmp #25 ; 1/2s
bcs CTRLPressedRight bcs CTRLPressedRight
mva #sfx_set_power_2 sfx_effect ; mva #1 Erase
mva #1 Erase
jsr DrawTankNr.BarrelChange jsr DrawTankNr.BarrelChange
dec:lda AngleTable,x dec:lda AngleTable,x
cmp #255 ; -1 cmp #255 ; -1
jne BeforeFire bne @+
lda #180 lda #180
sta AngleTable,x sta AngleTable,x
@
mva #sfx_set_power_2 sfx_effect
jmp BeforeFire jmp BeforeFire
CTRLPressedRight CTRLPressedRight
;ldx TankNr ; optimized ;ldx TankNr ; optimized
mva #sfx_set_power_2 sfx_effect ; mva #1 Erase
mva #1 Erase
jsr DrawTankNr.BarrelChange jsr DrawTankNr.BarrelChange
lda AngleTable,x lda AngleTable,x
sec sec
sbc #4 sbc #4
sta AngleTable,x sta AngleTable,x
cmp #4 ; smallest angle for speed rotating cmp #4 ; smallest angle for speed rotating
jcs BeforeFire bcs @-
lda #180 lda #180
sta AngleTable,x sta AngleTable,x
jmp BeforeFire bne @-
pressedLeft pressedLeft
@@ -1471,31 +1480,31 @@ pressedLeft
cmp #25 ; 1/2s cmp #25 ; 1/2s
bcs CTRLPressedLeft bcs CTRLPressedLeft
mva #sfx_set_power_2 sfx_effect ; mva #1 Erase
mva #1 Erase
jsr DrawTankNr.BarrelChange jsr DrawTankNr.BarrelChange
INC AngleTable,x INC AngleTable,x
lda AngleTable,x lda AngleTable,x
cmp #180 cmp #180
jcc BeforeFire bcc @+
lda #0 lda #0
sta AngleTable,x sta AngleTable,x
@
mva #sfx_set_power_2 sfx_effect
jmp BeforeFire jmp BeforeFire
CTRLPressedLeft CTRLPressedLeft
;ldx TankNr ; optimized ;ldx TankNr ; optimized
mva #sfx_set_power_2 sfx_effect ; mva #1 Erase
mva #1 Erase
jsr DrawTankNr.BarrelChange jsr DrawTankNr.BarrelChange
lda AngleTable,x lda AngleTable,x
clc clc
adc #4 adc #4
sta AngleTable,x sta AngleTable,x
cmp #180-4 cmp #180-4
jcc BeforeFire bcc @-
lda #0 lda #0
sta AngleTable,x sta AngleTable,x
jmp BeforeFire beq @-
pressedTAB pressedTAB
mva #sfx_purchase sfx_effect mva #sfx_purchase sfx_effect
@@ -1544,6 +1553,7 @@ pressedS
eor:sta noSfx eor:sta noSfx
ReleaseAndLoop ReleaseAndLoop
jsr WaitForKeyRelease jsr WaitForKeyRelease
; mva #$80 pressTimer
jmp BeforeFire jmp BeforeFire
pressedSpace pressedSpace
@@ -1551,12 +1561,9 @@ pressedSpace
;we shoot here!!! ;we shoot here!!!
lda #0 lda #0
sta ATRACT ; reset atract mode sta ATRACT ; reset atract mode
sta pressTimer ; reset jsr WaitForLongPress
jsr WaitForKeyRelease.StillWait bcc fire ; short press
lda pressTimer jmp callInventory ; long press
cmp #25 ; 1/2s
bcc fire
jmp callInventory
fire fire
RTS RTS
.endp .endp
@@ -2754,41 +2761,17 @@ notpressed
jsr DrawTankEngine jsr DrawTankEngine
; enimation ends ; enimation ends
lda SKSTAT jsr GetKeyFast
cmp #$ff
jeq checkJoy
cmp #$f7 ; SHIFT
jeq checkJoy
lda kbcode
and #%00111111 ; CTRL and SHIFT elimination
jumpFromStick
cmp #@kbcode._left ; $6 cmp #@kbcode._left ; $6
jeq pressedLeft jeq pressedLeft
cmp #@kbcode._right ; $7 cmp #@kbcode._right ; $7
jeq pressedRight jeq pressedRight
cmp #@kbcode._space ; $21 cmp #@kbcode._space ; $21
jeq pressedSpace jeq pressedSpace
jmp notpressed cmp #@kbcode._ret ; Fire (Joy)
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
jeq pressedSpace jeq pressedSpace
jmp notpressed jmp notpressed
pressedRight pressedRight
lda ShieldEnergy,x lda ShieldEnergy,x
jeq pressedSpace jeq pressedSpace