mirror of
https://github.com/pkali/scorch_src.git
synced 2026-05-21 21:35:16 +02:00
Compare commits
87 Commits
release_129
...
143
| Author | SHA1 | Date | |
|---|---|---|---|
| ea6c621d79 | |||
| afd81c08c3 | |||
| a9703609b6 | |||
| d8bfda28a0 | |||
| 743114fd0d | |||
| 079abc062f | |||
| 853a597daf | |||
| 1eadc7f63e | |||
| 081cf282c8 | |||
| 4c3203854c | |||
| bf11a9967f | |||
| 0d7403d1c0 | |||
| 777f5c341a | |||
| 8f0bd8ca81 | |||
| c12049d0d7 | |||
| 6013986e51 | |||
| 0fbe3de569 | |||
| 9569b3365a | |||
| 6d9b2907c5 | |||
| 94e6caebed | |||
| 532ee7dc88 | |||
| 17e653b37d | |||
| bef3c0f080 | |||
| 7ff3858433 | |||
| eae8cb08d8 | |||
| f13d7ac801 | |||
| 0ddbe41005 | |||
| 7cd31450c7 | |||
| a556e50e53 | |||
| 9f1720e970 | |||
| 2df28af79c | |||
| defbde5b87 | |||
| 0820124f9f | |||
| aa74cf133b | |||
| 2c640c370a | |||
| 636e121bf7 | |||
| 3c1b0a02aa | |||
| be5652074a | |||
| a425500d4e | |||
| a721b82944 | |||
| 762b56567b | |||
| b11d22d1bb | |||
| c68ba09103 | |||
| e399754e0c | |||
| 381495fb5a | |||
| 17b57d1ed2 | |||
| 2fb04cabff | |||
| 457af6d6b9 | |||
| bdf0f10cc0 | |||
| 347e59d5a2 | |||
| 61ff5e47e1 | |||
| 2d8c71e9ff | |||
| fd1a61c1f9 | |||
| 571b3c137e | |||
| bd8ecad2dd | |||
| 7e24e44f1b | |||
| eb8360dcd0 | |||
| 3d8ec72da0 | |||
| 2f099897c7 | |||
| 26f82b59c1 | |||
| 9a3cf1251f | |||
| ec5838ebaf | |||
| 491dc2861c | |||
| 5e476eb742 | |||
| 661d4776c7 | |||
| 3701accfc9 | |||
| fb54230ea7 | |||
| fb86876d9f | |||
| 80bc302689 | |||
| d9645b9c37 | |||
| 620bcf5aa8 | |||
| d0a9fb0fbe | |||
| 68bf4a9541 | |||
| 7dd3ecd2bf | |||
| 08f7680563 | |||
| d9322221a3 | |||
| d766088b66 | |||
| de5bfab2a8 | |||
| 91b39e736b | |||
| 572bee982a | |||
| b37dc73f52 | |||
| 11ddf69de9 | |||
| 0ba4594712 | |||
| 8556dfe0d7 | |||
| 860d0917ad | |||
| 2de2c24373 | |||
| a6382c5dc0 |
@@ -0,0 +1,2 @@
|
|||||||
|
|
||||||
|
*.bak
|
||||||
@@ -8,14 +8,15 @@ by Tomasz 'Pecus' Pecko and Pawel 'pirx' Kalinowski
|
|||||||
Warsaw, Miami 2000, 2001, 2002, 2003, 2009, 2012, 2013, 2022
|
Warsaw, Miami 2000, 2001, 2002, 2003, 2009, 2012, 2013, 2022
|
||||||
|
|
||||||
Contributors:
|
Contributors:
|
||||||
Kaz - splash screen, ideas
|
- Kaz - splash screen, ideas
|
||||||
Adam - font, ideas
|
- Miker (@mikerro) - game sfx, ideas, QA
|
||||||
Emkay - splash screen music
|
- Adam (@6502adam) - font, ideas, QA
|
||||||
Miker - game sfx, ideas
|
- Bocianu (@bocianu) - important ideas, FujiNet implementation, QA
|
||||||
Bocianu - important ideas, FujiNet implementation
|
- Emkay - splash screen music
|
||||||
|
|
||||||
|
QA: Probabilitydragon, KrzysRog, Beeblebrox, EnderDude, lopezpb, Dracon, brad-colbert
|
||||||
|
|
||||||
You can contact us at pecus@poczta.fm or pirx@5oft.pl
|
You can contact us at pecus@poczta.fm or pirx@5oft.pl
|
||||||
home page of this project is https://github.com/pkali/scorch_src
|
|
||||||
|
|
||||||
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).
|
||||||
|
|
||||||
@@ -31,12 +32,12 @@ Game source code is split into 5+4 parts:
|
|||||||
- display.asm - display lists and text screen definitions
|
- display.asm - display lists and text screen definitions
|
||||||
- ai.asm - artificial stupidity of computer opponents
|
- ai.asm - artificial stupidity of computer opponents
|
||||||
- weapons.asm - general arsenal of tankies
|
- weapons.asm - general arsenal of tankies
|
||||||
- definitions.asm - label definitions, moved to make it work better with Altirra debug.
|
- definitions.asm - label definitions, moved to make it work better with Altirra debug (it doesn't).
|
||||||
|
|
||||||
We were trying to use as much macros and pseudo-ops as possible.
|
We were trying to use macros, pseudo-ops and simple graphics primitives as much as possible.
|
||||||
They are defined in atari.hea and macro.hea files together with many atari constants. This way it should be relatively easy to port this code to e.g. C64
|
This way it should be relatively easy to port this code to e.g. C64
|
||||||
|
|
||||||
After those N years of working on this piece of code we are sure it would be much wiser to write it in C, Action! or MadPascal but on the other hand it is so much fun to type 150 chars where all you want to have y=ax+b :)
|
After those N years of working on this piece of code we are sure it would be much wiser to write it in C, Action! or MadPascal but on the other hand it is so much fun to type 150 chars where all you want to have y=a*x+b :)
|
||||||
|
|
||||||
Originally most variables were in Polish, comments were sparse, but we wanted to release this piece of code to public.
|
Originally most variables were in Polish, comments were sparse, but we wanted to release this piece of code to public.
|
||||||
Because of being always short of time/energy (to finish the game) we decided it must go in 'English' to let other people work on it.
|
Because of being always short of time/energy (to finish the game) we decided it must go in 'English' to let other people work on it.
|
||||||
@@ -46,10 +47,52 @@ With the advent of fujinet (https://fujinet.online/) we are thinking about makin
|
|||||||
|
|
||||||
## Changes:
|
## Changes:
|
||||||
|
|
||||||
###### Build 138
|
###### Build 143
|
||||||
|
2022-06-05
|
||||||
|
Rewrite build. We redone several important parts of the game to allow for bug fixes and requested features. Generally it was a great success, but some new bugs appeared. This build is nice for the eye, but beware, no mercy for testers again :)
|
||||||
|
Only visible changes listed, because you are possibly not as excited as we are for the new Flight routine and ground collisions by @Pecusx.
|
||||||
|
- https://github.com/pkali/scorch_src/issues/84, https://github.com/pkali/scorch_src/issues/63 - tanks now say good bye properly!
|
||||||
|
- https://github.com/pkali/scorch_src/issues/74 - Press [ESC] to quit the game at any point, with a confirmation when the round has already started. Please note the keyboard is not checked all the time, so press it for a while, especially when AI tanks are ru(i/n)ning the show.
|
||||||
|
- https://github.com/pkali/scorch_src/issues/56 - there should be no occurrences of frivolous weapon purchases. Please report all tanks getting their munitions from uncertified sources!
|
||||||
|
- https://github.com/pkali/scorch_src/issues/47 - It seems that the bad sequence of turns has been ameliorated. Fix is trivial, finding the culprit - far from it. Please pay special attention to fairness of shooting in case the fix is still longing for the fjords.
|
||||||
|
- ATTRACT mode works how it should - screensaver saves screen only when HUMAN should input something.
|
||||||
|
|
||||||
|
###### Build 142
|
||||||
|
2022-05-30
|
||||||
|
Late build. The bugs we tried to squelch turned out to be more difficult than usual. Some progress has been made though even if it is not yet visible.
|
||||||
|
- 4x4 font rewritten by @Pecusx as a prep for Y standarization. It makes the messages to appear faster. This is a good change.
|
||||||
|
- https://github.com/pkali/scorch_src/issues/5 and #80 fixed (again) - no funkybomb traces staying on the screen
|
||||||
|
- https://github.com/pkali/scorch_src/issues/70 too strong Shooters fixed
|
||||||
|
- https://github.com/pkali/scorch_src/issues/63 - tank say goodbye when (mostly) visible
|
||||||
|
- several other small changes and improvements that will pay off in the following releases.
|
||||||
|
|
||||||
|
###### Build 141
|
||||||
|
2022-05-22
|
||||||
|
Debug build. Thanks to all testers for finding numerous bugs. We tried to fix some of them and we have introduced some new for your enjoyment.
|
||||||
|
- https://github.com/pkali/scorch_src/issues/73 Fast forward. Press [START] to speed up the game where it can be sped up. Not in many places, mind you.
|
||||||
|
- https://github.com/pkali/scorch_src/issues/72 Screen glitches improved
|
||||||
|
- https://github.com/pkali/scorch_src/issues/70 AI shoot with more force than their energy allows. We might still have to revise this one
|
||||||
|
- https://github.com/pkali/scorch_src/issues/69 Explosions wrapping around the screen
|
||||||
|
- https://github.com/pkali/scorch_src/issues/67 Screen glitches after intro
|
||||||
|
- https://github.com/pkali/scorch_src/issues/65 Saved ~90 bytes by removing cosinus table
|
||||||
|
- https://github.com/pkali/scorch_src/issues/62 Empty list of defensive weapons gets corrupted. Plunged it with a new defensive weapon - "White Flag". Honor of the tank crew prohibits them from buying it (yet)
|
||||||
|
- https://github.com/pkali/scorch_src/issues/61 [SHIFT] was repeating the last key
|
||||||
|
- https://github.com/pkali/scorch_src/issues/57 Fire too sensitive on a real machine. Switched to shadow registers. First recorded use of Atari OS :O
|
||||||
|
- https://github.com/pkali/scorch_src/issues/55 Glitches in the status bar. This one was surprisingly tough.
|
||||||
|
|
||||||
|
###### Build 140
|
||||||
|
2022-05-15
|
||||||
|
Huge internal changes by @Pecusx. The whole game screen has been inverted - ground is now background color, "sky" and empty areas are in fact pixels. This allowed for introducing better tank colorization, fully devised and lead by Adam. The process started and results are already promising - the colors of tanks and the status bar are closer. We might get even better ones in the next builds.
|
||||||
|
- few new sfx added (end of round, weapon change, soil eating weapons)
|
||||||
|
- added colors to tank name and level selection screen
|
||||||
|
- Bug https://github.com/pkali/scorch_src/issues/57 possibly alleviated by using TRIG0S instead of TRIG0. Please test - it did not show for me.
|
||||||
|
Other unlisted minor bugs and typos fixed.
|
||||||
|
"Nightly" version moved to `develop` branch. `master` will be updated with stablish and playablish builds only.
|
||||||
|
|
||||||
|
###### Build 139
|
||||||
2022-05-09
|
2022-05-09
|
||||||
The post midnight release with great, heavy new features:
|
The post midnight release with great, heavy new features:
|
||||||
- https://github.com/pkali/scorch_src/issues/48, https://github.com/pkali/scorch_src/issues/10 - thanks to Miker we have a bunch of fresh sound effects. Not everything is perfectly implemented, but the game definitely got nicer! Thank you again Miker!
|
- https://github.com/pkali/scorch_src/issues/48, https://github.com/pkali/scorch_src/issues/10 - thanks to @mikerro we have a bunch of fresh sound effects. Not everything is perfectly implemented, but the game definitely got nicer! Thank you again Miker!
|
||||||
- https://github.com/pkali/scorch_src/issues/42 New weapon - Liquid Dirt by Pecus. Try it from directly from the weapon store!
|
- https://github.com/pkali/scorch_src/issues/42 New weapon - Liquid Dirt by Pecus. Try it from directly from the weapon store!
|
||||||
- (fix) https://github.com/pkali/scorch_src/issues/53 - non-existing weapons are not displayed. This makes the defense menu empty when you are poor, but it is still better than the old way with "$0" prices
|
- (fix) https://github.com/pkali/scorch_src/issues/53 - non-existing weapons are not displayed. This makes the defense menu empty when you are poor, but it is still better than the old way with "$0" prices
|
||||||
- (fix) https://github.com/pkali/scorch_src/issues/49 - seppuku should always kill now
|
- (fix) https://github.com/pkali/scorch_src/issues/49 - seppuku should always kill now
|
||||||
@@ -91,7 +134,7 @@ Other small fixes:
|
|||||||
2022-04-10
|
2022-04-10
|
||||||
- https://github.com/pkali/scorch_src/issues/34 - plot pointer visible only when missile is out of the screen
|
- https://github.com/pkali/scorch_src/issues/34 - plot pointer visible only when missile is out of the screen
|
||||||
- https://github.com/pkali/scorch_src/issues/33 - Poor AIs do not purchase non-working weapons
|
- https://github.com/pkali/scorch_src/issues/33 - Poor AIs do not purchase non-working weapons
|
||||||
- https://github.com/pkali/scorch_src/issues/32 - Basic is turned off right on the beginning of loading. Dracon reported problems with running the game in Altirra, this was the best idea I had about it. Maybe next will be removing from zero page LZSS routine by @dmsc
|
- https://github.com/pkali/scorch_src/issues/32 - Basic is turned off right on the beginning of loading. Dracon reported problems with running the game in Altirra, this was the best idea I had about it. Maybe next will be removing LZSS routine by @dmsc from zero page
|
||||||
- https://github.com/pkali/scorch_src/issues/31 - STA WSYNC removed from missile flight delay
|
- https://github.com/pkali/scorch_src/issues/31 - STA WSYNC removed from missile flight delay
|
||||||
- https://github.com/pkali/scorch_src/issues/30 - player level remembered between rounds, thx @KrzysRog
|
- https://github.com/pkali/scorch_src/issues/30 - player level remembered between rounds, thx @KrzysRog
|
||||||
- https://github.com/pkali/scorch_src/issues/5 - funkybomb smoke stays on the edges of the screen
|
- https://github.com/pkali/scorch_src/issues/5 - funkybomb smoke stays on the edges of the screen
|
||||||
@@ -102,7 +145,7 @@ Other small fixes:
|
|||||||
- enhancement: https://github.com/pkali/scorch_src/issues/15 Add player colors to purchase screen. Still room to improvement!
|
- enhancement: https://github.com/pkali/scorch_src/issues/15 Add player colors to purchase screen. Still room to improvement!
|
||||||
- enhancement: https://github.com/pkali/scorch_src/issues/22 Redesign information panel (top 2 lines of the game screen). Now game might make some sense for a newcomer :)
|
- enhancement: https://github.com/pkali/scorch_src/issues/22 Redesign information panel (top 2 lines of the game screen). Now game might make some sense for a newcomer :)
|
||||||
- change: https://github.com/pkali/scorch_src/issues/28 remove white lines around out-of-the-screen point tracker. Now it is visible and looks better!
|
- change: https://github.com/pkali/scorch_src/issues/28 remove white lines around out-of-the-screen point tracker. Now it is visible and looks better!
|
||||||
- enhancement: https://github.com/pkali/scorch_src/issues/25 Missiles are too fast. Thanks @bocianu and @miker for the hint. Speed of the shell is configurable now, 5 speeds available.
|
- enhancement: https://github.com/pkali/scorch_src/issues/25 Missiles are too fast. Thanks @bocianu and @mikerro for the hint. Speed of the shell is configurable now, 5 speeds available.
|
||||||
- enhancement: https://github.com/pkali/scorch_src/issues/27 Remember game settings between games.
|
- enhancement: https://github.com/pkali/scorch_src/issues/27 Remember game settings between games.
|
||||||
- enhancement: https://github.com/pkali/scorch_src/issues/24 Remember player names between games. Thanks @bocianu
|
- enhancement: https://github.com/pkali/scorch_src/issues/24 Remember player names between games. Thanks @bocianu
|
||||||
|
|
||||||
|
|||||||
@@ -1,90 +0,0 @@
|
|||||||
MOVED TO: https://github.com/pkali/scorch_src/issues
|
|
||||||
|
|
||||||
TODO and BUGS file
|
|
||||||
|
|
||||||
---------------------------------------------------------
|
|
||||||
Known bugs (+ means bug is fixed)
|
|
||||||
004. when parachute is on and the tank dies (e.g. hit by a powerful
|
|
||||||
weapon) the dead (invisible) tank falls on parachute
|
|
||||||
(and uses one parachute more than necessary)
|
|
||||||
005. tank stands still on a one pixel spike - it should fall
|
|
||||||
(possibly all that is necessary is adjust of WhereToSlideTable)
|
|
||||||
017: Observed MIRV loops - it shoots and shoots MIRV all over the screen. Very rare.
|
|
||||||
020: sometimes leftmost or rightmost remains of the funkybomb smoke do not get cleared
|
|
||||||
I think it happens when one of the bombs goes out of the screen
|
|
||||||
023: NEW BUG. After the last change (bug 007) now the last shell of any weapon gets removed and
|
|
||||||
the game switches to Baby missile.
|
|
||||||
|
|
||||||
Fixed:
|
|
||||||
+001. when bullet goes straight down very fast it misses the tank
|
|
||||||
it happens only when tank is standing on the bottom of
|
|
||||||
the screen (no ground below)
|
|
||||||
+002. points after the round are not calculated correctly
|
|
||||||
+003. if death's head explodes low, the lowest explosion wraps
|
|
||||||
and appears on the top of the screen
|
|
||||||
+006. After some attacks (like MIRV and leapfrog the OffensiveText
|
|
||||||
stays on the screen (and becomes a static decoration)
|
|
||||||
It possibly happens when a tank kills itself with mirv or leapfrog.
|
|
||||||
+008. After a round the last tank sprite stays on the screen.
|
|
||||||
This hurts only when the last tank is under the table with results!
|
|
||||||
+010. Even MORONS shoot their feet too often - increase min. randomised energy.
|
|
||||||
+011. High flying bullets sometimes cause brief screen garbage - like a DL damaged
|
|
||||||
for a fraction of a frame.
|
|
||||||
Update - these are NOT high flying bullets - it just happens during bullet flight
|
|
||||||
+012. (newly introduced) Death explosions are offset right and possibly up.
|
|
||||||
+013. sometimes demo mode does not work (it stops on results display)
|
|
||||||
+014: FunkyBomb shoots with too high angle
|
|
||||||
+015: Only first shoot of FunkyBomb is correct (with smoke and fast),
|
|
||||||
the next are like missiles
|
|
||||||
+016: Additional explosions after Frogger do not have falling soil (?)
|
|
||||||
-018: MINOR: ydraw, yhit, ybyte variable is sometimes treated as WORD, sometimes as BYTE.
|
|
||||||
Making it consistent would save both time and space (not much)
|
|
||||||
REJECTED: too much work - different routines depend on checking high byte.
|
|
||||||
+019: AI menu does not recognize keyboard up (prints "-" in tank name)
|
|
||||||
+021: check MWA, ADW, SBW macros - bad modifications of bytes found!!!
|
|
||||||
+009. When result in points is >99 then only 2 first digits are displayed
|
|
||||||
-022: shooting funkybomb decreases number of bombs too much! (2 instead of 1?)
|
|
||||||
+007. Decreasing of number of bullets after a shoot does not work correctly
|
|
||||||
(e.g. 2 bullets are deducted instead of 1) FUNKYBOMB!!!
|
|
||||||
it looks like it is fixed, although what I did was moving decreasing before jsr shoot
|
|
||||||
+000, Game crashes from time to time, code and/or screen gets corrupted
|
|
||||||
|
|
||||||
|
|
||||||
---------------------------------------------------------
|
|
||||||
To do
|
|
||||||
*004. The game has no end!!! Add ending!!!
|
|
||||||
A good idea for an ending - a TIP pic - Red Army taking Berlin :)
|
|
||||||
Another - vector tanks like in BattleZone
|
|
||||||
Another - stickman tankmen
|
|
||||||
006. Add sound effects (maybe sampled? or mp0 (sound based on fft))
|
|
||||||
007. There is no defensive weapon handling (only parachute works,
|
|
||||||
but also provisionally
|
|
||||||
009. Make AI in the existing framework (ongoing)
|
|
||||||
010. It is impossible to look up a number of parachutes left.
|
|
||||||
018. Speed up soil down after soil eating weapons - correctly calculate
|
|
||||||
ranges as now range is very broad even when very little soil is eaten.
|
|
||||||
019. Purchase impossible with joystick only. Add buy on e.g. joystick right.
|
|
||||||
020. Not a bug per se, but ydraw variable is word, possibly it can be switched to byte
|
|
||||||
021. Add player colors to purchase screen
|
|
||||||
022. Make colors more contrasting
|
|
||||||
024. no visual indication of using defensive weapons
|
|
||||||
|
|
||||||
Done:
|
|
||||||
|
|
||||||
+001. Start each round with a)worst tank or b)random tank
|
|
||||||
(Worst tank starts first)
|
|
||||||
+002. Start each round with random angles (not always 45 degrees left)
|
|
||||||
+003. Add colour of the given tank to the screen
|
|
||||||
E.g. when a given tank is shooting it's colour could be behind
|
|
||||||
tank name on the text screen
|
|
||||||
+005. Add number of rounds to the options menu
|
|
||||||
+008. No computer operated opponents - make a framework for AI!!!
|
|
||||||
+011. Colouring the top status lines in a colour of the active tank.
|
|
||||||
+014. Demo mode - when all tanks are CPUs let them play non-stop!
|
|
||||||
(replace waiting for a key-press after a round with a small delay)
|
|
||||||
+015. Switch to mads for easier development (mads speeds it up, no doubt)
|
|
||||||
+016. Speed up death's head (e.g.: draw each second circle)
|
|
||||||
-017. Wide screen mode (with scroll?)
|
|
||||||
+012. Decreased number of bullets should be displayed just after the shoot.
|
|
||||||
+013. Check LineTable - possibly it is unnecessarily long. Checked. It is OK
|
|
||||||
+023. Make not implemented weapons raise NotImplementedError :] Done by making it impossible to purchase free weapons (price == $0)
|
|
||||||
@@ -33,7 +33,7 @@ loop
|
|||||||
ArtificialIntelligence .proc ;
|
ArtificialIntelligence .proc ;
|
||||||
; A - skill of the TankNr
|
; A - skill of the TankNr
|
||||||
; returns shoot energy and angle in
|
; returns shoot energy and angle in
|
||||||
; EnergyTable/L/H and AngleTable
|
; ForceTable/L/H and AngleTable
|
||||||
;----------------------------------------------
|
;----------------------------------------------
|
||||||
asl
|
asl
|
||||||
tax
|
tax
|
||||||
@@ -77,24 +77,22 @@ Shooter .proc
|
|||||||
lda PreviousAngle,x
|
lda PreviousAngle,x
|
||||||
clc
|
clc
|
||||||
adc #5
|
adc #5
|
||||||
bmi leftQuadrant
|
bmi @+
|
||||||
cmp #90
|
cmp #90
|
||||||
bcc continue
|
bcc @+
|
||||||
lda #(-90)
|
lda #(-90)
|
||||||
bne continue
|
@
|
||||||
leftQuadrant
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
continue
|
|
||||||
sta NewAngle
|
sta NewAngle
|
||||||
|
|
||||||
|
sec
|
||||||
lda PreviousEnergyL,x
|
lda PreviousEnergyL,x
|
||||||
sta EnergyTableL,x
|
sbc #5
|
||||||
lda PreviousEnergyH,x
|
sta ForceTableL,x
|
||||||
sta EnergyTableH,x
|
lda PreviousEnergyH,x
|
||||||
|
sbc #0
|
||||||
|
sta ForceTableH,x
|
||||||
jmp endo
|
jmp endo
|
||||||
|
|
||||||
firstShoot
|
firstShoot
|
||||||
; compare the x position with the middle of the screen
|
; compare the x position with the middle of the screen
|
||||||
lda xTanksTableL,x
|
lda xTanksTableL,x
|
||||||
@@ -108,7 +106,6 @@ firstShoot
|
|||||||
and #$1F
|
and #$1F
|
||||||
clc
|
clc
|
||||||
adc #5
|
adc #5
|
||||||
;lda #45
|
|
||||||
|
|
||||||
sta NewAngle
|
sta NewAngle
|
||||||
jmp forceNow
|
jmp forceNow
|
||||||
@@ -123,15 +120,17 @@ tankIsOnTheRight
|
|||||||
forceNow
|
forceNow
|
||||||
mwa #100 RandBoundaryLow
|
mwa #100 RandBoundaryLow
|
||||||
mwa #800 RandBoundaryHigh
|
mwa #800 RandBoundaryHigh
|
||||||
|
ldx TankNr ;this is possibly not necessary
|
||||||
jsr RandomizeForce
|
jsr RandomizeForce
|
||||||
|
|
||||||
endo
|
endo
|
||||||
ldx TankNr ;this is possibly not necessary
|
ldx TankNr ;this is possibly not necessary
|
||||||
|
jsr RandomizeForce.LimitForce
|
||||||
lda NewAngle
|
lda NewAngle
|
||||||
sta PreviousAngle,x
|
sta PreviousAngle,x
|
||||||
lda EnergyTableL,x
|
lda ForceTableL,x
|
||||||
sta PreviousEnergyL,x
|
sta PreviousEnergyL,x
|
||||||
lda EnergyTableH,x
|
lda ForceTableH,x
|
||||||
sta PreviousEnergyH,x
|
sta PreviousEnergyH,x
|
||||||
|
|
||||||
; choose the best weapon
|
; choose the best weapon
|
||||||
@@ -214,6 +213,7 @@ skipThisPlayer
|
|||||||
forceNow
|
forceNow
|
||||||
mwa #300 RandBoundaryLow
|
mwa #300 RandBoundaryLow
|
||||||
mwa #700 RandBoundaryHigh
|
mwa #700 RandBoundaryHigh
|
||||||
|
ldx TankNr
|
||||||
jsr RandomizeForce
|
jsr RandomizeForce
|
||||||
|
|
||||||
endo
|
endo
|
||||||
|
|||||||
+28
-3
@@ -45,11 +45,16 @@ regX .ds 1
|
|||||||
regY .ds 1
|
regY .ds 1
|
||||||
; --- MAIN PROGRAM
|
; --- MAIN PROGRAM
|
||||||
org $2000
|
org $2000
|
||||||
ant dta $F0
|
ant dta $80
|
||||||
dta $42,a(scr),$02,$02,$02,$02,$02,$02,$02,$02,$02,$82,$02,$02,$02,$02,$82
|
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,$70
|
dta $02,$02,$02,$82,$82,$82,$02,$82,$02,$02,$02,$82
|
||||||
|
dta $42,a(verline)
|
||||||
dta $41,a(ant)
|
dta $41,a(ant)
|
||||||
|
|
||||||
|
verline
|
||||||
|
:37 dta d" "
|
||||||
|
build
|
||||||
|
|
||||||
scr ins "HIMARS14.scr"
|
scr ins "HIMARS14.scr"
|
||||||
|
|
||||||
.ds 2*40
|
.ds 2*40
|
||||||
@@ -202,6 +207,19 @@ main
|
|||||||
|
|
||||||
lda:cmp:req $14 ;wait 1 frame
|
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
|
sei ;stop IRQ interrupts
|
||||||
mva #$00 nmien ;stop NMI interrupts
|
mva #$00 nmien ;stop NMI interrupts
|
||||||
sta dmactl
|
sta dmactl
|
||||||
@@ -249,6 +267,11 @@ stop
|
|||||||
@ sta POKEY,x
|
@ sta POKEY,x
|
||||||
dex
|
dex
|
||||||
bpl @-
|
bpl @-
|
||||||
|
|
||||||
|
;no glitching please (issue #67)
|
||||||
|
lda #0
|
||||||
|
sta $D400 ;dmactl
|
||||||
|
sta $022F ;dmactls
|
||||||
rts ;return to ... DOS
|
rts ;return to ... DOS
|
||||||
|
|
||||||
; --- DLI PROGRAM
|
; --- DLI PROGRAM
|
||||||
@@ -339,8 +362,10 @@ dli7
|
|||||||
dli11
|
dli11
|
||||||
sta regA
|
sta regA
|
||||||
|
|
||||||
lda #$01
|
lda #>$a000 ; system font
|
||||||
sta wsync ;line=232
|
sta wsync ;line=232
|
||||||
|
sta chbase
|
||||||
|
lda #$01
|
||||||
sta gtictl
|
sta gtictl
|
||||||
|
|
||||||
lda regA
|
lda regA
|
||||||
|
|||||||
Executable → Regular
Executable → Regular
Executable → Regular
|
Before Width: | Height: | Size: 190 B After Width: | Height: | Size: 190 B |
@@ -0,0 +1,20 @@
|
|||||||
|
|
||||||
|
icl '../lib/atari.hea'
|
||||||
|
|
||||||
|
org $2000
|
||||||
|
joytest
|
||||||
|
mva #0 dmactls
|
||||||
|
|
||||||
|
@
|
||||||
|
lda trig0
|
||||||
|
beq pressed
|
||||||
|
mva #0 colbak
|
||||||
|
beq @-
|
||||||
|
pressed
|
||||||
|
lda #$0f
|
||||||
|
;ora jstick0
|
||||||
|
sta colbak
|
||||||
|
jmp @-
|
||||||
|
|
||||||
|
run joytest
|
||||||
|
|
||||||
Binary file not shown.
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
+46
-137
@@ -5,18 +5,24 @@
|
|||||||
;===================================================================================
|
;===================================================================================
|
||||||
;==========================CONSTANT TABLES, do not erase!===========================
|
;==========================CONSTANT TABLES, do not erase!===========================
|
||||||
;===================================================================================
|
;===================================================================================
|
||||||
TankColoursTable .BYTE $52,$32,$72,$92,$B2,$02
|
TankColoursTable .BYTE $88,$cc,$38,$1c,$6a,$02
|
||||||
|
TankStatusColoursTable .BYTE $80,$c0,$30,$10,$60,$00
|
||||||
|
dliColorsBack
|
||||||
|
:10 .by $02,$00
|
||||||
|
dliColorsFore
|
||||||
|
.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,<500,<800,<1000
|
.by 0,<200,<500,<800,<1000
|
||||||
CashOptionH
|
CashOptionH
|
||||||
.by 0,>200,>500,>800,>1000
|
.by 0,>200,>500,>800,>1000
|
||||||
GravityTable .by 10,20,25,30,40
|
GravityTable .by 10,20,25,30,40
|
||||||
MaxWindTable .by 5,20,40,60,80
|
MaxWindTable .by 5,20,40,70,99
|
||||||
RoundsTable .by 10,20,30,40,50
|
RoundsTable .by 10,20,30,40,50
|
||||||
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
|
||||||
;------------------------------------------------
|
;------------------------------------------------
|
||||||
|
|
||||||
LevelNameBeginL ; begins of level names
|
LevelNameBeginL ; begins of level names
|
||||||
.by <NamesOfLevels,<(NamesOfLevels+10),<(NamesOfLevels+20)
|
.by <NamesOfLevels,<(NamesOfLevels+10),<(NamesOfLevels+20)
|
||||||
.by <(NamesOfLevels+32),<(NamesOfLevels+42),<(NamesOfLevels+52)
|
.by <(NamesOfLevels+32),<(NamesOfLevels+42),<(NamesOfLevels+52)
|
||||||
@@ -30,31 +36,25 @@ 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
|
||||||
;-----4x4 texts-----
|
|
||||||
|
|
||||||
|
;-----4x4 texts-----
|
||||||
LineTop
|
LineTop
|
||||||
dta d"(%%%%%%%%%%%%)"
|
dta d"(%%%%%%%%%%%%)", $ff
|
||||||
.byte $ff
|
|
||||||
;# - vertical, () * +, % - horizontal
|
;# - vertical, () * +, % - horizontal
|
||||||
LineBottom
|
LineBottom
|
||||||
dta d"*%%%%%%%%%%%%+"
|
dta d"*%%%%%%%%%%%%+", $ff
|
||||||
.byte $ff
|
|
||||||
LineEmpty
|
LineEmpty
|
||||||
dta d"# #"
|
dta d"# #", $ff
|
||||||
.byte $ff
|
|
||||||
LineHeader2
|
LineHeader2
|
||||||
dta d"# RESULTS #"
|
dta d"# RESULTS #", $ff
|
||||||
.byte $ff
|
|
||||||
LineGameOver
|
LineGameOver
|
||||||
dta d"# GAME OVER #"
|
dta d"# GAME OVER #", $ff
|
||||||
.byte $ff
|
|
||||||
seppukuText
|
seppukuText
|
||||||
dta d"# SEPPUKU! #"
|
dta d"# SEPPUKU! #", $ff
|
||||||
.byte $ff
|
areYouSureText
|
||||||
|
dta d"# SURE? Y/N #", $ff
|
||||||
lineClear
|
lineClear
|
||||||
dta d" "
|
dta d" ", $ff
|
||||||
.byte $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 5 tanks (6th is without P/M background)
|
||||||
@@ -189,99 +189,6 @@ sintable
|
|||||||
.by 255
|
.by 255
|
||||||
.by 255 ;anti self destruction byte
|
.by 255 ;anti self destruction byte
|
||||||
|
|
||||||
costable
|
|
||||||
.by 255 ;anti self destruction byte
|
|
||||||
.by 255
|
|
||||||
.by 255
|
|
||||||
.by 255
|
|
||||||
.by 255
|
|
||||||
.by 255
|
|
||||||
.by 254
|
|
||||||
.by 254
|
|
||||||
.by 253
|
|
||||||
.by 252
|
|
||||||
.by 252
|
|
||||||
.by 251
|
|
||||||
.by 250
|
|
||||||
.by 249
|
|
||||||
.by 248
|
|
||||||
.by 247
|
|
||||||
.by 246
|
|
||||||
.by 244
|
|
||||||
.by 243
|
|
||||||
.by 242
|
|
||||||
.by 240
|
|
||||||
.by 238
|
|
||||||
.by 237
|
|
||||||
.by 235
|
|
||||||
.by 233
|
|
||||||
.by 232
|
|
||||||
.by 230
|
|
||||||
.by 228
|
|
||||||
.by 226
|
|
||||||
.by 223
|
|
||||||
.by 221
|
|
||||||
.by 219
|
|
||||||
.by 217
|
|
||||||
.by 214
|
|
||||||
.by 212
|
|
||||||
.by 209
|
|
||||||
.by 207
|
|
||||||
.by 204
|
|
||||||
.by 201
|
|
||||||
.by 198
|
|
||||||
.by 196
|
|
||||||
.by 193
|
|
||||||
.by 190
|
|
||||||
.by 187
|
|
||||||
.by 184
|
|
||||||
.by 181
|
|
||||||
.by 177
|
|
||||||
.by 174
|
|
||||||
.by 171
|
|
||||||
.by 167
|
|
||||||
.by 164
|
|
||||||
.by 161
|
|
||||||
.by 157
|
|
||||||
.by 154
|
|
||||||
.by 150
|
|
||||||
.by 146
|
|
||||||
.by 143
|
|
||||||
.by 139
|
|
||||||
.by 135
|
|
||||||
.by 131
|
|
||||||
.by 128
|
|
||||||
.by 124
|
|
||||||
.by 120
|
|
||||||
.by 116
|
|
||||||
.by 112
|
|
||||||
.by 108
|
|
||||||
.by 104
|
|
||||||
.by 100
|
|
||||||
.by 95
|
|
||||||
.by 91
|
|
||||||
.by 87
|
|
||||||
.by 83
|
|
||||||
.by 79
|
|
||||||
.by 74
|
|
||||||
.by 70
|
|
||||||
.by 66
|
|
||||||
.by 61
|
|
||||||
.by 57
|
|
||||||
.by 53
|
|
||||||
.by 48
|
|
||||||
.by 44
|
|
||||||
.by 40
|
|
||||||
.by 35
|
|
||||||
.by 31
|
|
||||||
.by 26
|
|
||||||
.by 22
|
|
||||||
.by 17
|
|
||||||
.by 13
|
|
||||||
.by 8
|
|
||||||
.by 4
|
|
||||||
.by 0
|
|
||||||
|
|
||||||
linetableL
|
linetableL
|
||||||
:screenheight+1 .by <(display+screenBytes*#)
|
:screenheight+1 .by <(display+screenBytes*#)
|
||||||
linetableH
|
linetableH
|
||||||
@@ -569,6 +476,7 @@ WhereToSlideTable
|
|||||||
.BY %000 ; 11111111
|
.BY %000 ; 11111111
|
||||||
|
|
||||||
EndOfTheBarrelX
|
EndOfTheBarrelX
|
||||||
|
; right angles from 0 (vertically up) to 90 (horizontally to the right)
|
||||||
.by 4,4,4,4,4,4,4,4,4,4,4
|
.by 4,4,4,4,4,4,4,4,4,4,4
|
||||||
.by 5,5,5,5,5,5,5,5,5,5
|
.by 5,5,5,5,5,5,5,5,5,5
|
||||||
.by 6,6,6,6,6,6,6,6,6
|
.by 6,6,6,6,6,6,6,6,6
|
||||||
@@ -578,15 +486,16 @@ EndOfTheBarrelX
|
|||||||
.by 7,7,7,7,7,7,7,7,7,7,7,7,7
|
.by 7,7,7,7,7,7,7,7,7,7,7,7,7
|
||||||
.by 7,7,7,7,7,7,7,7,7,7,7,7,7,7
|
.by 7,7,7,7,7,7,7,7,7,7,7,7,7,7
|
||||||
|
|
||||||
.by 0,0,0,0,0,0,0,0,0,0
|
.by 0,0,0,0,0,0,0,0,0,0 ; not used
|
||||||
.by 0,0,0,0,0,0,0,0,0,0
|
.by 0,0,0,0,0,0,0,0,0,0 ; not used
|
||||||
.by 0,0,0,0,0,0,0,0,0,0
|
.by 0,0,0,0,0,0,0,0,0,0 ; not used
|
||||||
.by 0,0,0,0,0,0,0,0,0,0
|
.by 0,0,0,0,0,0,0,0,0,0 ; not used
|
||||||
.by 0,0,0,0,0,0,0,0,0,0
|
.by 0,0,0,0,0,0,0,0,0,0 ; not used
|
||||||
.by 0,0,0,0,0,0,0,0,0,0
|
.by 0,0,0,0,0,0,0,0,0,0 ; not used
|
||||||
.by 0,0,0,0,0,0,0,0,0,0
|
.by 0,0,0,0,0,0,0,0,0,0 ; not used
|
||||||
.by 0,0,0,0
|
.by 0,0,0,0 ; not used
|
||||||
|
|
||||||
|
; left angles from 90 (horizontally to the left) to 1 (vertically up)
|
||||||
.by 0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
.by 0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||||
.by 0,0,0,0,0,0,0,0,0,0,0,0,0
|
.by 0,0,0,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
|
||||||
@@ -597,6 +506,7 @@ EndOfTheBarrelX
|
|||||||
.by 3,3,3,3,3,3,3,3,3,3,3
|
.by 3,3,3,3,3,3,3,3,3,3,3
|
||||||
|
|
||||||
EndOfTheBarrelY
|
EndOfTheBarrelY
|
||||||
|
; right angles from 0 (vertically up) to 90 (horizontally to the right)
|
||||||
.by 7,7,7,7,7,7,7,7,7,7,7
|
.by 7,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
|
.by 7,7,7,7,7,7,7,7,7
|
||||||
@@ -606,15 +516,16 @@ EndOfTheBarrelY
|
|||||||
.by 4,4,4,4,4,4,4,4,4,4,4,4,4
|
.by 4,4,4,4,4,4,4,4,4,4,4,4,4
|
||||||
.by 3,3,3,3,3,3,3,3,3,3,3,3,3,3
|
.by 3,3,3,3,3,3,3,3,3,3,3,3,3,3
|
||||||
|
|
||||||
.by 0,0,0,0,0,0,0,0,0,0
|
.by 0,0,0,0,0,0,0,0,0,0 ; not used
|
||||||
.by 0,0,0,0,0,0,0,0,0,0
|
.by 0,0,0,0,0,0,0,0,0,0 ; not used
|
||||||
.by 0,0,0,0,0,0,0,0,0,0
|
.by 0,0,0,0,0,0,0,0,0,0 ; not used
|
||||||
.by 0,0,0,0,0,0,0,0,0,0
|
.by 0,0,0,0,0,0,0,0,0,0 ; not used
|
||||||
.by 0,0,0,0,0,0,0,0,0,0
|
.by 0,0,0,0,0,0,0,0,0,0 ; not used
|
||||||
.by 0,0,0,0,0,0,0,0,0,0
|
.by 0,0,0,0,0,0,0,0,0,0 ; not used
|
||||||
.by 0,0,0,0,0,0,0,0,0,0
|
.by 0,0,0,0,0,0,0,0,0,0 ; not used
|
||||||
.by 0,0,0,0
|
.by 0,0,0,0 ; not used
|
||||||
|
|
||||||
|
; left angles from 90 (horizontally to the left) to 1 (vertically up)
|
||||||
.by 3,3,3,3,3,3,3,3,3,3,3,3,3,3
|
.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,4,4,4
|
.by 4,4,4,4,4,4,4,4,4,4,4,4,4
|
||||||
.by 5,5,5,5,5,5,5,5,5,5
|
.by 5,5,5,5,5,5,5,5,5,5
|
||||||
@@ -623,8 +534,8 @@ EndOfTheBarrelY
|
|||||||
.by 7,7,7,7,7,7,7,7,7
|
.by 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,7
|
.by 7,7,7,7,7,7,7,7,7,7,7
|
||||||
|
|
||||||
;-------------------------------------------------
|
;-------------------------------------------------
|
||||||
|
|
||||||
TanksNamesDefault
|
TanksNamesDefault
|
||||||
dta d"1st.Tank"
|
dta d"1st.Tank"
|
||||||
dta d"2nd.Tank"
|
dta d"2nd.Tank"
|
||||||
@@ -633,7 +544,6 @@ TanksNamesDefault
|
|||||||
dta d"5th.Tank"
|
dta d"5th.Tank"
|
||||||
dta d"6th.Tank"
|
dta d"6th.Tank"
|
||||||
|
|
||||||
|
|
||||||
WeaponPriceH ; weapons prices (tables with prices of weapons)
|
WeaponPriceH ; weapons prices (tables with prices of weapons)
|
||||||
.by >price_Baby_Missile___
|
.by >price_Baby_Missile___
|
||||||
.by >price_Missile________
|
.by >price_Missile________
|
||||||
@@ -698,7 +608,7 @@ WeaponPriceH ; weapons prices (tables with prices of weapons)
|
|||||||
.by >price_Auto_Defense___
|
.by >price_Auto_Defense___
|
||||||
.by >price_Fuel_Tank______
|
.by >price_Fuel_Tank______
|
||||||
.by >price_Contact_Trigger
|
.by >price_Contact_Trigger
|
||||||
.by >price______________63
|
.by >price_White_Flag_____
|
||||||
|
|
||||||
WeaponPriceL
|
WeaponPriceL
|
||||||
.by <price_Baby_Missile___
|
.by <price_Baby_Missile___
|
||||||
@@ -764,7 +674,7 @@ WeaponPriceL
|
|||||||
.by <price_Auto_Defense___
|
.by <price_Auto_Defense___
|
||||||
.by <price_Fuel_Tank______
|
.by <price_Fuel_Tank______
|
||||||
.by <price_Contact_Trigger
|
.by <price_Contact_Trigger
|
||||||
.by <price______________63
|
.by <price_White_Flag_____
|
||||||
|
|
||||||
;-------------------------------------------------
|
;-------------------------------------------------
|
||||||
; how many units (bulletd) of a given weapon we get for a given price
|
; how many units (bulletd) of a given weapon we get for a given price
|
||||||
@@ -836,7 +746,7 @@ WeaponUnits
|
|||||||
.by 1 ;Auto_Defense___
|
.by 1 ;Auto_Defense___
|
||||||
.by 10 ;Fuel_Tank______
|
.by 10 ;Fuel_Tank______
|
||||||
.by 25 ;Contact_Trigger
|
.by 25 ;Contact_Trigger
|
||||||
.by 0 ;_____________63
|
.by 1 ;_____________63
|
||||||
|
|
||||||
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
|
||||||
@@ -968,9 +878,10 @@ NamesOfWeapons ;the comment is an index in the tables
|
|||||||
dta d"Auto Defense " ; 60
|
dta d"Auto Defense " ; 60
|
||||||
dta d"Fuel Tank " ; 61
|
dta d"Fuel Tank " ; 61
|
||||||
dta d"Contact Trigger " ; 62
|
dta d"Contact Trigger " ; 62
|
||||||
dta d"----------------" ; 63
|
dta d"White Flag " ; 63
|
||||||
weaponsOfDeath
|
weaponsOfDeath
|
||||||
dta 0,1,2,3,7,8,9,15,16,17,18,19,20,21,22,23,24,25,26,27
|
dta 1,2,3,7,15,16,17,18,19,20,21,22,23,24,25,26,27
|
||||||
|
weaponsOfDeathEnd
|
||||||
joyToKeyTable
|
joyToKeyTable
|
||||||
; .by 00, 01, 02, 03, 04, 05, 06, 07, 08, 09, 10, 11, 12, 13, 14, 15
|
; .by 00, 01, 02, 03, 04, 05, 06, 07, 08, 09, 10, 11, 12, 13, 14, 15
|
||||||
.by $ff,$ff,$ff,$ff,$ff,$ff,$ff,$07,$ff,$ff,$ff,$06,$ff,$0f,$0e,$ff
|
.by $ff,$ff,$ff,$ff,$ff,$ff,$ff,$07,$ff,$ff,$ff,$06,$ff,$0f,$0e,$ff
|
||||||
@@ -989,7 +900,5 @@ scrcodes
|
|||||||
dta d"qrstuvwx"
|
dta d"qrstuvwx"
|
||||||
dta d"yz123456"
|
dta d"yz123456"
|
||||||
dta d"7890." ; "-"
|
dta d"7890." ; "-"
|
||||||
dliColors
|
|
||||||
:10 .by $02,$00
|
|
||||||
|
|
||||||
.endif
|
.endif
|
||||||
|
|||||||
+29
-29
@@ -74,35 +74,35 @@ price_Super_Mag______ = $ffff ;_59
|
|||||||
price_Auto_Defense___ = $ffff ;_60
|
price_Auto_Defense___ = $ffff ;_60
|
||||||
price_Fuel_Tank______ = $ffff ;_61
|
price_Fuel_Tank______ = $ffff ;_61
|
||||||
price_Contact_Trigger = $ffff ;_62
|
price_Contact_Trigger = $ffff ;_62
|
||||||
price______________63 = $ffff
|
price_White_Flag_____ = $0 ;_63
|
||||||
;--------------------------------
|
;--------------------------------
|
||||||
; names of RMT instruments (sfx)
|
; names of RMT instruments (sfx)
|
||||||
;--------------------------------
|
;--------------------------------
|
||||||
sfx_set_power_1 = $00
|
sfx_set_power_1 = $00 ;A
|
||||||
sfx_set_power_2 = $01
|
sfx_set_power_2 = $01 ;b
|
||||||
sfx_lightning = $02
|
sfx_lightning = $02 ;c
|
||||||
sfx_dunno = $03
|
sfx_dunno = $03 ;d
|
||||||
sfx_nuke = $04
|
sfx_nuke = $04 ;e
|
||||||
sfx_baby_missile= $05
|
sfx_baby_missile= $05 ;f
|
||||||
sfx_death_begin = $06
|
sfx_death_begin = $06 ;g
|
||||||
sfx_plasma_1_2 = $07
|
sfx_plasma_1_2 = $07 ;h
|
||||||
sfx_plasma_2_2 = $08
|
sfx_plasma_2_2 = $08 ;i
|
||||||
sfx_napalm = $09
|
sfx_napalm = $09 ;j
|
||||||
sfx_dirt_charge = $0a
|
sfx_dirt_charge = $0a ;k
|
||||||
sfx_missile_hit = $0b
|
sfx_missile_hit = $0b ;l
|
||||||
sfx_funky_hit = $0c
|
sfx_funky_hit = $0c ;m
|
||||||
sfx_shield_on = $0d
|
sfx_shield_on = $0d ;n
|
||||||
sfx_shield_off = $0e
|
sfx_shield_off = $0e ;o
|
||||||
sfx_parachute = $0f
|
sfx_parachute = $0f ;p
|
||||||
sfx_smoke_cloud = $10
|
sfx_smoke_cloud = $10 ;q
|
||||||
sfx_riot_blast = $11
|
sfx_riot_blast = $11 ;r
|
||||||
sfx_sandhog = $12
|
sfx_sandhog = $12 ;s
|
||||||
sfx_dirt_chrg_s = $13
|
sfx_dirt_chrg_s = $13 ;t
|
||||||
sfx_digger = $14
|
sfx_digger = $14 ;u
|
||||||
sfx_silencer = $15
|
sfx_silencer = $15 ;v
|
||||||
sfx_next_player = $16
|
sfx_next_player = $16 ;w
|
||||||
sfx_purchase = $17
|
sfx_purchase = $17 ;x
|
||||||
sfx_keyclick = $18
|
sfx_keyclick = $18 ;y
|
||||||
sfx_shoot = $19
|
sfx_shoot = $19 ;z
|
||||||
sfx_seppuku = $1a
|
sfx_seppuku = $1a ;1
|
||||||
sfx_liquid_dirt = $1b
|
sfx_liquid_dirt = $1b ;2
|
||||||
|
|||||||
Executable → Regular
+7
-7
@@ -40,8 +40,8 @@ NameDL
|
|||||||
.byte $42
|
.byte $42
|
||||||
.word NameScreen
|
.word NameScreen
|
||||||
.byte $30
|
.byte $30
|
||||||
.byte $02,$30,$2
|
.byte $02,$30+$80,$02
|
||||||
.byte $10,2,2,2,$30,2,2
|
.byte $10,$02,$02,$02,$30,$02,$02
|
||||||
.byte $41
|
.byte $41
|
||||||
.word NameDL
|
.word NameDL
|
||||||
; -------------------------------------------------
|
; -------------------------------------------------
|
||||||
@@ -142,7 +142,7 @@ WeaponsDescription
|
|||||||
EmptyLine
|
EmptyLine
|
||||||
dta d" "
|
dta d" "
|
||||||
LastLine
|
LastLine
|
||||||
:40 dta $ff
|
:40 dta $00
|
||||||
; -------------------------------------------------
|
; -------------------------------------------------
|
||||||
.ALIGN $1000 ; WARNING!!!! 4KiB barrier crossing here, might need reassignment!!!
|
.ALIGN $1000 ; WARNING!!!! 4KiB barrier crossing here, might need reassignment!!!
|
||||||
NameScreen
|
NameScreen
|
||||||
@@ -154,7 +154,7 @@ NameAdr
|
|||||||
dta d" "
|
dta d" "
|
||||||
NamesOfLevels
|
NamesOfLevels
|
||||||
dta d" HUMAN Moron Shooter "
|
dta d" HUMAN Moron Shooter "
|
||||||
dta d" Poolshark Toosser Chooser "
|
dta d" Poolshark Tosser Chooser "
|
||||||
dta d" Spoiler Cyborg Unknown "
|
dta d" Spoiler Cyborg Unknown "
|
||||||
dta d" "
|
dta d" "
|
||||||
dta d"Tab"*
|
dta d"Tab"*
|
||||||
@@ -166,10 +166,10 @@ NamesOfLevels
|
|||||||
textbuffer
|
textbuffer
|
||||||
; 0123456789012345678901234567890123456789
|
; 0123456789012345678901234567890123456789
|
||||||
dta d"Player: "
|
dta d"Player: "
|
||||||
dta d"Energy: 99 Angle: <99> Force: 9999 "
|
dta d"Energy: Angle: Force: "
|
||||||
dta d" Round: 99 Wind: <99> "
|
dta d" Round: Wind: "
|
||||||
textbuffer2
|
textbuffer2
|
||||||
dta d"Player: ******** Cash: 99990 "
|
dta d"Player: Cash: "
|
||||||
dta d"----------------------------------------"
|
dta d"----------------------------------------"
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Executable → Regular
+276
-266
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
|
|
||||||
;--------------------------------------------------
|
;--------------------------------------------------
|
||||||
draw .proc ;;fuxxing good draw :)
|
.proc draw ;;fuxxing good draw :)
|
||||||
;--------------------------------------------------
|
;--------------------------------------------------
|
||||||
;creditz to Dr Jankowski / MIM U.W.
|
;creditz to Dr Jankowski / MIM U.W.
|
||||||
; (xi,yi)-----(xk,yk)
|
; (xi,yi)-----(xk,yk)
|
||||||
@@ -43,9 +43,9 @@ draw .proc ;;fuxxing good draw :)
|
|||||||
;cpw ybyte #screenheight
|
;cpw ybyte #screenheight
|
||||||
;bcc DrawOnTheScreen
|
;bcc DrawOnTheScreen
|
||||||
lda ydraw+1
|
lda ydraw+1
|
||||||
bne DrawOutOfTheScreen
|
bmi DrawOutOfTheScreen
|
||||||
lda ybyte+1
|
lda ybyte+1
|
||||||
beq DrawOnTheScreen
|
bpl DrawOnTheScreen
|
||||||
DrawOutOfTheScreen
|
DrawOutOfTheScreen
|
||||||
;jsr DrawJumpPad
|
;jsr DrawJumpPad
|
||||||
rts
|
rts
|
||||||
@@ -214,9 +214,62 @@ LineGoesLeft
|
|||||||
; line goes left - we are reversing X
|
; line goes left - we are reversing X
|
||||||
sbw xtempDRAW temp xdraw ; XI
|
sbw xtempDRAW temp xdraw ; XI
|
||||||
PutPixelinDraw
|
PutPixelinDraw
|
||||||
jsr DrawJumpPad
|
|
||||||
; end of the special PLOT for DRAW
|
; 0 - plot, %10000000 - LineLength (N), %01000000 - DrawCheck (V)
|
||||||
|
bit drawFunction
|
||||||
|
bpl @+
|
||||||
|
inw LineLength
|
||||||
|
bne ContinueDraw ; ==jmp
|
||||||
|
@
|
||||||
|
bvc @+
|
||||||
|
DrawCheck
|
||||||
|
lda tracerflag
|
||||||
|
ora SmokeTracerFlag
|
||||||
|
yestrace
|
||||||
|
beq notrace
|
||||||
|
jsr plot
|
||||||
|
notrace
|
||||||
|
;aftertrace
|
||||||
|
;key
|
||||||
|
lda HitFlag
|
||||||
|
bne StopHitChecking
|
||||||
|
|
||||||
|
CheckCollisionDraw
|
||||||
|
; checking collision!
|
||||||
|
lda ydraw+1
|
||||||
|
bmi StopHitChecking
|
||||||
|
|
||||||
|
jsr CheckCollisionWithTank
|
||||||
|
lda HitFlag
|
||||||
|
bne StopHitChecking
|
||||||
|
|
||||||
|
clc
|
||||||
|
lda xdraw
|
||||||
|
adc #<mountaintable
|
||||||
|
sta temp
|
||||||
|
lda xdraw+1
|
||||||
|
adc #>mountaintable
|
||||||
|
sta temp+1
|
||||||
|
|
||||||
|
ldy #0
|
||||||
|
lda ydraw
|
||||||
|
cmp (temp),y
|
||||||
|
bcc StopHitChecking
|
||||||
|
|
||||||
|
mwa xdraw XHit
|
||||||
|
lda (temp),y
|
||||||
|
sec
|
||||||
|
sbc #1
|
||||||
|
sta YHit
|
||||||
|
sty YHit+1
|
||||||
|
;mwa ydraw YHit
|
||||||
|
mva #1 HitFlag
|
||||||
|
StopHitChecking
|
||||||
|
jmp ContinueDraw
|
||||||
|
@
|
||||||
|
jsr plot
|
||||||
|
|
||||||
|
ContinueDraw
|
||||||
; XI=XI+1
|
; XI=XI+1
|
||||||
; UNTIL XI=XK
|
; UNTIL XI=XK
|
||||||
inw XI
|
inw XI
|
||||||
@@ -225,59 +278,12 @@ PutPixelinDraw
|
|||||||
|
|
||||||
EndOfDraw
|
EndOfDraw
|
||||||
mwa xtempDRAW xdraw
|
mwa xtempDRAW xdraw
|
||||||
mva ytempDRAW ydraw
|
mwa ytempDRAW ydraw
|
||||||
rts
|
rts
|
||||||
.endp
|
.endp
|
||||||
|
|
||||||
;-------------JumpPad-------------
|
|
||||||
DrawJumpPad
|
|
||||||
jmp (DrawJumpAddr)
|
|
||||||
Drawplot
|
|
||||||
jmp plot
|
|
||||||
DrawLen
|
|
||||||
inw LineLength
|
|
||||||
rts
|
|
||||||
;-------------JumpPad-------------
|
|
||||||
|
|
||||||
DrawCheck .proc
|
|
||||||
lda tracerflag
|
|
||||||
ora SmokeTracerFlag
|
|
||||||
yestrace
|
|
||||||
beq notrace
|
|
||||||
jsr plot
|
|
||||||
notrace
|
|
||||||
;aftertrace
|
|
||||||
lda HitFlag
|
|
||||||
bne StopHitChecking
|
|
||||||
|
|
||||||
CheckCollisionDraw
|
|
||||||
; checking collision!
|
|
||||||
lda ydraw+1
|
|
||||||
bne StopHitChecking
|
|
||||||
|
|
||||||
jsr CheckCollisionWithTank
|
|
||||||
lda HitFlag
|
|
||||||
bne StopHitChecking
|
|
||||||
|
|
||||||
mwa xdraw temp
|
|
||||||
adw temp #mountaintable
|
|
||||||
|
|
||||||
ldy #0
|
|
||||||
lda ydraw
|
|
||||||
cmp (temp),y
|
|
||||||
bcc StopHitChecking
|
|
||||||
|
|
||||||
mva #1 HitFlag
|
|
||||||
mwa xdraw XHit
|
|
||||||
mwa ydraw YHit
|
|
||||||
|
|
||||||
|
|
||||||
StopHitChecking
|
|
||||||
rts
|
|
||||||
.endp
|
|
||||||
|
|
||||||
;--------------------------------------------------
|
;--------------------------------------------------
|
||||||
circle .proc ;fxxxing good circle drawing :)
|
.proc circle ;fxxxing good circle drawing :)
|
||||||
;--------------------------------------------------
|
;--------------------------------------------------
|
||||||
;Turbo Basic source
|
;Turbo Basic source
|
||||||
; R=30
|
; R=30
|
||||||
@@ -298,7 +304,7 @@ circle .proc ;fxxxing good circle drawing :)
|
|||||||
; splot8
|
; splot8
|
||||||
|
|
||||||
mwa xdraw xcircle
|
mwa xdraw xcircle
|
||||||
mva ydraw ycircle
|
mwa ydraw ycircle
|
||||||
|
|
||||||
mwa #0 xc
|
mwa #0 xc
|
||||||
mva radius yc
|
mva radius yc
|
||||||
@@ -354,7 +360,7 @@ endcircleloop
|
|||||||
jsr splot8
|
jsr splot8
|
||||||
|
|
||||||
mwa xcircle xdraw
|
mwa xcircle xdraw
|
||||||
mva ycircle ydraw
|
mwa ycircle ydraw
|
||||||
rts
|
rts
|
||||||
.endp
|
.endp
|
||||||
;----
|
;----
|
||||||
@@ -381,12 +387,19 @@ splot8 .proc
|
|||||||
adc YC
|
adc YC
|
||||||
sta ydraw
|
sta ydraw
|
||||||
sta tempcir
|
sta tempcir
|
||||||
|
lda ycircle+1
|
||||||
|
adc #$00
|
||||||
|
sta ydraw+1
|
||||||
|
sta tempcir+1
|
||||||
jsr plot
|
jsr plot
|
||||||
|
|
||||||
sec
|
sec
|
||||||
lda ycircle
|
lda ycircle
|
||||||
sbc YC
|
sbc YC
|
||||||
sta ydraw
|
sta ydraw
|
||||||
|
lda ycircle+1
|
||||||
|
sbc #$00
|
||||||
|
sta ydraw+1
|
||||||
jsr plot
|
jsr plot
|
||||||
|
|
||||||
sec
|
sec
|
||||||
@@ -400,6 +413,8 @@ splot8 .proc
|
|||||||
|
|
||||||
lda tempcir
|
lda tempcir
|
||||||
sta ydraw
|
sta ydraw
|
||||||
|
lda tempcir+1
|
||||||
|
sta ydraw+1
|
||||||
jsr plot
|
jsr plot
|
||||||
;---
|
;---
|
||||||
clc
|
clc
|
||||||
@@ -414,12 +429,19 @@ splot8 .proc
|
|||||||
adc xC
|
adc xC
|
||||||
sta ydraw
|
sta ydraw
|
||||||
sta tempcir
|
sta tempcir
|
||||||
|
lda ycircle+1
|
||||||
|
adc #$00
|
||||||
|
sta ydraw+1
|
||||||
|
sta tempcir+1
|
||||||
jsr plot
|
jsr plot
|
||||||
|
|
||||||
sec
|
sec
|
||||||
lda ycircle
|
lda ycircle
|
||||||
sbc xC
|
sbc xC
|
||||||
sta ydraw
|
sta ydraw
|
||||||
|
lda ycircle+1
|
||||||
|
sbc #$00
|
||||||
|
sta ydraw+1
|
||||||
jsr plot
|
jsr plot
|
||||||
|
|
||||||
sec
|
sec
|
||||||
@@ -433,6 +455,8 @@ splot8 .proc
|
|||||||
|
|
||||||
lda tempcir
|
lda tempcir
|
||||||
sta ydraw
|
sta ydraw
|
||||||
|
lda tempcir+1
|
||||||
|
sta ydraw+1
|
||||||
jsr plot
|
jsr plot
|
||||||
|
|
||||||
RTS
|
RTS
|
||||||
@@ -441,8 +465,9 @@ splot8 .proc
|
|||||||
;--------------------------------------------------
|
;--------------------------------------------------
|
||||||
clearscreen .proc
|
clearscreen .proc
|
||||||
;--------------------------------------------------
|
;--------------------------------------------------
|
||||||
lda #0
|
|
||||||
tax
|
lda #$ff
|
||||||
|
ldx #0
|
||||||
@
|
@
|
||||||
:31 sta display+($100*#),x
|
:31 sta display+($100*#),x
|
||||||
sta display+$1e50,x ; this is so no space outside of the screen is cleared
|
sta display+$1e50,x ; this is so no space outside of the screen is cleared
|
||||||
@@ -559,11 +584,10 @@ UnequalTanks
|
|||||||
bpl CheckNextTank
|
bpl CheckNextTank
|
||||||
rts
|
rts
|
||||||
.endp
|
.endp
|
||||||
;-------------------------------------------------
|
|
||||||
drawtanks
|
|
||||||
;-------------------------------------------------
|
|
||||||
|
|
||||||
|
|
||||||
|
;-------------------------------------------------
|
||||||
|
.proc drawtanks
|
||||||
|
;-------------------------------------------------
|
||||||
lda tanknr
|
lda tanknr
|
||||||
pha
|
pha
|
||||||
ldx #$00
|
ldx #$00
|
||||||
@@ -580,9 +604,10 @@ DrawNextTank
|
|||||||
sta tankNr
|
sta tankNr
|
||||||
|
|
||||||
rts
|
rts
|
||||||
|
.endp
|
||||||
;---------
|
;---------
|
||||||
drawtanknr
|
.proc DrawTankNr
|
||||||
ldx tanknr
|
ldx tankNr
|
||||||
; let's check the energy
|
; let's check the energy
|
||||||
lda eXistenZ,x
|
lda eXistenZ,x
|
||||||
bne SkipRemovigPM ; if energy=0 then no tank
|
bne SkipRemovigPM ; if energy=0 then no tank
|
||||||
@@ -629,7 +654,7 @@ DrawTankNrX
|
|||||||
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 #$24 ; P/M to graphics offser
|
adc #$24 ; 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 NoMissile
|
||||||
clc
|
clc
|
||||||
@@ -669,25 +694,50 @@ ZeroesToGo
|
|||||||
NoPlayerMissile
|
NoPlayerMissile
|
||||||
DoNotDrawTankNr
|
DoNotDrawTankNr
|
||||||
rts
|
rts
|
||||||
|
.endp
|
||||||
|
|
||||||
|
; -------------------------------------
|
||||||
|
.proc FlashTank
|
||||||
|
; -------------------------------------
|
||||||
|
; number of blinking tank in TankNr
|
||||||
|
mva #18 fs ; temp, how many times flash the tank
|
||||||
|
tankflash_loop
|
||||||
|
lda CONSOL ; turbo mode
|
||||||
|
cmp #6 ; START
|
||||||
|
sne:mva #1 fs ; finish it
|
||||||
|
mva #1 Erase
|
||||||
|
ldx TankNr
|
||||||
|
jsr DrawTankNr.SkipRemovigPM ; it's necessary becouse DrawTankNr skips tanks with no energy !
|
||||||
|
PAUSE 2
|
||||||
|
mva #0 Erase
|
||||||
|
ldx TankNr
|
||||||
|
jsr DrawTankNr.SkipRemovigPM
|
||||||
|
PAUSE 2
|
||||||
|
dec fs
|
||||||
|
jne tankflash_loop
|
||||||
|
rts
|
||||||
|
.endp
|
||||||
|
|
||||||
;--------------------------------------------------
|
;--------------------------------------------------
|
||||||
drawmountains .proc
|
.proc drawmountains
|
||||||
;--------------------------------------------------
|
;--------------------------------------------------
|
||||||
|
|
||||||
mwa #0 xdraw
|
mwa #0 xdraw
|
||||||
mwa #mountaintable modify
|
mwa #mountaintable modify
|
||||||
|
mva #1 color
|
||||||
|
|
||||||
drawmountainsloop
|
drawmountainsloop
|
||||||
ldy #0
|
ldy #0
|
||||||
lda (modify),y
|
lda (modify),y
|
||||||
|
cmp #screenheight
|
||||||
|
beq NoMountain
|
||||||
sta ydraw
|
sta ydraw
|
||||||
|
sty ydraw+1
|
||||||
jsr DrawLine
|
jsr DrawLine
|
||||||
|
NoMountain
|
||||||
inw modify
|
inw modify
|
||||||
inw xdraw
|
inw xdraw
|
||||||
cpw xdraw #screenwidth
|
cpw xdraw #screenwidth
|
||||||
bne drawmountainsloop
|
bne drawmountainsloop
|
||||||
|
|
||||||
rts
|
rts
|
||||||
;--------------------------------------------------
|
;--------------------------------------------------
|
||||||
drawmountainspixel
|
drawmountainspixel
|
||||||
@@ -700,6 +750,7 @@ drawmountainspixelloop
|
|||||||
ldy #0
|
ldy #0
|
||||||
lda (modify),y
|
lda (modify),y
|
||||||
sta ydraw
|
sta ydraw
|
||||||
|
sty ydraw+1
|
||||||
jsr plot
|
jsr plot
|
||||||
inw modify
|
inw modify
|
||||||
inw xdraw
|
inw xdraw
|
||||||
@@ -709,7 +760,7 @@ drawmountainspixelloop
|
|||||||
rts
|
rts
|
||||||
.endp
|
.endp
|
||||||
;--------------------------------------------------
|
;--------------------------------------------------
|
||||||
SoilDown2 .proc
|
.proc SoilDown2
|
||||||
;--------------------------------------------------
|
;--------------------------------------------------
|
||||||
|
|
||||||
; how it is supposed to work:
|
; how it is supposed to work:
|
||||||
@@ -746,7 +797,7 @@ SoilDown2 .proc
|
|||||||
adw RangeLeft #mountaintable2 tempor2
|
adw RangeLeft #mountaintable2 tempor2
|
||||||
|
|
||||||
NextColumn1
|
NextColumn1
|
||||||
mva #0 ydraw
|
mwa #0 ydraw
|
||||||
NextPoint1
|
NextPoint1
|
||||||
jsr point
|
jsr point
|
||||||
beq StillNothing
|
beq StillNothing
|
||||||
@@ -837,8 +888,9 @@ ColumnIsReady
|
|||||||
mva #sfx_silencer sfx_effect
|
mva #sfx_silencer sfx_effect
|
||||||
rts
|
rts
|
||||||
.endp
|
.endp
|
||||||
|
|
||||||
;--------------------------------------------------
|
;--------------------------------------------------
|
||||||
calculatemountains .proc
|
.proc calculatemountains
|
||||||
;--------------------------------------------------
|
;--------------------------------------------------
|
||||||
mwa #0 xdraw
|
mwa #0 xdraw
|
||||||
|
|
||||||
@@ -940,15 +992,15 @@ EndDrawing
|
|||||||
.endp
|
.endp
|
||||||
; ****************************************************
|
; ****************************************************
|
||||||
;--------------------------------------------------
|
;--------------------------------------------------
|
||||||
calculatemountains0 .proc
|
.proc calculatemountains0
|
||||||
; Only for testing - makes ground flat (one pixel)
|
; Only for testing - makes ground flat (0 pixels)
|
||||||
; and places tanks on it
|
; and places tanks on it
|
||||||
; remember to remove in final compilation :)
|
; remember to remove in final compilation :)
|
||||||
;--------------------------------------------------
|
;--------------------------------------------------
|
||||||
mwa #0 xdraw
|
mwa #0 xdraw
|
||||||
nextPointDrawing
|
nextPointDrawing
|
||||||
adw xdraw #mountaintable modify
|
adw xdraw #mountaintable modify
|
||||||
lda #screenheight-1
|
lda #screenheight
|
||||||
ldy #0
|
ldy #0
|
||||||
sta (modify),y
|
sta (modify),y
|
||||||
inw xdraw
|
inw xdraw
|
||||||
@@ -957,15 +1009,16 @@ nextPointDrawing
|
|||||||
ldx NumberOfPlayers
|
ldx NumberOfPlayers
|
||||||
dex
|
dex
|
||||||
SetYofNextTank
|
SetYofNextTank
|
||||||
lda #screenheight-2
|
lda #screenheight-1
|
||||||
sta ytankstable,x
|
sta ytankstable,x
|
||||||
dex
|
dex
|
||||||
bpl SetYofNextTank
|
bpl SetYofNextTank
|
||||||
rts
|
rts
|
||||||
.endp
|
.endp
|
||||||
; ****************************************************
|
; ****************************************************
|
||||||
|
|
||||||
; -----------------------------------------
|
; -----------------------------------------
|
||||||
unPlot .proc
|
.proc unPlot
|
||||||
; plots a point and saves the plotted byte, reverts the previous plot.
|
; plots a point and saves the plotted byte, reverts the previous plot.
|
||||||
; -----------------------------------------
|
; -----------------------------------------
|
||||||
ldx #0 ; only one pixel
|
ldx #0 ; only one pixel
|
||||||
@@ -1021,7 +1074,7 @@ MakeUnPlot
|
|||||||
|
|
||||||
|
|
||||||
lda color
|
lda color
|
||||||
beq ClearUnPlot
|
bne ClearUnPlot
|
||||||
|
|
||||||
;plotting here
|
;plotting here
|
||||||
lda (xbyte),y
|
lda (xbyte),y
|
||||||
@@ -1033,7 +1086,7 @@ ClearUnPlot
|
|||||||
lda (xbyte),y
|
lda (xbyte),y
|
||||||
sta OldOraTemp
|
sta OldOraTemp
|
||||||
and bittable2,x
|
and bittable2,x
|
||||||
; sta (xbyte),y
|
sta (xbyte),y
|
||||||
ContinueUnPlot
|
ContinueUnPlot
|
||||||
ldx WhichUnPlot
|
ldx WhichUnPlot
|
||||||
lda OldOraTemp
|
lda OldOraTemp
|
||||||
@@ -1068,8 +1121,9 @@ SkipThisPlot
|
|||||||
EndOfUnPlot
|
EndOfUnPlot
|
||||||
rts
|
rts
|
||||||
.endp
|
.endp
|
||||||
|
|
||||||
; -----------------------------------------
|
; -----------------------------------------
|
||||||
plot .proc ;plot (xdraw, ydraw, color)
|
.proc plot ;plot (xdraw, ydraw, color)
|
||||||
; color == 1 --> put pixel
|
; color == 1 --> put pixel
|
||||||
; color == 0 --> erase pixel
|
; color == 0 --> erase pixel
|
||||||
; this is one of the most important routines in the whole
|
; this is one of the most important routines in the whole
|
||||||
@@ -1102,11 +1156,7 @@ MakePlot
|
|||||||
lsr
|
lsr
|
||||||
lsr
|
lsr
|
||||||
tay ;save
|
tay ;save
|
||||||
;---
|
;---
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ldx ydraw
|
ldx ydraw
|
||||||
lda linetableL,x
|
lda linetableL,x
|
||||||
sta xbyte
|
sta xbyte
|
||||||
@@ -1115,7 +1165,7 @@ MakePlot
|
|||||||
|
|
||||||
ldx ybit
|
ldx ybit
|
||||||
lda color
|
lda color
|
||||||
beq ClearPlot
|
bne ClearPlot
|
||||||
|
|
||||||
lda (xbyte),y
|
lda (xbyte),y
|
||||||
ora bittable,x
|
ora bittable,x
|
||||||
@@ -1128,17 +1178,16 @@ ClearPlot
|
|||||||
sta (xbyte),y
|
sta (xbyte),y
|
||||||
rts
|
rts
|
||||||
.endp
|
.endp
|
||||||
|
|
||||||
; -----------------------------------------
|
; -----------------------------------------
|
||||||
point .proc
|
.proc point
|
||||||
; -----------------------------------------
|
; -----------------------------------------
|
||||||
; checks state of the pixel (coordinates in xdraw and ydraw)
|
; checks state of the pixel (coordinates in xdraw and ydraw)
|
||||||
; result is in A (zero or appropriate bit is set)
|
; 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
|
mwa xdraw xbyte
|
||||||
|
|
||||||
|
|
||||||
lda xbyte
|
lda xbyte
|
||||||
and #$7
|
and #$7
|
||||||
sta ybit
|
sta ybit
|
||||||
@@ -1150,9 +1199,7 @@ point .proc
|
|||||||
lsr
|
lsr
|
||||||
lsr
|
lsr
|
||||||
tay ;save
|
tay ;save
|
||||||
|
;---
|
||||||
;---
|
|
||||||
|
|
||||||
ldx ydraw
|
ldx ydraw
|
||||||
lda linetableL,x
|
lda linetableL,x
|
||||||
sta xbyte
|
sta xbyte
|
||||||
@@ -1163,37 +1210,36 @@ point .proc
|
|||||||
|
|
||||||
lda (xbyte),y
|
lda (xbyte),y
|
||||||
and bittable,x
|
and bittable,x
|
||||||
|
eor bittable,x
|
||||||
rts
|
rts
|
||||||
.endp
|
.endp
|
||||||
|
|
||||||
;--------------------------------------------------
|
;--------------------------------------------------
|
||||||
DrawLine .proc
|
.proc DrawLine
|
||||||
;--------------------------------------------------
|
;--------------------------------------------------
|
||||||
mva #0 ydraw+1
|
mva #0 ydraw+1
|
||||||
lda #screenheight
|
lda #screenheight
|
||||||
sec
|
sec
|
||||||
sbc ydraw
|
sbc ydraw
|
||||||
sta tempbyte01
|
sta tempbyte01
|
||||||
jsr plot
|
jsr plot.MakePlot
|
||||||
;rts
|
;rts
|
||||||
jmp IntoDraw ; jumps inside Draw routine
|
jmp IntoDraw ; jumps inside Draw routine
|
||||||
; because one pixel is already plotted
|
; because one pixel is already plotted
|
||||||
|
|
||||||
|
@
|
||||||
loopdraw
|
lda (xbyte),y
|
||||||
|
and bittable2,x
|
||||||
lda (xbyte),y
|
sta (xbyte),y
|
||||||
ora bittable,x
|
IntoDraw
|
||||||
sta (xbyte),y
|
adw xbyte #screenBytes
|
||||||
IntoDraw adw xbyte #screenBytes
|
dec tempbyte01
|
||||||
|
bne @-
|
||||||
dec tempbyte01
|
|
||||||
bne loopdraw
|
|
||||||
rts
|
rts
|
||||||
.endp
|
.endp
|
||||||
;
|
|
||||||
; ------------------------------------------
|
; ------------------------------------------
|
||||||
TypeChar .proc
|
.proc TypeChar
|
||||||
; puts char on the graphics screen
|
; puts char on the graphics screen
|
||||||
; in: CharCode
|
; in: CharCode
|
||||||
; in: left LOWER corner of the char coordinates (xdraw, ydraw)
|
; in: left LOWER corner of the char coordinates (xdraw, ydraw)
|
||||||
@@ -1214,8 +1260,9 @@ TypeChar .proc
|
|||||||
ldy #7
|
ldy #7
|
||||||
CopyChar
|
CopyChar
|
||||||
lda (fontind),y
|
lda (fontind),y
|
||||||
|
eor #$ff
|
||||||
sta char1,y
|
sta char1,y
|
||||||
lda #$00
|
lda #$ff
|
||||||
sta char2,y
|
sta char2,y
|
||||||
dey
|
dey
|
||||||
bpl CopyChar
|
bpl CopyChar
|
||||||
@@ -1224,8 +1271,9 @@ CopyChar
|
|||||||
ldy #7
|
ldy #7
|
||||||
CopyMask
|
CopyMask
|
||||||
lda (fontind),y
|
lda (fontind),y
|
||||||
|
eor #$ff
|
||||||
sta mask1,y
|
sta mask1,y
|
||||||
lda #$ff
|
lda #$00
|
||||||
sta mask2,y
|
sta mask2,y
|
||||||
dey
|
dey
|
||||||
bpl CopyMask
|
bpl CopyMask
|
||||||
@@ -1240,7 +1288,6 @@ CopyMask
|
|||||||
lsrw xbyte ; div 8
|
lsrw xbyte ; div 8
|
||||||
rorw xbyte
|
rorw xbyte
|
||||||
rorw xbyte
|
rorw xbyte
|
||||||
|
|
||||||
;---
|
;---
|
||||||
ldy xbyte
|
ldy xbyte
|
||||||
|
|
||||||
@@ -1257,53 +1304,22 @@ CopyMask
|
|||||||
ldx ybit
|
ldx ybit
|
||||||
beq MaskOK00
|
beq MaskOK00
|
||||||
MakeMask00
|
MakeMask00
|
||||||
sec
|
.rept 8
|
||||||
ror mask1
|
lsr mask1+#
|
||||||
ror mask2
|
ror mask2+#
|
||||||
sec
|
.endr
|
||||||
ror mask1+1
|
sec
|
||||||
ror mask2+1
|
.rept 8
|
||||||
sec
|
ror char1+# ; in second (and next) lines we have C=1 - one SEC enough
|
||||||
ror mask1+2
|
ror char2+#
|
||||||
ror mask2+2
|
.endr
|
||||||
sec
|
|
||||||
ror mask1+3
|
|
||||||
ror mask2+3
|
|
||||||
sec
|
|
||||||
ror mask1+4
|
|
||||||
ror mask2+4
|
|
||||||
sec
|
|
||||||
ror mask1+5
|
|
||||||
ror mask2+5
|
|
||||||
sec
|
|
||||||
ror mask1+6
|
|
||||||
ror mask2+6
|
|
||||||
sec
|
|
||||||
ror mask1+7
|
|
||||||
ror mask2+7
|
|
||||||
lsr char1
|
|
||||||
ror char2
|
|
||||||
ror char1+1
|
|
||||||
ror char2+1
|
|
||||||
ror char1+2
|
|
||||||
ror char2+2
|
|
||||||
ror char1+3
|
|
||||||
ror char2+3
|
|
||||||
ror char1+4
|
|
||||||
ror char2+4
|
|
||||||
ror char1+5
|
|
||||||
ror char2+5
|
|
||||||
ror char1+6
|
|
||||||
ror char2+6
|
|
||||||
ror char1+7
|
|
||||||
ror char2+7
|
|
||||||
dex
|
dex
|
||||||
bne MakeMask00
|
bne MakeMask00
|
||||||
MaskOK00
|
MaskOK00
|
||||||
; here x=0
|
; here x=0
|
||||||
lda Erase
|
lda Erase
|
||||||
beq CharLoopi ; it works, because x=0
|
beq CharLoopi ; it works, because x=0
|
||||||
lda #0
|
lda #$ff
|
||||||
ldx #7
|
ldx #7
|
||||||
EmptyChar
|
EmptyChar
|
||||||
sta char1,x
|
sta char1,x
|
||||||
@@ -1313,145 +1329,139 @@ EmptyChar
|
|||||||
ldx #0
|
ldx #0
|
||||||
CharLoopi
|
CharLoopi
|
||||||
lda (xbyte),y
|
lda (xbyte),y
|
||||||
and mask1,x
|
ora mask1,x
|
||||||
ora char1,x
|
and char1,x
|
||||||
sta (xbyte),y
|
sta (xbyte),y
|
||||||
iny
|
iny
|
||||||
lda (xbyte),y
|
lda (xbyte),y
|
||||||
and mask2,x
|
ora mask2,x
|
||||||
ora char2,x
|
and char2,x
|
||||||
sta (xbyte),y
|
sta (xbyte),y
|
||||||
dey
|
dey
|
||||||
adw xbyte #screenBytes
|
adw xbyte #screenBytes
|
||||||
inx
|
inx
|
||||||
cpx #8
|
cpx #8
|
||||||
bne CharLoopi
|
bne CharLoopi
|
||||||
|
EndPutChar
|
||||||
rts
|
rts
|
||||||
.endp
|
.endp
|
||||||
|
|
||||||
; ------------------------------------------
|
; ------------------------------------------
|
||||||
PutChar4x4 .proc ;puts 4x4 pixels char on the graphics screen
|
.proc PutChar4x4
|
||||||
; in: xdraw, ydraw (upper left corner of the char)
|
; puts 4x4 pixels char on the graphics screen
|
||||||
|
; in: xdraw, ydraw (LOWER left corner of the char)
|
||||||
; in: CharCode4x4 (.sbyte)
|
; in: CharCode4x4 (.sbyte)
|
||||||
|
; in: plot4x4color (0/1)
|
||||||
|
; all pixels are being drawn
|
||||||
|
; (empty and not empty)
|
||||||
;--------------------------------------------------
|
;--------------------------------------------------
|
||||||
lda plot4x4color
|
; cpw ydraw #(screenheight-4)
|
||||||
sta color
|
; jcs TypeChar.EndPutChar ;nearest RTS
|
||||||
|
; cpw xdraw #(screenwidth-4)
|
||||||
|
; jcs TypeChar.EndPutChar ;nearest RTS
|
||||||
; calculating address of the first byte
|
; checks ommited.
|
||||||
mva #4 LoopCounter4x4
|
lda plot4x4color
|
||||||
|
beq FontColor0
|
||||||
|
lda #$ff ; better option to check (plot4x4color = $00 or $ff)
|
||||||
|
sta plot4x4color
|
||||||
|
FontColor0
|
||||||
|
; char to the table
|
||||||
lda CharCode4x4
|
lda CharCode4x4
|
||||||
and #1
|
and #1
|
||||||
|
beq Upper4bits
|
||||||
|
lda #$ff ; better option to check (nibbler4x4 = $00 or $ff)
|
||||||
|
Upper4bits
|
||||||
sta nibbler4x4
|
sta nibbler4x4
|
||||||
lda CharCode4x4
|
lda CharCode4x4
|
||||||
ror
|
lsr
|
||||||
; in carry there is which nibble of the byte is to be taken
|
sta fontind
|
||||||
clc
|
lda #$00
|
||||||
adc #(3*32)
|
sta fontind+1
|
||||||
sta y4x4
|
|
||||||
nextline4x4
|
adw fontind #font4x4
|
||||||
mva #4 Xcounter4x4
|
|
||||||
ldy y4x4
|
|
||||||
lda font4x4,y ;there was a problem with OMC here, but it works now
|
|
||||||
|
|
||||||
ldx nibbler4x4
|
; and 4 bytes to the table
|
||||||
beq uppernibble
|
ldy #0
|
||||||
|
ldx #3
|
||||||
|
CopyChar
|
||||||
|
lda (fontind),y ; Y must be 0 !!!!
|
||||||
|
bit nibbler4x4
|
||||||
|
bpl GetUpper4bits
|
||||||
|
:4 rol
|
||||||
|
GetUpper4bits
|
||||||
|
ora #$0f
|
||||||
|
sta char1,x
|
||||||
|
lda #$ff
|
||||||
|
sta char2,x
|
||||||
|
; and 4 bytes as a mask
|
||||||
|
lda #$f0
|
||||||
|
sta mask1,x
|
||||||
|
lda #$00
|
||||||
|
sta mask2,x
|
||||||
|
adw fontind #32 ; next byte of 4x4 font
|
||||||
|
dex
|
||||||
|
bpl CopyChar
|
||||||
|
|
||||||
asl
|
; calculating coordinates from xdraw and ydraw
|
||||||
asl
|
mwa xdraw xbyte
|
||||||
asl
|
|
||||||
asl
|
|
||||||
uppernibble
|
|
||||||
rol
|
|
||||||
sta StoreA4x4
|
|
||||||
bcs EmptyPixel ; the font I drawn is in inverse ...
|
|
||||||
;lda plot4x4color ;these lines are not necessary
|
|
||||||
;sta color ;if a plots are one color only
|
|
||||||
jsr plot
|
|
||||||
;jmp Loop4x4Continued
|
|
||||||
EmptyPixel
|
|
||||||
;lda #1 ;reverse color (color==1-color)
|
|
||||||
;sec
|
|
||||||
;sbc plot4x4color
|
|
||||||
;sta color
|
|
||||||
;jsr plot
|
|
||||||
;this is turned off for speed
|
|
||||||
;anyway we assume the text is being drawn
|
|
||||||
;over an empty space
|
|
||||||
Loop4x4Continued
|
|
||||||
inw xdraw
|
|
||||||
lda StoreA4x4
|
|
||||||
dec Xcounter4x4
|
|
||||||
ldx Xcounter4x4
|
|
||||||
bne uppernibble
|
|
||||||
; here we have on screen one line of the char
|
|
||||||
inw ydraw
|
|
||||||
sbw xdraw #4
|
|
||||||
sbw y4x4 #32
|
|
||||||
dec:lda LoopCounter4x4
|
|
||||||
bne nextline4x4
|
|
||||||
|
|
||||||
rts
|
lda xbyte
|
||||||
.endp
|
and #$7
|
||||||
; ------------------------------------------
|
sta ybit
|
||||||
PutChar4x4FULL .proc;
|
|
||||||
;this routine works just like PutChar4x4,
|
|
||||||
;but this time all pixels are being drawn
|
|
||||||
;(empty and not empty)
|
|
||||||
;--------------------------------------------------
|
|
||||||
|
|
||||||
; calculating address of the first byte
|
lsrw xbyte ; div 8
|
||||||
mva #4 LoopCounter4x4
|
rorw xbyte
|
||||||
lda CharCode4x4
|
rorw xbyte
|
||||||
and #1
|
;---
|
||||||
sta nibbler4x4
|
ldy xbyte
|
||||||
lda CharCode4x4
|
lda ydraw ; y = y - 3 because left lower.
|
||||||
ror
|
|
||||||
; in carry there is which nibble of the byte is to be taken clc
|
|
||||||
clc
|
|
||||||
adc #(3*32)
|
|
||||||
sta y4x4
|
|
||||||
nextline4x4FULL
|
|
||||||
mva #4 Xcounter4x4
|
|
||||||
ldy y4x4
|
|
||||||
lda font4x4,y
|
|
||||||
|
|
||||||
ldx nibbler4x4
|
|
||||||
beq uppernibbleFULL
|
|
||||||
|
|
||||||
asl
|
|
||||||
asl
|
|
||||||
asl
|
|
||||||
asl
|
|
||||||
uppernibbleFULL
|
|
||||||
rol
|
|
||||||
sta StoreA4x4
|
|
||||||
bcs EmptyPixelFULL
|
|
||||||
lda plot4x4color ;these lines are not necessary
|
|
||||||
sta color ;if a plots are one color only
|
|
||||||
jsr plot
|
|
||||||
jmp Loop4x4ContinuedFULL
|
|
||||||
EmptyPixelFULL
|
|
||||||
lda #1 ;reverse color (color==1-color)
|
|
||||||
sec
|
sec
|
||||||
sbc plot4x4color
|
sbc #3
|
||||||
sta color
|
tax
|
||||||
jsr plot
|
|
||||||
;this is turned on now
|
|
||||||
;of course it is slower
|
|
||||||
|
|
||||||
Loop4x4ContinuedFULL
|
|
||||||
inw xdraw
|
|
||||||
lda StoreA4x4
|
|
||||||
dec Xcounter4x4
|
|
||||||
ldx Xcounter4x4
|
|
||||||
bne uppernibbleFULL
|
|
||||||
; here we have on screen one line of the char
|
|
||||||
inw ydraw
|
|
||||||
sbw xdraw #4
|
|
||||||
sbw y4x4 #32 ; why? possibly because of width of the 4x4 font
|
|
||||||
dec:lda LoopCounter4x4
|
|
||||||
bne nextline4x4FULL
|
|
||||||
|
|
||||||
|
lda linetableL,x
|
||||||
|
sta xbyte
|
||||||
|
lda linetableH,x
|
||||||
|
sta xbyte+1
|
||||||
|
; mask preparation and character shifting
|
||||||
|
ldx ybit
|
||||||
|
beq MaskOK01
|
||||||
|
MakeMask01
|
||||||
|
.rept 4
|
||||||
|
lsr mask1+#
|
||||||
|
ror mask2+#
|
||||||
|
.endr
|
||||||
|
sec
|
||||||
|
.rept 4
|
||||||
|
ror char1+# ; in second (and next) lines we have C=1 - one SEC enough
|
||||||
|
ror char2+#
|
||||||
|
.endr
|
||||||
|
dex
|
||||||
|
bne MakeMask01
|
||||||
|
MaskOK01
|
||||||
|
ldx #0
|
||||||
|
CharLoopi4x4
|
||||||
|
lda (xbyte),y
|
||||||
|
ora mask1,x
|
||||||
|
bit plot4x4color
|
||||||
|
bpl PutInColor0_1 ; only mask - no char
|
||||||
|
and char1,x
|
||||||
|
PutInColor0_1
|
||||||
|
sta (xbyte),y
|
||||||
|
iny
|
||||||
|
lda (xbyte),y
|
||||||
|
ora mask2,x
|
||||||
|
bit plot4x4color
|
||||||
|
bpl PutInColor0_2 ; only mask - no char
|
||||||
|
and char2,x
|
||||||
|
PutInColor0_2
|
||||||
|
sta (xbyte),y
|
||||||
|
dey
|
||||||
|
adw xbyte #screenBytes
|
||||||
|
inx
|
||||||
|
cpx #4
|
||||||
|
bne CharLoopi4x4
|
||||||
|
EndPut4x4
|
||||||
rts
|
rts
|
||||||
.endp
|
.endp
|
||||||
|
|
||||||
|
|||||||
@@ -147,6 +147,7 @@ NMIST = $D40F ; rejestr statusu przerwa� NMI
|
|||||||
;-------------------------------------
|
;-------------------------------------
|
||||||
;additional system variables
|
;additional system variables
|
||||||
;-------------------------------------
|
;-------------------------------------
|
||||||
|
ATRACT = $004D
|
||||||
COLPM0S = $02C0 ;- - shadow register COLPM0
|
COLPM0S = $02C0 ;- - shadow register COLPM0
|
||||||
COLPM1S = $02C1 ;- - shadow register COLPM1
|
COLPM1S = $02C1 ;- - shadow register COLPM1
|
||||||
COLPM2S = $02C2 ;- - shadow register COLPM2
|
COLPM2S = $02C2 ;- - shadow register COLPM2
|
||||||
|
|||||||
@@ -76,6 +76,9 @@
|
|||||||
.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
|
||||||
|
cmp #6 ; START KEY
|
||||||
|
beq ?nowait
|
||||||
LDA VCOUNT
|
LDA VCOUNT
|
||||||
ldy vcount
|
ldy vcount
|
||||||
?WA cpy VCOUNT
|
?WA cpy VCOUNT
|
||||||
@@ -83,6 +86,7 @@
|
|||||||
?wframe
|
?wframe
|
||||||
cmp vcount
|
cmp vcount
|
||||||
bne ?wframe
|
bne ?wframe
|
||||||
|
?nowait
|
||||||
.ENDM
|
.ENDM
|
||||||
;-------------------------------------
|
;-------------------------------------
|
||||||
.macro negw
|
.macro negw
|
||||||
|
|||||||
+268
-220
@@ -3,7 +3,7 @@
|
|||||||
;---------------------------------------------------
|
;---------------------------------------------------
|
||||||
;by Tomasz 'pecus' Pecko and Pawel 'pirx' Kalinowski
|
;by Tomasz 'pecus' Pecko and Pawel 'pirx' Kalinowski
|
||||||
;Warsaw 2000,2001,2002,2003,2009,2012,2013
|
;Warsaw 2000,2001,2002,2003,2009,2012,2013
|
||||||
;Miami 2022
|
;Miami&Warsaw 2022
|
||||||
;you can contact us at pecus@poczta.fm or pirx@5oft.pl
|
;you can contact us at pecus@poczta.fm or pirx@5oft.pl
|
||||||
;home page of this project is https://github.com/pkali/scorch_src
|
;home page of this project is https://github.com/pkali/scorch_src
|
||||||
|
|
||||||
@@ -36,7 +36,7 @@
|
|||||||
;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"139" ; number of this build (3 bytes)
|
dta d"143" ; number of this build (3 bytes)
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
icl 'definitions.asm'
|
icl 'definitions.asm'
|
||||||
@@ -98,6 +98,7 @@
|
|||||||
icl 'lib/atari.hea'
|
icl 'lib/atari.hea'
|
||||||
icl 'lib/macro.hea'
|
icl 'lib/macro.hea'
|
||||||
|
|
||||||
|
;splash screen and musix
|
||||||
icl 'artwork/HIMARS14.asm'
|
icl 'artwork/HIMARS14.asm'
|
||||||
;Game loading address
|
;Game loading address
|
||||||
ORG $3000
|
ORG $3000
|
||||||
@@ -116,54 +117,39 @@ START
|
|||||||
|
|
||||||
; Startup sequence
|
; Startup sequence
|
||||||
jsr Initialize
|
jsr Initialize
|
||||||
VMAIN VBLinterrupt,6 ; jsr SetVBL
|
|
||||||
|
|
||||||
mwa #OptionsDL dlptrs
|
|
||||||
lda dmactls
|
|
||||||
and #$fc
|
|
||||||
ora #$02 ; normal screen width
|
|
||||||
sta dmactls
|
|
||||||
|
|
||||||
jsr Options ;startup screen
|
jsr Options ;startup screen
|
||||||
|
lda escFlag
|
||||||
|
bne START
|
||||||
|
|
||||||
;entering names of players
|
jsr EnterPlayerNames
|
||||||
mwa #NameDL dlptrs
|
lda escFlag
|
||||||
lda dmactls
|
bne START
|
||||||
and #$fc
|
|
||||||
ora #$01 ; narrow screen (32 chars)
|
|
||||||
sta dmactls
|
|
||||||
|
|
||||||
mva #0 TankNr
|
|
||||||
|
|
||||||
@ jsr EnterPlayerName
|
|
||||||
inc TankNr
|
|
||||||
lda TankNr
|
|
||||||
cmp NumberOfPlayers
|
|
||||||
bne @-
|
|
||||||
|
|
||||||
mwa #dl dlptrs
|
|
||||||
lda dmactls
|
|
||||||
and #$fc
|
|
||||||
ora #$02 ; normal screen width
|
|
||||||
sta dmactls
|
|
||||||
|
|
||||||
jsr RandomizeSequence
|
jsr RandomizeSequence
|
||||||
; for the round #1 shooting sequence is random
|
; for the round #1 shooting sequence is random
|
||||||
|
|
||||||
MainGameLoop
|
MainGameLoop
|
||||||
VDLI DLIinterrupt ; jsr SetDLI
|
VDLI DLIinterruptText ; jsr SetDLI for text (purchase) screen
|
||||||
|
|
||||||
jsr CallPurchaseForEveryTank
|
jsr CallPurchaseForEveryTank
|
||||||
|
|
||||||
mwa #dl dlptrs
|
; issue #72 (glitches when switches)
|
||||||
|
mva #0 dmactl
|
||||||
lda dmactls
|
lda dmactls
|
||||||
and #$fc
|
and #$fc
|
||||||
ora #$02 ; 2=normal, 3 = wide screen width
|
;ora #$02 ; 2=normal, 3 = wide screen width, 0 = no screen
|
||||||
sta dmactls
|
sta dmactls
|
||||||
|
|
||||||
jsr GetRandomWind
|
jsr GetRandomWind
|
||||||
|
|
||||||
jsr Round
|
jsr RoundInit
|
||||||
|
|
||||||
|
jsr MainRoundLoop
|
||||||
|
lda escFlag
|
||||||
|
bne START
|
||||||
|
|
||||||
|
mva #0 TankNr ;
|
||||||
|
|
||||||
jsr SortSequence
|
jsr SortSequence
|
||||||
|
|
||||||
@@ -180,15 +166,7 @@ MainGameLoop
|
|||||||
; Results are number of other deaths
|
; Results are number of other deaths
|
||||||
; before the player dies itself
|
; before the player dies itself
|
||||||
|
|
||||||
; add gains and substract losses
|
|
||||||
; gain is what player gets for lost energy of opponents
|
|
||||||
; energy lost by opponents is added during Round and
|
|
||||||
; little below in source, multiplied by 2 to get "dollars".
|
|
||||||
; By analogy, loss is energy that given player losses during
|
|
||||||
; each Round.
|
|
||||||
; Important! If player has 10 energy and gets a central hit
|
|
||||||
; from nuke that would take 90 energy points, his loss
|
|
||||||
; is 90, not 10
|
|
||||||
jsr DisplayResults
|
jsr DisplayResults
|
||||||
|
|
||||||
;check demo mode
|
;check demo mode
|
||||||
@@ -209,6 +187,16 @@ noKey
|
|||||||
ldx NumberOfPlayers
|
ldx NumberOfPlayers
|
||||||
dex
|
dex
|
||||||
CalculateGains
|
CalculateGains
|
||||||
|
; add gains and substract losses
|
||||||
|
; gain is what player gets for lost energy of opponents
|
||||||
|
; energy lost by opponents is added during Round and
|
||||||
|
; little below in source, multiplied by 2 to get "dollars".
|
||||||
|
; By analogy, loss is energy that given player losses during
|
||||||
|
; each Round.
|
||||||
|
; Important! If player has 10 energy and gets a central hit
|
||||||
|
; from nuke that would take 90 energy points, his loss
|
||||||
|
; is 90, not 10
|
||||||
|
|
||||||
; add gain * 2
|
; add gain * 2
|
||||||
asl gainL,x
|
asl gainL,x
|
||||||
rol gainH,x
|
rol gainH,x
|
||||||
@@ -249,13 +237,14 @@ skipzeroing
|
|||||||
lda GameIsOver
|
lda GameIsOver
|
||||||
jne START
|
jne START
|
||||||
|
|
||||||
|
|
||||||
inc CurrentRoundNr
|
inc CurrentRoundNr
|
||||||
|
mva #0 dmactl ; issue #72
|
||||||
|
mva #sfx_silencer sfx_effect
|
||||||
jmp MainGameLoop
|
jmp MainGameLoop
|
||||||
|
|
||||||
|
|
||||||
;--------------------------------------------------
|
;--------------------------------------------------
|
||||||
Round .proc ;
|
.proc RoundInit
|
||||||
;--------------------------------------------------
|
;--------------------------------------------------
|
||||||
; at the beginning of each Round we set energy
|
; at the beginning of each Round we set energy
|
||||||
; of all players to 99
|
; of all players to 99
|
||||||
@@ -264,71 +253,76 @@ Round .proc ;
|
|||||||
; the shooting angle is randomized
|
; the shooting angle is randomized
|
||||||
; of course gains an looses are zeroed
|
; of course gains an looses are zeroed
|
||||||
|
|
||||||
jsr StatusDisplay
|
|
||||||
lda #0
|
lda #0
|
||||||
tax
|
tax
|
||||||
@
|
@ sta singleRoundVars,x
|
||||||
sta previousAngle,x
|
inx
|
||||||
inx
|
cpx #(singleRoundVarsEnd-singleRoundVars)
|
||||||
cpx #(singleRoundVarsEnd-PreviousAngle)
|
|
||||||
bne @-
|
bne @-
|
||||||
|
|
||||||
ldx #5
|
ldx #(MaxPlayers-1)
|
||||||
SettingEnergies
|
SettingEnergies
|
||||||
lda #$00
|
lda #$00
|
||||||
sta gainL,x
|
sta gainL,x
|
||||||
sta gainH,x
|
sta gainH,x
|
||||||
sta looseL,x
|
sta looseL,x
|
||||||
sta looseH,x
|
sta looseH,x
|
||||||
lda #99
|
lda #99
|
||||||
sta Energy,x
|
sta Energy,x
|
||||||
sta eXistenZ,x
|
sta eXistenZ,x
|
||||||
sta LASTeXistenZ,x
|
sta LASTeXistenZ,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 #232
|
lda #<1000
|
||||||
sta MaxEnergyTableL,x
|
sta MaxForceTableL,x
|
||||||
lda #3
|
lda #>1000
|
||||||
sta MaxEnergyTableH,x
|
sta MaxForceTableH,x
|
||||||
lda #94
|
lda #<350
|
||||||
sta EnergyTableL,x
|
sta ForceTableL,x
|
||||||
lda #1
|
lda #>350
|
||||||
sta EnergyTableH,x
|
sta ForceTableH,x
|
||||||
;lda #(255-45)
|
|
||||||
;it does not look good when all tanks have
|
;lda #(255-45)
|
||||||
;barrels pointing the same direction
|
;it does not look good when all tanks have
|
||||||
;so it would be nice to have more or less random
|
;barrels pointing the same direction
|
||||||
;angles
|
;so it would be nice to have more or less random
|
||||||
|
;angles
|
||||||
jsr RandomizeAngle
|
jsr RandomizeAngle
|
||||||
sta AngleTable,x
|
sta AngleTable,x
|
||||||
|
|
||||||
|
dex
|
||||||
dex
|
|
||||||
bpl SettingEnergies
|
bpl SettingEnergies
|
||||||
|
|
||||||
mva #0 CurrentResult
|
|
||||||
|
|
||||||
;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 placetanks ;let the tanks be evenly placed
|
jsr placetanks ;let the tanks be evenly placed
|
||||||
jsr calculatemountains ;let mountains be nice for the eye
|
jsr calculatemountains ;let mountains be easy for the eye
|
||||||
; jsr calculatemountains0 ;only fort tests - makes mountains flat and one pixel height
|
;jsr calculatemountains0 ;only for tests - makes mountains flat and 0 height
|
||||||
|
|
||||||
|
VDLI DLIinterruptGraph ; jsr SetDLI for graphics (game) screen
|
||||||
|
mwa #dl dlptrs ; issue #72 (glitches when switches)
|
||||||
|
lda dmactls
|
||||||
|
and #$fc
|
||||||
|
ora #$02 ; 2=normal, 3 = wide screen width
|
||||||
|
sta dmactls
|
||||||
|
|
||||||
|
|
||||||
jsr drawmountains ;draw them
|
jsr drawmountains ;draw them
|
||||||
jsr drawtanks ;finally draw tanks
|
jsr drawtanks ;finally draw tanks
|
||||||
|
|
||||||
.endp ; not really end of the procedure, but just for now. TODO: revisit.
|
|
||||||
|
|
||||||
;--------------------round screen is ready---------
|
|
||||||
|
|
||||||
mva #0 TankSequencePointer
|
mva #0 TankSequencePointer
|
||||||
|
;--------------------round screen is ready---------
|
||||||
|
rts
|
||||||
|
.endp
|
||||||
|
|
||||||
MainRoundLoop
|
;--------------------------------------------------
|
||||||
|
.proc MainRoundLoop
|
||||||
; here we must check if by a chance there is only one
|
; here we must check if by a chance there is only one
|
||||||
; tank with energy greater than 0 left
|
; tank with energy greater than 0 left
|
||||||
|
|
||||||
ldy #0 ; in Y - number of tanks with energy greater than zero
|
ldy #0 ; in Y - number of tanks with energy greater than zero
|
||||||
|
sty ATRACT ; reset atract mode
|
||||||
ldx NumberOfPlayers
|
ldx NumberOfPlayers
|
||||||
dex
|
dex
|
||||||
CheckingIfRoundIsFinished
|
CheckingIfRoundIsFinished
|
||||||
@@ -350,8 +344,7 @@ WhichTankWonLoop
|
|||||||
bne ThisOneWon
|
bne ThisOneWon
|
||||||
dex
|
dex
|
||||||
bpl WhichTankWonLoop
|
bpl WhichTankWonLoop
|
||||||
;error here!!!
|
;error was here!!!
|
||||||
;stop
|
|
||||||
; somehow I believed program will be never here
|
; somehow I believed program will be never here
|
||||||
; but it was a bad assumption
|
; but it was a bad assumption
|
||||||
; god knows when there is such a situation
|
; god knows when there is such a situation
|
||||||
@@ -361,7 +354,6 @@ WhichTankWonLoop
|
|||||||
; second tank explodes and kills the first one.
|
; second tank explodes and kills the first one.
|
||||||
; and code lands here...
|
; and code lands here...
|
||||||
; looks like no one won!
|
; looks like no one won!
|
||||||
|
|
||||||
rts
|
rts
|
||||||
|
|
||||||
ThisOneWon
|
ThisOneWon
|
||||||
@@ -383,7 +375,6 @@ DoNotFinishTheRound
|
|||||||
jsr DisplaySeppuku
|
jsr DisplaySeppuku
|
||||||
jmp Seppuku
|
jmp Seppuku
|
||||||
|
|
||||||
;ldx TankNr
|
|
||||||
@
|
@
|
||||||
ldx TankSequencePointer
|
ldx TankSequencePointer
|
||||||
lda TankSequence,x
|
lda TankSequence,x
|
||||||
@@ -395,18 +386,26 @@ DoNotFinishTheRound
|
|||||||
|
|
||||||
mva #1 color ;to display flying point
|
mva #1 color ;to display flying point
|
||||||
|
|
||||||
lda TankColoursTable,x
|
lda TankStatusColoursTable,x
|
||||||
sta colpf2s ; set color of status line
|
sta colpf2s ; set color of status line
|
||||||
|
|
||||||
lda SkillTable,x
|
lda SkillTable,x
|
||||||
beq ManualShooting
|
beq ManualShooting
|
||||||
|
|
||||||
RoboTanks
|
RoboTanks
|
||||||
; robotanks shoot here
|
; robotanks shoot here
|
||||||
jsr ArtificialIntelligence
|
jsr ArtificialIntelligence
|
||||||
jsr MoveBarrelToNewPosition
|
jsr MoveBarrelToNewPosition
|
||||||
jsr StatusDisplay ;all digital values like force, angle, wind, etc.
|
jsr DisplayStatus ;all digital values like force, angle, wind, etc.
|
||||||
jsr PutTankNameOnScreen
|
jsr PutTankNameOnScreen
|
||||||
|
lda kbcode
|
||||||
|
cmp #28 ; ESC
|
||||||
|
bne @+
|
||||||
|
jsr AreYouSure
|
||||||
|
lda escFlag
|
||||||
|
seq:rts
|
||||||
|
@
|
||||||
|
|
||||||
; let's move the tank's barrel so it points the right
|
; let's move the tank's barrel so it points the right
|
||||||
; direction
|
; direction
|
||||||
jmp AfterManualShooting
|
jmp AfterManualShooting
|
||||||
@@ -415,12 +414,14 @@ ManualShooting
|
|||||||
|
|
||||||
jsr WaitForKeyRelease
|
jsr WaitForKeyRelease
|
||||||
jsr BeforeFire
|
jsr BeforeFire
|
||||||
|
lda escFlag
|
||||||
|
seq:rts
|
||||||
|
|
||||||
AfterManualShooting
|
AfterManualShooting
|
||||||
inc noDeathCounter
|
inc noDeathCounter
|
||||||
|
|
||||||
jsr DecreaseWeaponBeforeShoot
|
jsr DecreaseWeaponBeforeShoot
|
||||||
jsr StatusDisplay
|
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
|
||||||
@@ -444,6 +445,7 @@ continueMainRoundLoopAfterSeppuku
|
|||||||
|
|
||||||
|
|
||||||
AfterExplode
|
AfterExplode
|
||||||
|
; TODO: IS IT OK??? possibly a fix here needed for #56
|
||||||
ldy WeaponDepleted
|
ldy WeaponDepleted
|
||||||
bne @+
|
bne @+
|
||||||
ldx TankNr
|
ldx TankNr
|
||||||
@@ -481,23 +483,19 @@ missed
|
|||||||
jsr DisplayOffensiveTextNr
|
jsr DisplayOffensiveTextNr
|
||||||
|
|
||||||
NextPlayerShoots
|
NextPlayerShoots
|
||||||
mva #1 Erase
|
;before it shoots, the eXistenZ table must be updated
|
||||||
jsr drawtanks
|
;accordingly to actual energy (was forgotten, sorry to ourselves)
|
||||||
|
|
||||||
;before it shoots, the eXistenZ table must be
|
ldx #(MaxPlayers-1)
|
||||||
;updated accordingly to actual energy (was forgotten, sorry to ourselves)
|
|
||||||
|
|
||||||
ldx #5
|
|
||||||
SeteXistenZ
|
SeteXistenZ
|
||||||
lda Energy,x
|
lda Energy,x
|
||||||
sta eXistenZ,x
|
sta eXistenZ,x
|
||||||
sta L1
|
sta L1
|
||||||
|
|
||||||
;DATA L1,L2
|
;DATA L1,L2
|
||||||
;RESULT WH*256+L1
|
|
||||||
;Multiplication 8bit*8bit,
|
;Multiplication 8bit*8bit,
|
||||||
;result 16bit
|
;result 16bit
|
||||||
;this algiorithm is a little longer than in Ruszczyc 6502 book
|
;this algiorithm is a little longer than one in Ruszczyc 6502 book
|
||||||
;but it is faster
|
;but it is faster
|
||||||
|
|
||||||
LDy #8
|
LDy #8
|
||||||
@@ -508,32 +506,22 @@ LP0
|
|||||||
ROR L1
|
ROR L1
|
||||||
BCC B0
|
BCC B0
|
||||||
CLC
|
CLC
|
||||||
ADC #10 ; multiplication by 10
|
ADC #10 ; (L2) multiplication by 10
|
||||||
B0 DEY
|
B0 DEY
|
||||||
BNE LP0
|
BNE LP0
|
||||||
ror
|
ror
|
||||||
ROR L1
|
ROR L1
|
||||||
STA MaxEnergyTableH,x
|
STA MaxForceTableH,x
|
||||||
lda L1
|
lda L1
|
||||||
sta MaxEnergyTableL,x
|
sta MaxForceTableL,x
|
||||||
|
|
||||||
dex
|
dex
|
||||||
bpl SeteXistenZ
|
bpl SeteXistenZ
|
||||||
|
|
||||||
;was setup of maximum energy for players
|
;was setup of maximum energy for players
|
||||||
|
|
||||||
mva #0 Erase
|
|
||||||
jsr drawtanks
|
|
||||||
|
|
||||||
;inc TankNr
|
PlayersAgain
|
||||||
;lda TankNr
|
|
||||||
inc:lda TankSequencePointer
|
|
||||||
cmp NumberOfPlayers
|
|
||||||
bne PlayersAgain
|
|
||||||
;mva 0 TankNr
|
|
||||||
mva #0 TankSequencePointer
|
|
||||||
|
|
||||||
PlayersAgain .proc
|
|
||||||
|
|
||||||
; In LASTeXistenZ there are values of eXistenZ before shoot
|
; In LASTeXistenZ there are values of eXistenZ before shoot
|
||||||
; from the next tank.
|
; from the next tank.
|
||||||
@@ -563,21 +551,16 @@ NoPlayerNoDeath
|
|||||||
dex
|
dex
|
||||||
bpl CheckingPlayersDeath
|
bpl CheckingPlayersDeath
|
||||||
; if processor is here it means there are no more explosions
|
; if processor is here it means there are no more explosions
|
||||||
|
|
||||||
|
inc:lda TankSequencePointer
|
||||||
|
cmp NumberOfPlayers
|
||||||
|
sne:mva #0 TankSequencePointer
|
||||||
|
|
||||||
jmp MainRoundLoop
|
jmp MainRoundLoop
|
||||||
.endp
|
.endp
|
||||||
|
|
||||||
;---------------------------------
|
;---------------------------------
|
||||||
.proc Seppuku
|
.proc PlayerXdeath
|
||||||
lda #0
|
|
||||||
sta FallDown1
|
|
||||||
sta FallDown2
|
|
||||||
lda #1
|
|
||||||
jsr ExplosionDirect
|
|
||||||
jmp continueMainRoundLoopAfterSeppuku
|
|
||||||
.endp
|
|
||||||
;---------------------------------
|
|
||||||
PlayerXdeath .proc
|
|
||||||
|
|
||||||
|
|
||||||
; this tank should not explode anymore:
|
; this tank should not explode anymore:
|
||||||
; there is 0 in A, and Tank Number in X, so...
|
; there is 0 in A, and Tank Number in X, so...
|
||||||
@@ -600,27 +583,27 @@ PlayerXdeath .proc
|
|||||||
adc ResultsTable,x
|
adc ResultsTable,x
|
||||||
sta ResultsTable,x
|
sta ResultsTable,x
|
||||||
inc CurrentResult
|
inc CurrentResult
|
||||||
.endp
|
|
||||||
|
|
||||||
|
|
||||||
mva #sfx_death_begin sfx_effect
|
mva #sfx_death_begin sfx_effect
|
||||||
|
|
||||||
;RandomizeDeffensiveText
|
;RandomizeDeffensiveText
|
||||||
randomize talk.NumberOfOffensiveTexts (talk.NumberOfDeffensiveTexts+talk.NumberOfOffensiveTexts-1)
|
randomize talk.NumberOfOffensiveTexts (talk.NumberOfDeffensiveTexts+talk.NumberOfOffensiveTexts-1)
|
||||||
sta TextNumberOff
|
sta TextNumberOff
|
||||||
ldy TankTempY
|
ldy TankTempY
|
||||||
mva #1 plot4x4color
|
mva #1 plot4x4color
|
||||||
jsr DisplayOffensiveTextNr
|
jsr DisplayOffensiveTextNr
|
||||||
|
; tank flash
|
||||||
|
ldy TankTempY
|
||||||
|
mva TankNr temp2 ; not elegant, and probably unnecessary
|
||||||
|
sty TankNr
|
||||||
|
jsr FlashTank ; blinking and pausing (like PAUSE 72 - 18x(2+2) )
|
||||||
|
mva temp2 TankNr
|
||||||
|
|
||||||
PAUSE 75
|
|
||||||
;Deffensive text cleanup
|
;Deffensive text cleanup
|
||||||
;here we clear Deffensive text (after a shoot)
|
;here we clear Deffensive text (after a shoot)
|
||||||
ldy TankTempY
|
ldy TankTempY
|
||||||
mva #0 plot4x4color
|
mva #0 plot4x4color
|
||||||
jsr DisplayOffensiveTextNr
|
jsr DisplayOffensiveTextNr
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
; calculate position of the explosion (the post-death one)
|
; calculate position of the explosion (the post-death one)
|
||||||
ldx TankTempY
|
ldx TankTempY
|
||||||
clc
|
clc
|
||||||
@@ -635,7 +618,7 @@ PlayerXdeath .proc
|
|||||||
sbc #4
|
sbc #4
|
||||||
sta ydraw
|
sta ydraw
|
||||||
lda #0
|
lda #0
|
||||||
sta ydraw+1 ; there is 0 left in A, so... TODO: bad code above. revisit when transitioning ydraw to byte
|
sta ydraw+1 ; there is 0 left in A, so... TODO: bad code above. revisit
|
||||||
|
|
||||||
;cleanup of the soil fall down ranges (left and right)
|
;cleanup of the soil fall down ranges (left and right)
|
||||||
sta RangeRight
|
sta RangeRight
|
||||||
@@ -644,33 +627,28 @@ PlayerXdeath .proc
|
|||||||
sta FallDown2
|
sta FallDown2
|
||||||
mwa #screenwidth RangeLeft
|
mwa #screenwidth RangeLeft
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
; We are randomizing the weapon now.
|
; We are randomizing the weapon now.
|
||||||
; jumping into the middle of the explosion
|
; jumping into the middle of the explosion
|
||||||
; routine
|
; routine
|
||||||
|
|
||||||
MetodOfDeath
|
MetodOfDeath
|
||||||
lda random
|
lda random
|
||||||
and #%00011111 ; range 0-31
|
and #%00011111 ; range 0-31
|
||||||
cmp #20 ; we have 20 weapons in table (from 0 to 19)
|
cmp #(weaponsOfDeathEnd-weaponsOfDeath) ; we have 20 weapons in table (from 0 to 19)
|
||||||
bcs MetodOfDeath
|
bcs MetodOfDeath
|
||||||
tay
|
tay
|
||||||
lda weaponsOfDeath,y
|
lda weaponsOfDeath,y
|
||||||
jsr ExplosionDirect
|
jsr ExplosionDirect
|
||||||
mva #$15 sfx_effect
|
mva #sfx_silencer sfx_effect
|
||||||
|
|
||||||
|
|
||||||
; 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
|
||||||
; a deadly shot here again.
|
; a deadly shot here again.
|
||||||
|
jmp MainRoundLoop.AfterExplode
|
||||||
|
.endp
|
||||||
jmp AfterExplode
|
|
||||||
|
|
||||||
;--------------------------------------------------
|
;--------------------------------------------------
|
||||||
DecreaseEnergyX .proc
|
.proc DecreaseEnergyX
|
||||||
;Decreases energy of player nr X
|
;Decreases energy of player nr X
|
||||||
;increases his financial loss
|
;increases his financial loss
|
||||||
;increases gain of tank TankNr
|
;increases gain of tank TankNr
|
||||||
@@ -709,20 +687,52 @@ NotNegativeEnergy
|
|||||||
rts
|
rts
|
||||||
.endp
|
.endp
|
||||||
|
|
||||||
|
;---------------------------------
|
||||||
|
.proc Seppuku
|
||||||
|
lda #0
|
||||||
|
sta FallDown1
|
||||||
|
sta FallDown2
|
||||||
|
sta ydraw+1
|
||||||
|
; get position of the tank
|
||||||
|
ldx TankNr
|
||||||
|
lda xtankstableL,x
|
||||||
|
sta xdraw
|
||||||
|
lda xtankstableH,x
|
||||||
|
sta xdraw+1
|
||||||
|
lda yTanksTable,x
|
||||||
|
sta ydraw
|
||||||
|
lda #1 ; Missile
|
||||||
|
jsr ExplosionDirect
|
||||||
|
jmp MainRoundLoop.continueMainRoundLoopAfterSeppuku
|
||||||
|
.endp
|
||||||
|
|
||||||
;--------------------------------------------------
|
;--------------------------------------------------
|
||||||
GetRandomWind .proc
|
GetRandomWind .proc
|
||||||
|
;in: MaxWind (byte)
|
||||||
|
;out: Wind (word)
|
||||||
|
;uses: _
|
||||||
;--------------------------------------------------
|
;--------------------------------------------------
|
||||||
lda random
|
lda random
|
||||||
cmp MaxWind
|
cmp MaxWind
|
||||||
bcs GetRandomWind ; if more than MaxWind then randomize again
|
bcs GetRandomWind ; if more than MaxWind then randomize again
|
||||||
sta Wind
|
sta Wind
|
||||||
mva #$00 Wind+1
|
mva #$00 Wind+1
|
||||||
; multiply Wind by 16 and take it as a decimal part (0.Wind)
|
sta Wind+2
|
||||||
|
sta Wind+3
|
||||||
|
; multiply Wind by 16
|
||||||
|
; two bytes of Wind are treated as a decimal part of vx variable
|
||||||
:4 aslw Wind
|
:4 aslw Wind
|
||||||
|
; decide the direction
|
||||||
lda random
|
lda random
|
||||||
and #$01
|
and #$01
|
||||||
sta WindOrientation
|
beq @+
|
||||||
rts
|
sec ; Wind = -Wind
|
||||||
|
.rept 4
|
||||||
|
lda #$00
|
||||||
|
sbc Wind+#
|
||||||
|
sta Wind+#
|
||||||
|
.endr
|
||||||
|
@ rts
|
||||||
.endp
|
.endp
|
||||||
|
|
||||||
;--------------------------------------------------
|
;--------------------------------------------------
|
||||||
@@ -740,34 +750,28 @@ PMoutofScreen .proc
|
|||||||
;--------------------------------------------------
|
;--------------------------------------------------
|
||||||
ldx #$3f
|
ldx #$3f
|
||||||
lda #$0
|
lda #$0
|
||||||
loop05
|
@
|
||||||
sta TanksWeapon1,x
|
sta TanksWeapon1,x
|
||||||
sta TanksWeapon2,x
|
sta TanksWeapon2,x
|
||||||
sta TanksWeapon3,x
|
sta TanksWeapon3,x
|
||||||
sta TanksWeapon4,x
|
sta TanksWeapon4,x
|
||||||
sta TanksWeapon5,x
|
sta TanksWeapon5,x
|
||||||
sta TanksWeapon6,x
|
sta TanksWeapon6,x
|
||||||
dex
|
dex
|
||||||
bne @+
|
sne:lda #99
|
||||||
lda #99
|
bpl @-
|
||||||
bne loop05
|
|
||||||
@ bpl loop05
|
|
||||||
rts
|
rts
|
||||||
.endp
|
.endp
|
||||||
|
|
||||||
;--------------------------------------------------
|
;--------------------------------------------------
|
||||||
Initialize .proc
|
.proc Initialize
|
||||||
;Initialization sequence
|
;Initialization sequence
|
||||||
|
;uses: temp, ...
|
||||||
;--------------------------------------------------
|
;--------------------------------------------------
|
||||||
deletePtr = temp
|
deletePtr = temp
|
||||||
|
|
||||||
lda #0
|
|
||||||
sta Erase
|
|
||||||
sta tracerflag
|
|
||||||
sta GameIsOver
|
|
||||||
|
|
||||||
|
|
||||||
; clean variables
|
; clean variables
|
||||||
|
lda #0
|
||||||
tay
|
tay
|
||||||
mwa #variablesStart deletePtr
|
mwa #variablesStart deletePtr
|
||||||
@ tya
|
@ tya
|
||||||
@@ -784,8 +788,8 @@ deletePtr = temp
|
|||||||
jsr WeaponCleanup
|
jsr WeaponCleanup
|
||||||
|
|
||||||
|
|
||||||
mva #$2 colpf2s
|
mva #TextBackgroundColor colpf2s
|
||||||
mva #12 colpf3s
|
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
|
||||||
@@ -797,6 +801,7 @@ SetunPlots
|
|||||||
sta oldplotH,x
|
sta oldplotH,x
|
||||||
lda #0
|
lda #0
|
||||||
sta oldply,x
|
sta oldply,x
|
||||||
|
lda #$ff
|
||||||
sta oldora,x
|
sta oldora,x
|
||||||
dex
|
dex
|
||||||
bpl SetunPlots
|
bpl SetunPlots
|
||||||
@@ -818,21 +823,21 @@ SetunPlots
|
|||||||
lda #$10 ; P/M priorities (bit 4 joins missiles)
|
lda #$10 ; P/M priorities (bit 4 joins missiles)
|
||||||
sta gtictls
|
sta gtictls
|
||||||
jsr PMoutofScreen
|
jsr PMoutofScreen
|
||||||
lda #$50 ; temporary colours of sprites under tanks
|
lda TankColoursTable ; temporary colours of sprites under tanks
|
||||||
sta $2c0
|
sta COLPM0S
|
||||||
lda #$30
|
lda TankColoursTable+1
|
||||||
sta $2c1
|
sta COLPM1S
|
||||||
lda #$70
|
lda TankColoursTable+2
|
||||||
sta $2c2
|
sta COLPM2S
|
||||||
lda #$90
|
lda TankColoursTable+3
|
||||||
sta $2c3
|
sta COLPM3S
|
||||||
LDA #$B0
|
LDA TankColoursTable+4
|
||||||
STA COLPF3S
|
STA COLPF3S ; joined missiles (5th tank)
|
||||||
mva #0 hscrol
|
mva #0 hscrol
|
||||||
|
|
||||||
|
|
||||||
;let the tanks be visible!
|
;let the tanks be visible!
|
||||||
ldx #5
|
ldx #(maxPlayers-1)
|
||||||
lda #1 ; tank is visible
|
lda #1 ; tank is visible
|
||||||
MakeTanksVisible
|
MakeTanksVisible
|
||||||
sta eXistenZ,x
|
sta eXistenZ,x
|
||||||
@@ -862,24 +867,38 @@ ClearResults
|
|||||||
lda #0 ;starting song line 0-255 to A reg
|
lda #0 ;starting song line 0-255 to A reg
|
||||||
jsr RASTERMUSICTRACKER ;Init
|
jsr RASTERMUSICTRACKER ;Init
|
||||||
;
|
;
|
||||||
|
VMAIN VBLinterrupt,6 ;jsr SetVBL
|
||||||
|
|
||||||
rts
|
rts
|
||||||
.endp
|
.endp
|
||||||
|
|
||||||
DLIinterrupt .proc
|
DLIinterruptGraph .proc
|
||||||
pha
|
pha
|
||||||
phy
|
phy
|
||||||
ldy dliCounter
|
ldy dliCounter
|
||||||
lda dliColors,y
|
lda dliColorsBack,y
|
||||||
;lda #$02 ; color of playground
|
ldy dliColorsFore
|
||||||
sta WSYNC
|
nop
|
||||||
sta COLPF2
|
nop
|
||||||
|
nop
|
||||||
|
sta COLPF1
|
||||||
|
sty COLPF2
|
||||||
inc dliCounter
|
inc dliCounter
|
||||||
ply
|
ply
|
||||||
pla
|
pla
|
||||||
rti
|
rti
|
||||||
.endp
|
.endp
|
||||||
|
|
||||||
|
DLIinterruptText .proc
|
||||||
|
pha
|
||||||
|
sta WSYNC
|
||||||
|
mva #TextBackgroundColor colpf2
|
||||||
|
mva #TextForegroundColor colpf3
|
||||||
|
pla
|
||||||
|
DLIinterruptNone
|
||||||
|
rti
|
||||||
|
.endp
|
||||||
|
|
||||||
VBLinterrupt .proc
|
VBLinterrupt .proc
|
||||||
pha
|
pha
|
||||||
phx
|
phx
|
||||||
@@ -906,7 +925,19 @@ lab2
|
|||||||
jmp SYSVBV
|
jmp SYSVBV
|
||||||
.endp
|
.endp
|
||||||
;----------------------------------------------
|
;----------------------------------------------
|
||||||
RandomizeSequence .proc
|
.proc RandomizeSequence0
|
||||||
|
ldx #0
|
||||||
|
@ txa
|
||||||
|
sta TankSequence,x
|
||||||
|
inx
|
||||||
|
cpx #MaxPlayers
|
||||||
|
bne @-
|
||||||
|
rts
|
||||||
|
.endp
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.proc RandomizeSequence
|
||||||
; in: NumberOfPlayers
|
; in: NumberOfPlayers
|
||||||
; out: TankSequence
|
; out: TankSequence
|
||||||
; how: get random number lower than NumberOfPlayers
|
; how: get random number lower than NumberOfPlayers
|
||||||
@@ -979,7 +1010,7 @@ RandomizeAngle .proc ;
|
|||||||
.endp
|
.endp
|
||||||
;----------------------------------------------
|
;----------------------------------------------
|
||||||
RandomizeForce .proc
|
RandomizeForce .proc
|
||||||
; routine returns in EnergyTable/L/H
|
; routine returns in ForceTable/L/H
|
||||||
; valid force of shooting for TankNr
|
; valid force of shooting for TankNr
|
||||||
; in X must be TankNr
|
; in X must be TankNr
|
||||||
; low and high randomize boundary passed as word value
|
; low and high randomize boundary passed as word value
|
||||||
@@ -987,40 +1018,45 @@ RandomizeForce .proc
|
|||||||
; RandBoundaryHigh
|
; RandBoundaryHigh
|
||||||
;----------------------------------------------
|
;----------------------------------------------
|
||||||
|
|
||||||
lda MaxEnergyTableL,x
|
|
||||||
sta temp
|
|
||||||
lda MaxEnergyTableH,x
|
|
||||||
sta temp+1
|
|
||||||
GetRandomAgain
|
|
||||||
lda RANDOM
|
lda RANDOM
|
||||||
; gets values in range(256,765)
|
|
||||||
sta temp2
|
sta temp2
|
||||||
lda RANDOM ; :)
|
lda RANDOM
|
||||||
and #%00000011 ;(0..1023)
|
and #%00000011 ;(0..1023)
|
||||||
sta temp2+1
|
sta temp2+1
|
||||||
|
|
||||||
cpw RandBoundaryLow temp2
|
cpw RandBoundaryLow temp2
|
||||||
bcs GetRandomAgain
|
bcs RandomizeForce
|
||||||
|
|
||||||
cpw RandBoundaryHigh temp2
|
cpw RandBoundaryHigh temp2
|
||||||
bcc GetRandomAgain
|
bcc RandomizeForce
|
||||||
|
|
||||||
cpw temp temp2
|
|
||||||
bcs EnergyInRange
|
|
||||||
|
|
||||||
mwa temp temp2
|
|
||||||
|
|
||||||
EnergyInRange
|
|
||||||
lda temp2
|
lda temp2
|
||||||
sta EnergyTableL,x
|
sta ForceTableL,x
|
||||||
lda temp2+1
|
lda temp2+1
|
||||||
sta EnergyTableH,x
|
sta ForceTableH,x
|
||||||
|
|
||||||
|
;---------
|
||||||
|
LimitForce
|
||||||
|
; in X must be TankNr
|
||||||
|
; cuts force to MaxForceTable
|
||||||
|
lda MaxForceTableH,x
|
||||||
|
cmp ForceTableH,x
|
||||||
|
bne @+
|
||||||
|
lda MaxForceTableL,x
|
||||||
|
cmp ForceTableL,x
|
||||||
|
@ bcs @+
|
||||||
|
|
||||||
|
lda MaxForceTableL,x
|
||||||
|
sta ForceTableL,x
|
||||||
|
lda MaxForceTableH,x
|
||||||
|
sta ForceTableH,x
|
||||||
|
@
|
||||||
rts
|
rts
|
||||||
|
|
||||||
.endp
|
.endp
|
||||||
|
|
||||||
;----------------------------------------------
|
;----------------------------------------------
|
||||||
MoveBarrelToNewPosition .proc
|
.proc MoveBarrelToNewPosition
|
||||||
jsr DrawTankNr
|
jsr DrawTankNr
|
||||||
ldx TankNr
|
ldx TankNr
|
||||||
lda AngleTable,x
|
lda AngleTable,x
|
||||||
@@ -1038,14 +1074,14 @@ rotateRight;older is lower
|
|||||||
bne MoveBarrelToNewPosition
|
bne MoveBarrelToNewPosition
|
||||||
|
|
||||||
mva #$30 CharCode ; if angle goes through 0 we clear the barrel
|
mva #$30 CharCode ; if angle goes through 0 we clear the barrel
|
||||||
jsr drawtankNrX
|
jsr DrawTankNr.drawtankNrX
|
||||||
|
|
||||||
jmp MoveBarrelToNewPosition
|
jmp MoveBarrelToNewPosition
|
||||||
rotateLeft
|
rotateLeft
|
||||||
dec angleTable,x
|
dec angleTable,x
|
||||||
bpl MoveBarrelToNewPosition
|
bpl MoveBarrelToNewPosition
|
||||||
mva #$2e CharCode
|
mva #$2e CharCode
|
||||||
jsr drawtankNrX
|
jsr DrawTankNr.drawtankNrX
|
||||||
|
|
||||||
jmp MoveBarrelToNewPosition
|
jmp MoveBarrelToNewPosition
|
||||||
|
|
||||||
@@ -1055,7 +1091,7 @@ BarrelPositionIsFine
|
|||||||
.endp
|
.endp
|
||||||
|
|
||||||
;----------------------------------------------
|
;----------------------------------------------
|
||||||
SortSequence .proc ;
|
.proc SortSequence ;
|
||||||
;----------------------------------------------
|
;----------------------------------------------
|
||||||
; here we try to get a sequence of tanks for two
|
; here we try to get a sequence of tanks for two
|
||||||
; purposes:
|
; purposes:
|
||||||
@@ -1143,18 +1179,24 @@ nextishigher
|
|||||||
.endp
|
.endp
|
||||||
|
|
||||||
;--------------------------------------------------
|
;--------------------------------------------------
|
||||||
getkey .proc; waits for pressing a key and returns pressed value in A
|
.proc GetKey ; waits for pressing a key and returns pressed value in A
|
||||||
|
; when [ESC] is pressed, escFlag is set to 1
|
||||||
;--------------------------------------------------
|
;--------------------------------------------------
|
||||||
jsr WaitForKeyRelease
|
jsr WaitForKeyRelease
|
||||||
@
|
@
|
||||||
lda SKSTAT
|
lda SKSTAT
|
||||||
cmp #$ff
|
cmp #$ff
|
||||||
beq checkJoyGetKey ; key not pressed, check Joy
|
beq checkJoyGetKey ; key not pressed, check Joy
|
||||||
|
cmp #$f7 ; SHIFT
|
||||||
|
beq checkJoyGetKey
|
||||||
|
|
||||||
mva #sfx_keyclick sfx_effect
|
|
||||||
lda kbcode
|
lda kbcode
|
||||||
and #$3f ;CTRL and SHIFT ellimination
|
and #$3f ;CTRL and SHIFT ellimination
|
||||||
rts
|
cmp #28 ; ESC
|
||||||
|
bne getkeyend
|
||||||
|
mvx #1 escFlag
|
||||||
|
bne getkeyend
|
||||||
|
|
||||||
checkJoyGetKey
|
checkJoyGetKey
|
||||||
;------------JOY-------------
|
;------------JOY-------------
|
||||||
;happy happy joy joy
|
;happy happy joy joy
|
||||||
@@ -1165,13 +1207,19 @@ checkJoyGetKey
|
|||||||
beq notpressedJoyGetKey
|
beq notpressedJoyGetKey
|
||||||
tay
|
tay
|
||||||
lda joyToKeyTable,y
|
lda joyToKeyTable,y
|
||||||
rts
|
bne getkeyend
|
||||||
|
|
||||||
notpressedJoyGetKey
|
notpressedJoyGetKey
|
||||||
;fire
|
;fire
|
||||||
lda TRIG0
|
lda TRIG0S
|
||||||
bne @-
|
bne @-
|
||||||
lda #$0c ;Return key
|
lda #$0c ;Return key
|
||||||
|
|
||||||
|
getkeyend
|
||||||
|
mvx #sfx_keyclick sfx_effect
|
||||||
rts
|
rts
|
||||||
|
|
||||||
|
|
||||||
.endp
|
.endp
|
||||||
;--------------------------------------------------
|
;--------------------------------------------------
|
||||||
getkeynowait .proc;
|
getkeynowait .proc;
|
||||||
@@ -1188,7 +1236,7 @@ WaitForKeyRelease .proc
|
|||||||
and #$0f
|
and #$0f
|
||||||
cmp #$0f
|
cmp #$0f
|
||||||
bne WaitForKeyRelease
|
bne WaitForKeyRelease
|
||||||
lda TRIG0
|
lda TRIG0S
|
||||||
beq WaitForKeyRelease
|
beq WaitForKeyRelease
|
||||||
lda SKSTAT
|
lda SKSTAT
|
||||||
cmp #$ff
|
cmp #$ff
|
||||||
|
|||||||
BIN
Binary file not shown.
Executable → Regular
+206
-116
@@ -16,13 +16,24 @@ Options .proc
|
|||||||
; - money each player has on the beginning of the game (moneyL i moneyH)
|
; - money each player has on the beginning of the game (moneyL i moneyH)
|
||||||
; - and I am sure maxwind, gravity, no_of_rounds in a game, speed of shell flight
|
; - and I am sure maxwind, gravity, no_of_rounds in a game, speed of shell flight
|
||||||
|
|
||||||
|
mwa #OptionsDL dlptrs
|
||||||
|
lda dmactls
|
||||||
|
and #$fc
|
||||||
|
ora #$02 ; normal screen width
|
||||||
|
sta dmactls
|
||||||
|
|
||||||
|
VDLI DLIinterruptText.DLIinterruptNone ; jsr SetDLI for text screen without DLIs
|
||||||
|
|
||||||
mva #0 OptionsY
|
mva #0 OptionsY
|
||||||
|
|
||||||
OptionsMainLoop
|
OptionsMainLoop
|
||||||
|
|
||||||
jsr OptionsInversion
|
jsr OptionsInversion
|
||||||
jsr getkey
|
jsr getkey
|
||||||
cmp #$f ;cursor down
|
ldx escFlag
|
||||||
|
seq:rts
|
||||||
|
|
||||||
|
cmp #$f ;cursor down
|
||||||
bne OptionsNoDown
|
bne OptionsNoDown
|
||||||
inc:lda OptionsY
|
inc:lda OptionsY
|
||||||
cmp #maxoptions
|
cmp #maxoptions
|
||||||
@@ -190,6 +201,7 @@ OptionsYLoop
|
|||||||
;-------------------------------------------
|
;-------------------------------------------
|
||||||
; call of the purchase screens for each tank
|
; call of the purchase screens for each tank
|
||||||
.proc CallPurchaseForEveryTank
|
.proc CallPurchaseForEveryTank
|
||||||
|
jsr PMoutofScreen
|
||||||
mwa #PurchaseDL dlptrs
|
mwa #PurchaseDL dlptrs
|
||||||
lda dmactls
|
lda dmactls
|
||||||
and #$fc
|
and #$fc
|
||||||
@@ -197,21 +209,22 @@ OptionsYLoop
|
|||||||
sta dmactls
|
sta dmactls
|
||||||
|
|
||||||
mva #0 TankNr
|
mva #0 TankNr
|
||||||
loop03
|
@
|
||||||
ldx TankNr
|
ldx TankNr
|
||||||
lda SkillTable,x
|
lda SkillTable,x
|
||||||
beq ManualPurchase
|
beq ManualPurchase
|
||||||
jsr PurchaseAI
|
jsr PurchaseAI
|
||||||
jmp AfterManualPurchase
|
jmp AfterManualPurchase
|
||||||
|
|
||||||
ManualPurchase
|
ManualPurchase
|
||||||
jsr Purchase
|
jsr Purchase
|
||||||
|
ldx escFlag
|
||||||
|
seq:rts
|
||||||
AfterManualPurchase
|
AfterManualPurchase
|
||||||
|
|
||||||
inc TankNr
|
inc:lda TankNr
|
||||||
lda TankNr
|
cmp NumberOfPlayers
|
||||||
cmp NumberOfPlayers
|
bne @-
|
||||||
bne loop03
|
|
||||||
rts
|
rts
|
||||||
.endp
|
.endp
|
||||||
|
|
||||||
@@ -223,12 +236,10 @@ AfterManualPurchase
|
|||||||
; Rest of the data is taken from appropriate tables
|
; Rest of the data is taken from appropriate tables
|
||||||
; and during the purchase these tables are modified.
|
; and during the purchase these tables are modified.
|
||||||
|
|
||||||
|
|
||||||
mwa #ListOfWeapons WeaponsListDL ;switch to the list of offensive weapons
|
mwa #ListOfWeapons WeaponsListDL ;switch to the list of offensive weapons
|
||||||
jsr PMoutofScreen
|
|
||||||
|
|
||||||
ldx tankNr
|
ldx tankNr
|
||||||
lda TankColoursTable,x
|
lda TankStatusColoursTable,x
|
||||||
sta colpf2s
|
sta colpf2s
|
||||||
|
|
||||||
; we are clearing list of the weapons
|
; we are clearing list of the weapons
|
||||||
@@ -238,12 +249,9 @@ AfterManualPurchase
|
|||||||
|
|
||||||
; there is a tank (player) number in tanknr
|
; there is a tank (player) number in tanknr
|
||||||
; we are displaying name of the player
|
; we are displaying name of the player
|
||||||
|
tay ; 0 to y
|
||||||
tay ; from 0 to y
|
|
||||||
lda tanknr
|
lda tanknr
|
||||||
asl
|
:3 asl ; 8 chars per name
|
||||||
asl
|
|
||||||
asl ; 8 chars per name
|
|
||||||
tax
|
tax
|
||||||
NextChar03
|
NextChar03
|
||||||
lda tanksnames,x
|
lda tanksnames,x
|
||||||
@@ -550,19 +558,22 @@ ChoosingItemForPurchase
|
|||||||
;--------------------------------------------------
|
;--------------------------------------------------
|
||||||
jsr PutLitteChar ; Places pointer at the right position
|
jsr PutLitteChar ; Places pointer at the right position
|
||||||
jsr getkey
|
jsr getkey
|
||||||
|
ldx escFlag
|
||||||
|
seq:rts
|
||||||
cmp #$2c ; Tab
|
cmp #$2c ; Tab
|
||||||
jeq ListChange
|
jeq ListChange
|
||||||
cmp #$0c ; Return
|
cmp #$0c ; Return
|
||||||
beq EndOfPurchase
|
sne:rts
|
||||||
cmp #$e
|
cmp #$e
|
||||||
beq PurchaseKeyUp
|
beq PurchaseKeyUp
|
||||||
cmp #$f
|
cmp #$f
|
||||||
beq PurchaseKeyDown
|
beq PurchaseKeyDown
|
||||||
cmp #$21 ; Space
|
cmp #$21 ; Space
|
||||||
|
jeq PurchaseWeaponNow
|
||||||
|
cmp #$07 ; cursor right
|
||||||
|
jeq PurchaseWeaponNow
|
||||||
bne ChoosingItemForPurchase
|
bne ChoosingItemForPurchase
|
||||||
jmp PurchaseWeaponNow
|
|
||||||
EndOfPurchase
|
|
||||||
rts
|
|
||||||
PurchaseKeyUp
|
PurchaseKeyUp
|
||||||
lda WhichList
|
lda WhichList
|
||||||
beq GoUp1
|
beq GoUp1
|
||||||
@@ -816,6 +827,29 @@ NoArrowDown
|
|||||||
rts
|
rts
|
||||||
.endp
|
.endp
|
||||||
; -----------------------------------------------------
|
; -----------------------------------------------------
|
||||||
|
.proc EnterPlayerNames
|
||||||
|
;entering names of players
|
||||||
|
mwa #NameDL dlptrs
|
||||||
|
lda dmactls
|
||||||
|
and #$fc
|
||||||
|
ora #$01 ; narrow screen (32 chars)
|
||||||
|
sta dmactls
|
||||||
|
VDLI DLIinterruptText ; jsr SetDLI for text (names) screen
|
||||||
|
|
||||||
|
mva #0 TankNr
|
||||||
|
@ tax
|
||||||
|
lda TankStatusColoursTable,x
|
||||||
|
sta colpf2s ; set color of player name line
|
||||||
|
jsr EnterPlayerName
|
||||||
|
lda escFlag
|
||||||
|
seq:rts
|
||||||
|
inc TankNr
|
||||||
|
lda TankNr
|
||||||
|
cmp NumberOfPlayers
|
||||||
|
bne @-
|
||||||
|
rts
|
||||||
|
.endp
|
||||||
|
; -----------------------------------------------------
|
||||||
.proc EnterPlayerName
|
.proc EnterPlayerName
|
||||||
; in: TankNr
|
; in: TankNr
|
||||||
; Out: TanksNames, SkillTable
|
; Out: TanksNames, SkillTable
|
||||||
@@ -867,6 +901,9 @@ endOfTankName
|
|||||||
|
|
||||||
CheckKeys
|
CheckKeys
|
||||||
jsr getkey
|
jsr getkey
|
||||||
|
ldx escFlag
|
||||||
|
seq:rts
|
||||||
|
|
||||||
; is the char to be recorded?
|
; is the char to be recorded?
|
||||||
ldx #keycodesEnd-keycodes ;table was 38 chars long
|
ldx #keycodesEnd-keycodes ;table was 38 chars long
|
||||||
IsLetter
|
IsLetter
|
||||||
@@ -1309,11 +1346,9 @@ DOTNcharloop
|
|||||||
ldy #0
|
ldy #0
|
||||||
sty LineCharNr
|
sty LineCharNr
|
||||||
|
|
||||||
|
|
||||||
TypeLine4x4Loop
|
TypeLine4x4Loop
|
||||||
ldy LineCharNr
|
ldy LineCharNr
|
||||||
|
|
||||||
|
|
||||||
mwa LineAddress4x4 temp
|
mwa LineAddress4x4 temp
|
||||||
lda (temp),y
|
lda (temp),y
|
||||||
cmp #$ff
|
cmp #$ff
|
||||||
@@ -1322,7 +1357,8 @@ TypeLine4x4Loop
|
|||||||
sta CharCode4x4
|
sta CharCode4x4
|
||||||
mwa LineXdraw Xdraw
|
mwa LineXdraw Xdraw
|
||||||
mva LineYdraw Ydraw
|
mva LineYdraw Ydraw
|
||||||
jsr PutChar4x4FULL ;type empty pixels as well!
|
mva #1 plot4x4color
|
||||||
|
jsr PutChar4x4 ;type empty pixels as well!
|
||||||
adw LineXdraw #4
|
adw LineXdraw #4
|
||||||
inc LineCharNr
|
inc LineCharNr
|
||||||
jmp TypeLine4x4Loop
|
jmp TypeLine4x4Loop
|
||||||
@@ -1332,6 +1368,63 @@ EndOfTypeLine4x4
|
|||||||
.endp
|
.endp
|
||||||
|
|
||||||
|
|
||||||
|
;--------------------------------
|
||||||
|
.proc AreYouSure
|
||||||
|
;using 4x4 font
|
||||||
|
|
||||||
|
;save vars (messed in TypeLine4x4)
|
||||||
|
mwa Xdraw xk
|
||||||
|
mva Ydraw yc
|
||||||
|
|
||||||
|
mva #4 ResultY ; where seppuku text starts Y-wise on the screen
|
||||||
|
|
||||||
|
;top frame
|
||||||
|
mva ResultY LineYdraw
|
||||||
|
jsr TL4x4_top
|
||||||
|
adb ResultY #4 ;next line
|
||||||
|
|
||||||
|
;seppuku
|
||||||
|
mwa #areYouSureText LineAddress4x4
|
||||||
|
mwa #((ScreenWidth/2)-(8*4)) LineXdraw ; centering
|
||||||
|
mva ResultY LineYdraw
|
||||||
|
jsr TypeLine4x4
|
||||||
|
adb ResultY #4 ;next line
|
||||||
|
|
||||||
|
;bottom frame
|
||||||
|
mva ResultY LineYdraw
|
||||||
|
jsr TL4x4_bottom
|
||||||
|
|
||||||
|
|
||||||
|
jsr GetKey
|
||||||
|
cmp #$2b ; "Y"
|
||||||
|
bne @+
|
||||||
|
mva #1 escFlag
|
||||||
|
bne skip01
|
||||||
|
@ mva #0 escFlag
|
||||||
|
jsr WaitForKeyRelease
|
||||||
|
skip01
|
||||||
|
|
||||||
|
;clean
|
||||||
|
mva #3 dx
|
||||||
|
mva #4 ResultY
|
||||||
|
@
|
||||||
|
mva #1 plot4x4color
|
||||||
|
mwa #lineClear LineAddress4x4
|
||||||
|
mwa #((ScreenWidth/2)-(8*4)) LineXdraw ; centering
|
||||||
|
mva ResultY LineYdraw
|
||||||
|
jsr TypeLine4x4
|
||||||
|
adb ResultY #4 ;next line
|
||||||
|
|
||||||
|
dec dx
|
||||||
|
bne @-
|
||||||
|
|
||||||
|
|
||||||
|
quit_areyousure
|
||||||
|
;restore vars
|
||||||
|
mva yc Ydraw
|
||||||
|
mwa xk Xdraw
|
||||||
|
rts
|
||||||
|
.endp
|
||||||
;--------------------------------
|
;--------------------------------
|
||||||
.proc DisplaySeppuku
|
.proc DisplaySeppuku
|
||||||
;using 4x4 font
|
;using 4x4 font
|
||||||
@@ -1340,18 +1433,17 @@ EndOfTypeLine4x4
|
|||||||
mwa Xdraw xk
|
mwa Xdraw xk
|
||||||
mva Ydraw yc
|
mva Ydraw yc
|
||||||
|
|
||||||
mva #15 fs ; temp, how many times blink the billboard
|
mva #20 fs ; temp, how many times blink the billboard
|
||||||
@
|
seppuku_loop
|
||||||
lda fs
|
lda CONSOL ; turbo mode
|
||||||
and #$01
|
cmp #6 ; START
|
||||||
sta plot4x4color
|
sne:mva #1 fs ; finish it
|
||||||
|
|
||||||
mva #4 ResultY ; where seppuku text starts Y-wise on the screen
|
mva #4 ResultY ; where seppuku text starts Y-wise on the screen
|
||||||
|
|
||||||
;top frame
|
;top frame
|
||||||
mwa #LineTop LineAddress4x4
|
|
||||||
mwa #((ScreenWidth/2)-(8*4)) LineXdraw ; centering
|
|
||||||
mva ResultY LineYdraw
|
mva ResultY LineYdraw
|
||||||
jsr TypeLine4x4
|
jsr TL4x4_top
|
||||||
adb ResultY #4 ;next line
|
adb ResultY #4 ;next line
|
||||||
|
|
||||||
;seppuku
|
;seppuku
|
||||||
@@ -1362,28 +1454,27 @@ EndOfTypeLine4x4
|
|||||||
adb ResultY #4 ;next line
|
adb ResultY #4 ;next line
|
||||||
|
|
||||||
;bottom frame
|
;bottom frame
|
||||||
mwa #LineBottom LineAddress4x4
|
|
||||||
mwa #((ScreenWidth/2)-(8*4)) LineXdraw ; centering
|
|
||||||
mva ResultY LineYdraw
|
mva ResultY LineYdraw
|
||||||
jsr TypeLine4x4
|
jsr TL4x4_bottom ; just go
|
||||||
|
|
||||||
dec fs
|
|
||||||
bne @-
|
|
||||||
|
|
||||||
;clean seppuku
|
;clean seppuku
|
||||||
mva #3 fs
|
|
||||||
|
mva #3 dx
|
||||||
mva #4 ResultY
|
mva #4 ResultY
|
||||||
@
|
@
|
||||||
mva #1 plot4x4color
|
|
||||||
mwa #lineClear LineAddress4x4
|
mwa #lineClear LineAddress4x4
|
||||||
mwa #((ScreenWidth/2)-(8*4)) LineXdraw ; centering
|
mwa #((ScreenWidth/2)-(8*4)) LineXdraw ; centering
|
||||||
mva ResultY LineYdraw
|
mva ResultY LineYdraw
|
||||||
jsr TypeLine4x4
|
jsr TypeLine4x4
|
||||||
adb ResultY #4 ;next line
|
adb ResultY #4 ;next line
|
||||||
|
|
||||||
dec fs
|
dec dx
|
||||||
bne @-
|
bne @-
|
||||||
|
|
||||||
|
dec fs
|
||||||
|
jne seppuku_loop
|
||||||
|
|
||||||
|
quit_seppuku
|
||||||
;restore vars
|
;restore vars
|
||||||
mva yc Ydraw
|
mva yc Ydraw
|
||||||
mwa xk Xdraw
|
mwa xk Xdraw
|
||||||
@@ -1393,18 +1484,17 @@ EndOfTypeLine4x4
|
|||||||
.proc DisplayResults ;
|
.proc DisplayResults ;
|
||||||
;displays results of the round
|
;displays results of the round
|
||||||
;using 4x4 font
|
;using 4x4 font
|
||||||
|
|
||||||
|
mva #sfx_smoke_cloud sfx_effect
|
||||||
|
mva #1 plot4x4color
|
||||||
|
|
||||||
;centering the result screen
|
;centering the result screen
|
||||||
mwa #((ScreenWidth/2)-(8*4)) ResultX
|
|
||||||
mva #((ScreenHeight/2)-(8*4)) ResultY
|
mva #((ScreenHeight/2)-(8*4)) ResultY
|
||||||
|
|
||||||
|
|
||||||
;upper frame
|
;upper frame
|
||||||
mwa #LineTop LineAddress4x4
|
|
||||||
mwa ResultX LineXdraw
|
|
||||||
mva ResultY LineYdraw
|
mva ResultY LineYdraw
|
||||||
mva #1 plot4x4color
|
jsr TL4x4_top
|
||||||
jsr TypeLine4x4
|
|
||||||
|
|
||||||
adb ResultY #4 ;next line
|
adb ResultY #4 ;next line
|
||||||
|
|
||||||
@@ -1419,17 +1509,15 @@ EndOfTypeLine4x4
|
|||||||
jsr displaybyte ;decimal (byte), displayposition (word)
|
jsr displaybyte ;decimal (byte), displayposition (word)
|
||||||
|
|
||||||
mwa #LineHeader1 LineAddress4x4
|
mwa #LineHeader1 LineAddress4x4
|
||||||
mwa ResultX LineXdraw
|
mwa #((ScreenWidth/2)-(8*4)) LineXdraw
|
||||||
mva ResultY LineYdraw
|
mva ResultY LineYdraw
|
||||||
mva #1 plot4x4color
|
|
||||||
jsr TypeLine4x4
|
jsr TypeLine4x4
|
||||||
beq @+ ;unconditional jump, because TypeLine4x4 ends with beq
|
beq @+ ;unconditional jump, because TypeLine4x4 ends with beq
|
||||||
|
|
||||||
GameOver4x4
|
GameOver4x4
|
||||||
mwa #LineGameOver LineAddress4x4
|
mwa #LineGameOver LineAddress4x4
|
||||||
mwa ResultX LineXdraw
|
mwa #((ScreenWidth/2)-(8*4)) LineXdraw
|
||||||
mva ResultY LineYdraw
|
mva ResultY LineYdraw
|
||||||
mva #1 plot4x4color
|
|
||||||
jsr TypeLine4x4
|
jsr TypeLine4x4
|
||||||
mva #1 GameIsOver
|
mva #1 GameIsOver
|
||||||
|
|
||||||
@@ -1437,30 +1525,23 @@ GameOver4x4
|
|||||||
adb ResultY #4 ;next line
|
adb ResultY #4 ;next line
|
||||||
|
|
||||||
;Empty line
|
;Empty line
|
||||||
mwa #LineEmpty LineAddress4x4
|
|
||||||
mwa ResultX LineXdraw
|
|
||||||
mva ResultY LineYdraw
|
mva ResultY LineYdraw
|
||||||
mva #1 plot4x4color
|
jsr TL4x4_empty
|
||||||
jsr TypeLine4x4
|
|
||||||
|
|
||||||
adb ResultY #2 ;next line
|
adb ResultY #2 ;next line
|
||||||
|
|
||||||
|
|
||||||
;Header2
|
;Header2
|
||||||
mwa #LineHeader2 LineAddress4x4
|
mwa #LineHeader2 LineAddress4x4
|
||||||
mwa ResultX LineXdraw
|
mwa #((ScreenWidth/2)-(8*4)) LineXdraw
|
||||||
mva ResultY LineYdraw
|
mva ResultY LineYdraw
|
||||||
mva #1 plot4x4color
|
|
||||||
jsr TypeLine4x4
|
jsr TypeLine4x4
|
||||||
|
|
||||||
adb ResultY #4 ;next line
|
adb ResultY #4 ;next line
|
||||||
|
|
||||||
;Empty line
|
;Empty line
|
||||||
mwa #LineEmpty LineAddress4x4
|
|
||||||
mwa ResultX LineXdraw
|
|
||||||
mva ResultY LineYdraw
|
mva ResultY LineYdraw
|
||||||
mva #1 plot4x4color
|
jsr TL4x4_empty
|
||||||
jsr TypeLine4x4
|
|
||||||
|
|
||||||
sbb ResultY #2 ;next line (was empty)
|
sbb ResultY #2 ;next line (was empty)
|
||||||
|
|
||||||
@@ -1525,24 +1606,17 @@ TankNameCopyLoop
|
|||||||
|
|
||||||
;result line display
|
;result line display
|
||||||
mwa #ResultLineBuffer LineAddress4x4
|
mwa #ResultLineBuffer LineAddress4x4
|
||||||
mwa ResultX LineXdraw
|
mwa #((ScreenWidth/2)-(8*4)) LineXdraw
|
||||||
mva ResultY LineYdraw
|
mva ResultY LineYdraw
|
||||||
mva #1 plot4x4color
|
|
||||||
jsr TypeLine4x4
|
jsr TypeLine4x4
|
||||||
|
|
||||||
adb ResultY #4 ;next line
|
adb ResultY #4 ;next line
|
||||||
|
|
||||||
;Empty line
|
;Empty line
|
||||||
mwa #LineEmpty LineAddress4x4
|
|
||||||
mwa ResultX LineXdraw
|
|
||||||
mva ResultY LineYdraw
|
mva ResultY LineYdraw
|
||||||
mva #1 plot4x4color
|
jsr TL4x4_empty
|
||||||
jsr TypeLine4x4
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
dec ResultOfTankNr
|
dec ResultOfTankNr
|
||||||
|
|
||||||
bmi FinishResultDisplay
|
bmi FinishResultDisplay
|
||||||
|
|
||||||
sbb ResultY #2 ;distance between lines is smaller
|
sbb ResultY #2 ;distance between lines is smaller
|
||||||
@@ -1550,25 +1624,35 @@ TankNameCopyLoop
|
|||||||
jmp ResultOfTheNextPlayer
|
jmp ResultOfTheNextPlayer
|
||||||
|
|
||||||
FinishResultDisplay
|
FinishResultDisplay
|
||||||
|
mva ResultY LineYdraw
|
||||||
|
;jmp TL4x4_bottom ; just go
|
||||||
|
.endp
|
||||||
|
|
||||||
|
.proc TL4x4_bottom
|
||||||
;bottom of the frame
|
;bottom of the frame
|
||||||
mwa #LineBottom LineAddress4x4
|
mwa #LineBottom LineAddress4x4
|
||||||
mwa ResultX LineXdraw
|
mwa #((ScreenWidth/2)-(8*4)) LineXdraw
|
||||||
mva ResultY LineYdraw
|
jmp TypeLine4x4 ; jsr:rts
|
||||||
mva #1 plot4x4color
|
.endp
|
||||||
jsr TypeLine4x4
|
|
||||||
rts
|
.proc TL4x4_top
|
||||||
|
;bottom of the frame
|
||||||
|
mwa #LineTop LineAddress4x4
|
||||||
|
mwa #((ScreenWidth/2)-(8*4)) LineXdraw
|
||||||
|
jmp TypeLine4x4 ; jsr:rts
|
||||||
|
.endp
|
||||||
|
|
||||||
|
.proc TL4x4_empty
|
||||||
|
;empty frame
|
||||||
|
mwa #LineEmpty LineAddress4x4
|
||||||
|
mwa #((ScreenWidth/2)-(8*4)) LineXdraw
|
||||||
|
jmp TypeLine4x4 ; jsr:rts
|
||||||
.endp
|
.endp
|
||||||
|
|
||||||
;-------------------------------------------------
|
;-------------------------------------------------
|
||||||
.proc StatusDisplay
|
.proc DisplayStatus
|
||||||
;-------------------------------------------------
|
;-------------------------------------------------
|
||||||
|
|
||||||
;lda noDeathCounter
|
|
||||||
;sta decimal
|
|
||||||
;mwa #textbuffer+80+37 displayposition
|
|
||||||
;jsr displaybyte
|
|
||||||
|
|
||||||
;---------------------
|
;---------------------
|
||||||
;displaying symbol of the weapon
|
;displaying symbol of the weapon
|
||||||
;---------------------
|
;---------------------
|
||||||
@@ -1581,15 +1665,6 @@ FinishResultDisplay
|
|||||||
lda WeaponSymbols,y
|
lda WeaponSymbols,y
|
||||||
sta TextBuffer+18
|
sta TextBuffer+18
|
||||||
|
|
||||||
;---------------------
|
|
||||||
;displaying the energy of a tank
|
|
||||||
;---------------------
|
|
||||||
|
|
||||||
lda Energy,x
|
|
||||||
|
|
||||||
sta decimal
|
|
||||||
mwa #textbuffer+48 displayposition
|
|
||||||
jsr displaybyte
|
|
||||||
;---------------------
|
;---------------------
|
||||||
;displaying quantity of the given weapon
|
;displaying quantity of the given weapon
|
||||||
;---------------------
|
;---------------------
|
||||||
@@ -1608,28 +1683,39 @@ FinishResultDisplay
|
|||||||
sta temp ;get back number of the weapon
|
sta temp ;get back number of the weapon
|
||||||
mva #0 temp+1
|
mva #0 temp+1
|
||||||
; times 16 (because this is length of weapon name)
|
; times 16 (because this is length of weapon name)
|
||||||
ldy #3 ; rotate 4 times
|
ldy #3 ; shift left 4 times
|
||||||
RotateDISP02
|
@
|
||||||
aslw temp
|
aslw temp
|
||||||
dey
|
dey
|
||||||
bpl RotateDISP02
|
bpl @-
|
||||||
|
|
||||||
adw temp #NamesOfWeapons
|
adw temp #NamesOfWeapons
|
||||||
ldy #6 ; from 6th character
|
ldy #6 ; from 6th character
|
||||||
|
|
||||||
ldy #15
|
ldy #15
|
||||||
loop06
|
@
|
||||||
lda (temp),y
|
lda (temp),y
|
||||||
sta textbuffer+23,y
|
sta textbuffer+23,y
|
||||||
dey
|
dey
|
||||||
bpl loop06
|
bpl @-
|
||||||
|
|
||||||
|
;---------------------
|
||||||
|
;displaying the energy of a tank
|
||||||
|
;---------------------
|
||||||
|
|
||||||
|
lda Energy,x
|
||||||
|
|
||||||
|
sta decimal
|
||||||
|
mwa #textbuffer+48 displayposition
|
||||||
|
jsr displaybyte
|
||||||
|
|
||||||
;=========================
|
;=========================
|
||||||
;display Force
|
;display Force
|
||||||
;=========================
|
;=========================
|
||||||
ldx TankNr
|
ldx TankNr
|
||||||
lda EnergyTableL,x
|
lda ForceTableL,x
|
||||||
sta decimal
|
sta decimal
|
||||||
lda EnergyTableH,x
|
lda ForceTableH,x
|
||||||
sta decimal+1
|
sta decimal+1
|
||||||
mwa #textbuffer+40+34 displayposition
|
mwa #textbuffer+40+34 displayposition
|
||||||
jsr displaydec
|
jsr displaydec
|
||||||
@@ -1670,35 +1756,39 @@ AngleDisplay
|
|||||||
mwa #textbuffer+40+21 displayposition
|
mwa #textbuffer+40+21 displayposition
|
||||||
jsr displaybyte
|
jsr displaybyte
|
||||||
|
|
||||||
|
|
||||||
;=========================
|
;=========================
|
||||||
;display Wind
|
;display Wind
|
||||||
;=========================
|
;=========================
|
||||||
lda WindOrientation
|
mwa Wind temp
|
||||||
bne DisplayLeftWind
|
lda Wind+3 ; highest byte of 4 byte wind
|
||||||
|
bmi DisplayLeftWind
|
||||||
lda #$7f ; (tab) char
|
lda #$7f ; (tab) char
|
||||||
sta textbuffer+80+28
|
sta textbuffer+80+28
|
||||||
lda #0 ;space
|
lda #0 ;space
|
||||||
sta textbuffer+80+25
|
sta textbuffer+80+25
|
||||||
beq DisplayWindValue
|
beq DisplayWindValue
|
||||||
DisplayLeftWind
|
DisplayLeftWind
|
||||||
|
sec ; Wind = -Wind
|
||||||
|
lda #$00
|
||||||
|
sbc temp
|
||||||
|
sta temp
|
||||||
|
lda #$00
|
||||||
|
sbc temp+1
|
||||||
|
sta temp+1
|
||||||
lda #$7e ;(del) char
|
lda #$7e ;(del) char
|
||||||
sta textbuffer+80+25
|
sta textbuffer+80+25
|
||||||
lda #0 ;space
|
lda #0 ;space
|
||||||
sta textbuffer+80+28
|
sta textbuffer+80+28
|
||||||
DisplayWindValue
|
DisplayWindValue
|
||||||
mwa Wind temp
|
:4 lsrw temp ;divide by 16 to have a nice value on a screen
|
||||||
lsrw temp ;divide by 16 to have
|
|
||||||
lsrw temp ;a nice view on a screen
|
|
||||||
lsrw temp
|
|
||||||
lsrw temp
|
|
||||||
lda temp
|
lda temp
|
||||||
sta decimal
|
sta decimal
|
||||||
mwa #textbuffer+80+26 displayposition
|
mwa #textbuffer+80+26 displayposition
|
||||||
jsr displaybyte
|
jsr displaybyte
|
||||||
|
|
||||||
|
;=========================
|
||||||
;display round number
|
;display round number
|
||||||
|
;=========================
|
||||||
lda CurrentRoundNr
|
lda CurrentRoundNr
|
||||||
sta decimal
|
sta decimal
|
||||||
mwa #textbuffer+80+14 displayposition
|
mwa #textbuffer+80+14 displayposition
|
||||||
|
|||||||
Executable → Regular
+65
-58
@@ -8,31 +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
|
||||||
;=====================================================
|
;=====================================================
|
||||||
;--------------------------------------------------
|
|
||||||
;Variables
|
|
||||||
;--------------
|
|
||||||
TanksNames ; DO NOT ZERO - ticket #24
|
TanksNames ; DO NOT ZERO - ticket #24
|
||||||
:6 dta d" "
|
:6 dta d" "
|
||||||
;----------------------------
|
;----------------------------------------------------
|
||||||
;Options DO NOT ZERO - ticket #27
|
;Options DO NOT ZERO - ticket #27
|
||||||
OptionsTable .by 0,0,2,2,0,1,4
|
OptionsTable .by 0,0,2,2,0,1,3
|
||||||
RoundsInTheGame .by 10 ;how many rounds in the current game
|
RoundsInTheGame .by 10 ;how many rounds in the current game
|
||||||
seppukuVal .by 75
|
seppukuVal .by 75
|
||||||
;--------------------------------------------------
|
;----------------------------------------------------
|
||||||
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]
|
||||||
;-----------------------------------
|
;----------------------------------------------------
|
||||||
; 4x4 text buffer
|
; 4x4 text buffer
|
||||||
ResultLineBuffer
|
ResultLineBuffer
|
||||||
dta d" "
|
dta d" ", $ff
|
||||||
.byte $ff
|
|
||||||
LineHeader1
|
LineHeader1
|
||||||
dta d"# ROUND: "
|
dta d"# ROUND: "
|
||||||
RoundNrDisplay
|
RoundNrDisplay
|
||||||
dta d" #"
|
dta d" #", $ff
|
||||||
.byte $ff
|
|
||||||
|
|
||||||
|
;=====================================================
|
||||||
variablesStart ; zeroing starts here
|
variablesStart ; zeroing starts here
|
||||||
|
;=====================================================
|
||||||
|
drawFunction .ds 1 ; 0 - plot, %10000000 - LineLength (N), %01000000 - DrawCheck (V)
|
||||||
;--------------
|
;--------------
|
||||||
sfx_effect .ds 1
|
sfx_effect .ds 1
|
||||||
;--------------
|
;--------------
|
||||||
@@ -43,29 +41,29 @@ flyDelay .ds 1
|
|||||||
;--------------
|
;--------------
|
||||||
NumberOfPlayers .DS 1 ;current number of players (counted from 1)
|
NumberOfPlayers .DS 1 ;current number of players (counted from 1)
|
||||||
TankSequence .DS [MaxPlayers] ;sequence of shooting during the Round
|
TankSequence .DS [MaxPlayers] ;sequence of shooting during the Round
|
||||||
GameIsOver .DS 1 ; 1 - it was the last round in the game
|
GameIsOver .DS 1 ; 1 means it was the last round in the game
|
||||||
;-----------------------------------
|
;----------------------------------------------------
|
||||||
moneyH ;we place zero at the end of prices and money
|
moneyH ;we place zero at the end of prices and money
|
||||||
;and have range from 0 to 99990 (not too much)
|
;and have range from 0 to 99990 (not too much)
|
||||||
;money players have (maybe one more byte is needed?)
|
;money players have (maybe one more byte is needed?)
|
||||||
.DS [MaxPlayers]
|
.DS [MaxPlayers]
|
||||||
moneyL
|
moneyL
|
||||||
.DS [MaxPlayers]
|
.DS [MaxPlayers]
|
||||||
;-----------------------------------
|
;----------------------------------------------------
|
||||||
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 loose after player's shoots
|
||||||
.DS [MaxPlayers]
|
.DS [MaxPlayers]
|
||||||
gainL
|
gainL
|
||||||
.DS [MaxPlayers]
|
.DS [MaxPlayers]
|
||||||
;-----------------------------------
|
;----------------------------------------------------
|
||||||
looseH ;how much player looses after the round
|
looseH ;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
|
looseL
|
||||||
.DS [MaxPlayers]
|
.DS [MaxPlayers]
|
||||||
;-----------------------------------
|
;----------------------------------------------------
|
||||||
Energy
|
Energy
|
||||||
.DS [MaxPlayers]
|
.DS [MaxPlayers]
|
||||||
EnergyDecrease .DS 1
|
EnergyDecrease .DS 1
|
||||||
@@ -78,66 +76,65 @@ ResultsTable ;the results in the gameeeeee
|
|||||||
.DS [MaxPlayers]
|
.DS [MaxPlayers]
|
||||||
TempResults
|
TempResults
|
||||||
.DS [MaxPlayers]
|
.DS [MaxPlayers]
|
||||||
CurrentResult
|
;----------------------------------------------------
|
||||||
.DS 1
|
ForceTableL ;shooting Force of the tank during the round
|
||||||
;-----------------------------------
|
|
||||||
EnergyTableL ;shooting Force of the tank during the round
|
|
||||||
.DS [MaxPlayers]
|
.DS [MaxPlayers]
|
||||||
EnergyTableH
|
ForceTableH
|
||||||
.DS [MaxPlayers] ;maxplayers=6
|
.DS [MaxPlayers] ;maxplayers=6
|
||||||
MaxEnergyTableL ;Energy of the tank during the round
|
MaxForceTableL ;Energy of the tank during the round
|
||||||
;(limes superior force of the Shoot)
|
;(limes superior force of the Shoot)
|
||||||
.DS [MaxPlayers] ;1000 is the default
|
.DS [MaxPlayers] ;1000 is the default
|
||||||
MaxEnergyTableH
|
MaxForceTableH
|
||||||
.DS [MaxPlayers]
|
.DS [MaxPlayers]
|
||||||
;-----------------------------------
|
;----------------------------------------------------
|
||||||
|
|
||||||
AngleTable ;Angle of the barrel of each tank during the round
|
AngleTable ;Angle of the barrel of each tank during the round
|
||||||
.DS [MaxPlayers]
|
.DS [MaxPlayers]
|
||||||
NewAngle .DS 1
|
NewAngle .DS 1
|
||||||
;-----------------------------------
|
;----------------------------------------------------
|
||||||
|
|
||||||
ActiveWeapon ;number of the selected weapon
|
ActiveWeapon ;number of the selected weapon
|
||||||
.DS [MaxPlayers]
|
.DS [MaxPlayers]
|
||||||
WeaponDepleted .DS 1 ; if 0 deactivate the weapon and switch to Baby Missile
|
WeaponDepleted .DS 1 ; if 0 deactivate the weapon and switch to Baby Missile
|
||||||
;-----------------------------------
|
;----------------------------------------------------
|
||||||
|
|
||||||
;format of the 3-byte static point number used in the game
|
;format of the 3-byte static point number used in the game
|
||||||
; 20203.5 => 128 : <20203 : >20203
|
; 20203.5 => 128 : <20203 : >20203
|
||||||
;-----------------------------------
|
;----------------------------------------------------
|
||||||
|
|
||||||
L1 .DS 1 ; variable used in multiplications (by 10:)
|
L1 .DS 1 ; variable used in multiplications (by 10:)
|
||||||
gravity .DS 1 ;only the decimal part (1/10 = 25)
|
gravity .DS 1 ;only the decimal part (1/10 = 25)
|
||||||
;-----------------------------------
|
;----------------------------------------------------
|
||||||
|
|
||||||
Wind .ds 2 ;walue displayed on the screen
|
Wind .ds 4 ;format: 0000.hhll
|
||||||
;multiplied by 16 (decimal part only)
|
;walue displayed on the screen is
|
||||||
;-----------------------------------
|
;decimal portion divided by 16 (>>4)
|
||||||
|
;----------------------------------------------------
|
||||||
MaxWind .ds 1 ;
|
MaxWind .ds 1 ;
|
||||||
WindOrientation .DS 1 ;(0-right,1-left)
|
WindOrientation .DS 1 ;(0-right,1-left)
|
||||||
;-----------------------------------
|
;----------------------------------------------------
|
||||||
Counter .DS 1 ;temporary Counter for outside loops
|
Counter .DS 1 ;temporary Counter for outside loops
|
||||||
HitFlag .DS 1 ;1 when missile hit anything
|
HitFlag .DS 1 ;1 when missile hit anything
|
||||||
;-----------------------------------
|
;----------------------------------------------------
|
||||||
xtankstableL ;X positions of tanks (lower left point)
|
xtankstableL ;X positions of tanks (lower left point)
|
||||||
.DS [MaxPlayers]
|
.DS [MaxPlayers]
|
||||||
xtankstableH
|
xtankstableH
|
||||||
.DS [MaxPlayers]
|
.DS [MaxPlayers]
|
||||||
ytankstable ;Y positions of tanks (lower left point)
|
ytankstable ;Y positions of tanks (lower left point)
|
||||||
.DS [MaxPlayers]
|
.DS [MaxPlayers]
|
||||||
LowResDistances ; coarse stank 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]
|
||||||
;-----------------------------------
|
;----------------------------------------------------
|
||||||
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
|
||||||
|
|
||||||
;-----------------------------------
|
;----------------------------------------------------
|
||||||
RangeLeft .DS 2 ;range of the soil to be fallen down
|
RangeLeft .DS 2 ;range of the soil to be fallen down
|
||||||
RangeRight .DS 2 ;it is being set by all Explosions
|
RangeRight .DS 2 ;it is being set by all Explosions
|
||||||
;-----------------------------------
|
;----------------------------------------------------
|
||||||
WeaponRangeLeft .DS 2 ;Range of the Explosion of the given weapon
|
WeaponRangeLeft .DS 2 ;Range of the Explosion of the given weapon
|
||||||
WeaponRangeRight .DS 2
|
WeaponRangeRight .DS 2
|
||||||
;--------------------------------------------------
|
;----------------------------------------------------
|
||||||
;xroller
|
;xroller
|
||||||
HowMuchToFall .ds 1
|
HowMuchToFall .ds 1
|
||||||
HeightRol .DS 1
|
HeightRol .DS 1
|
||||||
@@ -152,13 +149,12 @@ digtabyL .DS [8]
|
|||||||
digtabyH .DS [8]
|
digtabyH .DS [8]
|
||||||
; liquiddirt
|
; liquiddirt
|
||||||
TempXfill .ds 2
|
TempXfill .ds 2
|
||||||
FillCounter .ds 1
|
FillCounter .ds 2
|
||||||
;sandhog
|
;sandhog
|
||||||
sandhogflag .DS 1 ; (0 digger, 8 sandhog)
|
sandhogflag .DS 1 ; (0 digger, 8 sandhog)
|
||||||
;ofdirt
|
;ofdirt
|
||||||
magic .DS 2 ; was tempor2, but it was not compiling!!! (bug in OMC65)
|
magic .DS 2 ; was tempor2, but it was not compiling!!! (bug in OMC65)
|
||||||
;draw
|
;draw
|
||||||
DrawJumpAddr .DS 2
|
|
||||||
HowToDraw .DS 1
|
HowToDraw .DS 1
|
||||||
; bits here mean
|
; bits here mean
|
||||||
; 0 - negative X (go up)
|
; 0 - negative X (go up)
|
||||||
@@ -171,14 +167,14 @@ LineLength .DS 2
|
|||||||
;circle
|
;circle
|
||||||
radius .DS 1
|
radius .DS 1
|
||||||
xcircle .DS 2
|
xcircle .DS 2
|
||||||
ycircle .DS 1
|
ycircle .DS 2
|
||||||
tempcir .DS 2
|
tempcir .DS 2
|
||||||
;TankFalls
|
;TankFalls
|
||||||
IfFallDown .DS 1
|
IfFallDown .DS 1
|
||||||
PreviousFall .DS 1
|
PreviousFall .DS 1
|
||||||
EndOfTheFallFlag .DS 1 ; in case of the infinite fall
|
EndOfTheFallFlag .DS 1 ; in case of the infinite fall
|
||||||
Parachute .DS 1 ; are you insured with parachute?
|
Parachute .DS 1 ; are you insured with parachute?
|
||||||
; -------------------------------------------------
|
;----------------------------------------------------
|
||||||
;Flight
|
;Flight
|
||||||
;variables for 5 missiles (used for mirv)
|
;variables for 5 missiles (used for mirv)
|
||||||
xtraj00 .DS [5] ; 3 bytes of xtraj times 5. Lowest byte
|
xtraj00 .DS [5] ; 3 bytes of xtraj times 5. Lowest byte
|
||||||
@@ -191,7 +187,9 @@ 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
|
||||||
; -------------------------------------------------
|
XposFlag .DS 1 ; bullet positon X (0 - on screen , %1000000 - off-screen)
|
||||||
|
YposFlag .DS 1 ; bullet positon Y (0 - on screen , %1000000 - over the screen , %0100000 - under the screen)
|
||||||
|
;----------------------------------------------------
|
||||||
;CheckCollisionWithTank
|
;CheckCollisionWithTank
|
||||||
vx .ds 4 ; 0,0,0,0 ;two decimal bytes, two whole bytes (DC.BA)
|
vx .ds 4 ; 0,0,0,0 ;two decimal bytes, two whole bytes (DC.BA)
|
||||||
vy .ds 4 ;0,0,0,0
|
vy .ds 4 ;0,0,0,0
|
||||||
@@ -203,12 +201,11 @@ Angle .DS 1
|
|||||||
Force .ds 3 ; 0,0,0
|
Force .ds 3 ; 0,0,0
|
||||||
Multiplier .ds 3 ; 0,0,0
|
Multiplier .ds 3 ; 0,0,0
|
||||||
Multiplee .ds 2 ; 0,0
|
Multiplee .ds 2 ; 0,0
|
||||||
Result .ds 3 ; 0,0,0
|
|
||||||
goleft .DS 1 ;if 1 then flights left
|
goleft .DS 1 ;if 1 then flights left
|
||||||
;--------------------------------------------------
|
;----------------------------------------------------
|
||||||
;SoilDown2
|
;SoilDown2
|
||||||
IsEndOfTheFallFlag .DS 1
|
IsEndOfTheFallFlag .DS 1
|
||||||
; -------------------------------------------------
|
;----------------------------------------------------
|
||||||
;unPlot
|
;unPlot
|
||||||
WhichUnPlot .DS 1
|
WhichUnPlot .DS 1
|
||||||
; max 5 concurrent unPlots
|
; max 5 concurrent unPlots
|
||||||
@@ -222,7 +219,7 @@ xtrajfb .DS 2
|
|||||||
ytrajfb .DS 2
|
ytrajfb .DS 2
|
||||||
;
|
;
|
||||||
tracerflag .DS 1
|
tracerflag .DS 1
|
||||||
; -------------------------------------------------
|
;----------------------------------------------------
|
||||||
;TypeChar
|
;TypeChar
|
||||||
mask1 .DS [8]
|
mask1 .DS [8]
|
||||||
mask2 .DS [8]
|
mask2 .DS [8]
|
||||||
@@ -240,7 +237,7 @@ UpNdown .DS 1
|
|||||||
temptankX .DS 2
|
temptankX .DS 2
|
||||||
temptankNr .DS 1
|
temptankNr .DS 1
|
||||||
|
|
||||||
; -------------------------------------------------
|
;----------------------------------------------------
|
||||||
;Variables from textproc.s65
|
;Variables from textproc.s65
|
||||||
; tables with numbers of weapons on the right lists
|
; tables with numbers of weapons on the right lists
|
||||||
; to be honest - I do not know at the moment what the above
|
; to be honest - I do not know at the moment what the above
|
||||||
@@ -250,7 +247,7 @@ NubersOfWeaponsL1
|
|||||||
.ds 8*5 ; :(8*5) .by $ff
|
.ds 8*5 ; :(8*5) .by $ff
|
||||||
NubersOfWeaponsL2
|
NubersOfWeaponsL2
|
||||||
.ds 8*2 ; :(8*2) .by $ff
|
.ds 8*2 ; :(8*2) .by $ff
|
||||||
; -------------------------------------------------
|
;----------------------------------------------------
|
||||||
|
|
||||||
; variables storing amount of weapons on the first and second
|
; variables storing amount of weapons on the first and second
|
||||||
; list and pointer position
|
; list and pointer position
|
||||||
@@ -273,14 +270,14 @@ WhichList ; list currently on the screen
|
|||||||
OffsetDL1 ; offset of the list screen (how many lines)....
|
OffsetDL1 ; offset of the list screen (how many lines)....
|
||||||
.DS 1
|
.DS 1
|
||||||
|
|
||||||
; -------------------------------------------------
|
;----------------------------------------------------
|
||||||
|
|
||||||
;mark the level
|
;mark the level
|
||||||
PositionInName ; cursor position in name of the player when name input
|
PositionInName ; cursor position in name of the player when name input
|
||||||
.DS 1
|
.DS 1
|
||||||
DifficultyLevel ; Difficulty Level (human/cpu)
|
DifficultyLevel ; Difficulty Level (human/cpu)
|
||||||
.DS 1
|
.DS 1
|
||||||
;-------------------------------------------------
|
;----------------------------------------------------
|
||||||
;displaydecimal
|
;displaydecimal
|
||||||
decimal .DS 2
|
decimal .DS 2
|
||||||
decimalresult .DS 4
|
decimalresult .DS 4
|
||||||
@@ -295,7 +292,7 @@ FallDown2 .DS 1
|
|||||||
LeapFrogAngle .DS 1
|
LeapFrogAngle .DS 1
|
||||||
;laser
|
;laser
|
||||||
LaserCoordinate .DS 8 ; 2,2,2,2
|
LaserCoordinate .DS 8 ; 2,2,2,2
|
||||||
; -------------------------------------------------
|
;----------------------------------------------------
|
||||||
; Here go tables with weapons possesed by a given tank
|
; Here go tables with weapons possesed by a given tank
|
||||||
; Index in the table means weapon type
|
; Index in the table means weapon type
|
||||||
; number entered means ammo for given weapon possessed (max 99)
|
; number entered means ammo for given weapon possessed (max 99)
|
||||||
@@ -322,7 +319,7 @@ mountaintable2 ;table of mountains (size=screenwidth)
|
|||||||
.DS [screenwidth]
|
.DS [screenwidth]
|
||||||
.DS 1 ; additional byte for fallout (sometimes 1 pixel)
|
.DS 1 ; additional byte for fallout (sometimes 1 pixel)
|
||||||
MountaintableEnd ;good for table clearing
|
MountaintableEnd ;good for table clearing
|
||||||
;----------------------------------------------
|
;----------------------------------------------------
|
||||||
TextPositionX .DS 2
|
TextPositionX .DS 2
|
||||||
TextPositionY .DS 1
|
TextPositionY .DS 1
|
||||||
TextAddress .DS 2
|
TextAddress .DS 2
|
||||||
@@ -331,7 +328,16 @@ TextNumberOff .DS 1
|
|||||||
;--------------
|
;--------------
|
||||||
TankTempY
|
TankTempY
|
||||||
.DS 1
|
.DS 1
|
||||||
|
;----------------------------------------------------
|
||||||
;-------------- single round variables --------------
|
;-------------- single round variables --------------
|
||||||
|
;----------------------------------------------------
|
||||||
|
singleRoundVars
|
||||||
|
;--------------
|
||||||
|
escFlag .ds 1
|
||||||
|
;--------------
|
||||||
|
CurrentResult
|
||||||
|
.DS 1
|
||||||
|
;--------------
|
||||||
previousAngle
|
previousAngle
|
||||||
.DS [MaxPlayers]
|
.DS [MaxPlayers]
|
||||||
previousEnergyL
|
previousEnergyL
|
||||||
@@ -349,9 +355,9 @@ RandBoundaryHigh
|
|||||||
AngleTablePointer
|
AngleTablePointer
|
||||||
.DS 1
|
.DS 1
|
||||||
singleRoundVarsEnd
|
singleRoundVarsEnd
|
||||||
;----------------------------------------------
|
;----------------------------------------------------
|
||||||
; 4x4 texts
|
; 4x4 texts
|
||||||
;----------------------------------------------
|
;----------------------------------------------------
|
||||||
LineAddress4x4
|
LineAddress4x4
|
||||||
.DS 2
|
.DS 2
|
||||||
LineCharNr
|
LineCharNr
|
||||||
@@ -369,8 +375,9 @@ ResultY
|
|||||||
ResultOfTankNr
|
ResultOfTankNr
|
||||||
.DS 1
|
.DS 1
|
||||||
|
|
||||||
;----------------------------
|
;----------------------------------------------------
|
||||||
;PutChar4x4
|
;PutChar4x4
|
||||||
|
;----------------------------------------------------
|
||||||
LoopCounter4x4 .DS 1
|
LoopCounter4x4 .DS 1
|
||||||
y4x4 .DS 1
|
y4x4 .DS 1
|
||||||
StoreA4x4 .DS 1
|
StoreA4x4 .DS 1
|
||||||
@@ -382,6 +389,6 @@ plot4x4color .DS 1 ;1-white, 0-background
|
|||||||
|
|
||||||
|
|
||||||
variablesEnd
|
variablesEnd
|
||||||
;----------------------------
|
;----------------------------------------------------
|
||||||
|
|
||||||
.endif
|
.endif
|
||||||
|
|||||||
Executable → Regular
+291
-338
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user