Compare commits

..

139 Commits

Author SHA1 Message Date
Pirx d474ba7af8 README updt 2022-08-13 17:47:49 -04:00
Pirx 802b67673b Merge pull request #116 from pkali/developXL
Develop xl
2022-08-13 17:34:35 -04:00
Pecusx 5070b11be3 Battery lottery 2022-08-12 22:34:56 +02:00
Pirx 0d210b8d88 basic off 2022-08-12 10:59:15 -04:00
Pirx 171f37c73f intro colors fix 2022-08-12 09:52:51 -04:00
Pecusx cee53fd257 Now splash screen works on classic Atari 800 :) 2022-08-12 15:23:23 +02:00
Pecusx 224588eaa9 Manual PL fix :) 2022-08-12 13:49:25 +02:00
Pecusx 4cd864e47e Polish manual update 2022-08-12 13:44:05 +02:00
Pecusx 710570ae8a Press O to Game Over and small bugfix 2022-08-12 13:40:04 +02:00
Pirx 2820f66467 credits updt 2022-08-11 22:28:23 -04:00
Pecusx c84aecc886 Polish instruction 2022-08-11 22:52:16 +02:00
Pecusx 25ed106e02 Financial bonus for the winner 2022-08-11 21:23:34 +02:00
Pecusx bc65dafdac Long Schlong new price and SFX and minor fix 2022-08-11 18:21:45 +02:00
Pirx fd15ed9bb6 correct song during gameplay and version 1.00 2022-08-11 10:57:30 -04:00
Pirx 028c34bf31 cleanup 2022-08-11 10:43:45 -04:00
Pirx 3b0388fdaf Scorch50 splash 2022-08-11 10:15:38 -04:00
Pecusx 9d14950ef9 AI selected weapons on statusbar 2022-08-11 14:31:33 +02:00
Pecusx a205c37dc0 Atract and next player SFX fix 2022-08-11 11:10:23 +02:00
Pecusx 950d6922b4 New funky defensive weapon - Long Barrel 2022-08-11 10:46:23 +02:00
Pirx 22785ecdd5 kolorki Adama, 2022-07-21 2022-08-11 01:20:45 -04:00
Pirx 268d99ffaf Boucy Castle sfx 2022-08-11 00:54:00 -04:00
Pirx bb826b680d Auto Defense -> Bouncy Castle 2022-08-11 00:34:21 -04:00
Pecusx f45d2c8446 Better SFX, music for purchase and Credits fix 2022-08-10 20:52:26 +02:00
Pecusx 1f576a0c49 Preventing compilation of unused procedures. 2022-08-10 19:58:07 +02:00
Pecusx 054c5df5d7 New music file and Song change fixed! 2022-08-10 18:39:37 +02:00
Pecusx 1b4a73c362 RMT Player bug fix !!! 2022-08-10 13:30:30 +02:00
Pecusx f807fe8876 WaitOneFrame fixed 2022-08-10 00:56:56 +02:00
Pecusx f14b64a7f6 SFX audio channel corrected 2022-08-09 23:40:56 +02:00
Pecusx e45cc3e609 Preventing double RTM calls - but still hangs 2022-08-09 23:28:46 +02:00
Pecusx 192b1b01dc New old RMT player and bugfix 2022-08-09 22:32:16 +02:00
Pecusx 664dc1568d Variables initialization on strart 2022-08-09 13:30:21 +02:00
Pecusx 234fbc5a4a Tanks and mountains on Oprions screen but RMT still hangs 2022-08-09 10:10:44 +02:00
Pecusx 2f57c1f774 Game Over and Credits - but RTM problems 2022-08-08 21:18:47 +02:00
Pecusx 2d274b05d0 Clear variables optimisation and better text screen init 2022-08-07 16:01:09 +02:00
Pecusx 5b90bc571e Purchase AI uses bit tables instead bytes 2022-08-07 13:50:38 +02:00
Pirx c1b16cd1d1 missing MSX file added 2022-08-07 07:47:37 -04:00
Pirx cf08093cee FEAT update 2022-08-06 16:31:51 -04:00
Pirx e6d37e8410 song 0h1 2022-08-06 16:24:18 -04:00
Pirx 56ed83fbac PAUSE ellimintation 2022-08-06 16:16:47 -04:00
Pirx 2cda0bfb12 music v0g 2022-08-06 14:06:09 -04:00
Pirx e5ce864254 new song, VBL fix 2022-08-06 01:03:01 -04:00
Pirx 312bca4866 shorter ClearScreen 2022-08-05 23:56:27 -04:00
Pecusx 2bec64c38e Macro "wait" as procedure. 2022-08-05 17:13:13 +02:00
Pecusx d448eb2e1e Better? AI purchases and new WAIT macro 2022-08-05 12:04:14 +02:00
Pecusx 05409fa301 Diferent Cyborg purchase strategy 2022-08-05 10:12:44 +02:00
Pecusx e60776fd57 New optimized DisplayDec5 proc 2022-08-03 18:13:07 +02:00
Pecusx eed446545e 5 digits decimal display added 2022-08-03 15:00:07 +02:00
Pecusx 54cc76464e DirectHits and EarnedMoney counters added (for summary) 2022-08-03 14:36:03 +02:00
Pecusx 3ac678e68b Game Over screen exit 2022-08-03 00:17:11 +02:00
Pecusx 823be97490 Tank names and points on Game Over screen 2022-08-02 20:52:22 +02:00
Pecusx 8775e0b42e Colored lines on Game Over screen 2022-08-02 19:49:51 +02:00
Pecusx cd41f59175 Better set PM width (prepare to new Game Over screen) 2022-08-02 14:40:12 +02:00
Pecusx 91d5172fe2 To high parachute bug fixed! 2022-08-02 11:20:51 +02:00
Pecusx 3a836fa072 Better aiming (lower tank position - more force) 2022-08-01 23:26:06 +02:00
Pecusx 84da6fb7a0 Cyborg aiming fix 2022-08-01 23:12:48 +02:00
Pecusx 9eb0f8adff Faster AI (and fixed)
Correcion for barrel wider tjan tank (2 pixels)
2022-08-01 21:54:41 +02:00
Pecusx 2f1f016ce0 Fix for Blue Zombie tank :) 2022-08-01 10:12:23 +02:00
Pecusx 8e0aa974e7 Small loop ptimisation 2022-07-31 23:56:47 +02:00
Pecusx 6a0c3a91e9 AI optimisations 2022-07-31 22:49:34 +02:00
Pecusx 025afbce91 MagDeflector disappears properly 2022-07-31 21:29:03 +02:00
Pecusx edbfddf090 MagDeflector is working properly
And an attempt to repair the blue zombie tank.
2022-07-31 20:34:44 +02:00
Pecusx d7501b5c7c All AI tanks works but... 2022-07-31 18:35:51 +02:00
Pecusx 1945dd5e88 AI optimisations 2022-07-31 16:44:18 +02:00
Pecusx c725fd3827 New Cyborg AI 2022-07-31 16:14:01 +02:00
Pecusx c8ffba4603 AI internals 2022-07-29 13:27:59 +02:00
Pecusx 16f24793f6 Small memory optimisations 2022-07-28 22:08:43 +02:00
Pecusx f9fc25ec0f Preparing for better AI (invisible shot) 2022-07-28 21:38:38 +02:00
Pecusx 4d090f1766 All 3 tank shapes visible 2022-07-28 17:54:38 +02:00
Pecusx 9df4a49abe 3 tank shapes 2022-07-28 17:42:49 +02:00
Pecusx 0a68184f7c New (smaller) 8x8 font file and optimisations.
Second tank shape added.
2022-07-28 09:53:01 +02:00
Pecusx 807da90fda AI ​​uses White Flag 2022-07-27 22:40:53 +02:00
Pecusx 3855b0e2cf Robotanks barrel angle sound 2022-07-27 21:46:35 +02:00
Pecusx a01af2a608 New (drawto) barrels finished 2022-07-27 20:55:14 +02:00
Pecusx 47dcfa1af4 Final Shields fix
Now shields are draw ONLY in DrawTankNr proc.
2022-07-27 18:01:33 +02:00
Pecusx 02ff63d524 Game Over animation fix 2022-07-27 14:00:34 +02:00
Pecusx 9b42e79b61 Shields fix 2022-07-27 13:44:20 +02:00
Pecusx 2c3b4d148e Barrels optimisation and more 2022-07-27 13:03:10 +02:00
Pirx 513f13c5fc broken inventory rollback 2022-07-25 09:50:49 -04:00
Pirx 27bc443581 WIP: broken inventory 2022-07-25 00:50:16 -04:00
Pirx 992130f267 WIP: barrels anew 2022-07-24 09:19:03 -04:00
Pirx 1de19dfd26 WIP: drawto barrels 2022-07-23 15:42:22 -04:00
Pirx 960675d4ac WIP: drawto barrels 2022-07-23 15:20:19 -04:00
Pirx dc9e2de8df WIP: drawto barrels 2022-07-23 15:14:47 -04:00
Pirx a7e1bd519e WIP: drawto barrels 2022-07-23 15:14:00 -04:00
Pecusx 616452a01e Texts and more colours on Game Over screen 2022-07-19 10:37:09 +02:00
Pirx f20ce14dc3 moving GameoverDL to stop shaking 2022-07-18 23:51:05 -04:00
Pecusx d9012f4485 Good Game Over animation 2022-07-18 16:37:56 +02:00
Pecusx 5c38b7b12a Game Over animation - still not good. 2022-07-18 13:47:57 +02:00
Pirx 6cb817d463 sprites down the memory lane 2022-07-18 07:02:09 -04:00
Pecusx 19200be905 Game Over "animation" - TEST ONLY! 2022-07-18 12:44:33 +02:00
Pirx 34f0bb9d49 Merge pull request #113 from pkali/develop
build 148
2022-07-17 22:05:47 -04:00
Pirx f05af218f4 build 148 2022-07-17 22:04:58 -04:00
Pecusx 00b9575bcb Besto of the best laser
And code ordering.
2022-07-17 12:42:54 +02:00
Pecusx 738faec7e2 Better laser timing 2022-07-16 21:10:45 +02:00
Pecusx 6b0d8aa287 Great Laser. #110 2022-07-16 20:15:18 +02:00
Pecusx bc0148eb0f Fix for last fix :) 2022-07-16 14:52:45 +02:00
Pecusx 25dfe09a9d Real fix for rollers bug. 2022-07-16 14:44:12 +02:00
Pecusx 9e695f8fcd Rollers bug (blast radius at right edge of the screen) 2022-07-16 00:40:41 +02:00
Pecusx 12150a47c1 Slight graphic glitches when switching screens. 2022-07-15 10:18:57 +02:00
Pirx b12ad5efed new colors try 2022-07-14 20:35:30 -04:00
Pirx 1b2988069f results sprite fix 2022-07-13 22:59:58 -04:00
Pecusx 99d08367c4 PM code optimisation 2022-07-14 00:13:36 +02:00
Pirx 9acada4e9f FOX PLOTS FASTER 2022-07-13 17:18:34 -04:00
Pirx 85fac6e6cf Merge pull request #109 from pfusik/opt-plot
Optimize plot and point
2022-07-13 17:07:04 -04:00
Pecusx 9806613f2f New PMG for 6 colored tanks
but colors not set to new scheme.
2022-07-13 22:53:54 +02:00
Piotr Fusik af797029f9 Optimize plot and point 2022-07-13 17:58:04 +02:00
Pecusx 9ece051472 IA code optimisation
and "better" shields shapes.
2022-07-13 09:06:37 +02:00
Pecusx 6868eb8626 Better Shooter strategy
Poolshark and Tosser no longer cheat :)
2022-07-11 21:43:07 +02:00
Pecusx e94a356e6d Auto Defence angle fix 2022-07-11 18:26:59 +02:00
Pirx 93b16bd55a Merge pull request #108 from pkali/develop
build 147
2022-07-10 21:14:18 -04:00
Pirx 752b84ae2e version updt 2022-07-10 21:13:18 -04:00
Pirx d751379361 README updt 2022-07-10 21:12:00 -04:00
Pirx 01d941b013 dynamic angle #75 2022-07-10 20:45:08 -04:00
Pirx b63b7a3fb1 tank names for robots #107 2022-07-10 13:17:56 -04:00
Pirx c28d243719 improved mountains heights #86 2022-07-10 12:00:53 -04:00
Pirx 51975ccfbf first cheap attempt mountains heights #86 2022-07-09 22:35:12 -04:00
Pirx 541a7566cb tank names on gfx screen when aiming #107 2022-07-09 21:42:30 -04:00
Pirx 48bfd3824d zero page loading elimination 2022-07-09 08:31:48 -04:00
Pecusx e307f1a14a "New" shape of Force Shield 2022-07-07 20:04:32 +02:00
Pecusx 2fecc8d630 Different shape of Heavy Shield 2022-07-07 19:52:30 +02:00
Pecusx 1998c98784 Leap Frog and Funky Bobmb explosion range 2022-07-07 18:32:31 +02:00
Pecusx 4dc9b4ebb0 Havy and Force Shields swap (for better AI) 2022-07-06 20:55:22 +02:00
Pecusx 8e60cfa723 Better Napalms range calculation 2022-07-06 20:43:24 +02:00
Pecusx 9ee021b1f5 Small Soildown oprimization 2022-07-06 18:21:52 +02:00
Pecusx d738e6a6e8 Small optimisation 2022-07-05 21:16:22 +02:00
Pecusx d0838fa163 Statusbar display improvements - robo-tanks. 2022-07-05 15:02:52 +02:00
Pecusx a353e3bdb9 Better display of robo-tanks names 2022-07-05 14:30:40 +02:00
Pecusx 5933b00153 AI tanks display live angle changes. 2022-07-05 13:26:10 +02:00
Pecusx a5add9d9c4 Old way of displaying angle #105 2022-07-05 13:09:29 +02:00
Pecusx f2c7b9c5a5 Napalm for AI
now with xex :)
2022-07-05 10:22:59 +02:00
Pecusx e87d875467 Revert "Napalm for AI"
This reverts commit 876ea45eaf.
2022-07-05 10:21:19 +02:00
Pecusx 876ea45eaf Napalm for AI 2022-07-05 10:20:25 +02:00
Pecusx b164a79fd4 Napalm and Hot Napalm are working!
And they have new prices.
2022-07-05 09:36:50 +02:00
Pecusx 0984aee64f Napalm and Hot Napalm added
... but something is wrong
2022-07-04 21:25:57 +02:00
Pecusx 51c257c8e8 Better Napalm flames (test)
And AI cosmetics
2022-07-04 14:49:44 +02:00
Pecusx af4eb201b2 Second Napalm test
Only display and clear from screen.
2022-07-04 14:14:23 +02:00
Pecusx 85d0fb4778 First Napalm test
Display test only!
2022-07-04 13:09:07 +02:00
Pecusx 0a7c76f74a Napalm characters (test) 2022-07-04 08:36:45 +02:00
Pirx 6d5f83195f typo 2022-07-03 23:45:40 -04:00
40 changed files with 4308 additions and 2134 deletions
+2
View File
@@ -1,2 +1,4 @@
*.bak *.bak
scorch.lab
scorch.lst
+60 -4
View File
@@ -13,10 +13,11 @@ Contributors:
- Adam (@6502adam) - font, ideas, QA - Adam (@6502adam) - font, ideas, QA
- Bocianu (@bocianu) - important ideas, FujiNet implementation, QA - Bocianu (@bocianu) - important ideas, FujiNet implementation, QA
- Emkay - splash screen music - Emkay - splash screen music
- Fox (@pfusik) - plot and point optimization
QA: Probabilitydragon, KrzysRog, Beeblebrox, EnderDude, lopezpb, Dracon, brad-colbert QA: Probabilitydragon, KrzysRog, Beeblebrox, EnderDude, lopezpb, Dracon, brad-colbert, archon800, Shaggy the Atarian
You can contact us at pecus@poczta.fm or pirx@5oft.pl You can contact us via [AtariAge](https://atariage.com) or [AtariOnLine](https://atarionline.pl) forums.
This source code was originally compiled under [OMC65 crossassembler](https://github.com/pkali/omc65) and on 2012-06-21 translated to [mads](https://github.com/tebe6502/Mad-Assembler). This source code was originally compiled under [OMC65 crossassembler](https://github.com/pkali/omc65) and on 2012-06-21 translated to [mads](https://github.com/tebe6502/Mad-Assembler).
@@ -47,6 +48,61 @@ With the advent of fujinet (https://fujinet.online/) we are thinking about makin
## Changes: ## Changes:
###### Version 1.00
2022-08-13
Silly Version 1.00
This is an official Silly Venture Summer Edition Atari 50 release. The game reached version 1.00.
The game manual is available at https://github.com/pkali/scorch_src/wiki
All 48KB+ 8-bit Atari computers are supported.
Thank you @Pecusx and @Miker for your hard work over the last few weeks - I was almost entirely absent because of the real-world attack.
Most important changes:
* New Game Over screen with a summary of wins, direct hits and earned cash. https://github.com/pkali/scorch_src/issues/9
* Tank barrels are drawn procedurally to make aiming easier..
* Various SFX and music updates with new tunes for all parts of the game. https://github.com/pkali/scorch_src/issues/112
* AI can use White Flag.
* 3 different tank shapes https://github.com/pkali/scorch_src/issues/64.
* All AI levels are programmed. Cyborg is tough! https://github.com/pkali/scorch_src/issues/40
* New weapon - Long Schlong!
* New splash screen.
* Game mechanics improved.
* [O] key skips to the Game Over screen.
* The game works on Atari 800.
* Huge amount of optimizations to squeeze the game into 48K.
And now the new adventure begins!
###### Build 148
2022-07-17
WHAT DOES THE FOX SAY?
Fox (x0f, @pfusik) says plots and points can be optimized by 18 clock cycles each and thanks to his 6502 wizardry the game is noticeably nicer. Thank you!
Other changes:
- https://github.com/pkali/scorch_src/issues/99, https://github.com/pkali/scorch_src/issues/98 - tank number 6 has got a color now! No one is monochrome now!
- https://github.com/pkali/scorch_src/issues/110 much improved laser - previously it was almost useless, now it looks and works much better
- fixed an interesting roller bug
- Auto Defense angle fix
- multiple improvements in AI routines, preparation for the final opponents.
###### Build 147
2022-07-10
LOST build. We were watching [LOST party](https://www.lostparty.pl/2022/) streams so maybe a little less done, but still some nice improvements.
- new weapons by @Pecusx - Napalm and Hot Napalm. Fire penetrates all shields, so beware!
- status bar showing outdated info on the beginning of the round fix
- various small optimizations incl. memory usage, soildown, weapon ranges
- improved shapes of Heavy and Force Shields
Issues closed:
- revert to the old but slightly improved version of showing angles (#105)
- zero page loading eliminated (#106)
- active player name appear over his tank when aiming (#107)
- configurable mountain heights (The Netherlands, Belgium, Czechia, Switzerland, Nepal) (#86)
- angle speeds up when joystick / keyboard are pressed (#75)
###### Build 146 ###### Build 146
2022-07-03 2022-07-03
Super heavy rewrite build. Super heavy rewrite build.
@@ -55,9 +111,9 @@ Not much changed visually since the last build, but really large parts of the co
- silly angle system rewritten to a proper, primary school angling. BTW - I had to dig into 8th grade trig to make it work. About 200 bytes saved, complexity reduced. Next build will have improved angle speed UI. I will also allow for an easier improvement of tank visuals. - silly angle system rewritten to a proper, primary school angling. BTW - I had to dig into 8th grade trig to make it work. About 200 bytes saved, complexity reduced. Next build will have improved angle speed UI. I will also allow for an easier improvement of tank visuals.
- Weapon price and quantity balance - this is our honest attempt to make game more fun. We'll accept any critique and improvement proposals. - Weapon price and quantity balance - this is our honest attempt to make game more fun. We'll accept any critique and improvement proposals.
- New AI opponent - Tosser! Not much better than Poolshark, but still beats sharks most of the time. - New AI opponent - Tosser! Not much better than Poolshark, but still beats sharks most of the time.
- AI opponents can purchase defensive weapons what makes playing against AI somewhat more challenging. - AI opponents can purchase defensive weapons which make playing against AI somewhat more challenging.
- Improved Laser. It is still not ideal, but better. Still hard to aim :] - Improved Laser. It is still not ideal, but better. Still hard to aim :]
- Few small parachute related bugs fixed - Few small parachute-related bugs fixed
- Death's Head bug fix - Death's Head bug fix
Issues closed: Issues closed:
+674 -110
View File
@@ -31,19 +31,19 @@ loop
;---------------------------------------------- ;----------------------------------------------
.proc ArtificialIntelligence ; .proc ArtificialIntelligence ;
; A - skill of the TankNr ; A - skill of the TankNr (in X)
; returns shoot energy and angle in ; returns shoot energy and angle in
; ForceTable/L/H and AngleTable ; ForceTable/L/H and AngleTable
;---------------------------------------------- ;----------------------------------------------
asl asl
tax tay
:2 dex ;credit KK :2 dey ;credit KK
lda AIRoutines+1,x lda AIRoutines+1,y
pha pha
lda AIRoutines,x lda AIRoutines,y
pha pha
ldx TankNr ; common values used in AI routines ; common values used in AI routines
; address of weapons table (for future use) ; address of weapons table (for future use)
lda TanksWeaponsTableL,x lda TanksWeaponsTableL,x
sta temp sta temp
@@ -57,11 +57,23 @@ AIRoutines
.word Shooter-1 ;Shooter .word Shooter-1 ;Shooter
.word Poolshark-1 ;Poolshark .word Poolshark-1 ;Poolshark
.word Tosser-1 ;Tosser .word Tosser-1 ;Tosser
.word Poolshark-1 ;Chooser .word Chooser-1 ;Chooser
.word Poolshark-1 ;Spoiler .word Spoiler-1 ;Spoiler
.word Poolshark-1 ;Cyborg .word Cyborg-1 ;Cyborg
.word Poolshark-1 ;Unknown .word Unknown-1 ;Unknown
;----------------------------------------------
.proc Unknown
; random robotank (from Poolshark to Cyborg)
randomize 4 13
and #%11111110
tay
lda AIRoutines+1,y
pha
lda AIRoutines,y
pha
rts
.endp
;---------------------------------------------- ;----------------------------------------------
.proc Moron .proc Moron
jsr RandomizeAngle jsr RandomizeAngle
@@ -154,101 +166,29 @@ loop
.endp .endp
;---------------------------------------------- ;----------------------------------------------
.proc Poolshark .proc Poolshark
jsr UseBatteryOrFlag
; defensives ; defensives
; if low energy ten use battery jsr PoolsharkDefensives
lda Energy,x
cmp #30
bcs EnoughEnergy
; lower than 30 units - check battery
ldy #ind_Battery________
lda (temp),y ; has address of TanksWeaponsTable
beq NoBatteries
; we have batteries - use one
clc
sbc #1
sta (temp),y
lda #99
sta Energy,x
NoBatteries
EnoughEnergy
; use best defensive :)
; but not allways
randomize 1 3
cmp #1
bne NoUseDefensive
; first check check if any is in use
lda ActiveDefenceWeapon,x
bne DefensiveInUse
ldy #ind_Nuclear_Winter_+1 ;the last defensive weapon
@
dey
cpy #ind_Battery________ ;first defensive weapon (White Flag nad Battery - never use)
beq NoUseDefensive
lda (temp),y ; has address of TanksWeaponsTable
beq @-
tya
; activate defensive weapon
sta ActiveDefenceWeapon,x
lda DefensiveEnergy,y
sta ShieldEnergy,x
; decrease in inventory
clc
sbc #1
sta (temp),y ; has address of TanksWeaponsTable
NoUseDefensive
DefensiveInUse
firstShoot firstShoot
;find nearest tank neighbour ;find nearest tank neighbour
jsr MakeLowResDistances jsr FindBestTarget2
mva #$ff temp2 ; min possible distance beq EnemyOnLeft
;ldx TankNr
ldy NumberOfPlayers
dey
loop01
cpy TankNr
beq skipThisPlayer
lda eXistenZ,y
beq skipThisPlayer
lda LowResDistances,x
cmp LowResDistances,y
bcs EnemyOnTheLeft
;enemy on the right
sec
lda LowResDistances,y
sbc LowResDistances,x
cmp temp2 ; lowest
bcs lowestIsLower
sta temp2
sty temp2+1 ; number of the closest tank
; calculate index to shotangle table ; calculate index to shotangle table
; in temp2 we have x distance divided by 8
lda temp2
:3 lsr @ :3 lsr @
and #%00000111 and #%00000111
clc clc
adc #8 adc #8
sta AngleTablePointer sta AngleTablePointer
jmp lowestIsLower bne AngleIsSet
EnemyOnLeft
EnemyOnTheLeft lda temp2
sec
lda LowResDistances,x
sbc LowResDistances,y
cmp temp2 ; lowest
bcs lowestIsLower
sta temp2
sty temp2+1 ; number of the closest tank
; calculate index to shotangle table
:3 lsr @ :3 lsr @
and #%00000111 and #%00000111
eor #%00000111 eor #%00000111
sta AngleTablePointer sta AngleTablePointer
AngleIsSet
lowestIsLower
skipThisPlayer
dey
bpl loop01
randomize 0 8 randomize 0 8
ldy AngleTablePointer ldy AngleTablePointer
@@ -286,7 +226,72 @@ AngleTable ; 16 bytes ;ba w $348b L$3350
.by 18,26,34,43,50,58,66,74 .by 18,26,34,43,50,58,66,74
.endp .endp
;---------------------------------------------- ;----------------------------------------------
.proc UseBatteryOrFlag
; if low energy ten use battery
lda Energy,x
cmp #30
bcs EnoughEnergy
; lower than 30 units - check battery
ldy #ind_Battery________
lda (temp),y ; has address of TanksWeaponsTable
beq NoBatteries
; we have batteries - use one
clc
sbc #1
sta (temp),y
lda #99
sta Energy,x
NoBatteries
; if very low energy and no battery then use White Flag
lda Energy,x
cmp #5
bcs EnoughEnergy
; lower than 5 units - white flag
lda #ind_White_Flag_____
sta ActiveDefenceWeapon,x
EnoughEnergy
rts
.endp
;----------------------------------------------
.proc PoolsharkDefensives
; use best defensive :)
; but not allways
randomize 1 3
cmp #1
bne NoUseDefensive
; first check check if any is in use
lda ActiveDefenceWeapon,x
bne DefensiveInUse
ldy #ind_Nuclear_Winter_+1 ;the last defensive weapon
@
dey
cpy #ind_Battery________ ;first defensive weapon (White Flag nad Battery - never use)
beq NoUseDefensive
lda (temp),y ; has address of TanksWeaponsTable
beq @-
; decrease in inventory
clc
sbc #1
sta (temp),y ; has address of TanksWeaponsTable
; activate defensive weapon
tya ; number of selectet defensive weapon
sta ActiveDefenceWeapon,x
lda DefensiveEnergy,y
sta ShieldEnergy,x
NoUseDefensive
DefensiveInUse
rts
.endp
;----------------------------------------------
.proc Tosser .proc Tosser
jsr UseBatteryOrFlag
; use best defensive :)
jsr TosserDefensives
; Toosser is like Poolshark but allways uses defensives
jmp Poolshark.firstShoot
.endp
;----------------------------------------------
.proc TosserDefensives
; use best defensive :) ; use best defensive :)
; allways ; allways
; first check check if any is in use ; first check check if any is in use
@@ -299,19 +304,523 @@ AngleTable ; 16 bytes ;ba w $348b L$3350
beq NoUseDefensive beq NoUseDefensive
lda (temp),y ; has address of TanksWeaponsTable lda (temp),y ; has address of TanksWeaponsTable
beq @- beq @-
tya
; activate defensive weapon
sta ActiveDefenceWeapon,x
lda DefensiveEnergy,y
sta ShieldEnergy,x
; decrease in inventory ; decrease in inventory
clc clc
sbc #1 sbc #1
sta (temp),y sta (temp),y ; has address of TanksWeaponsTable
; activate defensive weapon
tya ; number of selectet defensive weapon
sta ActiveDefenceWeapon,x
lda DefensiveEnergy,y
sta ShieldEnergy,x
DefensiveInUse DefensiveInUse
NoUseDefensive NoUseDefensive
; Toosser is like Poolshark but allways uses defensives rts
jmp Poolshark .endp
;----------------------------------------------
.proc Chooser
; like cyborg but more randomizing force
jsr UseBatteryOrFlag
; use defensives like Tosser
jsr TosserDefensives
; now select best target
jsr FindBestTarget3
sty TargetTankNr
; aiming
jsr TakeAim ; direction still in A (0 - left, >0 - right)
; choose the best weapon
lda TanksWeaponsTableL,x
sta temp
lda TanksWeaponsTableH,x
sta temp+1
ldy #ind_LeapFrog_______ ;the last offensive weapon to use
loop
dey
lda (temp),y
beq loop
tya
sta ActiveWeapon,x
; randomizing force +-100
sbw Force #100 RandBoundaryLow
bpl NotNegativeEnergy
mwa #1 RandBoundaryLow
NotNegativeEnergy
adw Force #100 RandBoundaryHigh
jsr RandomizeForce
lda ForceTableH,x
bne HighForce
; if Force lower than 256 - set weapon to Baby Missile (for security :) )
lda #ind_Baby_Missile___
sta ActiveWeapon,x
HighForce
rts
.endp
;----------------------------------------------
.proc Spoiler
; like cyborg but little randomizing force
jsr UseBatteryOrFlag
; use defensives like Tosser
jsr TosserDefensives
; now select best target
jsr FindBestTarget3
sty TargetTankNr
; aiming
jsr TakeAim ; direction still in A (0 - left, >0 - right)
; choose the best weapon
lda TanksWeaponsTableL,x
sta temp
lda TanksWeaponsTableH,x
sta temp+1
ldy #ind_LeapFrog_______ ;the last offensive weapon to use
loop
dey
lda (temp),y
beq loop
tya
sta ActiveWeapon,x
; randomizing force +-50
sbw Force #50 RandBoundaryLow
bpl NotNegativeEnergy
mwa #1 RandBoundaryLow
NotNegativeEnergy
adw Force #50 RandBoundaryHigh
jsr RandomizeForce
lda ForceTableH,x
bne HighForce
; if Force lower than 256 - set weapon to Baby Missile (for security :) )
lda #ind_Baby_Missile___
sta ActiveWeapon,x
HighForce
rts
.endp
;----------------------------------------------
.proc Cyborg
jsr UseBatteryOrFlag
; use defensives like Tosser
jsr TosserDefensives
; now select best target
jsr FindBestTarget3
sty TargetTankNr
; aiming
jsr TakeAim ; direction still in A (0 - left, >0 - right)
; choose the best weapon
lda TanksWeaponsTableL,x
sta temp
lda TanksWeaponsTableH,x
sta temp+1
ldy #ind_LeapFrog_______ ;the last offensive weapon to use
loop
dey
lda (temp),y
beq loop
tya
sta ActiveWeapon,x
lda Force
sta ForceTableL,x
lda Force+1
sta ForceTableH,x
bne HighForce
; if Force lower than 256 - set weapon to Baby Missile (for security :) )
lda #ind_Baby_Missile___
sta ActiveWeapon,x
HighForce
rts
.endp
;----------------------------------------------
.proc FindBestTarget3
; find target with lowest energy
; X - shooting tank number
; returns target tank number in Y and
; direcion of shoot in A (0 - left, >0 - right)
;----------------------------------------------
jsr MakeLowResDistances
lda #101
sta temp2 ; max possible energy
lda #0
sta tempor2 ; direction of shoot
;ldx TankNr
ldy NumberOfPlayers
dey
loop01
cpy TankNr
beq skipThisPlayer
lda eXistenZ,y
beq skipThisPlayer
lda LowResDistances,x
cmp LowResDistances,y
bcs EnemyOnTheLeft
;enemy on the right
lda Energy,y
cmp temp2 ; lowest
bcs lowestIsLower
sta temp2
sty temp2+1 ; number of the closest tank
inc tempor2 ; set direction to right
bne lowestIsLower
EnemyOnTheLeft
lda Energy,y
cmp temp2 ; lowest
bcs lowestIsLower
sta temp2
sty temp2+1 ; number of the closest tank
lowestIsLower
skipThisPlayer
dey
bpl loop01
; now we have number of the farthest tank in temp2+1
; and direction (0 - left, >0 - right) in tempor2
; let's move them to registers
; in temp2 we have energy of target
ldy temp2+1
lda tempor2
rts
.endp
;----------------------------------------------
.proc FindBestTarget2
; find nearest tank neighbour
; X - shooting tank number
; returns target tank number in Y and
; direcion of shoot in A (0 - left, >0 - right)
;----------------------------------------------
jsr MakeLowResDistances
mva #$ff temp2 ; min possible distance
mva #0 tempor2 ; direction of shoot
;ldx TankNr
ldy NumberOfPlayers
dey
loop01
cpy TankNr
beq skipThisPlayer
lda eXistenZ,y
beq skipThisPlayer
lda LowResDistances,x
cmp LowResDistances,y
bcs EnemyOnTheLeft
;enemy on the right
sec
lda LowResDistances,y
sbc LowResDistances,x
cmp temp2 ; lowest
bcs lowestIsLower
sta temp2
sty temp2+1 ; number of the closest tank
inc tempor2 ; set direction to right
bne lowestIsLower
EnemyOnTheLeft
sec
lda LowResDistances,x
sbc LowResDistances,y
cmp temp2 ; lowest
bcs lowestIsLower
sta temp2
sty temp2+1 ; number of the closest tank
lowestIsLower
skipThisPlayer
dey
bpl loop01
; now we have number of the closest tank in temp2+1
; and direction (0 - left, >0 - right) in tempor2
; let's move them to registers
; in temp2 we have x distance divided by 8
ldy temp2+1
lda tempor2
rts
.endp
/*
;----------------------------------------------
.proc FindBestTarget1
; find farthest tank neighbour
; X - shooting tank number
; returns target tank number in Y and
; direcion of shoot in A (0 - left, >0 - right)
;----------------------------------------------
jsr MakeLowResDistances
lda #$00
sta temp2 ; max possible distance
sta tempor2 ; direction of shoot
;ldx TankNr
ldy NumberOfPlayers
dey
loop01
cpy TankNr
beq skipThisPlayer
lda eXistenZ,y
beq skipThisPlayer
lda LowResDistances,x
cmp LowResDistances,y
bcs EnemyOnTheLeft
;enemy on the right
sec
lda LowResDistances,y
sbc LowResDistances,x
cmp temp2 ; bigest
bcc bigestIsBigger
sta temp2
sty temp2+1 ; number of the farthest tank
inc tempor2 ; set direction to right
bne bigestIsBigger
EnemyOnTheLeft
sec
lda LowResDistances,x
sbc LowResDistances,y
cmp temp2 ; lowest
bcc bigestIsBigger
sta temp2
sty temp2+1 ; number of the farthest tank
bigestIsBigger
skipThisPlayer
dey
bpl loop01
; now we have number of the farthest tank in temp2+1
; and direction (0 - left, >0 - right) in tempor2
; let's move them to registers
; in temp2 we have x distance divided by 8
ldy temp2+1
lda tempor2
rts
.endp
*/
;----------------------------------------------
.proc TakeAim
; targeting the tank number TargetTankNr (and Y)
; A (and tempor2) - direction from shooting tank (0 - left, >0 - right)
; returns angle and power of shoot tank X (TankNr)
; in the appropriate variables (Angle and Force)
;----------------------------------------------
; set initial Angle and Force values
; wind correction 90+(wind/8)
mwa Wind temp2
:7 lsrw temp2
clc
lda #90
adc temp2
sta NewAngle
lda OptionsTable+2 ; selected gravity
asl
tay
; force correction - lower tank Y position - higher possible force
clc
lda #screenheight
sbc Ytankstable,x
sta temp2
clc
lda AIForceTable,y
sta RandBoundaryLow
adc temp2
sta RandBoundaryHigh
lda AIForceTable+1,y
sta RandBoundaryLow+1
adc #0
sta RandBoundaryHigh+1
jsr RandomizeForce
lda ForceTableL,x
sta Force
lda ForceTableH,x
sta Force+1
lda #ind_Baby_Missile___
sta ActiveWeapon,x
; now we have initial valuses
mva #$ff TestFlightFlag
; check targeting direction
lda tempor2
jne AimingLeft
AimingRight
; make test Shoot (Flight)
jsr SetStartAndFlight
lda HitFlag
beq NoHitInFirstLoopR ; impossible :)
bmi GroundHitInFirstLoopR
TankHitInFirstLoopR
; tank hit, but which tank?
; it's our target or not?
ldy HitFlag
dey
cpy TargetTankNr
beq EndOfFirstLoopR ; it's our target!
; if it's another tank then check position like ground hit
GroundHitInFirstLoopR
; checking only x position of hit
ldy TargetTankNr
lda xTanksTableH,y
cmp XHit+1
bne @+
lda xTanksTableL,y
cmp XHit
@
bcs HitOnRightSideOfTargetR
; continue targeting
clc
lda NewAngle
adc #5 ; 5 deg to right
cmp #(180-20)
bcs EndOfFirstLoopR ; if angle 180-20 or higher
sta NewAngle
jmp AimingRight
NoHitInFirstLoopR
; Angle 5 deg to left and end loop
sec
lda NewAngle
sbc #5
sta NewAngle
HitOnRightSideOfTargetR
EndOfFirstLoopR
mva #5 modify ; set counter (5 turns)
SecondLoopR
; make test Shoot (Flight)
jsr SetStartAndFlight
lda HitFlag
beq NoHitInSecondLoopR ; impossible :)
bmi GroundHitInSecondLoopR
TankHitInSecondLoopR
; tank hit, but which tank?
; it's our target or not?
ldy HitFlag
dey
cpy TargetTankNr
beq EndOfSecondLoopR ; it's our target!
; if it's another tank then check position like ground hit
GroundHitInSecondLoopR
; checking only x position of hit
ldy TargetTankNr
lda xTanksTableH,y
cmp XHit+1
bne @+
lda xTanksTableL,y
cmp XHit
@
bcc HitOnLeftSideOfTargetR
; continue targeting
dec NewAngle ; 1 deg to left
dec modify ; max 5 turns
beq EndOfSecondLoopR
jmp SecondLoopR
HitOnLeftSideOfTargetR
; decrease energy (a little)
sbw Force #5
NoHitInSecondLoopR
; Angle 1 deg to right and end loop
inc NewAngle
EndOfSecondLoopR
rts
AimingLeft
; make test Shoot (Flight)
jsr SetStartAndFlight
lda HitFlag
beq NoHitInFirstLoopL ; impossible :)
bmi GroundHitInFirstLoopL
TankHitInFirstLoopL
; tank hit, but which tank?
; it's our target or not?
ldy HitFlag
dey
cpy TargetTankNr
beq EndOfFirstLoopL ; it's our target!
; if it's another tank then check position like ground hit
GroundHitInFirstLoopL
; checking only x position of hit
ldy TargetTankNr
lda xTanksTableH,y
cmp XHit+1
bne @+
lda xTanksTableL,y
cmp XHit
@
bcc HitOnLeftSideOfTargetL
; continue targeting
sec
lda NewAngle
sbc #5 ; 5 deg to left
cmp #21
bcc EndOfFirstLoopL ; if angle 180-20 or higher
sta NewAngle
jmp AimingLeft
NoHitInFirstLoopL
; Angle 5 deg to right and end loop
clc
lda NewAngle
adc #5
sta NewAngle
HitOnLeftSideOfTargetL
EndOfFirstLoopL
mva #5 modify ; set counter (5 turns)
SecondLoopL
; make test Shoot (Flight)
jsr SetStartAndFlight
lda HitFlag
beq NoHitInSecondLoopL ; impossible :)
bmi GroundHitInSecondLoopL
TankHitInSecondLoopL
; tank hit, but which tank?
; it's our target or not?
ldy HitFlag
dey
cpy TargetTankNr
beq EndOfSecondLoopL ; it's our target!
; if it's another tank then check position like ground hit
GroundHitInSecondLoopL
; checking only x position of hit
ldy TargetTankNr
lda xTanksTableH,y
cmp XHit+1
bne @+
lda xTanksTableL,y
cmp XHit
@
bcs HitOnRightSideOfTargetL
; continue targeting
inc NewAngle ; 1 deg to right
dec modify ; max 5 turns
beq EndOfSecondLoopL
jmp SecondLoopL
HitOnRightSideOfTargetL
; decrease energy (a little)
sbw Force #5
NoHitInSecondLoopL
; Angle 1 deg to left and end loop
dec NewAngle
EndOfSecondLoopL
rts
SetStartAndFlight ; set start point (virtual barrel end :) ) and make test flight
; xtraj+1 and ytraj+1 set
clc
lda xTanksTableL,x
adc #4
sta xtraj+1
lda xTanksTableH,x
adc #0
sta xtraj+2
sec
lda yTanksTable,x
sbc #4
sta ytraj+1
mva #0 ytraj+2
mva NewAngle Angle
jsr Flight
ldx TankNr
rts
.endp .endp
;---------------------------------------------- ;----------------------------------------------
.proc PurchaseAI ; .proc PurchaseAI ;
@@ -335,10 +844,10 @@ PurchaseAIRoutines
.word ShooterPurchase-1 ;ShooterPurchase .word ShooterPurchase-1 ;ShooterPurchase
.word PoolsharkPurchase-1 ;PoolsharkPurchase .word PoolsharkPurchase-1 ;PoolsharkPurchase
.word TosserPurchase-1 ;TosserPurchase .word TosserPurchase-1 ;TosserPurchase
.word PoolsharkPurchase-1 ;ChooserPurchase .word TosserPurchase-1 ;ChooserPurchase
.word PoolsharkPurchase-1 ;SpoilerPurchase .word CyborgPurchase-1 ;SpoilerPurchase
.word PoolsharkPurchase-1 ;CyborgPurchase .word CyborgPurchase-1 ;CyborgPurchase
.word PoolsharkPurchase-1 ;UnknownPurchase .word TosserPurchase-1 ;UnknownPurchase
;---------------------------------------------- ;----------------------------------------------
.proc MoronPurchase .proc MoronPurchase
@@ -346,13 +855,41 @@ PurchaseAIRoutines
rts rts
.endp .endp
;------- ;-------
.proc TryToPurchaseOnePiece2 ; for Cyborg
; A - weapon number, better it will be in range(1,32)
; TankNr in X
; DOES NOT CHANGE X
tay
sta temp+1
:3 lsr ; A=A/8
sta temp
tya
and #%00000111
tay
lda bittable,y
ldy temp
and PurchaseMeTable2,y
beq TryToPurchaseOnePiece.SorryNoPurchase
jmp TryToPurchaseOnePiece.PurchaseIt
.endp
;-------
.proc TryToPurchaseOnePiece .proc TryToPurchaseOnePiece
; A - weapon number, better it will be in range(1,32) ; A - weapon number, better it will be in range(1,32)
; TankNr in X ; TankNr in X
; DOES NOT CHANGE X ; DOES NOT CHANGE X
tay tay
lda PurchaseMeTable,y sta temp+1
:3 lsr ; A=A/8
sta temp
tya
and #%00000111
tay
lda bittable,y
ldy temp
and PurchaseMeTable,y
beq SorryNoPurchase beq SorryNoPurchase
PurchaseIt
ldy temp+1
lda WeaponPriceL,y lda WeaponPriceL,y
sta temp sta temp
lda WeaponPriceH,y lda WeaponPriceH,y
@@ -422,7 +959,7 @@ SorryNoPurchase
mva #3 tempXroller; number of offensive purchases to perform mva #3 tempXroller; number of offensive purchases to perform
ldx TankNr ldx TankNr
@ @
randomize ind_Battery________ ind_Auto_Defense___ randomize ind_Battery________ ind_Bouncy_Castle__
jsr TryToPurchaseOnePiece jsr TryToPurchaseOnePiece
dec tempXroller dec tempXroller
bne @- bne @-
@@ -443,12 +980,12 @@ SorryNoPurchase
; what is my money level ; what is my money level
ldx TankNr ldx TankNr
lda MoneyH,x ; money / 256 ; lda MoneyH,x ; money / 256
sta tempXroller ; perform this many purchase attempts ; sta tempXroller ; perform this many purchase attempts
; first try to buy defensives ; first try to buy defensives
mva #3 tempXroller; number of defensive purchases to perform mva #1 tempXroller; number of defensive purchases to perform
@ @
randomize ind_Battery________ ind_Auto_Defense___ randomize ind_Battery________ ind_Bouncy_Castle__
jsr TryToPurchaseOnePiece jsr TryToPurchaseOnePiece
dec tempXroller dec tempXroller
bne @- bne @-
@@ -465,3 +1002,30 @@ SorryNoPurchase
rts rts
.endp .endp
;----------------------------------------------
.proc CyborgPurchase
; what is my money level
ldx TankNr
;lda MoneyH,x ; money / 256
;sta tempXroller ; perform this many purchase attempts
; first try to buy defensives
mva #1 tempXroller; number of defensive purchases to perform
@
randomize ind_Battery________ ind_Bouncy_Castle__
jsr TryToPurchaseOnePiece2
dec tempXroller
bne @-
; and now offensives
lda MoneyH,x ; money / 256
:4 asl ;*16
sta tempXroller ; perform this many purchase attempts
@
randomize ind_Missile________ ind_Plasma_Blast___
jsr TryToPurchaseOnePiece2
dec tempXroller
bne @-
rts
.endp
-498
View File
@@ -1,498 +0,0 @@
; @com.wudsn.ide.asm.mainsourcefile=../scorch.asm
/***************************************/
/* Use MADS http://mads.atari8.info/ */
/* Mode: DLI (char mode) */
/***************************************/
;icl "HIMARS14.h"
;ICL '../lib/atari.hea'
WIDTH = 40
HEIGHT = 30
; --- BASIC switch OFF
org $2000\ mva #$ff portb\ rts\ ini $2000
; --- dmsc LZSS player routine on zero page
org $80
chn_copy .ds 9
chn_pos .ds 9
bptr .ds 2
cur_pos .ds 1
chn_bits .ds 1
bit_data .byte 1
.proc get_byte
lda song_data+1
inc song_ptr
bne skip
inc song_ptr+1
skip
rts
.endp
song_ptr = get_byte + 1
fcnt .ds 2
fadr .ds 2
fhlp .ds 2
cloc .ds 1
regA .ds 1
regX .ds 1
regY .ds 1
; --- MAIN PROGRAM
org $2000
ant dta $80
dta $42,a(scr),$02,$02,$02,$02,$02,$02,$02,$02,$02,$82,$02,$02,$02,$02,$82
dta $02,$02,$02,$82,$82,$82,$02,$82,$02,$02,$02,$82
dta $42,a(verline)
dta $41,a(ant)
verline
:37 dta d" "
build
scr ins "HIMARS14.scr"
.ds 2*40
.ALIGN $0400
fnt ins "HIMARS14.fnt"
ift USESPRITES
.ALIGN $0800
pmg .ds $0300
ift FADECHR = 0
SPRITES
els
.ds $500
eif
eif
song_data
ins 'mmm_16.lzs'
song_end
POKEY = $D200
buffers
.ds 256 * 9
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Song Initialization - this runs in the first tick:
;
.proc init_song
; Example: here initializes song pointer:
;mwa #song_data song_ptr
; Init all channels:
ldx #8
ldy #0
clear
; Read just init value and store into buffer and POKEY
jsr get_byte
sta POKEY, x
sty chn_copy, x
cbuf
sta buffers + 255
inc cbuf + 2
dex
bpl clear
; Initialize buffer pointer:
sty bptr
sty cur_pos
rts
.endp
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Wait for next frame
;
.proc wait_frame
lda 20
delay
cmp 20
beq delay
.endp
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Play one frame of the song
;
.proc play_frame
lda #>buffers
sta bptr+1
lda song_data
sta chn_bits
ldx #8
; Loop through all "channels", one for each POKEY register
chn_loop:
lsr chn_bits
bcs skip_chn ; C=1 : skip this channel
lda chn_copy, x ; Get status of this stream
bne do_copy_byte ; If > 0 we are copying bytes
; We are decoding a new match/literal
lsr bit_data ; Get next bit
bne got_bit
jsr get_byte ; Not enough bits, refill!
ror ; Extract a new bit and add a 1 at the high bit (from C set above)
sta bit_data ;
got_bit:
jsr get_byte ; Always read a byte, it could mean "match size/offset" or "literal byte"
bcs store ; Bit = 1 is "literal", bit = 0 is "match"
sta chn_pos, x ; Store in "copy pos"
jsr get_byte
sta chn_copy, x ; Store in "copy length"
; And start copying first byte
do_copy_byte:
dec chn_copy, x ; Decrease match length, increase match position
inc chn_pos, x
ldy chn_pos, x
; Now, read old data, jump to data store
lda (bptr), y
store:
ldy cur_pos
sta POKEY, x ; Store to output and buffer
sta (bptr), y
skip_chn:
; Increment channel buffer pointer
inc bptr+1
dex
bpl chn_loop ; Next channel
inc cur_pos
.endp
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Check for ending of song and jump to the next frame
;
.proc check_end_song
lda song_ptr + 1
cmp #>song_end
;bne wait_frame
lda song_ptr
cmp #<song_end
;bne wait_frame
.endp
end_loop
rts
main
jsr init_song
; --- init PMG
ift USESPRITES
mva >pmg pmbase ;missiles and players data address
mva #$03 pmcntl ;enable players and missiles
eif
lda:cmp:req $14 ;wait 1 frame
; copy system font to $a000
ldx #0
@ lda $e000,x
sta $a000,x
;lda $e100,x ; i need digits only :]
;sta $a100,x
;lda $e200,x
;sta $a200,x
;lda $e300,x
;sta $a300,x
inx
bne @-
sei ;stop IRQ interrupts
mva #$00 nmien ;stop NMI interrupts
sta dmactl
mva #$fe portb ;switch off ROM to get 16k more ram
mwa #NMI $fffa ;new NMI handler
mva #$c0 nmien ;switch on NMI+DLI again
ift CHANGES ;if label CHANGES defined
_lp lda trig0 ; FIRE #0
beq stop
lda trig1 ; FIRE #1
beq stop
lda consol ; START
and #1
beq stop
lda skctl
and #$04
bne _lp ;wait to press any key; here you can put any own routine
els
null jmp DLI.dli1 ;CPU is busy here, so no more routines allowed
eif
stop
mva #$00 pmcntl ;PMG disabled
tax
sta:rne hposp0,x+
mva #$ff portb ;ROM switch on
mva #$40 nmien ;only NMI interrupts, DLI disabled
cli ;IRQ enabled
lda #0
ldx #8
@ sta POKEY,x
dex
bpl @-
;no glitching please (issue #67)
lda #0
sta $D400 ;dmactl
sta $022F ;dmactls
rts ;return to ... DOS
; --- DLI PROGRAM
.local DLI
?old_dli = *
ift !CHANGES
dli1 lda trig0 ; FIRE #0
beq stop
lda trig1 ; FIRE #1
beq stop
lda consol ; START
and #1
beq stop
lda skctl
and #$04
beq stop
lda vcount
cmp #$02
bne dli1
:3 sta wsync
DLINEW dli10
eif
dli_start
dli10
sta regA
c4 lda #$04
sta wsync ;line=8
sta color0
sta gtictl
DLINEW DLI.dli2 1 0 0
dli2
sta regA
lda >fnt+$400*$01
sta wsync ;line=96
sta chbase
DLINEW dli3 1 0 0
dli3
sta regA
lda >fnt+$400*$02
sta wsync ;line=136
sta chbase
DLINEW dli4 1 0 0
dli4
sta regA
lda >fnt+$400*$01
sta wsync ;line=168
sta chbase
DLINEW dli5 1 0 0
dli5
sta regA
lda >fnt+$400*$02
sta wsync ;line=176
sta chbase
DLINEW dli6 1 0 0
dli6
sta regA
lda >fnt+$400*$03
sta wsync ;line=184
sta chbase
DLINEW dli7 1 0 0
dli7
sta regA
lda >fnt+$400*$00
sta wsync ;line=200
sta chbase
DLINEW dli11 1 0 0
dli11
sta regA
lda #>$a000 ; system font
sta wsync ;line=232
sta chbase
lda #$01
sta gtictl
lda regA
rti
.endl
; ---
CHANGES = 1
FADECHR = 0
SCHR = 127
; ---
.proc NMI
bit nmist
bpl VBL
jmp DLI.dli_start
dliv equ *-2
VBL
sta regA
stx regX
sty regY
sta nmist ;reset NMI flag
mwa #ant dlptr ;ANTIC address program
mva #@dmactl(standard|dma|lineX1) dmactl ;set new screen width
inc cloc ;little timer
; Initial values
lda >fnt+$400*$00
sta chbase
c0 lda #$00
sta colbak
lda #$02
sta chrctl
lda #$01
sta gtictl
c1 lda #$0C
sta color1
c2 lda #$02
sta color2
c3 lda #$0E
sta color3
x0 lda #$00
sta hposp0
sta hposp1
sta hposp2
sta hposp3
sta hposm0
sta hposm1
sta hposm2
sta hposm3
sta sizep0
sta sizep1
sta sizep2
sta sizep3
sta sizem
sta colpm0
sta colpm1
sta colpm2
sta colpm3
sta color0
mwa #DLI.dli_start dliv ;set the first address of DLI interrupt
;this area is for yours routines
jsr play_frame
quit
lda regA
ldx regX
ldy regY
rti
.endp
; ---
ini main
; ---
;opt l-
.MACRO SPRITES
missiles
.ds $100
player0
.ds $100
player1
.ds $100
player2
.ds $100
player3
.ds $100
.ENDM
USESPRITES = 0
.MACRO DLINEW
mva <:1 NMI.dliv
ift [>?old_dli]<>[>:1]
mva >:1 NMI.dliv+1
eif
ift :2
lda regA
eif
ift :3
ldx regX
eif
ift :4
ldy regY
eif
rti
.def ?old_dli = *
.ENDM
Binary file not shown.
Binary file not shown.
Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.
+877
View File
@@ -0,0 +1,877 @@
/***************************************/
/* Use MADS http://mads.atari8.info/ */
/* Mode: DLI (char mode) */
/***************************************/
;icl "Scorch50.h"
; --- dmsc LZSS player routine on zero page
org $80
chn_copy .ds 9
chn_pos .ds 9
bptr .ds 2
cur_pos .ds 1
chn_bits .ds 1
bit_data .ds 1
fcnt .ds 2
fadr .ds 2
fhlp .ds 2
cloc .ds 1
regA .ds 1
regX .ds 1
regY .ds 1
WIDTH = 40
HEIGHT = 30
; --- BASIC switch OFF
org $2000\ mva #$ff portb\ rts\ ini $2000
; --- MAIN PROGRAM
org $2000
ant dta $C2,a(scr)
dta $02,$82,$02,$02,$82,$02,$82,$02,$82,$02,$02,$02,$82,$02,$82,$82
dta $02,$02,$82,$02,$02,$82,$02,$02,$82,$82,$02,$82,$22
;dta $42,a(verline)
dta $41,a(ant)
;verline
; :37 dta d" "
; dta build
scr ins "Scorch50.scr"
.ds 0*40
.ALIGN $0400
fnt ins "Scorch50.fnt"
ift USESPRITES
.ALIGN $0800
pmg .ds $0300
ift FADECHR = 0
SPRITES
els
.ds $500
eif
eif
song_data
ins 'mmm_16.lzs'
song_end
POKEY = $D200
buffers
.ds 256 * 9
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Song Initialization - this runs in the first tick:
;
.proc init_song
mva #1 bit_data
; Example: here initializes song pointer:
;mwa #song_data song_ptr
; Init all channels:
ldx #8
ldy #0
clear
; Read just init value and store into buffer and POKEY
jsr get_byte
sta POKEY, x
sty chn_copy, x
cbuf
sta buffers + 255
inc cbuf + 2
dex
bpl clear
; Initialize buffer pointer:
sty bptr
sty cur_pos
rts
.endp
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Wait for next frame
;
.proc wait_frame
lda 20
delay
cmp 20
beq delay
.endp
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Play one frame of the song
;
.proc play_frame
lda #>buffers
sta bptr+1
lda song_data
sta chn_bits
ldx #8
; Loop through all "channels", one for each POKEY register
chn_loop:
lsr chn_bits
bcs skip_chn ; C=1 : skip this channel
lda chn_copy, x ; Get status of this stream
bne do_copy_byte ; If > 0 we are copying bytes
; We are decoding a new match/literal
lsr bit_data ; Get next bit
bne got_bit
jsr get_byte ; Not enough bits, refill!
ror ; Extract a new bit and add a 1 at the high bit (from C set above)
sta bit_data ;
got_bit:
jsr get_byte ; Always read a byte, it could mean "match size/offset" or "literal byte"
bcs store ; Bit = 1 is "literal", bit = 0 is "match"
sta chn_pos, x ; Store in "copy pos"
jsr get_byte
sta chn_copy, x ; Store in "copy length"
; And start copying first byte
do_copy_byte:
dec chn_copy, x ; Decrease match length, increase match position
inc chn_pos, x
ldy chn_pos, x
; Now, read old data, jump to data store
lda (bptr), y
store:
ldy cur_pos
sta POKEY, x ; Store to output and buffer
sta (bptr), y
skip_chn:
; Increment channel buffer pointer
inc bptr+1
dex
bpl chn_loop ; Next channel
inc cur_pos
.endp
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Check for ending of song and jump to the next frame
;
; not checking really so the tune gets funky :)))
;lda song_ptr + 1
;cmp #>song_end
;bne wait_frame
;lda song_ptr
;cmp #<song_end
;bne wait_frame
end_loop
rts
song_ptr = get_byte + 1
.proc get_byte
lda song_data+1
inc song_ptr
bne skip
inc song_ptr+1
skip
rts
.endp
main
jsr init_song
; ; copy system font to $a000
; ldx #0
;@ lda $e000,x
; sta $a000,x
; ;lda $e100,x ; i need digits only :]
; ;sta $a100,x
; ;lda $e200,x
; ;sta $a200,x
; ;lda $e300,x
; ;sta $a300,x
; inx
; bne @-
; --- init PMG
ift USESPRITES
mva >pmg pmbase ;missiles and players data address
mva #$03 pmcntl ;enable players and missiles
eif
lda:cmp:req $14 ;wait 1 frame
sei ;stop IRQ interrupts
mva #$00 nmien ;stop NMI interrupts
sta dmactl
;mva #$fe portb ;switch off ROM to get 16k more ram
;mwa #NMI $fffa ;new NMI handler
sta colbaks
lda #$0E
sta colpf1s
lda #$84
sta colpf2s
lda #$0E
sta colpf3s
lda #$02
VMAIN NMI.vbl,6 ;jsr SetVBL
VDLI DLI.dli_start
mva #1 vscrol
mva #$c0 nmien ;switch on NMI+DLI again
_lp lda trig0 ; FIRE #0
beq stop
lda trig1 ; FIRE #1
beq stop
lda consol ; START
and #1
beq stop
lda skctl
and #$04
bne _lp ;wait to press any key; here you can put any own routine
stop
cli
vmain sysvbv,6
mva #$00 pmcntl ;PMG disabled
tax
sta:rne hposp0,x+
;mva #$ff portb ;ROM switch on
mva #$40 nmien ;only NMI interrupts, DLI disabled
;cli ;IRQ enabled
lda #0
ldx #8
@ sta POKEY,x
dex
bpl @-
;no glitching please (issue #67)
lda #0
sta $D400 ;dmactl
sta $022F ;dmactls
rts ;return to ... DOS
; --- DLI PROGRAM
.local DLI
?old_dli = *
dli_start
dli13
sta regA
sta wsync ;line=8
sta wsync ;line=9
sta wsync ;line=10
sta wsync ;line=11
sta wsync ;line=12
sta wsync ;line=13
c9 lda #$14
sta wsync ;line=14
sta colpm3
DLINEW DLI.dli2 1 0 0
dli2
sta regA
lda >fnt+$400*$01
sta wsync ;line=24
sta chbase
DLINEW dli3 1 0 0
dli3
sta regA
lda >fnt+$400*$02
sta wsync ;line=48
sta chbase
sta wsync ;line=49
sta wsync ;line=50
sta wsync ;line=51
s3 lda #$07
sta wsync ;line=52
sta sizem
DLINEW dli14 1 0 0
dli14
sta regA
stx regX
sty regY
x8 lda #$A3
sta wsync ;line=64
sta hposp3
x9 lda #$AB
sta wsync ;line=65
sta hposm3
sta wsync ;line=66
sta wsync ;line=67
sta wsync ;line=68
sta wsync ;line=69
sta wsync ;line=70
s4 lda #$13
x10 ldx #$A6
sta wsync ;line=71
sta sizem
stx hposm2
s5 lda #$01
x11 ldx #$72
x12 ldy #$62
sta wsync ;line=72
sta sizep2
sta sizep3
stx hposp2
sty hposp3
x13 lda #$A9
sta wsync ;line=73
sta hposp1
DLINEW dli4 1 1 1
dli4
sta regA
lda >fnt+$400*$03
sta wsync ;line=80
sta chbase
DLINEW dli5 1 0 0
dli5
sta regA
stx regX
lda >fnt+$400*$04
sta wsync ;line=112
sta chbase
sta wsync ;line=113
sta wsync ;line=114
sta wsync ;line=115
sta wsync ;line=116
sta wsync ;line=117
sta wsync ;line=118
s6 lda #$07
x14 ldx #$A3
sta wsync ;line=119
sta sizem
stx hposm1
s7 lda #$01
x15 ldx #$93
sta wsync ;line=120
sta sizep1
stx hposp1
DLINEW dli15 1 1 0
dli15
sta regA
stx regX
sta wsync ;line=128
sta wsync ;line=129
sta wsync ;line=130
sta wsync ;line=131
x16 lda #$4A
sta wsync ;line=132
sta hposp1
c10 lda #$D4
sta wsync ;line=133
sta color2
s8 lda #$C3
x17 ldx #$5A
sta wsync ;line=134
sta sizem
stx hposm3
DLINEW dli6 1 1 0
dli6
sta regA
stx regX
sty regY
lda >fnt+$400*$05
sta wsync ;line=136
sta chbase
sta wsync ;line=137
sta wsync ;line=138
sta wsync ;line=139
sta wsync ;line=140
sta wsync ;line=141
sta wsync ;line=142
s9 lda #$C7
x18 ldx #$A9
sta wsync ;line=143
sta sizem
stx hposm1
s10 lda #$D7
x19 ldx #$9E
c11 ldy #$02
sta wsync ;line=144
sta sizem
stx hposm2
sty colpm2
sta wsync ;line=145
c12 lda #$04
sta wsync ;line=146
sta colpm1
sta wsync ;line=147
sta wsync ;line=148
sta wsync ;line=149
s11 lda #$00
x20 ldx #$74
c13 ldy #$02
sta wsync ;line=150
sta sizep3
stx hposp3
sty colpm3
sta wsync ;line=151
sta wsync ;line=152
sta wsync ;line=153
sta wsync ;line=154
sta wsync ;line=155
sta wsync ;line=156
sta wsync ;line=157
c14 lda #$04
sta wsync ;line=158
sta color0
DLINEW dli7 1 1 1
dli7
sta regA
lda >fnt+$400*$06
sta wsync ;line=160
sta chbase
DLINEW dli8 1 0 0
dli8
sta regA
stx regX
sty regY
lda >fnt+$400*$07
sta wsync ;line=184
sta chbase
sta wsync ;line=185
s12 lda #$00
x21 ldx #$8E
c15 ldy #$08
sta wsync ;line=186
sta sizep2
stx hposp2
sty colpm2
x22 lda #$4C
c16 ldx #$0E
sta wsync ;line=187
sta hposp3
stx colpm3
c17 lda #$0A
c18 ldx #$34
sta wsync ;line=188
sta color1
stx colpm3
s13 lda #$43
x23 ldx #$49
sta wsync ;line=189
sta sizem
stx hposm3
c19 lda #$08
c20 ldx #$34
sta wsync ;line=190
sta color1
stx colpm2
sta wsync ;line=191
c21 lda #$0A
sta wsync ;line=192
sta color1
c22 lda #$08
sta wsync ;line=193
sta color1
c23 lda #$0A
sta wsync ;line=194
sta color1
c24 lda #$34
sta wsync ;line=195
sta color2
c25 lda #$0C
sta wsync ;line=196
sta color1
c26 lda #$0A
sta wsync ;line=197
sta color1
c27 lda #$0C
sta wsync ;line=198
sta color1
sta wsync ;line=199
sta wsync ;line=200
c28 lda #$0E
sta wsync ;line=201
sta color1
c29 lda #$0C
sta wsync ;line=202
sta color1
c30 lda #$0E
sta wsync ;line=203
sta color1
c31 lda #$0C
sta wsync ;line=204
sta color1
c32 lda #$0E
sta wsync ;line=205
sta color1
DLINEW dli16 1 1 1
dli16
sta regA
sta wsync ;line=208
sta wsync ;line=209
c33 lda #$0C
sta wsync ;line=210
sta color1
c34 lda #$0E
sta wsync ;line=211
sta color1
c35 lda #$0C
sta wsync ;line=212
sta color1
DLINEW dli9 1 0 0
dli9
sta regA
stx regX
sty regY
lda >fnt+$400*$08
c36 ldx #$0A
sta wsync ;line=216
sta chbase
stx color1
c37 lda #$0C
sta wsync ;line=217
sta color1
c38 lda #$0A
x24 ldx #$9D
c39 ldy #$34
sta wsync ;line=218
sta color1
stx hposm1
sty colpm1
s14 lda #$03
x25 ldx #$7D
sta wsync ;line=219
sta sizep3
stx hposp3
c40 lda #$08
s15 ldx #$13
x26 ldy #$45
sta wsync ;line=220
sta color1
stx sizem
sty hposm2
s16 lda #$03
x27 ldx #$59
sta wsync ;line=221
sta sizep2
stx hposp2
s17 lda #$53
x28 ldx #$49
x29 ldy #$79
sta wsync ;line=222
sta sizem
stx hposp1
sty hposm3
c41 lda #$06
c42 ldx #$00
sta wsync ;line=223
sta color1
stx color2
lda >fnt+$400*$01
s18 ldx #$50
x30 ldy #$44
sta wsync ;line=224
sta chbase
stx sizem
sty hposm0
sta wsync ;line=225
c43 lda #$08
sta wsync ;line=226
sta color1
c44 lda #$0C
sta wsync ;line=227
sta color1
sta wsync ;line=228
sta wsync ;line=229
c45 lda #$0E
sta wsync ;line=230
sta color1
DLINEW dli10 1 1 1
dli10
sta regA
lda >fnt+$400*$00
sta wsync ;line=232
sta chbase
;DLINEW dli11 1 0 0
lda regA
rti
;dli11
; sta regA
;
; lda #>$a000 ; system font
; sta wsync ;line=232
; sta chbase
; lda #$01
; sta gtictl
;
; lda regA
; rti
.endl
; ---
CHANGES = 1
FADECHR = 0
SCHR = 127
dliv = $0200
; ---
.proc NMI
bit nmist
bpl VBL
jmp DLI.dli_start
VBL
sta regA
stx regX
sty regY
;sta nmist ;reset NMI flag
mwa #ant dlptr ;ANTIC address program
mva #@dmactl(standard|dma|lineX1|players|missiles) dmactl ;set new screen width
inc cloc ;little timer
; Initial values
lda >fnt+$400*$00
sta chbase
c0 lda #$00
sta colbak
c1 lda #$0E
sta color1
c2 lda #$84
sta color2
c3 lda #$0E
sta color3
lda #$02
sta chrctl
lda #$01
sta gtictl
sta sizep0
s0 lda #$03
sta sizem
x0 lda #$D0
sta hposp0
x1 lda #$28
sta hposm0
c4 lda #$00
sta colpm0
x2 lda #$A2
sta hposm3
c5 lda #$0E
sta colpm3
s1 lda #$00
sta sizep2
sta sizep3
x3 lda #$92
sta hposp2
x4 lda #$8A
sta hposp3
c6 lda #$14
sta colpm2
s2 lda #$00
sta sizep1
x5 lda #$9A
sta hposp1
c7 lda #$14
sta colpm1
x6 lda #$A4
sta hposm2
x7 lda #$A6
sta hposm1
c8 lda #$00
sta color0
mwa #DLI.dli_start dliv ;set the first address of DLI interrupt
;this area is for yours routines
jsr play_frame
quit
lda regA
ldx regX
ldy regY
jmp sysvbv
.endp
; ---
ini main
; ---
opt l-
.MACRO SPRITES
missiles
.he 00 00 00 00 00 00 00 00 03 03 C3 03 03 03 03 03
.he 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03
.he 03 03 03 03 03 03 03 03 03 83 83 83 C3 C3 C3 C3
.he C3 C3 C3 C3 C3 E3 E3 E3 E3 E3 E3 F3 F3 F3 F3 FB
.he FB FB FB FB FF FF FF FF F3 33 83 83 83 83 C3 D3
.he D3 D3 13 03 03 03 03 03 03 03 03 03 03 03 03 03
.he 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03
.he 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 0F
.he 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 03 03 03 03 C3 C3
.he C3 C3 C3 C3 C3 C3 C3 C3 C3 D3 FF FF 3F 3F 3F 3F
.he 3F 3F 33 13 03 03 03 03 03 03 03 03 03 03 03 03
.he 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03
.he 03 03 03 03 03 03 03 43 43 C3 C3 C3 C3 03 03 03
.he 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03
.he 03 03 0F 0F 3F 3F FF FC FE FE FF DB 03 03 03 03
.he 03 03 03 03 03 03 03 03 00 00 00 00 00 00 00 00
player0
.he 00 00 00 00 00 00 00 00 FF FF FF FF FF FF FF FF
.he FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
.he FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
.he FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
.he FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
.he FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
.he FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
.he FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
.he FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
.he FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
.he FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
.he FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
.he FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
.he FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
.he FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
.he FF FF FF FF FF FF FF FF 00 00 00 00 00 00 00 00
player1
.he 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
.he 00 00 00 00 00 00 00 00 F0 FC FE FE FF FF FF FF
.he FF 0F 0F 0F 0F 0F 0F 0F 0F 0F 07 07 07 07 07 07
.he 03 03 03 FF FF FF FF FF CF CF FF FF FF FF FF 9F
.he 9F FF FF FF FF FF FF FF 00 00 00 00 00 00 00 00
.he 00 F0 F0 F0 F0 78 F8 78 78 78 78 38 78 38 3C 3C
.he 3C 3C 1C 3C 1C 1C 1C 1C 1E 1E 1E 1E 0E 1E 0E 0E
.he 0E 0F 07 0F 07 0F 07 07 07 07 07 07 06 06 06 06
.he FF FF FF FF FF FF FF FF FF FF FF 00 00 3E 3F 7F
.he 7F 7F 7F 7F 7F 7F 7F 3F 3F 3F 00 00 00 00 00 00
.he 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
.he 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
.he 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
.he 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
.he 00 00 00 00 00 00 FF FF FF FF FF FF 00 00 00 00
.he 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
player2
.he 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
.he 00 00 00 00 00 00 00 00 FF FF FF FF FF FF FF FF
.he FF 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
.he 00 00 00 FF FF FF FF FF 99 99 FF FF FF FF FF 33
.he 33 FF FF FF FF FF FF FF 00 00 00 00 00 00 00 00
.he 00 00 80 F0 F8 F8 F8 FC FC FC FC FC FC FC FC FC
.he FC FE FE FE FE FE FE FF FF FF FF FF FF FF FE FC
.he F8 F8 F8 F8 F0 F0 F0 F0 F0 F0 F0 F0 E0 E0 E0 E0
.he E0 E0 E0 FC FE FE FF FF 8F 87 87 87 07 07 07 07
.he 07 07 07 07 07 07 07 03 00 00 00 00 00 00 00 00
.he 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
.he 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
.he 00 00 00 00 00 00 F8 FC FC FE FE FF FF 00 00 00
.he 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
.he 00 00 00 00 00 00 FF FF FF FF FF FF 00 00 00 00
.he 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
player3
.he 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
.he 00 00 00 00 00 00 00 00 01 07 0F 1F 1F 3F 3F 7F
.he 7F 78 78 F0 F0 F0 F0 F8 F8 F8 78 7C 7C 7C 3C 3E
.he 3E 3E 1E 1F 1F 1F 0F 0F 0F 0F 0F 1F 1F 1F 1F 1F
.he 1F 3F 3F 3F 3F 3F 3F 3F FF 7F 7F 3F 3F 1F 1F 0F
.he 1F 1F 1F 3F 3F 3F 3F 3F 3F 3B 30 30 30 30 30 30
.he 30 30 30 30 38 3E 7F 7F 7F 7F 7F 7F 7F 7F 7F 7F
.he 7F 7F 7F 7F 7F 7F 7F FF FF FF FF FF FF FF FF FF
.he FF FF FF FF FF FF FF FF 7F 7F 7F 7F 7F 7F FF FF
.he FF FF FF FF FE FE FE FE FE FE FE FE FC 1C FF 7E
.he 7E FE FE FE FE FF FF FF 7F 7E 7E 3C 00 00 00 00
.he 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
.he 00 00 00 00 00 7C FE FE FF FF FF 00 00 00 00 00
.he 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
.he 00 00 00 FF FF FF FF FF FF FF FF FF 00 00 00 00
.he 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
.ENDM
USESPRITES = 1
.MACRO DLINEW
mva <:1 dliv
ift [>?old_dli]<>[>:1]
mva >:1 dliv+1
eif
ift :2
lda regA
eif
ift :3
ldx regX
eif
ift :4
ldy regY
eif
rti
.def ?old_dli = *
.ENDM
Binary file not shown.
Binary file not shown.
-54
View File
@@ -1,54 +0,0 @@
IN TIMES OF TROUBLE, GO WITH WHAT YOU KNOW.
DIE!
EAT MY SHORTS!
YOU'RE TOAST!
BANZAI!
FROM HELL'S HEART I STAB AT THEE...
I DIDN'T DO IT. NOBODY SAW ME DO IT.
TAKE A HIKE!
YOU'RE DEAD MEAT.
MAKE MY DAY.
CHARGE!
ATTACK!
YOU'RE OUTTA HERE.
WATTSA MATTA YOU?
FREEZE, OR I'LL SHOOT!
HA HA HA.
WE COME IN PEACE - SHOOT TO KILL!
IN YOUR FACE!
DIE COMMIE PIG!
I LOVE THE SMELL OF NAPALM IN THE MORNING.
VICTORY!
SHOW SOME RESPECT.
JUST WHO DO YOU THINK YOU ARE?
LOOK OUT BELOW!
KNOCK, KNOCK.
LOOK OVER THERE.
GUESS WHAT'S COMING FOR DINNER?
MERRY CHRISTMAS.
OPEN WIDE!
HERE GOES NOTHING...
DON'T WORRY, IT ISN'T A LIVE ROUND.
BLOOD, PAIN, VIOLENCE!
TAKE THIS, SISSY!
I SHALL FLATTEN YOU!
I SHALL SMASH YOUR UGLY TANK!
I WONDER WHAT THIS BUTTON DOES?
DON'T TAKE THIS PERSONALLY.
WOULD THIS MAKE YOU MAD?
I TOLD YOU TO LEAVE MY SISTER ALONE!
I COULD SPARE YOU, BUT WHY?
MY BOMB IS BIGGER THAN YOURS.
DON'T FORGET ABOUT ME!
HASTA LA VISTA, BABY!
THIS IS YOUR BRAIN ON SCORCH.
TAKE THIS!
THIS SCREEN AIN'T BIG ENOUGH FOR THE BOTH OF US.
DIE, ALIEN SWINE!
SAY 'ARRGGHHHHH....'
I SHALL OIL MY TURRET WITH YOUR BLOOD.
DIE, TANK-SCUM!
I'M GONNA BREAK YOUR FACE!
MAMA SAID KNOCK YOU OUT!
I HOPE YOU ENJOY PAIN!
PARTING IS SUCH SWEET SORROW... NOT!
-60
View File
@@ -1,60 +0,0 @@
UGH!
AARGH!
AAAGGHHH!
I'M MELTING!
OOF..
OH!
EEEK!
AACCH!
I HATE IT WHEN THAT HAPPENS.
ONE DIRECT HIT CAN RUIN YOUR WHOLE DAY.
OH NO!
NOT ME!
OUCH.
OH NO, NOT AGAIN.
ANOTHER ONE BITES THE DUST.
GOODBYE.
HELP ME!
FAREWELL, CRUEL WORLD.
REMEMBER THE ALAMO!
OH MAN!
DOOUGH!
ANOTHER DAY, ANOTHER BOMB.
THIS IS THE END, MY ONLY FRIEND.
IT'S ALL OVER.
THE FAT LADY SANG.
WHY DOES EVERYTHING HAPPEN TO ME?
I'M GOING DOWN.
I'VE GOT A BAD FEELING ABOUT THIS.
CRAPOLA.
POW!
BIF!
BAM!
ZONK!
I SHOULD'VE LISTENED TO MY MOTHER...
NO... A BUD LIGHT!
WHAT WAS THAT NOISE?
MAMA SAID THERE'D BE DAYS LIKE THIS.
ITS JUST ONE OF THOSE DAYS...
I SEE A BRIGHT LIGHT...
MOMMY? IS THAT YOU?
I LET YOU HIT ME!
SUCKER SHOT!
I DIDN'T WANT TO LIVE ANYWAY.
-<SOB>-
WAS THAT AS CLOSE AS I THINK IT WAS?
JOIN THE ARMY, SEE THE WORLD THEY SAID.
IT WASN'T JUST A JOB IT WAS AN ADVENTURE!
I DIDN'T LIKE VIOLENCE ANYWAY!
I THOUGHT YOU LIKED ME?
SUCH SENSELESS VIOLENCE! I DON'T UNDERSTAND IT.
I THINK THIS GUY'S A LITTLE CRAZY.
SOMEHOW I DON'T FEEL LIKE KILLING ANYMORE.
HEY! KILLIN' AIN'T COOL.
GEE... THANKS.
I'VE FALLEN AND I CAN'T GET UP!
911?
OH NO! HERE I BLOW AGAIN!
I'LL BE BACK...
HEY - I'VE GOT LAWYERS.
TIME TO CALL 1-900-SUE-TANK.
+41
View File
@@ -0,0 +1,41 @@
STEREOMODE equ 0
;* --------BEGIN--------
;* C:\Atari\rmt\rmt128\schorch_str.rmt
FEAT_SFX equ 1
FEAT_GLOBALVOLUMEFADE equ 0 ;RMTGLOBALVOLUMEFADE variable
FEAT_NOSTARTINGSONGLINE equ 0
FEAT_INSTRSPEED equ 1
FEAT_CONSTANTSPEED equ 0 ;(19 times)
FEAT_COMMAND1 equ 1 ;(18 times)
FEAT_COMMAND2 equ 0 ;(0 times)
FEAT_COMMAND3 equ 0 ;(0 times)
FEAT_COMMAND4 equ 0 ;(0 times)
FEAT_COMMAND5 equ 0 ;(0 times)
FEAT_COMMAND6 equ 0 ;(0 times)
FEAT_COMMAND7SETNOTE equ 0 ;(0 times)
FEAT_COMMAND7VOLUMEONLY equ 0 ;(0 times)
FEAT_PORTAMENTO equ 0 ;(0 times)
FEAT_FILTER equ 1 ;(44 times)
FEAT_FILTERG0L equ 1 ;(13 times)
FEAT_FILTERG1L equ 1 ;(22 times)
FEAT_FILTERG0R equ 0 ;(0 times)
FEAT_FILTERG1R equ 0 ;(0 times)
FEAT_BASS16 equ 0 ;(0 times)
FEAT_BASS16G1L equ 0 ;(0 times)
FEAT_BASS16G3L equ 0 ;(0 times)
FEAT_BASS16G1R equ 0 ;(0 times)
FEAT_BASS16G3R equ 0 ;(0 times)
FEAT_VOLUMEONLYG0L equ 0 ;(0 times)
FEAT_VOLUMEONLYG2L equ 0 ;(0 times)
FEAT_VOLUMEONLYG3L equ 0 ;(0 times)
FEAT_VOLUMEONLYG0R equ 0 ;(0 times)
FEAT_VOLUMEONLYG2R equ 0 ;(0 times)
FEAT_VOLUMEONLYG3R equ 0 ;(0 times)
FEAT_TABLETYPE equ 0 ;(0 times)
FEAT_TABLEMODE equ 0 ;(0 times)
FEAT_TABLEGO equ 1 ;(1 times)
FEAT_AUDCTLMANUALSET equ 1 ;(6 times)
FEAT_VOLUMEMIN equ 0 ;(0 times)
FEAT_EFFECTVIBRATO equ 1 ;(3 times)
FEAT_EFFECTFSHIFT equ 1 ;(11 times)
;* --------END--------
+41
View File
@@ -0,0 +1,41 @@
STEREOMODE equ 0
;* --------BEGIN--------
;* C:\Atari\rmt\rmt128\schorch_str2.rmt
FEAT_SFX equ 1
FEAT_GLOBALVOLUMEFADE equ 0 ;RMTGLOBALVOLUMEFADE variable
FEAT_NOSTARTINGSONGLINE equ 0
FEAT_INSTRSPEED equ 1
FEAT_CONSTANTSPEED equ 0 ;(19 times)
FEAT_COMMAND1 equ 1 ;(18 times)
FEAT_COMMAND2 equ 0 ;(0 times)
FEAT_COMMAND3 equ 0 ;(0 times)
FEAT_COMMAND4 equ 0 ;(0 times)
FEAT_COMMAND5 equ 0 ;(0 times)
FEAT_COMMAND6 equ 0 ;(0 times)
FEAT_COMMAND7SETNOTE equ 0 ;(0 times)
FEAT_COMMAND7VOLUMEONLY equ 0 ;(0 times)
FEAT_PORTAMENTO equ 0 ;(0 times)
FEAT_FILTER equ 1 ;(44 times)
FEAT_FILTERG0L equ 1 ;(13 times)
FEAT_FILTERG1L equ 1 ;(22 times)
FEAT_FILTERG0R equ 0 ;(0 times)
FEAT_FILTERG1R equ 0 ;(0 times)
FEAT_BASS16 equ 0 ;(0 times)
FEAT_BASS16G1L equ 0 ;(0 times)
FEAT_BASS16G3L equ 0 ;(0 times)
FEAT_BASS16G1R equ 0 ;(0 times)
FEAT_BASS16G3R equ 0 ;(0 times)
FEAT_VOLUMEONLYG0L equ 0 ;(0 times)
FEAT_VOLUMEONLYG2L equ 0 ;(0 times)
FEAT_VOLUMEONLYG3L equ 0 ;(0 times)
FEAT_VOLUMEONLYG0R equ 0 ;(0 times)
FEAT_VOLUMEONLYG2R equ 0 ;(0 times)
FEAT_VOLUMEONLYG3R equ 0 ;(0 times)
FEAT_TABLETYPE equ 0 ;(0 times)
FEAT_TABLEMODE equ 0 ;(0 times)
FEAT_TABLEGO equ 1 ;(2 times)
FEAT_AUDCTLMANUALSET equ 1 ;(6 times)
FEAT_VOLUMEMIN equ 0 ;(0 times)
FEAT_EFFECTVIBRATO equ 1 ;(3 times)
FEAT_EFFECTFSHIFT equ 1 ;(11 times)
;* --------END--------
-40
View File
@@ -1,40 +0,0 @@
;* --------BEGIN--------
;* Z:\home\pkalinowski\Seafile\atari\projects\scorch_src\artwork\sfx\scorch_trial07_stripped.rmt
FEAT_SFX equ 1
FEAT_GLOBALVOLUMEFADE equ 0 ;RMTGLOBALVOLUMEFADE variable
FEAT_NOSTARTINGSONGLINE equ 0
FEAT_INSTRSPEED equ 1
FEAT_CONSTANTSPEED equ 16 ;(0 times)
FEAT_COMMAND1 equ 1 ;(4 times)
FEAT_COMMAND2 equ 0 ;(0 times)
FEAT_COMMAND3 equ 0 ;(0 times)
FEAT_COMMAND4 equ 0 ;(0 times)
FEAT_COMMAND5 equ 0 ;(0 times)
FEAT_COMMAND6 equ 0 ;(0 times)
FEAT_COMMAND7SETNOTE equ 0 ;(0 times)
FEAT_COMMAND7VOLUMEONLY equ 0 ;(0 times)
FEAT_PORTAMENTO equ 0 ;(0 times)
FEAT_FILTER equ 1 ;(22 times)
FEAT_FILTERG0L equ 0 ;(0 times)
FEAT_FILTERG1L equ 0 ;(0 times)
FEAT_FILTERG0R equ 0 ;(0 times)
FEAT_FILTERG1R equ 0 ;(0 times)
FEAT_BASS16 equ 0 ;(0 times)
FEAT_BASS16G1L equ 0 ;(0 times)
FEAT_BASS16G3L equ 0 ;(0 times)
FEAT_BASS16G1R equ 0 ;(0 times)
FEAT_BASS16G3R equ 0 ;(0 times)
FEAT_VOLUMEONLYG0L equ 0 ;(0 times)
FEAT_VOLUMEONLYG2L equ 0 ;(0 times)
FEAT_VOLUMEONLYG3L equ 0 ;(0 times)
FEAT_VOLUMEONLYG0R equ 0 ;(0 times)
FEAT_VOLUMEONLYG2R equ 0 ;(0 times)
FEAT_VOLUMEONLYG3R equ 0 ;(0 times)
FEAT_TABLETYPE equ 0 ;(0 times)
FEAT_TABLEMODE equ 0 ;(0 times)
FEAT_TABLEGO equ 1 ;(1 times)
FEAT_AUDCTLMANUALSET equ 1 ;(4 times)
FEAT_VOLUMEMIN equ 0 ;(0 times)
FEAT_EFFECTVIBRATO equ 0 ;(0 times)
FEAT_EFFECTFSHIFT equ 1 ;(7 times)
;* --------END--------
@@ -1,4 +1,3 @@
.echo *
;* ;*
;* Raster Music Tracker, RMT Atari routine version 1.20090108 ;* Raster Music Tracker, RMT Atari routine version 1.20090108
;* (c) Radek Sterba, Raster/C.P.U., 2002 - 2009 ;* (c) Radek Sterba, Raster/C.P.U., 2002 - 2009
@@ -17,18 +16,40 @@
;* ;*
;* 3. Because of RMTplayer provides a lot of effects, it spent a lot of CPU time. ;* 3. Because of RMTplayer provides a lot of effects, it spent a lot of CPU time.
;* ;*
STEREOMODE equ 0 ;0 => compile RMTplayer for 4 tracks mono ;* STEREOMODE equ 0..3 ;0 => compile RMTplayer for 4 tracks mono
;* ;1 => compile RMTplayer for 8 tracks stereo ;* ;1 => compile RMTplayer for 8 tracks stereo
;* ;2 => compile RMTplayer for 4 tracks stereo L1 R2 R3 L4 ;* ;2 => compile RMTplayer for 4 tracks stereo L1 R2 R3 L4
;* ;3 => compile RMTplayer for 4 tracks stereo L1 L2 R3 R4 ;* ;3 => compile RMTplayer for 4 tracks stereo L1 L2 R3 R4
;* ;*
; IFT STEREOMODE==1 IFT STEREOMODE==1
;TRACKS equ 8 TRACKS equ 8
; ELS ELS
TRACKS equ 4 TRACKS equ 4
; EIF EIF
;* ;*
PLAYER = * ;*PLAYER equ $3400
;*
;* RMT FEATures definitions file
;* For optimizations of RMT player routine to concrete RMT modul only!
icl "feat.txt"
;*
;* RMT ZeroPage addresses
org RMT_Zero_Page_V
p_tis
p_instrstable org *+2
p_trackslbstable org *+2
p_trackshbstable org *+2
p_song org *+2
ns org *+2
nr org *+2
nt org *+2
reg1 org *+1
reg2 org *+1
reg3 org *+1
tmp org *+1
IFT FEAT_COMMAND2
frqaddcmd2 org *+1
EIF
IFT TRACKS>4 IFT TRACKS>4
org PLAYER-$400+$40 org PLAYER-$400+$40
ELS ELS
@@ -745,8 +766,9 @@ ei4
IFT 1==[FEAT_COMMAND1+FEAT_COMMAND2+FEAT_COMMAND3+FEAT_COMMAND4+FEAT_COMMAND5+FEAT_COMMAND6+[FEAT_COMMAND7SETNOTE||FEAT_COMMAND7VOLUMEONLY]] IFT 1==[FEAT_COMMAND1+FEAT_COMMAND2+FEAT_COMMAND3+FEAT_COMMAND4+FEAT_COMMAND5+FEAT_COMMAND6+[FEAT_COMMAND7SETNOTE||FEAT_COMMAND7VOLUMEONLY]]
beq cmd0 beq cmd0
ELS ELS
lsr @ ; lsr @
lsr @ ; lsr @
lda #0 ; my fix :)
sta jmx+1 sta jmx+1
jmx bcc * jmx bcc *
jmp cmd0 jmp cmd0
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+121 -118
View File
@@ -1,125 +1,128 @@
.proc talk .proc talk
L0 dta c"IN TIMES OF TROUBLE, GO WITH WHAT YOU KNOW." L0 dta d"IN TIMES OF TROUBLE, GO WITH WHAT YOU KNOW."
L1 dta c"DIE!" L1 dta d"DIE!"
L2 dta c"EAT MY SHORTS!" L2 dta d"EAT MY SHORTS!"
L3 dta c"YOU'RE TOAST!" L3 dta d"YOU'RE TOAST!"
L4 dta c"BANZAI!" L4 dta d"BANZAI!"
L5 dta c"FROM HELL'S HEART I STAB AT THEE..." L5 dta d"FROM HELL'S HEART I STAB AT THEE..."
L6 dta c"I DIDN'T DO IT. NOBODY SAW ME DO IT." L6 dta d"I DIDN'T DO IT. NOBODY SAW ME DO IT."
L7 dta c"TAKE A HIKE!" L7 dta d"TAKE A HIKE!"
L8 dta c"YOU'RE DEAD MEAT." L8 dta d"YOU'RE DEAD MEAT."
L9 dta c"MAKE MY DAY." L9 dta d"MAKE MY DAY."
L10 dta c"CHARGE!" L10 dta d"CHARGE!"
L11 dta c"ATTACK!" L11 dta d"ATTACK!"
L12 dta c"YOU'RE OUTTA HERE." L12 dta d"YOU'RE OUTTA HERE."
L13 dta c"WATTSA MATTA YOU?" L13 dta d"WATTSA MATTA YOU?"
L14 dta c"FREEZE, OR I'LL SHOOT!" L14 dta d"FREEZE, OR I'LL SHOOT!"
L15 dta c"HA HA HA." L15 dta d"HA HA HA."
L16 dta c"WE COME IN PEACE - SHOOT TO KILL!" L16 dta d"WE COME IN PEACE - SHOOT TO KILL!"
L17 dta c"IN YOUR FACE!" L17 dta d"IN YOUR FACE!"
L18 dta c"DIE COMMIE PIG!" L18 dta d"DIE COMMIE PIG!"
L19 dta c"I LOVE THE SMELL OF NAPALM IN THE MORNING." L19 dta d"I LOVE THE SMELL OF NAPALM IN THE MORNING."
L20 dta c"VICTORY!" L20 dta d"VICTORY!"
L21 dta c"SHOW SOME RESPECT." L21 dta d"SHOW SOME RESPECT."
L22 dta c"JUST WHO DO YOU THINK YOU ARE?" L22 dta d"JUST WHO DO YOU THINK YOU ARE?"
L23 dta c"LOOK OUT BELOW!" L23 dta d"LOOK OUT BELOW!"
L24 dta c"KNOCK, KNOCK." L24 dta d"KNOCK, KNOCK."
L25 dta c"LOOK OVER THERE." L25 dta d"LOOK OVER THERE."
L26 dta c"GUESS WHAT'S COMING FOR DINNER?" L26 dta d"GUESS WHAT'S COMING FOR DINNER?"
L27 dta c"MERRY CHRISTMAS." L27 dta d"MERRY CHRISTMAS."
L28 dta c"OPEN WIDE!" L28 dta d"OPEN WIDE!"
L29 dta c"HERE GOES NOTHING..." L29 dta d"HERE GOES NOTHING..."
L30 dta c"DON'T WORRY, IT ISN'T A LIVE ROUND." L30 dta d"DON'T WORRY, IT ISN'T A LIVE ROUND."
L31 dta c"BLOOD, PAIN, VIOLENCE!" L31 dta d"BLOOD, PAIN, VIOLENCE!"
L32 dta c"TAKE THIS, SISSY!" L32 dta d"TAKE THIS, SISSY!"
L33 dta c"I SHALL FLATTEN YOU!" L33 dta d"I SHALL FLATTEN YOU!"
L34 dta c"I SHALL SMASH YOUR UGLY TANK!" L34 dta d"I SHALL SMASH YOUR UGLY TANK!"
L35 dta c"I WONDER WHAT THIS BUTTON DOES?" L35 dta d"I WONDER WHAT THIS BUTTON DOES?"
L36 dta c"DON'T TAKE THIS PERSONALLY." L36 dta d"DON'T TAKE THIS PERSONALLY."
L37 dta c"WOULD THIS MAKE YOU MAD?" L37 dta d"WOULD THIS MAKE YOU MAD?"
L38 dta c"I TOLD YOU TO LEAVE MY SISTER ALONE!" L38 dta d"I TOLD YOU TO LEAVE MY SISTER ALONE!"
L39 dta c"I COULD SPARE YOU, BUT WHY?" L39 dta d"I COULD SPARE YOU, BUT WHY?"
L40 dta c"MY BOMB IS BIGGER THAN YOURS." L40 dta d"MY BOMB IS BIGGER THAN YOURS."
L41 dta c"DON'T FORGET ABOUT ME!" L41 dta d"DON'T FORGET ABOUT ME!"
L42 dta c"HASTA LA VISTA, BABY!" L42 dta d"HASTA LA VISTA, BABY!"
L43 dta c"THIS IS YOUR BRAIN ON SCORCH." L43 dta d"THIS IS YOUR BRAIN ON SCORCH."
L44 dta c"TAKE THIS!" L44 dta d"TAKE THIS!"
L45 dta c"THIS SCREEN AIN'T BIG ENOUGH FOR THE BOTH OF US." L45 dta d"THIS SCREEN AIN'T BIG ENOUGH FOR THE BOTH OF US."
L46 dta c"DIE, ALIEN SWINE!" L46 dta d"DIE, ALIEN SWINE!"
L47 dta c"SAY ARRGGHHHHH...." L47 dta d"SAY ARRGGHHHHH...."
L48 dta c"I SHALL OIL MY TURRET WITH YOUR BLOOD." L48 dta d"I SHALL OIL MY TURRET WITH YOUR BLOOD."
L49 dta c"DIE, TANK-SCUM!" L49 dta d"DIE, TANK-SCUM!"
L50 dta c"I'M GONNA BREAK YOUR FACE!" L50 dta d"I'M GONNA BREAK YOUR FACE!"
L51 dta c"MAMA SAID KNOCK YOU OUT!" L51 dta d"MAMA SAID KNOCK YOU OUT!"
L52 dta c"I HOPE YOU ENJOY PAIN!" L52 dta d"I HOPE YOU ENJOY PAIN!"
;-------------------------------- ;--------------------------------
L53 dta c"PARTING IS SUCH SWEET SORROW... NOT!" L53 dta d"PARTING IS SUCH SWEET SORROW... NOT!"
L54 dta c"UGH!" L54 dta d"UGH!"
L55 dta c"AARGH!" L55 dta d"AARGH!"
L56 dta c"AAAGGHHH!" L56 dta d"AAAGGHHH!"
L57 dta c"I'M MELTING!" L57 dta d"I'M MELTING!"
L58 dta c"OOF.." L58 dta d"OOF.."
L59 dta c"OH!" L59 dta d"OH!"
L60 dta c"EEEK!" L60 dta d"EEEK!"
L61 dta c"AACCH!" L61 dta d"AACCH!"
L62 dta c"I HATE IT WHEN THAT HAPPENS." L62 dta d"I HATE IT WHEN THAT HAPPENS."
L63 dta c"ONE DIRECT HIT CAN RUIN YOUR WHOLE DAY." L63 dta d"ONE DIRECT HIT CAN RUIN YOUR WHOLE DAY."
L64 dta c"OH NO!" L64 dta d"OH NO!"
L65 dta c"NOT ME!" L65 dta d"NOT ME!"
L66 dta c"OUCH." L66 dta d"OUCH."
L67 dta c"OH NO, NOT AGAIN." L67 dta d"OH NO, NOT AGAIN."
L68 dta c"ANOTHER ONE BITES THE DUST." L68 dta d"ANOTHER ONE BITES THE DUST."
L69 dta c"GOODBYE." L69 dta d"GOODBYE."
L70 dta c"HELP ME!" L70 dta d"HELP ME!"
L71 dta c"FAREWELL, CRUEL WORLD." L71 dta d"FAREWELL, CRUEL WORLD."
L72 dta c"REMEMBER THE ALAMO!" L72 dta d"REMEMBER THE ALAMO!"
L73 dta c"OH MAN!" L73 dta d"OH MAN!"
L74 dta c"DOOUGH!" L74 dta d"DOOUGH!"
L75 dta c"ANOTHER DAY, ANOTHER BOMB." L75 dta d"ANOTHER DAY, ANOTHER BOMB."
L76 dta c"THIS IS THE END, MY ONLY FRIEND." L76 dta d"THIS IS THE END, MY ONLY FRIEND."
L77 dta c"IT'S ALL OVER." L77 dta d"IT'S ALL OVER."
L78 dta c"THE FAT LADY SANG." L78 dta d"THE FAT LADY SANG."
L79 dta c"WHY DOES EVERYTHING HAPPEN TO ME?" L79 dta d"WHY DOES EVERYTHING HAPPEN TO ME?"
L80 dta c"I'M GOING DOWN." L80 dta d"I'M GOING DOWN."
L81 dta c"I'VE GOT A BAD FEELING ABOUT THIS." L81 dta d"I'VE GOT A BAD FEELING ABOUT THIS."
L82 dta c"CRAPOLA." L82 dta d"CRAPOLA."
L83 dta c"POW!" L83 dta d"POW!"
L84 dta c"BIF!" L84 dta d"BIF!"
L85 dta c"BAM!" L85 dta d"BAM!"
L86 dta c"ZONK!" L86 dta d"ZONK!"
L87 dta c"I SHOULD'VE LISTENED TO MY MOTHER..." L87 dta d"I SHOULD'VE LISTENED TO MY MOTHER..."
L88 dta c"NO... A BUD LIGHT!" L88 dta d"NO... A BUD LIGHT!"
L89 dta c"WHAT WAS THAT NOISE?" L89 dta d"WHAT WAS THAT NOISE?"
L90 dta c"MAMA SAID THERE'D BE DAYS LIKE THIS." L90 dta d"MAMA SAID THERE'D BE DAYS LIKE THIS."
L91 dta c"ITS JUST ONE OF THOSE DAYS..." L91 dta d"ITS JUST ONE OF THOSE DAYS..."
L92 dta c"I SEE A BRIGHT LIGHT..." L92 dta d"I SEE A BRIGHT LIGHT..."
L93 dta c"MOMMY? IS THAT YOU?" L93 dta d"MOMMY? IS THAT YOU?"
L94 dta c"I LET YOU HIT ME!" L94 dta d"I LET YOU HIT ME!"
L95 dta c"SUCKER SHOT!" L95 dta d"SUCKER SHOT!"
L96 dta c"I DIDN'T WANT TO LIVE ANYWAY." L96 dta d"I DIDN'T WANT TO LIVE ANYWAY."
L97 dta c"-<SOB>-" L97 dta d"-<SOB>-"
L98 dta c"WAS THAT AS CLOSE AS I THINK IT WAS?" L98 dta d"WAS THAT AS CLOSE AS I THINK IT WAS?"
L99 dta c"JOIN THE ARMY, SEE THE WORLD THEY SAID." L99 dta d"JOIN THE ARMY, SEE THE WORLD THEY SAID."
L100 dta c"IT WASN'T JUST A JOB IT WAS AN ADVENTURE!" L100 dta d"IT WASN'T JUST A JOB IT WAS AN ADVENTURE!"
L101 dta c"I DIDN'T LIKE VIOLENCE ANYWAY!" L101 dta d"I DIDN'T LIKE VIOLENCE ANYWAY!"
L102 dta c"I THOUGHT YOU LIKED ME?" L102 dta d"I THOUGHT YOU LIKED ME?"
L103 dta c"SUCH SENSELESS VIOLENCE! I DON'T UNDERSTAND IT." L103 dta d"SUCH SENSELESS VIOLENCE! I DON'T UNDERSTAND IT."
L104 dta c"I THINK THIS GUY'S A LITTLE CRAZY." L104 dta d"I THINK THIS GUY'S A LITTLE CRAZY."
L105 dta c"SOMEHOW I DON'T FEEL LIKE KILLING ANYMORE." L105 dta d"SOMEHOW I DON'T FEEL LIKE KILLING ANYMORE."
L106 dta c"HEY! KILLIN' AIN'T COOL." L106 dta d"HEY! KILLIN' AIN'T COOL."
L107 dta c"GEE... THANKS." L107 dta d"GEE... THANKS."
L108 dta c"I'VE FALLEN AND I CAN'T GET UP!" L108 dta d"I'VE FALLEN AND I CAN'T GET UP!"
L109 dta c"911?" L109 dta d"911?"
L110 dta c"OH NO! HERE I BLOW AGAIN!" L110 dta d"OH NO! HERE I BLOW AGAIN!"
L111 dta c"I'LL BE BACK..." L111 dta d"I'LL BE BACK..."
L112 dta c"HEY - I'VE GOT LAWYERS." L112 dta d"HEY - I'VE GOT LAWYERS."
L113 dta c"TIME TO CALL 1-900-SUE-TANK." L113 dta d"TIME TO CALL 1-900-SUE-TANK."
LEND
OffensiveTextTableL OffensiveTextTableL
dta <L0,<L1,<L2,<L3,<L4,<L5,<L6,<L7,<L8,<L9,<L10,<L11,<L12,<L13,<L14,<L15,<L16,<L17,<L18,<L19,<L20,<L21,<L22,<L23,<L24,<L25,<L26,<L27,<L28,<L29,<L30,<L31,<L32,<L33,<L34,<L35,<L36,<L37,<L38,<L39,<L40,<L41,<L42,<L43,<L44,<L45,<L46,<L47,<L48,<L49,<L50,<L51,<L52,<L53,<L54,<L55,<L56,<L57,<L58,<L59,<L60,<L61,<L62,<L63,<L64,<L65,<L66,<L67,<L68,<L69,<L70,<L71,<L72,<L73,<L74,<L75,<L76,<L77,<L78,<L79,<L80,<L81,<L82,<L83,<L84,<L85,<L86,<L87,<L88,<L89,<L90,<L91,<L92,<L93,<L94,<L95,<L96,<L97,<L98,<L99,<L100,<L101,<L102,<L103,<L104,<L105,<L106,<L107,<L108,<L109,<L110,<L111,<L112,<L113 dta <L0,<L1,<L2,<L3,<L4,<L5,<L6,<L7,<L8,<L9,<L10,<L11,<L12,<L13,<L14,<L15,<L16,<L17,<L18,<L19,<L20,<L21,<L22,<L23,<L24,<L25,<L26,<L27,<L28,<L29,<L30,<L31,<L32,<L33,<L34,<L35,<L36,<L37,<L38,<L39,<L40,<L41,<L42,<L43,<L44,<L45,<L46,<L47,<L48,<L49,<L50,<L51,<L52
dta <L53,<L54,<L55,<L56,<L57,<L58,<L59,<L60,<L61,<L62,<L63,<L64,<L65,<L66,<L67,<L68,<L69,<L70,<L71,<L72,<L73,<L74,<L75,<L76,<L77,<L78,<L79,<L80,<L81,<L82,<L83,<L84,<L85,<L86,<L87,<L88,<L89,<L90,<L91,<L92,<L93,<L94,<L95,<L96,<L97,<L98,<L99,<L100,<L101,<L102,<L103,<L104,<L105,<L106,<L107,<L108,<L109,<L110,<L111,<L112,<L113
dta <LEND
OffensiveTextTableH OffensiveTextTableH
dta >L0,>L1,>L2,>L3,>L4,>L5,>L6,>L7,>L8,>L9,>L10,>L11,>L12,>L13,>L14,>L15,>L16,>L17,>L18,>L19,>L20,>L21,>L22,>L23,>L24,>L25,>L26,>L27,>L28,>L29,>L30,>L31,>L32,>L33,>L34,>L35,>L36,>L37,>L38,>L39,>L40,>L41,>L42,>L43,>L44,>L45,>L46,>L47,>L48,>L49,>L50,>L51,>L52,>L53,>L54,>L55,>L56,>L57,>L58,>L59,>L60,>L61,>L62,>L63,>L64,>L65,>L66,>L67,>L68,>L69,>L70,>L71,>L72,>L73,>L74,>L75,>L76,>L77,>L78,>L79,>L80,>L81,>L82,>L83,>L84,>L85,>L86,>L87,>L88,>L89,>L90,>L91,>L92,>L93,>L94,>L95,>L96,>L97,>L98,>L99,>L100,>L101,>L102,>L103,>L104,>L105,>L106,>L107,>L108,>L109,>L110,>L111,>L112,>L113 dta >L0,>L1,>L2,>L3,>L4,>L5,>L6,>L7,>L8,>L9,>L10,>L11,>L12,>L13,>L14,>L15,>L16,>L17,>L18,>L19,>L20,>L21,>L22,>L23,>L24,>L25,>L26,>L27,>L28,>L29,>L30,>L31,>L32,>L33,>L34,>L35,>L36,>L37,>L38,>L39,>L40,>L41,>L42,>L43,>L44,>L45,>L46,>L47,>L48,>L49,>L50,>L51,>L52
OffensiveTextLengths dta >L53,>L54,>L55,>L56,>L57,>L58,>L59,>L60,>L61,>L62,>L63,>L64,>L65,>L66,>L67,>L68,>L69,>L70,>L71,>L72,>L73,>L74,>L75,>L76,>L77,>L78,>L79,>L80,>L81,>L82,>L83,>L84,>L85,>L86,>L87,>L88,>L89,>L90,>L91,>L92,>L93,>L94,>L95,>L96,>L97,>L98,>L99,>L100,>L101,>L102,>L103,>L104,>L105,>L106,>L107,>L108,>L109,>L110,>L111,>L112,>L113
dta 43,4,14,13,7,35,37,12,17,12,7,7,18,17,22,9,33,13,15,42,8,18,30,15,13,16,31,16,10,20,35,22,17,20,29,31,27,24,36,27,29,22,21,29,10,48,17,20,38,15,26,24,22,36,4,6,9,12,5,3,5,6,28,39,6,7,5,17,27,8,8,22,19,7,7,26,32,14,18,33,15,34,8,4,4,4,5,36,18,20,36,29,23,19,17,12,29,7,36,39,41,30,23,48,34,42,25,14,31,4,26,15,23,28 dta >LEND
NumberOfOffensiveTexts=54 NumberOfOffensiveTexts=54
NumberOfDeffensiveTexts=60 NumberOfDeffensiveTexts=60
.endp .endp
Binary file not shown.
Binary file not shown.
-48
View File
@@ -1,48 +0,0 @@
import sys
from string import strip
lineCount = 0
lengths = []
alltexts = []
for line in open("TALK1.txt"):
lineCount+=1
line = strip(line)
lengths.append(len(line))
alltexts.append(line)
off = lineCount
for line in open("TALK2.txt"):
lineCount+=1
line = strip(line)
lengths.append(len(line))
alltexts.append(line)
tmpNo = 0
for line in alltexts:
print ("L"+str(tmpNo)+' dta "'+line+'"')
tmpNo+= 1
l=""
for i in range(0,lineCount):
l+="<L"+str(i)+","
l=l[:-1]
print ("OffensiveTextTableL")
print (" dta "+l)
l=""
for i in range(0,lineCount):
l+=">L"+str(i)+","
l=l[:-1]
print ("OffensiveTextTableH")
print (" dta "+l)
l=""
for i in range(0,lineCount):
l+=str(lengths[i])+","
l=l[:-1]
print ("OffensiveTextLengths")
print (" dta "+l)
deff = lineCount-off
print ("NumberOfOffensiveTexts="+str(off))
print ("NumberOfDeffensiveTexts="+str(deff))
Binary file not shown.
+133 -172
View File
@@ -2,17 +2,33 @@
.IF *>0 ;this is a trick that prevents compiling this file alone .IF *>0 ;this is a trick that prevents compiling this file alone
; initial values for some variables
initialvaluesStart
I_OptionsTable .by 0,1,2,2,0,1,3,2
I_RoundsInTheGame .by 10 ;how many rounds in the current game
I_seppukuVal .by 75
I_mountainDeltaH .by 3
I_mountainDeltaL .by $ff
;----------------------------------------------------
; 4x4 text buffer
I_ResultLineBuffer
dta d" ", $ff
I_LineHeader1
dta d"# ROUND: "
I_RoundNrDisplay
dta d" #", $ff
initialvaluesCount = *-initialvaluesstart ; MAX 128 bytes !
;=================================================================================== ;===================================================================================
;==========================CONSTANT TABLES, do not erase!=========================== ;==========================CONSTANT TABLES, do not erase!===========================
;=================================================================================== ;===================================================================================
TankColoursTable .BYTE $88,$cc,$38,$1c,$6a,$02 TankColoursTable .BYTE $58,$2a,$96,$ca,$7a,$de
TankStatusColoursTable .BYTE $80,$c0,$30,$10,$60,$00 TankStatusColoursTable .BYTE $54,$24,$94,$c4,$74,$d4
TankShapesTable .BYTE char_tank1___________,char_tank2___________,char_tank3___________
.BYTE char_tank1___________,char_tank2___________,char_tank3___________
dliColorsBack dliColorsBack
:10 .by $02,$00 :10 .by $02,$00
dliColorsFore dliColorsFore
.by $0a .by $0a
TextBackgroundColor = $02 ; REAL constans - use: LDA #TextBackgroundColor
TextForegroundColor = $0c
CashOptionL ;(one zero less than on the screen) CashOptionL ;(one zero less than on the screen)
.by 0,<200,<800,<1200,<2000 .by 0,<200,<800,<1200,<2000
CashOptionH CashOptionH
@@ -20,8 +36,11 @@ CashOptionH
GravityTable .by 10,20,25,30,40 GravityTable .by 10,20,25,30,40
MaxWindTable .by 5,20,40,70,99 MaxWindTable .by 5,20,40,70,99
RoundsTable .by 10,20,30,40,50 RoundsTable .by 10,20,30,40,50
AIForceTable .wo 375,470,630,720,820 ; starting shoot forces for different gravity
flyDelayTable .by 255,150,75,35,1 flyDelayTable .by 255,150,75,35,1
seppukuTable .by 255, 45,25,15,9 seppukuTable .by 255, 45,25,15,9
mountainsDeltaTableH .by 0,1,3,5,7
mountainsDeltaTableL .by $1f, $7f, $ff, $7f, $ff
;------------------------------------------------ ;------------------------------------------------
LevelNameBeginL ; begins of level names LevelNameBeginL ; begins of level names
.by <NamesOfLevels,<(NamesOfLevels+10),<(NamesOfLevels+20) .by <NamesOfLevels,<(NamesOfLevels+10),<(NamesOfLevels+20)
@@ -36,7 +55,11 @@ TanksWeaponsTableL
.by <TanksWeapon1,<TanksWeapon2,<TanksWeapon3,<TanksWeapon4,<TanksWeapon5,<TanksWeapon6 .by <TanksWeapon1,<TanksWeapon2,<TanksWeapon3,<TanksWeapon4,<TanksWeapon5,<TanksWeapon6
TanksWeaponsTableH TanksWeaponsTableH
.by >TanksWeapon1,>TanksWeapon2,>TanksWeapon3,>TanksWeapon4,>TanksWeapon5,>TanksWeapon6 .by >TanksWeapon1,>TanksWeapon2,>TanksWeapon3,>TanksWeapon4,>TanksWeapon5,>TanksWeapon6
;--------------
XtankOffsetGO_L
.by 6,56,106,156,206,0
XtankOffsetGO_H
.by 0,0,0,0,0,1
;-----4x4 texts----- ;-----4x4 texts-----
LineTop LineTop
dta d"(%%%%%%%%%%%%)", $ff dta d"(%%%%%%%%%%%%)", $ff
@@ -57,18 +80,20 @@ lineClear
dta d" ", $ff dta d" ", $ff
;----------- ;-----------
pmtableL ; addressess of the P/M memory for 5 tanks (6th is without P/M background) pmtableL ; addressess of the P/M memory for 6 tanks
.by <(pmgraph+$400) .by <(pmgraph+$400)
.by <(pmgraph+$500) .by <(pmgraph+$500)
.by <(pmgraph+$600) .by <(pmgraph+$600)
.by <(pmgraph+$700) .by <(pmgraph+$700)
.by <(pmgraph+$300) ; this is a missile background .by <(pmgraph+$300) ; this is a missile background
.by <(pmgraph+$300) ; this is a missile background
pmtableH pmtableH
.by >(pmgraph+$400) .by >(pmgraph+$400)
.by >(pmgraph+$500) .by >(pmgraph+$500)
.by >(pmgraph+$600) .by >(pmgraph+$600)
.by >(pmgraph+$700) .by >(pmgraph+$700)
.by >(pmgraph+$300) .by >(pmgraph+$300)
.by >(pmgraph+$300)
;----------- ;-----------
sintable sintable
.by 0 .by 0
@@ -195,90 +220,6 @@ SlideLeftTable
.BY %00000111 .BY %00000111
.BY %00001100 .BY %00001100
;-----------------------------------------------------------
; this table changes Angle to the appropriate tank character
BarrelTable
.by $2C,$2C,$2C,$2C,$2C,$2C,$2C,$2C,$2A,$2A,
.by $2A,$2A,$2A,$2A,$2A,$2A,$28,$28,$28,$28,
.by $28,$28,$28,$28,$28,$26,$26,$26,$26,$26,
.by $26,$26,$26,$24,$24,$24,$24,$24,$24,$24,
.by $24,$22,$22,$22,$22,$22,$22,$22,$22,$22,
.by $20,$20,$20,$20,$20,$20,$20,$20,$1E,$1E,
.by $1E,$1E,$1E,$1E,$1E,$1E,$1C,$1C,$1C,$1C,
.by $1C,$1C,$1C,$1C,$1C,$1A,$1A,$1A,$1A,$1A,
.by $1A,$1A,$1A,$18,$18,$18,$18,$18,$18,$18,
;.by $18,
.by $16,$16,$16,$16,$16,$16,$16,$16,$14,$14,
.by $14,$14,$14,$14,$14,$14,$12,$12,$12,$12,
.by $12,$12,$12,$12,$12,$10,$10,$10,$10,$10,
.by $10,$10,$10,$0E,$0E,$0E,$0E,$0E,$0E,$0E,
.by $0E,$0C,$0C,$0C,$0C,$0C,$0C,$0C,$0C,$0C,
.by $0A,$0A,$0A,$0A,$0A,$0A,$0A,$0A,$08,$08,
.by $08,$08,$08,$08,$08,$08,$06,$06,$06,$06,
.by $06,$06,$06,$06,$06,$04,$04,$04,$04,$04,
.by $04,$04,$04,$02,$02,$02,$02,$02,$02,$02,
.by $02,
EndOfTheBarrelX
; right angles from 0 (horizontally right) to 90 (up)
.by 7,7,7,7,7,7,7,7,7,7,
.by 7,7,7,7,7,7,7,7,7,7,
.by 7,7,7,7,7,7,7,7,7,7,
.by 7,7,7,7,7,7,7,7,7,7,
.by 7,7,7,7,7,7,7,7,7,7,
.by 7,7,7,7,7,7,7,7,7,7,
.by 7,6,6,6,6,6,6,6,6,6,
.by 5,5,5,5,5,5,5,5,5,5,
.by 4,4,4,4,4,4,4,4,4,4,
;.by 4,
; left angles from 90 (vertical) to 180 (horizontally left)
.by 3,3,3,3,3,3,3,3,3,3,
.by 3,2,2,2,2,2,2,2,2,2,
.by 2,1,1,1,1,1,1,1,1,1,
.by 0,0,0,0,0,0,0,0,0,0,
.by 0,0,0,0,0,0,0,0,0,0,
.by 0,0,0,0,0,0,0,0,0,0,
.by 0,0,0,0,0,0,0,0,0,0,
.by 0,0,0,0,0,0,0,0,0,0,
.by 0,0,0,0,0,0,0,0,0,0,
.by 0
EndOfTheBarrelY
; right angles from 0 (horizontally right) to 90 (up)
; one pixel Up for fix problems with colision check
;.by 3,3,3,3,3,3,3,3,3,3,3,3,3,3
.by 4,4,4,4,4,4,4,4,4,4,
.by 4,4,4,4,4,4,4,4,4,4,
.by 4,4,4,4,4,4,4,5,5,5,
.by 5,5,5,5,5,5,5,6,6,6,
.by 6,6,6,6,6,6,7,7,7,7,
.by 7,7,7,7,7,7,7,7,7,7,
.by 7,7,7,7,7,7,7,7,7,7,
.by 7,7,7,7,7,7,7,7,7,7,
.by 7,7,7,7,7,7,7,7,7,7,
;.by 7,
; left angles from 90 (vertical) to 180 (horizontally left)
.by 7,7,7,7,7,7,7,7,7,7,
.by 7,7,7,7,7,7,7,7,7,7,
.by 7,7,7,7,7,7,7,7,7,7,
.by 7,7,7,7,7,7,7,7,7,7,
.by 7,7,7,7,7,6,6,6,6,6,
.by 6,6,6,6,5,5,5,5,5,5,
.by 5,5,5,5,4,4,4,4,4,4,
.by 4,4,4,4,4,4,4,4,4,4,
.by 4,4,4,4,4,4,4,4,4,4,
.by 4,
; one pixel Up for fix problems with colision check
;.by 3,3,3,3,3,3,3,3,3,3,3,3,3,3
;------------------------------------------------- ;-------------------------------------------------
TanksNamesDefault TanksNamesDefault
dta d"1st.Tank" dta d"1st.Tank"
@@ -347,11 +288,11 @@ WeaponPriceH ; weapons prices (tables with prices of weapons)
.by >price_StrongParachute .by >price_StrongParachute
.by >price_Mag_Deflector__ .by >price_Mag_Deflector__
.by >price_Shield_________ .by >price_Shield_________
.by >price_Force_Shield___
.by >price_Heavy_Shield___ .by >price_Heavy_Shield___
.by >price_Force_Shield___
.by >price_Super_Mag______ .by >price_Super_Mag______
.by >price_Auto_Defense___ .by >price_Bouncy_Castle__
.by >price_Fuel_Tank______ .by >price_Long_Barrel____
.by >price_Nuclear_Winter_ .by >price_Nuclear_Winter_
WeaponPriceL WeaponPriceL
@@ -413,11 +354,11 @@ WeaponPriceL
.by <price_StrongParachute .by <price_StrongParachute
.by <price_Mag_Deflector__ .by <price_Mag_Deflector__
.by <price_Shield_________ .by <price_Shield_________
.by <price_Force_Shield___
.by <price_Heavy_Shield___ .by <price_Heavy_Shield___
.by <price_Force_Shield___
.by <price_Super_Mag______ .by <price_Super_Mag______
.by <price_Auto_Defense___ .by <price_Bouncy_Castle__
.by <price_Fuel_Tank______ .by <price_Long_Barrel____
.by <price_Nuclear_Winter_ .by <price_Nuclear_Winter_
;------------------------------------------------- ;-------------------------------------------------
@@ -435,7 +376,7 @@ WeaponUnits
.by 3 ;Funky_Bomb_____ .by 3 ;Funky_Bomb_____
.by 2 ;MIRV___________ .by 2 ;MIRV___________
.by 1 ;Death_s_Head___ .by 1 ;Death_s_Head___
.by 10 ;Napalm_________ .by 4 ;Napalm_________
.by 2 ;Hot_Napalm_____ .by 2 ;Hot_Napalm_____
.by 20 ;Tracer_________ .by 20 ;Tracer_________
.by 10 ;Smoke_Tracer___ .by 10 ;Smoke_Tracer___
@@ -485,80 +426,60 @@ WeaponUnits
.by 2 ;StrongParachute .by 2 ;StrongParachute
.by 2 ;Mag_Deflector__ .by 2 ;Mag_Deflector__
.by 3 ;Shield_________ .by 3 ;Shield_________
.by 3 ;Force_Shield___
.by 2 ;Heavy_Shield___ .by 2 ;Heavy_Shield___
.by 3 ;Force_Shield___
.by 2 ;Super_Mag______ .by 2 ;Super_Mag______
.by 1 ;Auto_Defense___ .by 1 ;Auto_Defense___
.by 10 ;Fuel_Tank______ .by 2 ;Long_Barrel____
.by 1 ;Nuclear_Winter_ .by 1 ;Nuclear_Winter_
PurchaseMeTable ;weapons good to be purchased by the robot PurchaseMeTable ;weapons good to be purchased by the robot
;the comment is an index in the tables ;the comment is an index in the tables
dta 1 ;"Baby Missile " ; 0 ; "Baby Missile ","Missile ","Baby Nuke ","Nuke "
dta 1 ;"Missile " ; 1 ; "LeapFrog ","Funky Bomb ","MIRV ","Death's Head "
dta 1 ;"Baby Nuke " ; 2 .by %01111111
dta 1 ;"Nuke " ; 3 ; "Napalm ","Hot Napalm ","Tracer ","Smoke Tracer "
dta 1 ;"LeapFrog " ; 4 ; "Baby Roller ","Roller ","Heavy Roller ","Riot Charge "
dta 1 ;"Funky Bomb " ; 5 .by %11001110
dta 1 ;"MIRV " ; 6 ; "Riot Blast ","Riot Bomb ","Heavy Riot Bomb ","Baby Digger "
dta 1 ;"Death's Head " ; 7 ; "Digger ","Heavy Digger ","Baby Sandhog ","Sandhog "
dta 0 ;"Napalm " ; 8 .by %00000000
dta 0 ;"Hot Napalm " ; 9 ; "Heavy Sandhog ","Dirt Clod ","Dirt Ball ","Ton of Dirt "
dta 0 ;"Tracer " ; 10 ; "Liquid Dirt ","Dirt Charge ","Earth Disrupter ","Plasma Blast "
dta 0 ;"Smoke Tracer " ; 11 .by %00000000
dta 1 ;"Baby Roller " ; 12 ; "Laser "
dta 1 ;"Roller " ; 13 .by %00000000
dta 1 ;"Heavy Roller " ; 14 .by 0 ; offset to defensives
dta 0 ;"Riot Charge " ; 15 ; "White Flag ","Battery ","Bal Guidance ","Horz Guidance "
dta 0 ;"Riot Blast " ; 16 ; "Vert Guidance ","Lazy Boy ","Parachute ","Strong Parachute"
dta 0 ;"Riot Bomb " ; 17 .by %01000011
dta 0 ;"Heavy Riot Bomb " ; 18 ; "Mag Deflector ","Shield ","Heavy Shield ","Force Shield "
dta 0 ;"Baby Digger " ; 19 ; "Super Mag ","Bouncy Castle ","Long Barrel ","Nuclear Winter "
dta 0 ;"Digger " ; 20 .by %11110100
dta 0 ;"Heavy Digger " ; 21
dta 0 ;"Baby Sandhog " ; 22
dta 0 ;"Sandhog " ; 23
dta 0 ;"Heavy Sandhog " ; 24
dta 0 ;"Dirt Clod " ; 25
dta 0 ;"Dirt Ball " ; 26
dta 0 ;"Ton of Dirt " ; 27
dta 0 ;"Liquid Dirt " ; 28
dta 0 ;"Dirt Charge " ; 29
dta 0 ;"Earth Disrupter " ; 30
dta 0 ;"Plasma Blast " ; 31
dta 1 ;"Laser " ; 32
dta 0 ;"----------------" ; 33
dta 0 ;"----------------" ; 34
dta 0 ;"----------------" ; 35
dta 0 ;"----------------" ; 36
dta 0 ;"----------------" ; 37
dta 0 ;"----------------" ; 38
dta 0 ;"----------------" ; 39
dta 0 ;"----------------" ; 40
dta 0 ;"----------------" ; 41
dta 0 ;"----------------" ; 42
dta 0 ;"----------------" ; 43
dta 0 ;"----------------" ; 44
dta 0 ;"----------------" ; 45
dta 0 ;"----------------" ; 46
dta 0 ;"----------------" ; 47
dta 0 ;"White Flag " ; 48
dta 1 ;"Battery " ; 49
dta 0 ;"Bal Guidance " ; 50
dta 0 ;"Horz Guidance " ; 51
dta 0 ;"Vert Guidance " ; 52
dta 0 ;"Lazy Boy " ; 53
dta 1 ;"Parachute " ; 54
dta 1 ;"Strong Parachute" ; 55
dta 1 ;"Mag Deflector " ; 56
dta 1 ;"Shield " ; 57
dta 1 ;"Force Shield " ; 58
dta 1 ;"Heavy Shield " ; 59
dta 0 ;"Super Mag " ; 60
dta 1 ;"Auto Defense " ; 61
dta 0 ;"Fuel Tank " ; 62
dta 0 ;"Nuclear Winter " ; 63
PurchaseMeTable2 ;weapons good to be purchased by the robot (Cyborg)
;the comment is an index in the tables
; "Baby Missile ","Missile ","Baby Nuke ","Nuke "
; "LeapFrog ","Funky Bomb ","MIRV ","Death's Head "
.by %00110001
; "Napalm ","Hot Napalm ","Tracer ","Smoke Tracer "
; "Baby Roller ","Roller ","Heavy Roller ","Riot Charge "
.by %01000000
; "Riot Blast ","Riot Bomb ","Heavy Riot Bomb ","Baby Digger "
; "Digger ","Heavy Digger ","Baby Sandhog ","Sandhog "
.by %00000000
; "Heavy Sandhog ","Dirt Clod ","Dirt Ball ","Ton of Dirt "
; "Liquid Dirt ","Dirt Charge ","Earth Disrupter ","Plasma Blast "
.by %00000000
; "Laser "
.by %00000000
.by 0 ; offset to defensives
; "White Flag ","Battery ","Bal Guidance ","Horz Guidance "
; "Vert Guidance ","Lazy Boy ","Parachute ","Strong Parachute"
.by %01000001
; "Mag Deflector ","Shield ","Heavy Shield ","Force Shield "
; "Super Mag ","Bouncy Castle ","Long Barrel ","Nuclear Winter "
.by %10110100
;------------------------------------------------- ;-------------------------------------------------
; Screen codes of icons (chars) representing a given weapon ; Screen codes of icons (chars) representing a given weapon
@@ -570,7 +491,7 @@ WeaponSymbols
.by $20,$00,$00,$00,$00,$00,$00,$00 .by $20,$00,$00,$00,$00,$00,$00,$00
.by $00,$00,$00,$00,$00,$00,$00,$00 .by $00,$00,$00,$00,$00,$00,$00,$00
.by $5f,$1c,$03,$06,$1d,$0a,$1b,$1b ; defensives .by $5f,$1c,$03,$06,$1d,$0a,$1b,$1b ; defensives
.by $1e,$3b,$3c,$3d,$3e,$3f,$5e,$7d .by $1e,$3b,$3d,$3c,$3e,$3f,$1d,$7d
; Names of weapons (16 chars long) ; Names of weapons (16 chars long)
NamesOfWeapons ;the comment is an index in the tables NamesOfWeapons ;the comment is an index in the tables
@@ -633,11 +554,11 @@ NamesOfWeapons ;the comment is an index in the tables
dta d"Strong Parachute" ; 55 - with energy (earlier Battery) dta d"Strong Parachute" ; 55 - with energy (earlier Battery)
dta d"Mag Deflector " ; 56 - with shield and energy dta d"Mag Deflector " ; 56 - with shield and energy
dta d"Shield " ; 57 - shield for one shot - no energy dta d"Shield " ; 57 - shield for one shot - no energy
dta d"Force Shield " ; 58 - shield with energy and parachute dta d"Heavy Shield " ; 58 - shield with energy
dta d"Heavy Shield " ; 59 - shield with energy dta d"Force Shield " ; 59 - shield with energy and parachute
dta d"Super Mag " ; 60 dta d"Super Mag " ; 60
dta d"Auto Defense " ; 61 - with shield and energy dta d"Bouncy Castle " ; 61 - with shield and energy
dta d"Fuel Tank " ; 62 dta d"Long Schlong " ; 62
dta d"Nuclear Winter " ; 63 dta d"Nuclear Winter " ; 63
DefensiveEnergy = * - 48 DefensiveEnergy = * - 48
.by 00 ; White Flag .by 00 ; White Flag
@@ -650,11 +571,11 @@ DefensiveEnergy = * - 48
.by 99 ; Strong Parachute .by 99 ; Strong Parachute
.by 99 ; Mag Deflector .by 99 ; Mag Deflector
.by 00 ; Shield .by 00 ; Shield
.by 99 ; Force Shield
.by 99 ; Heavy Shield .by 99 ; Heavy Shield
.by 99 ; Force Shield
.by 00 ; Super Mag .by 00 ; Super Mag
.by 99 ; Auto Defense .by 99 ; Bouncy Castle
.by 00 ; Fuel Tank .by 00 ; Long Barrel
.by 00 ; Nuclear Winter .by 00 ; Nuclear Winter
weaponsOfDeath weaponsOfDeath
dta 1,2,3,7,17,18,19,20,21,22,23,24,25,26,27 dta 1,2,3,7,17,18,19,20,21,22,23,24,25,26,27
@@ -682,5 +603,45 @@ gameOverSpritesTop
; end of the Gover sprites by number of players ; end of the Gover sprites by number of players
; 1 2 3 4 5 6 ; 1 2 3 4 5 6
.by 130,130,136,142,148,154 .by 130,130,136,142,148,154
;-------decimal constans
zero
digits dta d"0123456789"
nineplus dta d"9"+1
space dta d" "
;------credits
CreditsStart
dta d" "*
dta d"You were playin",d"g"*
dta d"Scorc",d"h"*
dta d"Warsaw, Miam",d"i"*
dta d"2000-202",d"2"*
dta d" "*
dta d"B",d"y"*
dta d" "*
dta d"Programmin",d"g"*
dta d"Tomasz 'Pecus' Peck",d"o"*
dta d"Pawel 'pirx' Kalinowsk",d"i"*
dta d" "*
dta d"SFX, Music and Suppor",d"t"*
dta d"Michal 'Miker' Szpilowsk",d"i"*
dta d" "*
dta d"Additional Musi",d"c"*
dta d"Mario 'Emkay' Kri",d"x"*
dta d" "*
dta d"Code Optimizatio",d"n"*
dta d"Piotr '0xF' Fusi",d"k"*
dta d" "*
dta d"Ar",d"t"*
dta d"Adam Wachowsk",d"i"*
dta d"Krzysztof 'Kaz' Ziembi",d"k"*
dta d" "*
dta d"Ideas and Q",d"A"*
dta d"Bocianu, Probabilitydragon, EnderDude",d","*
dta d"Beeblebrox, KrzysRog, lopezpb, Dracon",d","*
dta d"brad-colbert, archon800, nowy80",d","*
dta d"Shaggy the Atarian, RetroBorsuk, ZP",d"H"*
dta d" "*
dta d"Stay tuned for the FujiNet version",d"!"*
dta d" "*
CreditsEnd
.endif .endif
+43 -16
View File
@@ -1,14 +1,38 @@
; @com.wudsn.ide.asm.mainsourcefile=scorch.asm ; @com.wudsn.ide.asm.mainsourcefile=scorch.asm
;----------------------------------------------
; Player/missile memory
PMGraph = $0800
display = $1010 ;screen takes $2K due to clearing routine
screenheight = 200 screenheight = 200
screenBytes = 40 screenBytes = 40
screenwidth = screenBytes*8 ; Max screenwidth = 512!!! screenwidth = screenBytes*8 ; Max screenwidth = 512!!!
margin = 48 ;mountain drawing Y variable margin margin = 40 ;mountain drawing Y variable margin
display = $1010 ;screen takes $2K due to clearing routine
MaxPlayers = 6 MaxPlayers = 6
maxOptions = 7 ;number of all options maxOptions = 8 ;number of all options
PMOffset = $23 ; P/M to graphics offset PMOffsetX = $2C ; P/M to graphics offset
PMOffsetY = $23 ; P/M to graphics offset
napalmRadius = 10
StandardBarrel = 6 ; standard tank barrel length
LongBarrel = 20 ; long barrel length
TextBackgroundColor = $02 ; REAL constans - use: LDA #TextBackgroundColor
TextForegroundColor = $0A
;character codes for symbols (tank, parachute, etc. )
char_parachute_______ = $02
char_flag____________ = $1e
char_flame___________ = $14
char_clear_flame_____ = $1c
char_digger__________ = $04
char_sandhog_________ = $0c
char_sandhog_offset = char_sandhog_________ - char_digger__________
char_tank1___________ = $20
char_tank2___________ = $24
char_tank3___________ = $28
;Weapon prices (*10 on screen) ;Weapon prices (*10 on screen)
price_Baby_Missile___ = 0 ;_0 price_Baby_Missile___ = 0 ;_0
@@ -19,8 +43,8 @@ price_LeapFrog_______ = 192 ;_4
price_Funky_Bomb_____ = 293 ;_5 price_Funky_Bomb_____ = 293 ;_5
price_MIRV___________ = 456 ;_6 price_MIRV___________ = 456 ;_6
price_Death_s_Head___ = 337 ;_7 price_Death_s_Head___ = 337 ;_7
price_Napalm_________ = $ffff ;496 ;_8 price_Napalm_________ = 125 ;_8
price_Hot_Napalm_____ = $ffff ;511 ;_9 price_Hot_Napalm_____ = 162 ;_9
price_Tracer_________ = 102 ;_10 price_Tracer_________ = 102 ;_10
price_Smoke_Tracer___ = 291 ;_11 price_Smoke_Tracer___ = 291 ;_11
price_Baby_Roller____ = 211 ;_12 price_Baby_Roller____ = 211 ;_12
@@ -69,11 +93,11 @@ price_Parachute______ = 234 ;_54
price_StrongParachute = 1000 ;_55 price_StrongParachute = 1000 ;_55
price_Mag_Deflector__ = 745 ;_56 price_Mag_Deflector__ = 745 ;_56
price_Shield_________ = 224 ;_57 price_Shield_________ = 224 ;_57
price_Force_Shield___ = 1100 ;_58 price_Heavy_Shield___ = 628 ;_58
price_Heavy_Shield___ = 628 ;_59 price_Force_Shield___ = 1100 ;_59
price_Super_Mag______ = $ffff ;_60 price_Super_Mag______ = $ffff ;_60
price_Auto_Defense___ = 512 ;_61 price_Bouncy_Castle__ = 512 ;_61
price_Fuel_Tank______ = $ffff ;_62 price_Long_Barrel____ = 2100 ;_62
price_Nuclear_Winter_ = 1000 ;_63 price_Nuclear_Winter_ = 1000 ;_63
;Weapon indexes (numbers) ;Weapon indexes (numbers)
ind_Baby_Missile___ = 0 ind_Baby_Missile___ = 0
@@ -134,11 +158,11 @@ ind_Parachute______ = 54
ind_StrongParachute = 55 ind_StrongParachute = 55
ind_Mag_Deflector__ = 56 ind_Mag_Deflector__ = 56
ind_Shield_________ = 57 ind_Shield_________ = 57
ind_Force_Shield___ = 58 ind_Heavy_Shield___ = 58
ind_Heavy_Shield___ = 59 ind_Force_Shield___ = 59
ind_Super_Mag______ = 60 ind_Super_Mag______ = 60
ind_Auto_Defense___ = 61 ind_Bouncy_Castle__ = 61
ind_Fuel_Tank______ = 62 ind_Long_Barrel____ = 62
ind_Nuclear_Winter_ = 63 ind_Nuclear_Winter_ = 63
;-------------------------------- ;--------------------------------
; names of RMT instruments (sfx) ; names of RMT instruments (sfx)
@@ -173,10 +197,13 @@ sfx_seppuku = $1a ;1
sfx_liquid_dirt = $1b ;2 sfx_liquid_dirt = $1b ;2
sfx_battery = $1c ;3 sfx_battery = $1c ;3
sfx_white_flag = $1d ;4 sfx_white_flag = $1d ;4
sfx_long_barrel = $1e
;-------------------------------- ;--------------------------------
; RMT songs (lines) ; RMT songs (lines)
;-------------------------------- ;--------------------------------
song_silencio = $00 song_silencio = $00
song_end_round = $02 song_main_menu = $02
song_ingame = $06 song_ingame = $06
song_game_over = $0b song_round_over = $0b
song_ending_looped = $0e
song_supermarket = $1b
+84 -41
View File
@@ -1,4 +1,4 @@
; @com.wudsn.ide.asm.mainsourcefile=scorch.asm ; @com.wudsn.ide.asm.mainsourcefile=scorch.asm
.IF *>0 ;this is a trick that prevents compiling this file alone .IF *>0 ;this is a trick that prevents compiling this file alone
@@ -31,6 +31,11 @@ OptionsDL
.word OptionsScreen .word OptionsScreen
.byte $30,$02,$02,$70 .byte $30,$02,$02,$70
:maxOptions .by $02,$10 :maxOptions .by $02,$10
:(9-maxOptions) .by $70,$10
.byte $80
.byte $4f
.word (display+140*40)
:21 .by $0f ;76
.byte $41 .byte $41
.word OptionsDL .word OptionsDL
;------------------------ ;------------------------
@@ -54,51 +59,51 @@ dl ; MAIN game display list
.byte $10 ; 2 blank lines .byte $10 ; 2 blank lines
.byte $4f .byte $4f
.word display ; 1 line .word display ; 1 line
:76 .by $0f ;76 :76 .by $0f ;76
.by $0f+$80 ; DLI (black bar) ;2 .by $0f+$80 ; DLI (black bar) ;2
.by $0f+$80 ; DLI .by $0f+$80 ; DLI
:13 .by $0f ;13 :13 .by $0f ;13
.by $0f+$80 ; DLI (black bar) ;2 .by $0f+$80 ; DLI (black bar) ;2
.by $0f+$80 ; DLI .by $0f+$80 ; DLI
:8 .by $0f ;8 :8 .by $0f ;8
.by $4f ;1 .by $4f ;1
.wo display+$0ff0 .wo display+$0ff0
:2 .by $0f ;2 :2 .by $0f ;2
.by $0f+$80 ; DLI (black bar) ;2 .by $0f+$80 ; DLI (black bar) ;2
.by $0f+$80 ; DLI .by $0f+$80 ; DLI
:9 .by $0f ;9 :9 .by $0f ;9
.by $0f+$80 ; DLI (black bar) ;2 .by $0f+$80 ; DLI (black bar) ;2
.by $0f+$80 ; DLI .by $0f+$80 ; DLI
:8 .by $0f ;8 :8 .by $0f ;8
.by $0f+$80 ; DLI (black bar) ;2 .by $0f+$80 ; DLI (black bar) ;2
.by $0f+$80 ; DLI .by $0f+$80 ; DLI
:7 .by $0f ;7 :7 .by $0f ;7
.by $0f+$80 ; DLI (black bar) ;2 .by $0f+$80 ; DLI (black bar) ;2
.by $0f+$80 ; DLI .by $0f+$80 ; DLI
:6 .by $0f ;6 :6 .by $0f ;6
.by $0f+$80 ; DLI (black bar) ;2 .by $0f+$80 ; DLI (black bar) ;2
.by $0f+$80 ; DLI .by $0f+$80 ; DLI
:5 .by $0f ;5 :5 .by $0f ;5
.by $0f+$80 ; DLI (black bar) ;2 .by $0f+$80 ; DLI (black bar) ;2
.by $0f+$80 ; DLI .by $0f+$80 ; DLI
:4 .by $0f ;4 :4 .by $0f ;4
.by $0f+$80 ; DLI (black bar) ;2 .by $0f+$80 ; DLI (black bar) ;2
.by $0f+$80 ; DLI .by $0f+$80 ; DLI
:3 .by $0f ;3 :3 .by $0f ;3
.by $0f+$80 ; DLI (black to end);1 .by $0f+$80 ; DLI (black to end);1
:38 .byte $0f ;35 ..... = 200 :38 .byte $0f ;35 ..... = 200
.by $4f .by $4f
.wo LastLine ; additional line of ground .wo EmptyLine ; additional line of ground
.byte $41 .byte $41
.word dl .word dl
;----------------------------------------------- ;-----------------------------------------------
;Screen displays go first to avoid crossing 4kb barrier ;Screen displays go first to avoid crossing 4kb barrier
;----------------------------------------------- ;-----------------------------------------------
OptionsScreen OptionsScreen
dta d"Welcome to Scorch ver. " dta d"Welcome to Scorch v. "
build ; 3 bytes from scorch.asm (fancy method) :) build ; 4 bytes from scorch.asm (fancy method) :)
dta d" (un)2000-2022" dta d" (un)2000-2022"
dta d" Please select option with cursor keys " dta d" Please select option with cursor keys "
dta d" and press (Return) to proceed " dta d" and press (Return) to proceed "
OptionsHere OptionsHere
@@ -110,6 +115,7 @@ OptionsHere
dta d"Rounds : 10 20 30 40 50 " dta d"Rounds : 10 20 30 40 50 "
dta d"Missiles : slug slow norm fast hare " dta d"Missiles : slug slow norm fast hare "
dta d"Seppuku : nevr rare norm oftn alws " dta d"Seppuku : nevr rare norm oftn alws "
dta d"Mountains: NL BE CZ CH NP "
OptionsScreenEnd OptionsScreenEnd
;----------------------------------------------- ;-----------------------------------------------
MoreUp MoreUp
@@ -127,6 +133,7 @@ MoreDown
ListOfWeapons ListOfWeapons
:36 dta d" " :36 dta d" "
ListOfWeapons1End ListOfWeapons1End
;GameOverResults ; reuse after game (remember to clear on start new)
ListOfDefensiveWeapons ListOfDefensiveWeapons
:16 dta d" " :16 dta d" "
ListOfDefensiveWeaponsEnd ;constant useful when clearing ListOfDefensiveWeaponsEnd ;constant useful when clearing
@@ -143,10 +150,43 @@ purchaseActivate
dta d" - Finish " dta d" - Finish "
EmptyLine EmptyLine
dta d" " dta d" "
LastLine
:40 dta $00
; ------------------------------------------------- ; -------------------------------------------------
.ALIGN $1000 ; WARNING!!!! 4KiB barrier crossing here, might need reassignment!!! .ALIGN $1000 ; WARNING!!!! 4KiB barrier crossing here, might need reassignment!!!
;-----------------------------------------------
GameOverResults = display+$0ff0 ; reuse after game
Credits = GameOverResults +(6*40)
CreditsLastLine = Credits + (41*40)
GameOverDL
.byte $70,$40
.byte $47 ; 16 gr8 lines
.word GameOverTitle
.byte $4f ; 1 line
.word display+(40*72)
:28 .byte $0f ; 28 lines
.byte $0f+$80
.byte $4f ; 1 line
.word display+(40*32)
:30 .byte $0f ; 30 lines
.byte $0f+$80 ; 1 line
.byte $4f ; 1 line
.word display+(40*72)
:7 .byte $0f ; 7 lines
.byte $00+$80 ; 1 line
.byte $42 ; 7 tekst lines
.word GameOverTitle2
.byte $00+$80
.byte $42
.word GameOverResults
:5 .byte $00+$80,$02
.byte $70+$80
.byte $42+$20 ; VSCRL
DLCreditsAddr
.word Credits
:6 .byte $02+$20
.byte $02
.byte $41
.word GameOverDL
NameScreen NameScreen
dta d" Enter names of players " dta d" Enter names of players "
dta d" Tank 01 Name:" dta d" Tank 01 Name:"
@@ -180,5 +220,8 @@ activateTextEnd
purchaseText purchaseText
dta d"Purchase" dta d"Purchase"
purchaseTextEnd purchaseTextEnd
GameOverTitle
dta d" game over "*
GameOverTitle2
dta d" Player Points Hits Earned Money "
.endif .endif
+595 -121
View File
@@ -28,7 +28,7 @@
; begin: xdraw,ydraw - end: xbyte,ybyte ; begin: xdraw,ydraw - end: xbyte,ybyte
; let's store starting coordinates ; let's store starting coordinates
; will be needed, because everything is calculated relatively ; will be needed, because everything is calculated relatively
mwa #0 LineLength mwa #$ffff LineLength
mwa xdraw xtempDRAW mwa xdraw xtempDRAW
mwa ydraw ytempDRAW mwa ydraw ytempDRAW
@@ -462,19 +462,18 @@ endcircleloop
.endp .endp
;-------------------------------------------------- ;--------------------------------------------------
.proc clearscreen .proc ClearScreen
;-------------------------------------------------- ;--------------------------------------------------
mwa #display temp
lda #$ff ldy #0
ldx #0 @ lda #$ff
@ sta (temp),y
:31 sta display+($100*#),x inw temp
sta display+$1e50,x ; this is so no space outside of the screen is cleared cpw temp #display+screenheight*screenBytes+1
; of course we are clearing $100 instead of $50, but who cares :]
inx
bne @- bne @-
rts rts
.endp .endp
;-------------------------------*------------------ ;-------------------------------*------------------
.proc placetanks .proc placetanks
;-------------------------------------------------- ;--------------------------------------------------
@@ -611,45 +610,66 @@ DrawNextTank
lda eXistenZ,x lda eXistenZ,x
bne SkipHidingPM ; if energy=0 then no tank bne SkipHidingPM ; if energy=0 then no tank
; hide P/M ; hide P/M
lda #0 lda #0
sta hposp0,x cpx #$4 ; 5th tank is defferent
jmp DoNotDrawTankNr bne No5thTankHide
sta hposp0+4
sta hposp0+5
beq @+
No5thTankHide
cpx #$5 ; 6th tank is defferent
bne No6thTankHide
sta hposp0+6
sta hposp0+7
beq @+
No6thTankHide
sta hposp0,x
@
jmp DoNotDrawTankNr
SkipHidingPM SkipHidingPM
ldy TankShapesTable,x
lda AngleTable,x lda AngleTable,x
tay cmp #91 ; left or right tank shape
lda BarrelTable,y bcs LeftTank
sta CharCode :2 iny ; right tank
LeftTank
sty CharCode
DrawTankNrX DrawTankNrX
ldx tanknr ldx tanknr
lda xtankstableL,x jsr SetupXYdraw
sta xdraw
lda xtankstableH,x
sta xdraw+1
lda ytankstable,x
sta ydraw
mva #0 ydraw+1
jsr TypeChar jsr TypeChar
; now P/M graphics on the screen (only for 5 tanks) ; now P/M graphics on the screen (only for 5 tanks)
; horizontal position ; horizontal position
ldx TankNr
mwa xdraw xbyte mwa xdraw xbyte
ldx tanknr
cpx #$5
bcs NoPlayerMissile
rorw xbyte ; divide by 2 (carry does not matter) rorw xbyte ; divide by 2 (carry does not matter)
lda xbyte lda xbyte
clc clc
adc #PMOffset+1 ; P/M to graphics offset adc #PMOffsetX ; P/M to graphics offset
cpx #$4 ; 5th tank are joined missiles and offset is defferent cpx #$4 ; 5th tank are joined missiles and offset is defferent
bne NoMissile bne No5thTank
clc clc
adc #$0C ; missile offset offset adc #$04 ; missile offset offset
NoMissile sta hposp0+4
sta hposp0+5
bne NoMissile
No5thTank
cpx #$5 ; 6th tank are joined missiles and offset is defferent
bne Tanks1to4
clc
adc #$04 ; missile offset offset
sta hposp0+6
sta hposp0+7
bne NoMissile
Tanks1to4
sta hposp0,x sta hposp0,x
NoMissile
; vertical position ; vertical position
lda pmtableL,x lda pmtableL,x
sta xbyte sta xbyte
@@ -659,64 +679,103 @@ NoMissile
; calculate start position of the tank ; calculate start position of the tank
lda ydraw lda ydraw
clc clc
adc #PMOffset adc #PMOffsetY
sta temp sta temp
; clear sprite and put 3 lines on the tank at the same time
ldy #$00 ldy #$00
tya cpx #$5
bcs PMForTank6
; clear sprite and put 3 lines on the tank at the same time
ldx #3 ; three lines of PM
ClearPM ClearPM
cpy temp cpy temp
bne ZeroesToGo bne ZeroesToGo
lda #$03 ; (2 bits set) we set on two pixels in three lines @ lda (xbyte),y
and #%11110000
ora #%00001111 ; (2 bits set) we set on two pixels in three lines
sta (xbyte),y sta (xbyte),y
dey dey
sta (xbyte),y dex
dey bne @-
sta (xbyte),y
dey
lda #$00
ZeroesToGo ZeroesToGo
lda (xbyte),y
and #%11110000
sta (xbyte),y sta (xbyte),y
dey dey
bne ClearPM bne ClearPM
beq NoPlayerMissile
PMForTank6
; clear sprite and put 3 lines on the tank at the same time
ldx #3 ; three lines of PM
ClearPM6
cpy temp
bne ZeroesToGo6
@ lda (xbyte),y
and #%00001111
ora #%11110000 ; (2 bits set) we set on two pixels in three lines
sta (xbyte),y
dey
dex
bne @-
ZeroesToGo6
lda (xbyte),y
and #%00001111
sta (xbyte),y
dey
bne ClearPM6
NoPlayerMissile NoPlayerMissile
ldy #$01
lda Erase
beq @+
dey
@ sty color
; draw defensive weapons like shield ( tank number in X ) ; draw defensive weapons like shield ( tank number in X )
; in xdraw, ydraw we have coordinates left LOWER corner of Tank char ; in xdraw, ydraw we have coordinates left LOWER corner of Tank char
ldx TankNr
lda ActiveDefenceWeapon,x lda ActiveDefenceWeapon,x
cmp #ind_Shield_________ ; one shot shield cmp #ind_Shield_________ ; one shot shield
beq ShieldDraw beq DrawTankSh
cmp #ind_Force_Shield___ ; shield with energy and parachute cmp #ind_Force_Shield___ ; shield with energy and parachute
beq ShieldDraw beq DrawTankShieldBold
cmp #ind_Heavy_Shield___ ; shield with energy cmp #ind_Heavy_Shield___ ; shield with energy
beq ShieldDraw beq DrawTankShieldBold
cmp #ind_Auto_Defense___ ; Auto Defence cmp #ind_Bouncy_Castle__ ; Auto Defence
beq DrawTankShieldWihHorns beq DrawTankShieldWihHorns
cmp #ind_Mag_Deflector__ ; Mag Deflector cmp #ind_Mag_Deflector__ ; Mag Deflector
beq DrawTankShieldWihHorns beq DrawTankShieldWihHorns
cmp #ind_White_Flag_____ ; White Flag cmp #ind_White_Flag_____ ; White Flag
beq DrawTankFlag beq DrawTankFlag
bne NoShieldDraw bne NoShieldDraw
ShieldDraw DrawTankSh
jsr DrawTankShield.DrawInPosition jsr DrawTankShield
NoShieldDraw jmp NoShieldDraw
DoNotDrawTankNr
rts
DrawTankShieldWihHorns DrawTankShieldWihHorns
jsr DrawTankShield.DrawInPosition jsr DrawTankShield
jsr DrawTankShieldHorns jsr DrawTankShieldHorns
rts jmp NoShieldDraw
DrawTankShieldBold
jsr DrawTankShield
jsr DrawTankShieldBoldLine
jmp NoShieldDraw
DrawTankFlag DrawTankFlag
lda #$5E ; flag symbol lda #char_flag____________ ; flag symbol
sta CharCode sta CharCode
lda Ytankstable,x lda Ytankstable,x
sec sec
sbc #8 sbc #8
sta ydraw sta ydraw
lda XtanksTableL,x
sta xdraw
lda XtanksTableH,x
sta xdraw+1
jsr TypeChar jsr TypeChar
NoShieldDraw
BarrelChange
ldy #$01
lda Erase
beq @+
dey
@ sty color
jsr DrawBarrel
ldx TankNr
DoNotDrawTankNr
rts rts
.endp .endp
@@ -732,11 +791,15 @@ tankflash_loop
mva #1 Erase mva #1 Erase
ldx TankNr ldx TankNr
jsr DrawTankNr.SkipHidingPM ; it's necessary becouse DrawTankNr skips tanks with no energy ! jsr DrawTankNr.SkipHidingPM ; it's necessary becouse DrawTankNr skips tanks with no energy !
PAUSE 2 ;PAUSE 2
ldy #1
jsr PauseYFrames
mva #0 Erase mva #0 Erase
ldx TankNr ldx TankNr
jsr DrawTankNr.SkipHidingPM jsr DrawTankNr.SkipHidingPM
PAUSE 2 ;PAUSE 2
ldy #1
jsr PauseYFrames
dec fs dec fs
jne tankflash_loop jne tankflash_loop
rts rts
@@ -751,29 +814,16 @@ tankflash_loop
; ;
; 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
lda ytankstable,x
sta ydraw
mva #0 ydraw+1
DrawInPosition
mva #1 color
lda erase
beq ShieldVisible
dec color
ShieldVisible
sbw xdraw #$03 ; 3 pixels to left sbw xdraw #$03 ; 3 pixels to left
; draw left vertical line of shield ( | ) ; draw left vertical line of shield ( | )
mva #6 temp ; strange !!! mva #7 temp ; strange !!!
@ @
jsr plot jsr plot
.nowarn dew ydraw .nowarn dew ydraw
dec temp dec temp
bne @- bne @-
; draw left oblique line of shield ( / ) ; draw left oblique line of shield ( / )
mva #4 temp mva #3 temp
@ @
jsr plot jsr plot
.nowarn dew ydraw .nowarn dew ydraw
@@ -781,14 +831,14 @@ ShieldVisible
dec temp dec temp
bne @- bne @-
; draw top horizontal line of shield ( _ ) ; draw top horizontal line of shield ( _ )
mva #5 temp mva #7 temp
@ @
jsr plot jsr plot
inw xdraw inw xdraw
dec temp dec temp
bne @- bne @-
; draw right oblique line of shield ( \ ) ; draw right oblique line of shield ( \ )
mva #4 temp mva #3 temp
@ @
jsr plot jsr plot
inw ydraw inw ydraw
@@ -823,6 +873,289 @@ ShieldVisible
jsr plot jsr plot
rts rts
.endp .endp
;--------------------------------------------------
.proc DrawTankShieldBoldLine
; use only directly after DrawTankShield
; this proc draws bold top on shield.
; Symbol of ablative shield ? :)
;--------------------------------------------------
sbw xdraw #$04 ; 5 pixels left
sbw ydraw #$0b ; 11 pixels up
; draw additional top horizontal line of shield ( _ )
mva #6 temp
@
jsr plot
.nowarn dew xdraw
dec temp
bne @-
rts
.endp
;--------------------------------------------------
.proc DrawTankParachute
;Tank number in X
;--------------------------------------------------
lda #char_parachute_______ ; parachute symbol
sta CharCode
lda Ytankstable,x
cmp #16
bcc ToHighToParachute
;sec
sbc #8
sta ydraw
jsr SetupXYdraw.X
jsr TypeChar
ToHighToParachute
ldx TankNr
rts
.endp
;--------------------------------------------------
.proc TankFalls;
;--------------------------------------------------
lda #0
sta PreviousFall ; bit 7 - left, bit 6 - right
sta EndOfTheFallFlag
sta Parachute
mva #2 FallingSoundBit ; another trick for only one sfx initialization in loop
; let's check if the given tank has got the parachute
ldx TankNr
lda ActiveDefenceWeapon,x
cmp #ind_Parachute______ ; parachute
beq ParachuteActive
cmp #ind_StrongParachute ; strong parachute
beq ParachuteActive
cmp #ind_Force_Shield___ ; shield witch energy and parachute
bne TankFallsX
ParachuteActive
inc Parachute
TankFallsX
; sound only if really falls
lda Parachute
and FallingSoundBit ; bit 1
beq NoFallingSound
mva #0 FallingSoundBit
mva #sfx_shield_off sfx_effect
NoFallingSound
; clear previous position
mva #1 Erase
jsr DrawTankNr
; and the parachute (if present)
lda Parachute
and #01
beq DoNotClearParachute
; here we clear the parachute
; ldx TankNr
jsr DrawTankParachute
DoNotClearParachute
mva #0 Erase
; ldx TankNr
lda EndOfTheFallFlag ; We only get byte below the tank if still falling
bne NoGroundCheck
; coordinates of the first pixel under the tank
ldx TankNr
jsr SetupXYdraw.X
lda Ytankstable,x
clc
adc #1 ; in this point the comment helped us! For the very first
; time in our lives! Tada! It opens a new chapter!!!
sta ydraw
;
; UnderTank1 ; byte under tank
; UnderTank2 ; byte under tank reversed (for simple check right direction)
lda #08
sta temp ; Loop Counter
ByteBelowTank
jsr point
beq EmptyPoint2
sec
ror UnderTank2
sec
bcs ROLPoint2
EmptyPoint2
clc
ror UnderTank2
clc
ROLPoint2
rol UnderTank1
inw xdraw
dec temp
bne ByteBelowTank
NoGroundCheck
ldx TankNr
lda UnderTank1
bne NoFallingDown
; Tank falling down ----
lda Parachute
and #1
bne ParachutePresent
; decreasing energy
ldy #2 ; how much energy to substract
jsr DecreaseEnergyX
ParachutePresent
; check parachute type
lda ActiveDefenceWeapon,x
cmp #ind_StrongParachute ; strong parachute
bne OneTimeParachute
; decreasing energy of parachute
ldy #2 ; how much energy to substract
jsr DecreaseShieldEnergyX
cpy #0 ; is necessary to reduce tenk energy ?
beq @+
jsr DecreaseEnergyX
@
; check energy of parachute
lda ShieldEnergy,x
bne OneTimeParachute
mva #0 Parachute
mva #0 ActiveDefenceWeapon,x ; deactivate defence
OneTimeParachute
lda Parachute
ora #2 ; we set bit nr 1 (nr 0 means that parachute is present)
sta Parachute
; tank is falling down - modify coorinates
lda Ytankstable,x
clc
adc #1
sta Ytankstable,x
jmp EndOfFCycle
NoFallingDown
; check direction (left or right)
ldy #7 ; SlideLeftTable length -1 (from 0 to 7)
@ lda SlideLeftTable,y
cmp UnderTank1
beq FallingRight
cmp UnderTank2
beq FallingLeft
dey
bpl @-
bmi NoLeftOrRight
FallingLeft
; tank is falling left
bit PreviousFall ; bit 6 - right
bvs EndLeftFall
; we finish falling left if the tank reached the edge of the screen
lda XtanksTableH,x
bne NotLeftEdge
lda XtanksTableL,x
cmp #2 ; 2 pixels correction due to a barrel wider than tank
beq EndLeftFall
NotLeftEdge
; tank is falling left - modify coorinates
clc
lda XtankstableL,x
adc #1
sta XtankstableL,x
lda XtankstableH,x
adc #0
sta XtankstableH,x
mva #%10000000 PreviousFall ; set bit 7 - left
bne EndOfFCycle
FallingRight
; tank is falling right
bit PreviousFall ; bit 7 - left
bmi EndRightFall
; we finish falling right if the tank reached the edge of the screen
clc
lda XtanksTableL,x
adc #$08 ; we'll check right side of the char
sta temp
lda XtanksTableH,x
adc #0
sta temp+1
cpw temp #screenwidth-2 ; 2 pixels correction due to a barrel wider than tank
beq EndRightFall
; tank is falling right - modify coorinates
sec
lda XtankstableL,x
sbc #1
sta XtankstableL,x
lda XtankstableH,x
sbc #0
sta XtankstableH,x
mva #%01000000 PreviousFall ; set bit 6 - right
bne EndOfFCycle
EndLeftFall
EndRightFall
NoLeftOrRight
inc EndOfTheFallFlag ; after this is shouldn't fall
EndOfFCycle
; draw tank on new position
jsr DrawTankNr ; ew have TankNr in X (I hope :) )
; checking is parachute present and if so, draw it
lda Parachute
cmp #3 ; parachute and falling
bne DoNotDrawParachute
; here we draw parachute
; ldx TankNr
jsr DrawTankParachute
jsr WaitOneFrame ; only if tank with parachute
RapidFalling
DoNotDrawParachute
lda EndOfTheFallFlag
jeq TankFallsX
; Tank falling down already finished, but it is not sure that
; the horizontal coordinate is even.
; If it is odd then it must be corrected because otherwise
; P/M graphics background would not look OK
; ldx TankNr
lda XtanksTableL,x
and #$01
beq EndOfFall ; if it is even then it is the end
; and if not, we push it one pixel the way it was falling before
lda #%10000000 ; set "virtual ground" for right falling
ldy #%00000001
bit PreviousFall
bmi ForceFallLeft
tay ; tricky - replaces ldy #%10000000
lda #%00000001 ; set "virtual ground" for left falling
ForceFallLeft
sta UnderTank1
sty UnderTank2
jne TankFallsX
EndOfFall
mva #1 Erase
; ldx TankNr
; if tank was falling down having parachute,
; we must deduct one parachute
lda Parachute
cmp #$03 ; was falling down and the parachute
bne NoParachuteWeapon
; first we check type of parachute
lda ActiveDefenceWeapon,x
cmp #ind_Parachute______ ; deactivate weapon only if parachute (54)
bne NoParachuteWeapon
mva #0 ActiveDefenceWeapon,x ; deactivate defence weapon (parachute)
NoParachuteWeapon
; now we clear parachute on the screen if present
lda Parachute
and #01
beq ThereWasNoParachute
jsr DrawTankParachute
ThereWasNoParachute
mva #0 Erase
; ldx TankNr
jsr DrawTankNr ; redraw tank after erase parachute (exactly for redraw leaky schield :) )
mva #sfx_silencer sfx_effect
rts
.endp
;--------------------------------------------------
.proc ClearPMmemory
;--------------------------------------------------
lda #$00
tay
@ sta pmgraph+$300,y
sta pmgraph+$400,y
sta pmgraph+$500,y
sta pmgraph+$600,y
sta pmgraph+$700,y
iny
bne @-
rts
.endp
;-------------------------------------------------- ;--------------------------------------------------
.proc drawmountains .proc drawmountains
@@ -922,7 +1255,6 @@ StillNothing
lda ydraw lda ydraw
sta (tempor2),y sta (tempor2),y
sta (temp),y sta (temp),y
jmp FoundPeek1
FoundPeek1 FoundPeek1
inw tempor2 inw tempor2
inw temp inw temp
@@ -990,7 +1322,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
mva #1 color sta color ; Pozor! :) we know - now A=1
mva #sfx_silencer sfx_effect mva #sfx_silencer sfx_effect
rts rts
.endp .endp
@@ -1011,6 +1343,8 @@ getrandomY ;getting random Y coordinate
sta ydraw sta ydraw
sta yfloat+1 sta yfloat+1
mva #0 yfloat ;yfloat equals to e.g. 140.0 mva #0 yfloat ;yfloat equals to e.g. 140.0
mva #screenheight-margin-5 yfloat+1
sta ydraw
; how to make nice looking mountains? ; how to make nice looking mountains?
; randomize points and join them with lines ; randomize points and join them with lines
@@ -1019,9 +1353,10 @@ getrandomY ;getting random Y coordinate
NextPart NextPart
lda random lda random
and mountainDeltaL
sta delta ; it is after the dot (xxx.delta) sta delta ; it is after the dot (xxx.delta)
lda random lda random
and #$03 ;(max delta) and mountainDeltaH ;(max delta)
sta delta+1 ; before the dot (delta+1.delta) sta delta+1 ; before the dot (delta+1.delta)
lda random lda random
@@ -1096,7 +1431,7 @@ EndDrawing
rts rts
.endp .endp
; **************************************************** /*
;-------------------------------------------------- ;--------------------------------------------------
.proc calculatemountains0 .proc calculatemountains0
; Only for testing - makes ground flat (0 pixels) ; Only for testing - makes ground flat (0 pixels)
@@ -1121,7 +1456,7 @@ SetYofNextTank
bpl SetYofNextTank bpl SetYofNextTank
rts rts
.endp .endp
; **************************************************** */
; ----------------------------------------- ; -----------------------------------------
.proc unPlot .proc unPlot
@@ -1236,40 +1571,36 @@ EndOfUnPlot
; 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
; through line drawing and small text output!!! ; through line drawing and small text output!!!
; We tried to keep it clear and therefore it is far from ;
; optimal speed. ; Optimized by 0xF (Fox) THXXXX!!!
; ----------------------------------------- ; -----------------------------------------
; is it not over the screen ??? ; is it not over the screen ???
cpw ydraw #(screenheight+1); changed for one additional line. cpw ydraw #(screenheight-1) cpw ydraw #(screenheight+1); changed for one additional line. cpw ydraw #(screenheight-1)
bcs unPlot.EndOfUnPlot bcs unPlot.EndOfUnPlot ;nearest RTS
CheckX02 CheckX02
cpw xdraw #screenwidth cpw xdraw #screenwidth
bcs EndOfPlot ;nearest RTS bcs EndOfPlot
MakePlot MakePlot
; let's calculate coordinates from xdraw and ydraw ; let's calculate coordinates from xdraw and ydraw
mwa xdraw xbyte
lda xbyte
and #$7
sta ybit
;xbyte = xbyte/8 ;xbyte = xbyte/8
lda xbyte lda xdraw+1
lsr xbyte+1 lsr
lda xdraw
ror ;just one bit over 256. Max screenwidth = 512!!! ror ;just one bit over 256. Max screenwidth = 512!!!
lsr lsr
lsr lsr
tay ;save sta xbyte
;--- ;---
ldx ydraw ldx ydraw
lda linetableL,x ldy linetableL,x
sta xbyte
lda linetableH,x lda linetableH,x
sta xbyte+1 sta xbyte+1
ldx ybit lda xdraw
and #$7
tax
lda color lda color
bne ClearPlot bne ClearPlot
@@ -1292,35 +1623,30 @@ ClearPlot
; result is in A (zero or appropriate bit is set) ; result is in A (zero or appropriate bit is set)
; let's calculate coordinates from xdraw and ydraw ; let's calculate coordinates from xdraw and ydraw
mwa xdraw xbyte
lda xbyte
and #$7
sta ybit
;xbyte = xbyte/8 ;xbyte = xbyte/8
lda xbyte lda xdraw+1
lsr xbyte+1 lsr
lda xdraw
ror ;just one bit over 256. Max screenwidht = 512!!! ror ;just one bit over 256. Max screenwidht = 512!!!
lsr lsr
lsr lsr
tay ;save sta xbyte
;--- ;---
ldx ydraw ldx ydraw
lda linetableL,x ldy linetableL,x
sta xbyte
lda linetableH,x lda linetableH,x
sta xbyte+1 sta xbyte+1
ldx ybit lda xdraw
and #$7
tax
lda (xbyte),y lda (xbyte),y
eor #$ff
and bittable,x and bittable,x
eor bittable,x
rts rts
.endp .endp;--------------------------------------------------
;--------------------------------------------------
.proc DrawLine .proc DrawLine
;-------------------------------------------------- ;--------------------------------------------------
mva #0 ydraw+1 mva #0 ydraw+1
@@ -1473,7 +1799,7 @@ EndPutChar
FontColor0 FontColor0
; char to the table ; char to the table
lda CharCode4x4 lda CharCode4x4
and #1 and #%00000001
beq Upper4bits beq Upper4bits
lda #$ff ; better option to check (nibbler4x4 = $00 or $ff) lda #$ff ; better option to check (nibbler4x4 = $00 or $ff)
Upper4bits Upper4bits
@@ -1515,11 +1841,11 @@ GetUpper4bits
and #$7 and #$7
sta ybit sta ybit
lsrw xbyte ; div 8 :3 lsrw xbyte ; div 8
rorw xbyte ; rorw xbyte
rorw xbyte ; rorw xbyte
;--- ;---
ldy xbyte ldy xbyte ; horizontal byte offet stored in Y
lda dy ; y = y - 3 because left lower. lda dy ; y = y - 3 because left lower.
sec sec
sbc #3 sbc #3
@@ -1572,13 +1898,161 @@ EndPut4x4
.endp .endp
.proc SetMainScreen .proc SetMainScreen
mva #0 dmactl ; mva #0 dmactls
VDLI DLIinterruptGraph ; jsr SetDLI for graphics (game) screen VDLI DLIinterruptGraph ; jsr SetDLI for graphics (game) screen
mwa #dl dlptrs ; issue #72 (glitches when switches) mwa #dl dlptrs ; issue #72 (glitches when switches)
lda dmactls lda #%00111110
and #$fc ; and #$fc
ora #$02 ; 2=normal, 3 = wide screen width ; ora #$02 ; 2=normal, 3 = wide screen width
sta dmactls sta dmactls
jsr WaitOneFrame
rts
.endp
; -------------------------------------
.proc SetupXYdraw
lda ytankstable,x
sta ydraw
mva #0 ydraw+1
X lda XtanksTableL,x
sta xdraw
lda XtanksTableH,x
sta xdraw+1
rts
.endp
;--------------------------------------------------
.proc DrawBarrel
; X - tankNr
; changes xdraw, ydraw, fx, fy
;--------------------------------------------------
;vx calculation
;vx = sin(90-Angle) for Angle <=90
;vx = -sin(Angle-90) for 90 < Angle <= 180
; erase previous barrel
;cos(Angle) (but we use sin table only so some shenanigans happen)
; mva #0 color
; lda previousBarrelAngle,x
; sta Angle
; jsr DrawBarrelTech
;
; mva #1 color
ldx TankNr
jsr SetupXYdraw
lda BarrelLength,x
sta yc ; current tank barrel length
lda angleTable,x
sta Angle
jsr DrawBarrelTech
rts
.endp
.proc DrawBarrelTech
; angle in Angle and A
mvx #0 goleft
cmp #91
bcc angleUnder90
;over 90
sec
sbc #90
tax
; barrel start offset over 90deg
adw xdraw #5 xdraw
mva #1 goleft
bpl @+ ; jmp @+
angleUnder90
sec ; X = 90-Angle
lda #90
sbc Angle
tax
; barrel start offset under 90deg
adw xdraw #3 xdraw
@
sbw ydraw #3 ydraw
lda sintable,x ; cos(X)
sta vx
;======vy
;vy = sin(Angle) for Angle <=90
;vy = sin(180-Angle) for 90 < Angle <= 180
;--
lda Angle
cmp #91
bcc YangleUnder90
lda #180
sec
sbc Angle
YangleUnder90
tax
lda sintable,x
sta vy
lda #0 ; all arithmetic to zero
sta vx+1
sta vy+1
sta fx
sta fy
; draw by vx vy
; in each step
; 1. plot(xdraw, ydraw)
; 2. add vx and vy to 3 byte variables xdraw.fx, ydraw.fy
; 3 check length, if shorter, go to 1.
; mva #6 yc ; barrel length
barrelLoop
lda goleft
bne @+
clc
lda fx
adc vx
sta fx
lda xdraw
adc #0
sta xdraw
lda xdraw+1
adc #0
sta xdraw+1
jmp ybarrel
@
sec
lda fx
sbc vx
sta fx
lda xdraw
sbc #0
sta xdraw
lda xdraw+1
sbc #0
sta xdraw+1
ybarrel
sec
lda fy
sbc vy
sta fy
lda ydraw
sbc #0
sta ydraw
lda ydraw+1
sbc #0
sta ydraw+1
jsr plot ;.MakePlot
dec yc
bne barrelLoop
mwa xdraw EndOfTheBarrelX
mva ydraw EndOfTheBarrelY
rts rts
.endp .endp
+157
View File
@@ -0,0 +1,157 @@
Podstawowa instrukcja:
Grać można przy użyciu klawiatury (wszystkie funkcjonalności) lub joysticka (wszystkie funkcjonalności niezbędne w rozgrywce).
1 Wybór opcji gry.
Na pierwszym ekranie możemy skonfigurować opcje rozgrywwki:
- ilość graczy (2 - 6) obejmuje tak ludzi jak graczy sterowanych przez komputer
- początkową ilość gotówki każdego z graczy (8k to wybrana przez nas wartość optymalna, jecz przy krótkich rozgrywkach warto wybrać większą wartość)
- grawitacja
- maksymalna siła wiatru (wiatr jest losowany na początku każdej z rund, tu możemy wybrać jak silny może być)
- ilość rozgrywanych rund
- szybkość lotu pocisków (nie ma wpływu na tor lotu - zmienia jedynie widoczną prędkość rysowania - nie zmienia nic w samej rozgrywce)
- częstotliwość samobójstw :) - jeśli przez ileś tur gra nie odnotowała trafień (czołgi ciągle strzelają niecelnie) jeden z takich pudłujących czołgów popełnia samobójstwo - tu określamy jak długo mogą “strzelać w próżnię” :) - jeśli grają tylko ludzie optymalne ustawienie to “norm”, w przypadku graczy sterowanych przez komputer… wedle uznania.
- wysokość (i pofałdowanie) gór od prawie płaskich (NL), do strzelistych i wysokich (NP)
Wybór opcji klawiszami kursora lub joystickiem.
klawisz [RETURN] lub przycisk Joysticka przechodzi do następnego ekranu.
2. Wprowadzanie nazwy graczy i wybór poziomu graczy sterowanych przez komputer
Drugi ekran powtarza się dla każdego z graczy można na nim klawiszami kursora lub joysticjiem wybrać czy danym czołgiem będzie kierował człowiek (opcja HUMAN) czy też kompute (pozostałe opcje). Jednocześnie z klawiatury można wprowadzić nazwę wybranego gracza.
Po naciśnięciu klawisza [RETURN] lub przycisku Joysticka ekran przechodzi na następnego gracza aż zostaną wybrane poziomy trudności dla każdego z nich.
Jeśli nazwa nie zostanie wpisana (bo np operujemy wyłącznie joystickiem), to zostanie uzupełniona nazwą domyślną.
3. Ekran zakupów (przed każdą rundą)
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 ten 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 zmieniają ekran na bronie defensywne lub ofensywne, klawisz [SPACJA] lub strzałka w prawo a także joystick w prawo realizują zakup wskazanej broni.
Klawisz [RETURN] lub przycisk joysticka przechodzi do ekranu zakupów następnego gracza.
(oczywiście dla graczy komputerowych ten ekran się nie pojawia)
4. Główny ekran gry
W linii statusowej widoczna jest informacja o tym który z graczy aktualnie może oddać strzał oraz zestaw innych informacji:
- nazwa czołgu gracza
- wybrana aktualnie broń ofensywna
- pozostała ilość punktów energii gracza i jeśli ma on aktywną broń defensywną posiadającą swój zasób energii - w nawiasie ten zasób
- ustawiony przez gracza kąt nachylenia lufy i kierunek jej nachylenia
- ustawiona przez gracza siła strzału (maksymalna siła strzału jest ograniczana przez energię gracza - nie może przekroczyć energii * 10 . Oznacza to, że mając małą ilość energii możemy oddać słabsze strzały
- numer aktualnej rundy rozgrywki
- prędkość i kierunek wiatru
- w nawiasie nazwę aktywnej broni defensywnej - jeśli jest jakaś aktywowana przez gracz
Tutaj klawiszologia jest prosta, klawisze kursora lub joustick: lewo/prawo - zmiana kąta nachylenia lufy, góra/dół - zmiana ustawienia siły strzału.
[SPACJA] lub przycisk joysticka naciśnięte krótko - oddanie strzału
[TAB] - wybór broni ofensywnej (ta opcja nie jest dostępna bezpośrednio joystickiem - trzeba wybrać Inventory)
klawisz [I] lub dłuższe przytrzymanie przycisku joysticka - przejście do Inventory
Inventory to ekran (a w zasadzie dwa) bliźniaczo podobny do ekranu zakupów. Zasady poruszania się są identyczne z tym, że tu nie kupujemy broni, ale wybieramy jedną z ofensywnych, którą będziemy strzelać lub aktywujemy broń defensywną.
Klawisz [M] - wyłączenie/włączenie muzyki w tle
Klawisz [S] - wyłączenie/włączenie dźwięków efektów.
Klawisz [O] - wymuszenie zakończenia gry (Game Over). W podsumowaniu wyników nie jest brana pod uwagę przerwana właśnie runda rozgrywki, a wyłącznie rundy zakończone wcześniej. Odpowiada to wciśnięciu klawisza [ESC] z tą różnicą, że wyświetlane jest podsumowanie oraz creditsy.
W czasie całej gry w dowolnym momencie (chyba że akurat gra komputer, wtedy czasem trzeba chwilę poczekać) można nacisnąć klawisz [ESC], który umożliwia przerwanie gry i powrót na początek (oczywiście jest zabezpieczenie przed przypadkowym naciśnięciem).
A tutaj zręby opisu działania poszczególnych broni, zasad punktacji itp:
—-----------------------
Najpierw co wiemy o energii czołgów
- Czołgi mają energię (a Ogry warstwy - jak cebula) - na starcie 99 jednostek
- Energii czołgom ubywa na 3 sposoby:
1. 1 jednostka po oddaniu każdego strzału
2. w czasie spadania (jeden piksel w dół 2 jednostki)
3. w chwili trafienia w czołg lub obok niego jakiegoś pocisku - i tu ilość odejmowanej energii zależy od odległości od centrum eksplozji i typu/siły rażenia pocisku.
Jak działa odejmowanie energii (i zarabianie kasy!)
Po każdej rundzie wyliczana jest ilość zdobytych/straconych pieniędzy robione jest to na podstawie dwóch zmiennych gromadzonych przez każdy z czołgów w trakcie rundy. Te zmienne to:
gain - energia "przechwycona" od trafionych czołgów (także jeśli trafimy w samego siebie :) i tu haczyk, jeśli pozostało nam bardzo mało energii opłacalne może być trafienie w siebie mocną bronią!
loose - energia stracona w wyniku eksplozji/upadku (i tu ważne liczona jest całkowita utrata energii nawet jeśli czołg ma w chwili trafienia mniej).
Dodatkowo czołg który wygrał rundę ma parametr gain (przechwyconej od trafionych czołgów energii) zwiększany o pozostałą mu na koniec rundy energię (bo nie zginął i powinien ją mieć - choć bywa też inaczej :) )
Konkretnie:
Po każdej rundzie:
money = money + (2 * (gain+energy))
money = money - loose
if money <0 then money=0
(na starcie każdej rundy gain i loose mają wartość 0)
W czasie rundy, jeśli w wyniku strzału oddanego przez czołg inny czołg zostanie trafiony, czołg oddający strzał "dostaje energię" zabraną czołgowi trafionemu.
czołg oddający strzał:
gain = gain + EnergyDecrease
czołg trafiony:
loose = loose + EnergyDecrease
gdzie EnergyDecrease to utrata energii w wyniku trafienia.
Oczywiście jednocześnie trafiony czołg traci ilość energii zapisaną w EnergyDecrease, z tym że tutaj strata nie może przekroczyć posiadanej energii.
Uwaga! Ekranowa reprezentacja pieniędzy ma na końcu dopisane dodatkowe 0 więc faktyczne mamy 10 razy więcej kasy niż wynika z powyższych obliczeń :)
Jak działa trafienie.
Każda broń, która skutkuje eksplozją, ma swój promień rażenia (ExplosionRadius).
Po eksplozji każdy czołg w jej zasięgu traci energię.
Działa to tak, że obliczana jest odległość trafianego czołgu od centrum eksplozji, zmniejszony o tę odległość ExplosionRadius jest mnożony przez 8 i w wyniku otrzymujemy EnergyDecrease.
Czyli w przypadku trafienia centralnie w czołg:
EnergyDecrease = ExplosionRadius * 8
a z każdym pikselem dalej od centrum ubywa o 8 jednostek mniej.
Nie wiem czy to zrozumiałe - ja rozumiem :)
Przykładowo, jeśli czołg zostanie trafiony centralnie przy pomocy Baby Missile - odejmowane jest mu 88 jednostek energii (11 * 8), co także oznacza, że przy trafieniu tym pociskiem w odległości 12 pikseli od czołgu - nie traci on energii wcale.
A oto wartości promienia rażenia (ExplosionRadius) dla poszczególnych broni:
Baby Missile - 11
Missile - 17
Baby Nuke - 25
Nuke - 31
LeapFrog - 17 15 13
Funky Bomb - 21 11 (* 5)
MIRV - 17 (* 5)
Death's Head - 31 (* 5)
Napalm - x 40 (ta broń jest inna i nie jest wyznaczana odległość od centrum, po prostu każdy czołg znajdujący się w zasięgu płomieni traci 40 jednostek energii - zmienna ExplosionRadius nie jest używana)
Hot Napalm - x 80 (zasada taka jak w Napalm)
Baby Roller - 11
Roller - 21
Heavy Roller - 31
Riot Charge - 31
Riot Blast - 0 (tak na prawdę - 61 ale przy tych broniach nie jest brana pod uwagę przy liczeniu ubytku energii tylko szerokości gruntu do opadnięcia)
Riot Bomb - 17
Heavy Riot Bomb - 29
Baby Digger - 0 (60 - jak w Riot Blast)
Digger - 0 (60 - jak wyżej)
Heavy Digger - 0 (60 - jak wyżej)
Baby Sandhog - 0 (60 - jak wyżej)
Sandhog - 0 (60 - jak wyżej)
Heavy Sandhog - 0 (60 - jak wyżej)
Dirt Clod - 12
Dirt Ball - 22
Ton of Dirt - 31
Liquid Dirt - 0 (może warto to zmienić?)
Dirt Charge - 0 (61 - jak wyżej)
Laser - x 100 (ale tu także jest inaczej - równo 100 tylko w przypadku bezpośredniego trafienia, zmienna ExplosionRadius nie jest używana, więc nie ma mnożenia przez 8 - po prostu odejmujemy 100 jednostek energii - czyli czołg zawsze ginie).
Duże punkty otrzymane przez gracza to ilość czołgów, które zginęły wcześniej niż on. Jeśli któryś z innych czołgów skapitulował wcześniej (Biała Flaga) nie jest doliczany do tych które zginęły i nie daje punktów.
Tylko te punkty decydują o kolejności w podsumowaniu
A teraz bronie defensywne:
White Flag - powoduje poddanie gracza (może czasem przydać się w sytuacji beznadziejnej). Zaletą jest to, że poddając się nie dajemy dużego punktu przeciwnikom i nie powodujemy, że któryś zyska na tym, że nas zgładzi, ograniczamy też stratę swojej energii czyli także kasy. I tu także ważna uwaga - to jedyna broń defensywna, którą można deaktywować. Wystarczy ponownie wejść do inventory i jeszcze raz wybrać jej aktywację.
Battery - w momencie aktywacji doładowuje energię czołgu do pełna (99 jednostek) i jednocześnie jest to jedyna broń defensywna, która nie deaktywuje innych broni defensywnych w przypadku jej użycia.
Parachute - nie chroni przed ubytkiem energii z powodu sąsiedniej eksplozji, powoduje że nie ubywa energii w czasie JEDNEGO spadania. Po takim upadku deaktywuje się i trzeba aktywować nowy spadochron.
Shield - najprostsza osłona działa dokładnie przeciwnie niż Parachute, nie chroni przed ubytkiem energii w czasie spadania, chroni za to przed ubytkiem energii spowodowanym JEDNĄ sąsiednią eksplozją. Chroni jednorazowo, bez znaczenia jak silna jest eksplozja (czy jest to tylko "draśnięcie", czy też bezpośrednie trafienie atomówką) i od razu po niej deaktywuje się.
Heavy Shield - osłona z własną energią (na starcie 99 jednostek), działa tak samo jak Shield (nie chroni przed upadkiem) z tym wyjątkiem, że ma własny zasób energii. Przy eksplozji w pierwszej kolejności zmniejszana jest energia tej osłony i jeśli dojdzie ona do 0 to osłona deaktywuje się i dalej zmniejszana jest energia czołgu. W związku z takim działaniem, czołg z tym typem osłony można "zabić" podkopując go, bo spadanie zmniejsza energię czołgu a nie osłony.
Force Shield - najmocniejsza osłona - działa tak jak Heavy Shield tyle że połączona z Parachute. Co ważne w jej przypadku upadek nie zabiera energii osłonie ani czołgowi. Zabierają ją tylko trafienia.
Bouncy Castle - broń agresywna :) . Działa następująco. W przypadku bezpośredniego trafienia w czołg (i osłonę) powoduje "odbicie" pocisku w przeciwnym kierunku z tą samą siłą z jaką był wystrzelony. W przypadku braku wiatru i różnicy poziomów broń trafia wtedy w czołg, który ją wystrzelił. Po takim odbiciu deaktywuje się. W związku z tym, że broń ta reaguje w ten sposób tylko na precyzyjne trafienia, jest także osłoną odpowiadającą działaniu Heavy Shield i ma na starcie 99 jednostek (prawdopodobnie trzeba będzie przemyśleć tę wartość i dać tu mniejszą).
Mag Deflector - druga broń agresywna :) . W przypadku bezpośredniego trafienia w czołg (i osłonę) powoduje przesunięcie punktu trafienia losowo w lewo lub prawą stronę chronionego czołgu, ale niezbyt daleko, więc można dostać "odłamkiem" przy silniejszej broni. Tak jak w przypadku Bouncy Castle jest także osłoną odpowiadającą działaniu Heavy Shield i ma na starcie 99 jednostek (prawdopodobnie i tutaj trzeba będzie przemyśleć tę wartość i dać mniejszą).
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ę ale tylko przy niewielkim przysypaniu ale fanie 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 deaktywować).
W związku z odmiennym działaniem broni MIRV, Auto Defense i Mag Deflector wykorzystują tylko funkcję osłony przy trafieniu tą bronią.
Dodatkowo, żadna z osłon nie chroni przed Napalmem. Auto Defense czy Mag Deflector przy bezpośrednim trafieniu odbije je lub przeniesie obok, ale wystarczy trafić bardzo blisko czołgu i nie zadziała jego osłona.
Bronie White Flag i Nuclear Winter po aktywacji wymagają uruchomienia, jest to realizowanie przez "oddanie strzału" po aktywacji tej broni. Oczywiście strzał bronią ofensywną nie jest wtedy oddawany, a jedynie uruchamiana jest wybrana broń defensywna.
Można mieć aktywną tylko jedną broń defensywną w danej chwili (za wyjątkiem Long Schlong oczywiście :) ). Zawsze przed oddaniem strzału możemy zmienić decyzję i aktywować inną broni defensywną czy też dezaktywować White Flag.
Oczywiście aktywacja broni w momencie kiedy mamy już aktywowaną jakąś inną powoduje utratę tej poprzedniej (nie ma zwrotów :) ).
+19 -19
View File
@@ -1,33 +1,33 @@
.enum @dmactl .enum @dmactl
blank = %00 blank = %00
narrow = %01 narrow = %01
standard= %10 standard= %10
wide = %11 wide = %11
missiles= %100 missiles= %100
players = %1000 players = %1000
lineX1 = %10000 lineX1 = %10000
lineX2 = %00000 lineX2 = %00000
dma = %100000 dma = %100000
.ende .ende
scr48 = @dmactl(wide|dma|players|missiles|lineX1) ;screen 48b scr48 = @dmactl(wide|dma|players|missiles|lineX1)
scr40 = @dmactl(standard|dma|players|missiles|lineX1) ;screen 40b scr40 = @dmactl(standard|dma|players|missiles|lineX1)
scr32 = @dmactl(narrow|dma|players|missiles|lineX1) ;screen 32b scr32 = @dmactl(narrow|dma|players|missiles|lineX1)
.enum @pmcntl .enum @pmcntl
missiles= %1 missiles= %1
players = %10 players = %10
trigs = %100 trigs = %100
.ende .ende
.enum @gtictl .enum @gtictl
prior0 = %0 prior0 = %0
prior1 = %1 prior1 = %1
prior2 = %10 prior2 = %10
prior4 = %100 prior4 = %100
prior8 = %1000 prior8 = %1000
ply5 = %10000 ; Fifth Player Enable ply5 = %10000 ; Fifth Player Enable
mlc = %100000 ; Multiple Color Player Enable mlc = %100000 ; Multiple Color Player Enable
mode9 = %01000000 mode9 = %01000000
mode10 = %10000000 mode10 = %10000000
mode11 = %11000000 mode11 = %11000000
+10 -10
View File
@@ -76,16 +76,16 @@
.MACRO WAIT .MACRO WAIT
; WAIT ; WAIT
; waits one frame (1/50 s(PAL) or 1/60s(NTSC)) ; waits one frame (1/50 s(PAL) or 1/60s(NTSC))
lda CONSOL ?zero LDA VCOUNT
cmp #6 ; START KEY beq ?zero
beq ?nowait bpl ?WA
LDA VCOUNT sbc #10 ; last lines correction
ldy vcount ?WA cmp VCOUNT
?WA cpy VCOUNT beq ?WA
BEQ ?WA bcc ?WA
?wframe ?WFRAME cmp VCOUNT
cmp vcount beq ?nowait
bne ?wframe bcs ?WFRAME
?nowait ?nowait
.ENDM .ENDM
;------------------------------------- ;-------------------------------------
+425 -173
View File
@@ -36,11 +36,11 @@
;we decided it must go in 'English' to let other people work on it ;we decided it must go in 'English' to let other people work on it
.macro build .macro build
dta d"146" ; number of this build (3 bytes) dta d"1.00" ; number of this build (3 bytes)
.endm .endm
icl 'definitions.asm' icl 'definitions.asm'
icl 'artwork/sfx/rmt_feat.asm' ; icl 'artwork/sfx/rmt_feat.asm'
.zpvar xdraw .word = $80 ;variable X for plot .zpvar xdraw .word = $80 ;variable X for plot
@@ -60,6 +60,7 @@
.zpvar xtempDRAW .word ;same as above for XDRAW routine .zpvar xtempDRAW .word ;same as above for XDRAW routine
.zpvar ytempDRAW .word ;same as above for XDRAW routine .zpvar ytempDRAW .word ;same as above for XDRAW routine
.zpvar tempor2 .byte .zpvar tempor2 .byte
.zpvar CreditsVScrol .byte
;--------------temps used in circle routine ;--------------temps used in circle routine
.zpvar xi .word ;X (word) in draw routine .zpvar xi .word ;X (word) in draw routine
.zpvar fx .byte .zpvar fx .byte
@@ -77,43 +78,51 @@
.zpvar UnderTank1 .byte .zpvar UnderTank1 .byte
.zpvar UnderTank2 .byte .zpvar UnderTank2 .byte
;---------------------------- ;----------------------------
.zpvar TestFlightFlag .byte ; For AI test flights ($ff - test, $00 - standard shoot flight)
.zpvar weaponPointer .word .zpvar weaponPointer .word
.zpvar dliCounter .byte .zpvar dliCounter .byte
.zpvar pressTimer .byte .zpvar pressTimer .byte
.zpvar NTSCcounter .byte .zpvar NTSCcounter .byte
.zpvar IsEndOfTheFallFlag .byte ; for small speedup ground falling
;.zpvar dliA .byte ;.zpvar dliA .byte
;.zpvar dliX .byte ;.zpvar dliX .byte
;.zpvar dliY .byte ;.zpvar dliY .byte
.zpvar sfx_effect .byte
.zpvar RMT_blocked .byte
;--------------
displayposition = modify
;* RMT ZeroPage addresses ;* RMT ZeroPage addresses
.zpvar p_tis .word .zpvar RMT_Zero_Page_V .byte
.zpvar p_trackslbstable .word ; .zpvar p_tis .word
.zpvar p_trackshbstable .word ; .zpvar p_trackslbstable .word
.zpvar p_song .word ; .zpvar p_trackshbstable .word
.zpvar ns .word ; .zpvar p_song .word
.zpvar nr .word ; .zpvar ns .word
.zpvar nt .word ; .zpvar nr .word
.zpvar reg1 .byte ; .zpvar nt .word
.zpvar reg2 .byte ; .zpvar reg1 .byte
.zpvar reg3 .byte ; .zpvar reg2 .byte
.zpvar tmp .byte ; .zpvar reg3 .byte
IFT FEAT_COMMAND2 ; .zpvar tmp .byte
.zpvar frqaddcmd2 .byte ; IFT FEAT_COMMAND2
EIF ; .zpvar frqaddcmd2 .byte
p_instrstable = p_tis ; EIF
; p_instrstable = p_tis
displayposition = modify
;------------------------------- ;-------------------------------
icl 'lib/atari.hea' icl 'lib/atari.hea'
icl 'lib/macro.hea' icl 'lib/macro.hea'
;splash screen and musix ;splash screen and musix
icl 'artwork/HIMARS14.asm' icl 'artwork/Scorch50.asm'
;Game loading address ;Game loading address
ORG $3000 ORG $3000
WeaponFont WeaponFont
ins 'artwork/weapons_AW5_mod.fnt' ; 'artwork/weapons.fnt' ins 'artwork/weapons_AW6_mod.fnt' ; 'artwork/weapons.fnt'
;----------------------------------------------- ;-----------------------------------------------
;Screen displays go here to avoid crossing 4kb barrier ;Screen displays go here to avoid crossing 4kb barrier
;----------------------------------------------- ;-----------------------------------------------
@@ -123,18 +132,57 @@ WeaponFont
;-------------------------------------------------- ;--------------------------------------------------
; Game Code ; Game Code
;-------------------------------------------------- ;--------------------------------------------------
START FirstSTART
mva #0 dmactls ; dark screen
jsr WaitOneFrame
; one time zero variables in RAM (non zero page)
lda #0
ldy #OneTimeZeroVariablesCount-1
@ sta OneTimeZeroVariables,y
dey
bpl @-
; initialize variables in RAM (non zero page)
ldy #initialvaluesCount-1
@ lda initialvaluesStart,y
sta variablesToInitialize,y
dey
bpl @-
; RMT INIT
lda #$f0 ;initial value
sta RMTSFXVOLUME ;sfx note volume * 16 (0,16,32,...,240)
lda #$ff ;initial value
sta sfx_effect
lda #0
jsr RmtSongSelect
VMAIN VBLinterrupt,7 ;jsr SetVBL
START
; Startup sequence ; Startup sequence
jsr Initialize jsr Initialize
;jsr GameOverScreen ; only for test !!!
lda #song_main_menu
jsr RmtSongSelect
jsr Options ;startup screen jsr Options ;startup screen
lda escFlag mva #0 dmactls ; dark screen
bne START jsr WaitOneFrame
bit escFlag
bmi START
jsr EnterPlayerNames jsr EnterPlayerNames
lda escFlag mva #0 dmactls ; dark screen
bne START jsr WaitOneFrame
bit escFlag
bmi START
jsr RandomizeSequence jsr RandomizeSequence
; for the round #1 shooting sequence is random ; for the round #1 shooting sequence is random
@@ -143,15 +191,17 @@ MainGameLoop
jsr CallPurchaseForEveryTank jsr CallPurchaseForEveryTank
; issue #72 (glitches when switches) ; issue #72 (glitches when switches)
mva #0 dmactl mva #0 dmactls ; dark screen
jsr WaitOneFrame
jsr GetRandomWind jsr GetRandomWind
jsr RoundInit jsr RoundInit
jsr MainRoundLoop jsr MainRoundLoop
lda escFlag bit escFlag
bne START bmi START
jvs GoGameOver
mva #0 TankNr ; mva #0 TankNr ;
@@ -170,25 +220,12 @@ MainGameLoop
; Results are number of other deaths ; Results are number of other deaths
; before the player dies itself ; before the player dies itself
lda #song_end_round lda #song_round_over
jsr RmtSongSelect jsr RmtSongSelect
jsr DisplayResults jsr DisplayResults
;check demo mode jsr DemoModeOrKey
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
jmp noKey
peopleAreHere
jsr getkey
noKey
ldx NumberOfPlayers ldx NumberOfPlayers
dex dex
CalculateGains CalculateGains
@@ -202,6 +239,14 @@ CalculateGains
; from nuke that would take 90 energy points, his loss ; from nuke that would take 90 energy points, his loss
; is 90, not 10 ; is 90, not 10
; adding the remaining energy of the tank to gain
; winner gets more ! :)
lda Energy,x
adc gainL,x
sta gainL,x
bcc @+
inc gainH,x
@
; add gain * 2 ; add gain * 2
asl gainL,x asl gainL,x
rol gainH,x rol gainH,x
@@ -212,40 +257,79 @@ CalculateGains
lda moneyH,x lda moneyH,x
adc gainH,x adc gainH,x
sta moneyH,x sta moneyH,x
; substract loose ; substract lose
; if loose is greater than money then zero money ; if lose is greater than money then zero money
lda moneyH,x lda moneyH,x
cmp looseH,x cmp loseH,x
bcc zeromoney bcc zeromoney
bne substractloose bne substractlose
lda moneyL,x lda moneyL,x
cmp looseL,x cmp loseL,x
bcc zeromoney bcc zeromoney
substractloose substractlose
sec sec
lda moneyL,x lda moneyL,x
sbc looseL,x sbc loseL,x
sta moneyL,x sta moneyL,x
lda moneyH,x lda moneyH,x
sbc looseH,x sbc loseH,x
sta moneyH,x sta moneyH,x
jmp skipzeroing jmp skipzeroing
zeromoney zeromoney
lda #0 lda #0
sta moneyL,x sta moneyL,x
sta moneyH,x sta moneyH,x
skipzeroing skipzeroing
; and earned money for summary
clc
lda EarnedMoneyL,x
adc gainL,x
sta EarnedMoneyL,x
lda EarnedMoneyH,x
adc gainH,x
sta EarnedMoneyH,x
; substract lose
; if lose is greater than money then zero money
lda EarnedMoneyH,x
cmp loseH,x
bcc ezeromoney
bne esubstractlose
lda EarnedMoneyL,x
cmp loseL,x
bcc ezeromoney
esubstractlose
sec
lda EarnedMoneyL,x
sbc loseL,x
sta EarnedMoneyL,x
lda EarnedMoneyH,x
sbc loseH,x
sta EarnedMoneyH,x
jmp eskipzeroing
ezeromoney
lda #0
sta EarnedMoneyL,x
sta EarnedMoneyH,x
eskipzeroing
dex dex
bpl CalculateGains jpl CalculateGains
lda GameIsOver lda GameIsOver
jne START beq NoGameOverYet
GoGameOver
mva #0 dmactls ; dark screen
jsr WaitOneFrame
jsr GameOverScreen
jmp START
NoGameOverYet
inc CurrentRoundNr inc CurrentRoundNr
mva #0 dmactl ; issue #72 lda #$0
sta dmactls ; issue #72
jsr RmtSongSelect jsr RmtSongSelect
mva #sfx_silencer sfx_effect mva #sfx_silencer sfx_effect
jsr PMoutofscreen
jmp MainGameLoop jmp MainGameLoop
@@ -257,12 +341,16 @@ skipzeroing
; the maximum shooting energy to 990 (it is 10*energy) ; the maximum shooting energy to 990 (it is 10*energy)
; the default shooting energy to 350 ; the default shooting energy to 350
; the shooting angle is randomized ; the shooting angle is randomized
; of course gains an looses are zeroed ; of course gains an loses are zeroed
lda #song_ingame lda #song_ingame
jsr RmtSongSelect jsr RmtSongSelect
jsr SetPMWidth
lda #0 lda #0
sta colpf2s ; status line "off"
sta colpf1s
tax tax
@ sta singleRoundVars,x @ sta singleRoundVars,x
inx inx
@@ -274,12 +362,14 @@ SettingEnergies
lda #$00 lda #$00
sta gainL,x sta gainL,x
sta gainH,x sta gainH,x
sta looseL,x sta loseL,x
sta looseH,x sta loseH,x
lda #99 lda #99
sta Energy,x sta Energy,x
sta eXistenZ,x sta eXistenZ,x
sta LASTeXistenZ,x sta LASTeXistenZ,x
lda #StandardBarrel ; standard barrel length
sta BarrelLength,x
; anything in eXistenZ table means that this tank exist ; anything in eXistenZ table means that this tank exist
; in the given round ; in the given round
lda #<1000 lda #<1000
@@ -305,20 +395,26 @@ SettingEnergies
;generating the new landscape ;generating the new landscape
jsr PMoutofScreen ;let P/M disappear jsr PMoutofScreen ;let P/M disappear
jsr clearscreen ;let the screen be clean jsr clearscreen ;let the screen be clean
jsr ClearPMmemory
jsr placetanks ;let the tanks be evenly placed jsr placetanks ;let the tanks be evenly placed
jsr calculatemountains ;let mountains be easy for the eye jsr calculatemountains ;let mountains be easy for the eye
;jsr calculatemountains0 ;only for tests - makes mountains flat and 0 height ;jsr calculatemountains0 ;only for tests - makes mountains flat and 0 height
jsr SetMainScreen jsr SetMainScreen
jsr ColorsOfSprites jsr ColorsOfSprites
lda #0
sta colpf2s ; status line "off" ; lda #90 ; barrel fully erect
sta colpf1s ; ldx #MaxPlayers-1
;@ sta previousBarrelAngle,x
; dex
; bpl @-
jsr drawmountains ;draw them jsr drawmountains ;draw them
jsr drawtanks ;finally draw tanks jsr drawtanks ;finally draw tanks
mva #0 TankSequencePointer mva #$00 TankSequencePointer
;---------round screen is ready--------- ;---------round screen is ready---------
mva #TextForegroundColor colpf1s ; status line "on" mva #TextForegroundColor colpf1s ; status line "on"
rts rts
@@ -393,30 +489,37 @@ DoNotFinishTheRound
jeq NextPlayerShoots jeq NextPlayerShoots
mva #1 plot4x4color
jsr DisplayTankNameAbove
mva #1 color ;to display flying point mva #1 color ;to display flying point
ldx tankNr
lda TankStatusColoursTable,x lda TankStatusColoursTable,x
sta colpf2s ; set color of status line sta colpf2s ; set color of status line
jsr PutTankNameOnScreen
jsr DisplayStatus
lda SkillTable,x lda SkillTable,x
beq ManualShooting beq ManualShooting
RoboTanks RoboTanks
; robotanks shoot here ; robotanks shoot here
; TankNr still in X
jsr ArtificialIntelligence jsr ArtificialIntelligence
;pause 30
ldx TankNr
jsr DisplayStatus ; to make visible AI selected defensive (and offensive :) )
jsr MoveBarrelToNewPosition jsr MoveBarrelToNewPosition
jsr DisplayStatus ;all digital values like force, angle, wind, etc.
jsr PutTankNameOnScreen
lda kbcode lda kbcode
cmp #28 ; ESC cmp #28 ; ESC
bne @+ bne @+
jsr AreYouSure jsr AreYouSure
lda escFlag bit escFlag
seq:rts spl:rts
@ @
; let's move the tank's barrel so it points the right
; direction
jmp AfterManualShooting jmp AfterManualShooting
ManualShooting ManualShooting
@@ -424,9 +527,11 @@ ManualShooting
jsr WaitForKeyRelease jsr WaitForKeyRelease
jsr BeforeFire jsr BeforeFire
lda escFlag lda escFlag
seq:rts seq:rts ; keys Esc or O
AfterManualShooting AfterManualShooting
mva #0 plot4x4color
jsr DisplayTankNameAbove
; defensive weapons without flight handling ; defensive weapons without flight handling
ldx TankNr ldx TankNr
lda ActiveDefenceWeapon,x lda ActiveDefenceWeapon,x
@@ -435,8 +540,8 @@ AfterManualShooting
cmp #ind_Nuclear_Winter_ cmp #ind_Nuclear_Winter_
bne StandardShoot bne StandardShoot
ShootAtomicWinter ShootAtomicWinter
; --- nuclear winter --- ; --- atomic winter ---
jsr NuclearWinter jsr AtomicWinter
jmp NextPlayerShoots ; and we skip shoot jmp NextPlayerShoots ; and we skip shoot
ShootWhiteFlag ShootWhiteFlag
; --- white flag --- ; --- white flag ---
@@ -448,7 +553,7 @@ StandardShoot
jsr DecreaseWeaponBeforeShoot jsr DecreaseWeaponBeforeShoot
jsr DisplayStatus jsr DisplayStatus
ldx TankNr ; ldx TankNr
dec Energy,x ; lower energy to eventually let tanks commit suicide dec Energy,x ; lower energy to eventually let tanks commit suicide
ShootNow ShootNow
@@ -493,16 +598,16 @@ AfterExplode
NoFallDown2 NoFallDown2
;here tanks are falling down ;here tanks are falling down
mva tankNr tempor2 mva tankNr tempor2
mvx #0 TankNr ldx NumberOfPlayers
dex
TanksFallDown TanksFallDown
stx TankNr
lda eXistenZ,x lda eXistenZ,x
beq NoExistNoFall beq NoExistNoFall
jsr TankFalls jsr TankFalls
NoExistNoFall NoExistNoFall
inc:ldx TankNr dex
cpx NumberOfPlayers bpl TanksFallDown
bne TanksFallDown
mva tempor2 TankNr mva tempor2 TankNr
missed missed
@@ -520,30 +625,8 @@ NextPlayerShoots
SeteXistenZ SeteXistenZ
lda Energy,x lda Energy,x
sta eXistenZ,x sta eXistenZ,x
sta L1
;DATA L1,L2 jsr MaxForceCalculate
;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
CLC
LP0
ror
ROR L1
BCC B0
CLC
ADC #10 ; (L2) multiplication by 10
B0 DEY
BNE LP0
ror
ROR L1
STA MaxForceTableH,x
lda L1
sta MaxForceTableL,x
dex dex
bpl SeteXistenZ bpl SeteXistenZ
@@ -670,6 +753,20 @@ MetodOfDeath
jsr ExplosionDirect jsr ExplosionDirect
mva #sfx_silencer sfx_effect mva #sfx_silencer sfx_effect
; Clear current Shooter settings. After that, Shooter will "search" for the target again
ldx NumberOfPlayers
dex
@ lda skillTable,x
cmp #2 ; clear variables only if Shooter
bne NotShooter
lda #0
sta PreviousAngle,x
sta PreviousEnergyL,x
sta PreviousEnergyH,x
NotShooter
dex
bpl @-
; jump to after explosion routines (soil fallout, etc.) ; jump to after explosion routines (soil fallout, etc.)
; After going through these routines we are back ; After going through these routines we are back
; to checking if a tank exploded and maybe we have ; to checking if a tank exploded and maybe we have
@@ -684,14 +781,14 @@ MetodOfDeath
;increases gain of tank TankNr ;increases gain of tank TankNr
;-------------------------------------------------- ;--------------------------------------------------
sty EnergyDecrease sty EnergyDecrease
; Loose increase ; Lose increase
lda looseL,x lda loseL,x
clc clc
adc EnergyDecrease adc EnergyDecrease
sta looseL,x sta loseL,x
lda looseH,x lda loseH,x
adc #$00 adc #$00
sta looseH,x sta loseH,x
; Energy now, not less than 0 ; Energy now, not less than 0
lda Energy,x lda Energy,x
cmp EnergyDecrease cmp EnergyDecrease
@@ -704,16 +801,16 @@ ldahashzero
NotNegativeEnergy NotNegativeEnergy
sta Energy,x sta Energy,x
;now increase the gain of the shooting tank ;now increase the gain of the shooting tank
phx ; phx
ldx TankNr ldy TankNr
clc clc
lda gainL,x lda gainL,y
adc EnergyDecrease adc EnergyDecrease
sta gainL,x sta gainL,y
lda gainH,x lda gainH,y
adc #$00 adc #$00
sta gainH,x sta gainH,y
plx ; plx
rts rts
.endp .endp
@@ -755,12 +852,7 @@ NotNegativeShieldEnergy
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
lda xtankstableL,x jsr SetupXYdraw
sta xdraw
lda xtankstableH,x
sta xdraw+1
lda yTanksTable,x
sta ydraw
lda #1 ; Missile lda #1 ; Missile
jsr ExplosionDirect jsr ExplosionDirect
jmp MainRoundLoop.continueMainRoundLoopAfterSeppuku jmp MainRoundLoop.continueMainRoundLoopAfterSeppuku
@@ -794,7 +886,37 @@ NotNegativeShieldEnergy
.endr .endr
@ rts @ rts
.endp .endp
;--------------------------------------------------
.proc MaxForceCalculate
; calculates max force for tank (tanknr in X)
; Energy of tank X in A
;--------------------------------------------------
sta L1
;DATA L1,L2
;Multiplication 8bit*8bit,
;result 16bit
;this algiorithm is a little longer than one in Ruszczyc 6502 book
;but it is faster
LDy #8
LDA #0
CLC
LP0
ror
ROR L1
BCC B0
CLC
ADC #10 ; (L2) multiplication by 10
B0 DEY
BNE LP0
ror
ROR L1
STA MaxForceTableH,x
lda L1
sta MaxForceTableL,x
rts
.endp
;-------------------------------------------------- ;--------------------------------------------------
.proc PMoutofScreen .proc PMoutofScreen
;-------------------------------------------------- ;--------------------------------------------------
@@ -824,7 +946,7 @@ NotNegativeShieldEnergy
;-------------------------------------------------- ;--------------------------------------------------
ldx #$3f ; TODO: maxweapons ldx #$3f ; TODO: maxweapons
@ lda #$0 @ lda #$0
cpx #48 ; White Flag cpx #ind_White_Flag_____ ; White Flag
bne @+ bne @+
lda #99 lda #99
@ sta TanksWeapon1,x @ sta TanksWeapon1,x
@@ -864,11 +986,9 @@ deletePtr = temp
sta HowMuchToFall sta HowMuchToFall
mva #1 color mva #1 color
jsr SetStandardBarrels
jsr WeaponCleanup jsr WeaponCleanup
mva #TextBackgroundColor colpf2s
mva #TextForegroundColor colpf3s
mva #>WeaponFont chbas mva #>WeaponFont chbas
;parameter for old plot (unPlot) max 5 points ;parameter for old plot (unPlot) max 5 points
@@ -888,56 +1008,62 @@ SetunPlots
;setting up P/M graphics ;setting up P/M graphics
lda #>pmgraph lda #>pmgraph
sta pmbase sta pmbase
lda dmactls ; lda dmactls
ora #$38 ; Players and Missiles single lined ; ora #$38 ; Players and Missiles single lined
sta dmactls ; sta dmactls
lda #$03 ; P/M on lda #$03 ; P/M on
sta pmcntl sta pmcntl
lda #$01 jsr SetPMWidth
sta sizem ; there will be only M0, double width lda #%00100000 ; P/M priorities (multicolor players on)
sta sizep0 ; P0-P3 widths
sta sizep0+1
sta sizep0+2
sta sizep0+3
lda #$10 ; P/M priorities (bit 4 joins missiles)
sta gtictls sta gtictls
jsr PMoutofScreen jsr PMoutofScreen
;let the tanks be visible! ;let the tanks be visible!
ldx #(maxPlayers-1) ldx #(maxPlayers-1)
lda #1 ; tank is visible lda #99 ; tank is visible
MakeTanksVisible MakeTanksVisible
sta eXistenZ,x sta eXistenZ,x
dex dex
bpl MakeTanksVisible bpl MakeTanksVisible
ldx #0
txa
ClearResults
sta ResultsTable,x
inx
cpx #MaxPlayers
bne ClearResults
mva #1 CurrentRoundNr ;we start from round 1 mva #1 CurrentRoundNr ;we start from round 1
mva #6 NTSCcounter mva #6 NTSCcounter
; RMT INIT ; ; RMT INIT
lda #$f0 ;initial value ; lda #$f0 ;initial value
sta RMTSFXVOLUME ;sfx note volume * 16 (0,16,32,...,240) ; sta RMTSFXVOLUME ;sfx note volume * 16 (0,16,32,...,240)
; ;
lda #$ff ;initial value ; lda #$ff ;initial value
sta sfx_effect ; sta sfx_effect
; ;
lda #0 ; lda #0
jsr RmtSongSelect ; jsr RmtSongSelect
; ;
VMAIN VBLinterrupt,6 ;jsr SetVBL ; VMAIN VBLinterrupt,7 ;jsr SetVBL
rts rts
.endp .endp
;-------------------------------------------------- ;--------------------------------------------------
.proc SetStandardBarrels
ldx #maxPlayers-1
lda #StandardBarrel ; standard barrel length
@ sta BarrelLength,x
dex
bpl @-
rts
.endp
;--------------------------------------------------
.proc SetPMWidth
lda #$00
sta sizep0 ; P0-P3 widths
sta sizep0+1
sta sizep0+2
sta sizep0+3
lda #%01010101
sta sizem ; all missiles, double width
rts
.endp
;--------------------------------------------------
.proc DLIinterruptGraph .proc DLIinterruptGraph
;sta dliA ;sta dliA
;sty dliY ;sty dliY
@@ -959,12 +1085,78 @@ ClearResults
rti rti
.endp .endp
;-------------------------------------------------- ;--------------------------------------------------
.proc DLIinterruptOptions
;sta dliA
;sty dliY
pha
; lda dliColorsBack
lda #0
sta COLPF1
lda dliColorsFore
sta COLPF2
pla
rti
.endp
;--------------------------------------------------
.proc DLIinterruptGameOver
;sta dliA
;sty dliY
pha
phy
lda dliCounter
bne EndofPMG
lda #%00100000 ; playfield after P/M
STA WSYNC
sta gtictl
bne EndOfDLI_GO
EndofPMG
cmp #1
bne ColoredLines
lda #%00100100 ; playfield before P/M
STA WSYNC
sta gtictl
bne EndOfDLI_GO
ColoredLines
cmp #9
beq CreditsScroll
tay
lda GameOverColoursTable-3,y ; -2 becouse this is DLI nr 2 and -1 (labels line)
ldy #$0a ; text colour (brightnes)
STA WSYNC
sta COLPF2
sty COLPF1
bne EndOfDLI_GO
CreditsScroll
lda #$00
sta COLPF2
inc CreditsVScrol
lda CreditsVScrol
cmp #32 ;not to fast
beq nextlinedisplay
:2 lsr ;not to fast
sta VSCROL
jmp EndOfDLI_GO
nextlinedisplay
lda #0
sta CreditsVScrol
sta VSCROL
adw DLCreditsAddr #40
cpw DLCreditsAddr #CreditsLastLine
bne EndOfDLI_GO
mwa #Credits DLCreditsAddr
EndOfDLI_GO
inc dliCounter
ply
pla
rti
.endp
;--------------------------------------------------
.proc DLIinterruptText .proc DLIinterruptText
;sta dliA ;sta dliA
pha pha
sta WSYNC sta WSYNC
mva #TextBackgroundColor colpf2 mva #TextBackgroundColor COLPF2
mva #TextForegroundColor colpf3 mva #TextForegroundColor COLPF3
;lda dliA ;lda dliA
pla pla
DLIinterruptNone DLIinterruptNone
@@ -991,7 +1183,8 @@ itsPAL
; pressTimer is trigger tick counter. always 50 ticks / s ; pressTimer is trigger tick counter. always 50 ticks / s
bit:smi:inc pressTimer ; timer halted if >127. max time measured 2.5 s bit:smi:inc pressTimer ; timer halted if >127. max time measured 2.5 s
bit RMT_blocked
bmi SkipRMTVBL
; ------- RMT ------- ; ------- RMT -------
lda sfx_effect lda sfx_effect
bmi lab2 bmi lab2
@@ -1007,12 +1200,12 @@ itsPAL
lab2 lab2
jsr RASTERMUSICTRACKER+3 ;1 play jsr RASTERMUSICTRACKER+3 ;1 play
; ------- RMT ------- ; ------- RMT -------
SkipRMTVBL
exitVBL exitVBL
ply ply
plx plx
pla pla
jmp SYSVBV jmp XITVBV
.endp .endp
;---------------------------------------------- ;----------------------------------------------
.proc RandomizeSequence0 .proc RandomizeSequence0
@@ -1144,19 +1337,30 @@ LimitForce
.endp .endp
;---------------------------------------------- ;----------------------------------------------
.proc MoveBarrelToNewPosition .proc MoveBarrelToNewPosition
mva #1 Erase
jsr DrawTankNr.BarrelChange
mva #0 Erase
MoveBarrel
mva #sfx_set_power_2 sfx_effect
jsr DrawTankNr jsr DrawTankNr
ldx TankNr jsr DisplayStatus.displayAngle
; ldx TankNr
mva #1 Erase
jsr WaitOneFrame
jsr DrawTankNr.BarrelChange
mva #0 Erase
lda NewAngle lda NewAngle
cmp AngleTable,x cmp AngleTable,x
beq BarrelPositionIsFine beq BarrelPositionIsFine
bcc rotateLeft ; older is bigger bcc rotateLeft ; older is bigger
rotateRight;older is lower rotateRight;older is lower
inc angleTable,x inc angleTable,x
jmp MoveBarrelToNewPosition jmp MoveBarrel
rotateLeft rotateLeft
dec angleTable,x dec angleTable,x
jmp MoveBarrelToNewPosition jmp MoveBarrel
BarrelPositionIsFine BarrelPositionIsFine
jsr DrawTankNr
rts rts
.endp .endp
@@ -1265,7 +1469,7 @@ nextishigher
and #$3f ;CTRL and SHIFT ellimination and #$3f ;CTRL and SHIFT ellimination
cmp #28 ; ESC cmp #28 ; ESC
bne getkeyend bne getkeyend
mvx #1 escFlag mvx #$80 escFlag
bne getkeyend bne getkeyend
checkJoyGetKey checkJoyGetKey
@@ -1314,6 +1518,54 @@ getkeyend
bne WaitForKeyRelease bne WaitForKeyRelease
rts rts
.endp .endp
;--------------------------------------------------
.proc IsKeyPressed ; A=0 - yes , A>0 - no
;--------------------------------------------------
lda SKSTAT
and #%00000100
beq @+
lda #1
@ and TRIG0S
rts
.endp
;--------------------------------------------------
.proc DemoModeOrKey
;--------------------------------------------------
;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
jsr PauseYFrames
jmp noKey
peopleAreHere
jsr getkey
noKey
rts
.endp
.proc WaitOneFrame
lda CONSOL
cmp #6 ; START KEY
beq @+
wait
@ rts
.endp
.proc PauseYFrames
; Y - number of frames to wait (divided by 2)
; pauses for maximally 510 frames (255 * 2)
@ jsr WaitOneFrame
jsr WaitOneFrame
dey
bne @-
rts
.endp
;-------------------------------------------------- ;--------------------------------------------------
.proc RmtSongSelect .proc RmtSongSelect
@@ -1321,9 +1573,12 @@ getkeyend
; starting song line 0-255 to A reg ; starting song line 0-255 to A reg
bit noMusic bit noMusic
spl:lda #song_silencio spl:lda #song_silencio
mvx #$ff RMT_blocked
ldx #<MODUL ;low byte of RMT module to X reg ldx #<MODUL ;low byte of RMT module to X reg
ldy #>MODUL ;hi byte of RMT module to Y reg ldy #>MODUL ;hi byte of RMT module to Y reg
jmp RASTERMUSICTRACKER ;Init, :RTS jsr RASTERMUSICTRACKER ;Init
mva #0 RMT_blocked
rts
.endp .endp
;---------------------------------------------- ;----------------------------------------------
icl 'weapons.asm' icl 'weapons.asm'
@@ -1342,7 +1597,7 @@ font4x4
ins 'artwork/font4x4s.bmp',+62 ins 'artwork/font4x4s.bmp',+62
;---------------------------------------------- ;----------------------------------------------
TankFont TankFont
ins 'artwork/tanksv2.fnt' ins 'artwork/tanksv3.fnt',+0,352 ; 44 characters only
;---------------------------------------------- ;----------------------------------------------
icl 'variables.asm' icl 'variables.asm'
;---------------------------------------------- ;----------------------------------------------
@@ -1350,26 +1605,23 @@ TankFont
; reserved space for RMT player ; reserved space for RMT player
.ds $0320 .ds $0320
.align $100 .align $100
PLAYER
.ECHO 'PLAYER: ',* .ECHO 'PLAYER: ',*
icl 'artwork/sfx/rmtplayr_game.asm' icl 'artwork/sfx/rmtplayr.a65'
MODUL equ $b000 ;address of RMT module MODUL equ $b000 ;address of RMT module
opt h- ;RMT module is standard Atari binary file already opt h- ;RMT module is standard Atari binary file already
ins "artwork/sfx/scorch_trial0f_stripped.rmt" ;include music RMT module ins "artwork/sfx/schorch_str2.rmt" ;include music RMT module
opt h+ opt h+
; ;
; ;
TheEnd TheEnd
.ECHO 'TheEnd: ',TheEnd .ECHO 'TheEnd: ',TheEnd
.if TheEnd > PMGraph + $300 ;.if TheEnd > PMGraph + $300
.error "memory conflict" ; .error "memory conflict"
;.endif
.endif
;----------------------------------------------
; Player/missile memory
org $b800
PMGraph
run START
run FirstSTART
BIN
View File
Binary file not shown.
+544 -204
View File
File diff suppressed because it is too large Load Diff
+47 -25
View File
@@ -8,19 +8,29 @@
; compilation to e.g. cartridge ; compilation to e.g. cartridge
; zero page variables are declared in program.s65 module ; zero page variables are declared in program.s65 module
;===================================================== ;=====================================================
TanksNames ; DO NOT ZERO - ticket #24 OneTimeZeroVariables
:6 dta d" " OneTimeZeroVariablesCount = variablesToInitialize-OneTimeZeroVariables ; MAX 128 bytes !
noMusic .by 0 ; 0 - play music, $ff - do not play music
noSfx .by 0 ; 0 - play SFX, $ff - do not play SFX
;---------------------------------------------------- ;----------------------------------------------------
;Options DO NOT ZERO - ticket #27 ; Color table for Game Over Screen (created in a gameover routine)
OptionsTable .by 0,1,2,2,0,1,3 .by $00 ; labels line color
RoundsInTheGame .by 10 ;how many rounds in the current game GameOverColoursTable .BYTE $80,$40,$c4,$20,$c0,$e4
seppukuVal .by 75 ;----------------------------------------------------
TanksNames ; DO NOT ZERO ON RESTART GAME - ticket #24
:6 dta d" "
;---------------------------------------------------- ;----------------------------------------------------
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]
;---------------------------------------------------- ;----------------------------------------------------
noMusic .by 0 ; 0 - play music, $ff - do not play music variablesToInitialize
noSfx .by 0 ; 0 - play SFX, $ff - do not play SFX ;Options DO NOT ZERO ON RESTART GAME - ticket #27
OptionsTable .by 0,1,2,2,0,1,3,2
RoundsInTheGame .by 10 ;how many rounds in the current game
seppukuVal .by 75
mountainDeltaH .by 3
mountainDeltaL .by $ff
;----------------------------------------------------
; 4x4 text buffer ; 4x4 text buffer
ResultLineBuffer ResultLineBuffer
dta d" ", $ff dta d" ", $ff
@@ -36,8 +46,6 @@ isInventory .ds 1 ; 0 - purchase, $ff - inventory
;-------------- ;--------------
drawFunction .ds 1 ; 0 - plot, %10000000 - LineLength (N), %01000000 - DrawCheck (V) drawFunction .ds 1 ; 0 - plot, %10000000 - LineLength (N), %01000000 - DrawCheck (V)
;-------------- ;--------------
sfx_effect .ds 1
;--------------
noDeathCounter .ds 1 noDeathCounter .ds 1
;-------------- ;--------------
OptionsY .ds 1 ;vertical position of cursor on Options screen OptionsY .ds 1 ;vertical position of cursor on Options screen
@@ -56,16 +64,16 @@ moneyL
;---------------------------------------------------- ;----------------------------------------------------
gainH ;how much money player gets after the round gainH ;how much money player gets after the round
;it is gathered during the round basing on energy ;it is gathered during the round basing on energy
;opponents loose after player's shoots ;opponents lose after player's shoots
.DS [MaxPlayers] .DS [MaxPlayers]
gainL gainL
.DS [MaxPlayers] .DS [MaxPlayers]
;---------------------------------------------------- ;----------------------------------------------------
looseH ;how much player looses after the round loseH ;how much player looses after the round
;calculated from REAL energy loss ;calculated from REAL energy loss
;(not only to zero energy) ;(not only to zero energy)
.DS [MaxPlayers] .DS [MaxPlayers]
looseL loseL
.DS [MaxPlayers] .DS [MaxPlayers]
;---------------------------------------------------- ;----------------------------------------------------
Energy Energy
@@ -82,6 +90,14 @@ ResultsTable ;the results in the gameeeeee
.DS [MaxPlayers] .DS [MaxPlayers]
TempResults TempResults
.DS [MaxPlayers] .DS [MaxPlayers]
DirectHitsH
.DS [MaxPlayers]
DirectHitsL
.DS [MaxPlayers]
EarnedMoneyH
.DS [MaxPlayers]
EarnedMoneyL
.DS [MaxPlayers]
;---------------------------------------------------- ;----------------------------------------------------
ForceTableL ;shooting Force of the tank during the round ForceTableL ;shooting Force of the tank during the round
.DS [MaxPlayers] .DS [MaxPlayers]
@@ -93,12 +109,8 @@ MaxForceTableL ;Energy of the tank during the round
MaxForceTableH MaxForceTableH
.DS [MaxPlayers] .DS [MaxPlayers]
;---------------------------------------------------- ;----------------------------------------------------
BarrelLength ;length of the tank barrel - dont forget to set it to 6 at round start!
AngleTable ;Angle of the barrel of each tank during the round
.DS [MaxPlayers] .DS [MaxPlayers]
NewAngle .DS 1
;----------------------------------------------------
ActiveWeapon ;number of the selected weapon ActiveWeapon ;number of the selected weapon
.DS [MaxPlayers] .DS [MaxPlayers]
ActiveDefenceWeapon ;number of the activated defence weapon - 0 ActiveDefenceWeapon ;number of the activated defence weapon - 0
@@ -133,6 +145,9 @@ ytankstable ;Y positions of tanks (lower left point)
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]
;---------------------------------------------------- ;----------------------------------------------------
TargetTankNr ; Target tank index (for AI routines)
.DS 1
;----------------------------------------------------
Erase .DS 1 ; if 1 only mask of the character is printed Erase .DS 1 ; if 1 only mask of the character is printed
; on the graphics screen. if 0 character is printed normally ; on the graphics screen. if 0 character is printed normally
@@ -195,6 +210,7 @@ vx03 .DS [5]
MirvDown .DS [5] ; is given missile down? MirvDown .DS [5] ; is given missile down?
MirvMissileCounter .DS 1 ; missile Counter (mainly for X) MirvMissileCounter .DS 1 ; missile Counter (mainly for X)
SmokeTracerFlag .DS 1 ; if Smoketracer SmokeTracerFlag .DS 1 ; if Smoketracer
LaserFlag .DS 1 ; $ff if Laser
XposFlag .DS 1 ; bullet positon X (0 - on screen , %1000000 - off-screen) XposFlag .DS 1 ; bullet positon X (0 - on screen , %1000000 - off-screen)
YposFlag .DS 1 ; bullet positon Y (0 - on screen , %1000000 - over the screen , %0100000 - under the screen) YposFlag .DS 1 ; bullet positon Y (0 - on screen , %1000000 - over the screen , %0100000 - under the screen)
;---------------------------------------------------- ;----------------------------------------------------
@@ -211,9 +227,6 @@ Multiplier .ds 3 ; 0,0,0
Multiplee .ds 2 ; 0,0 Multiplee .ds 2 ; 0,0
goleft .DS 1 ;if 1 then flights left goleft .DS 1 ;if 1 then flights left
;---------------------------------------------------- ;----------------------------------------------------
;SoilDown2
IsEndOfTheFallFlag .DS 1
;----------------------------------------------------
;unPlot ;unPlot
WhichUnPlot .DS 1 WhichUnPlot .DS 1
; max 5 concurrent unPlots ; max 5 concurrent unPlots
@@ -286,7 +299,7 @@ DifficultyLevel ; Difficulty Level (human/cpu)
;---------------------------------------------------- ;----------------------------------------------------
;displaydecimal ;displaydecimal
decimal .DS 2 decimal .DS 2
decimalresult .DS 4 decimalresult .DS 5
;xmissile ;xmissile
ExplosionRadius .DS 2 ;because when adding in xdraw it is double byte ExplosionRadius .DS 2 ;because when adding in xdraw it is double byte
@@ -339,11 +352,22 @@ TankTempY
;---------------------------------------------------- ;----------------------------------------------------
singleRoundVars singleRoundVars
;-------------- ;--------------
escFlag .ds 1 escFlag .ds 1 ; 0 - Esc or O not pressed, $80 - Esc pressed, $40 - O pressed
;-------------- ;--------------
CurrentResult CurrentResult
.DS 1 .DS 1
;-------------- ;--------------
AngleTable ;Angle of the barrel of each tank during the round
.DS [MaxPlayers]
NewAngle ; used in AI
.DS 1
;previousBarrelAngle
; .DS [MaxPlayers]
EndOfTheBarrelX
.ds 2
EndOfTheBarrelY
.ds 1
;----------------------------------------------------
previousAngle previousAngle
.DS [MaxPlayers] .DS [MaxPlayers]
previousEnergyL previousEnergyL
@@ -352,8 +376,6 @@ previousLeftRange
.DS [MaxPlayers] .DS [MaxPlayers]
previousEnergyH previousEnergyH
.DS [MaxPlayers] .DS [MaxPlayers]
previousRightAngle
.DS [MaxPlayers]
RandBoundaryLow RandBoundaryLow
.ds 2 .ds 2
RandBoundaryHigh RandBoundaryHigh
+387 -395
View File
File diff suppressed because it is too large Load Diff