build 129

This commit is contained in:
2022-03-06 14:22:42 -05:00
parent d54c38d0bf
commit c38c87ce44
13 changed files with 231 additions and 69 deletions
+6 -1
View File
@@ -40,7 +40,12 @@ with the advent of fujinet (https://fujinet.online/) we are thinking about makin
## Changes:
###### Build 127
###### Build 129
2022-03-06
- added tune by emkay, lzss player by dmsc
- fixed bug "When result in points is >99 then only 2 first digits are displayed"
###### Build 128
2022-02-19
- fixed a bug making it harder to select AI level, unfortunately now player names can not include hyphen
- fixed numerous mistakes in handling bytes and words - possibly some of the crashes eliminated
+34 -26
View File
@@ -3,25 +3,29 @@ rev. 2013-11-17
---------------------------------------------------------
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)
007. Decreasing of number of bullets after a shoot does not work correctly
(e.g. 2 bullets are deducted instead of 1)
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
022: shooting funkybomb decreases number of bombs too much! (2 instead of 1?)
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 groud 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
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)
+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.
007. Decreasing of number of bullets after a shoot does not work correctly
(e.g. 2 bullets are deducted instead of 1)
+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!
009. When result in points is >99 then only 2 first digits are displayed
+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.
@@ -32,44 +36,48 @@ Known bugs (+ means bug is fixed)
+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 (?)
017: Observed MIRV loops - it shoots and shoots MIRV all over the screen. Very rare.
-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)
020: sometimes leftmost or rightmost remains of the funkybomb smoke do not get cleared
021: check MWA, ADW, SBW macros - bad modifications of bytes found!!!
022: shooting funkybomb decreases number of bombs too much! (2 instead of 1?)
+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
---------------------------------------------------------
To do
+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
*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
+005. Add number of rounds to the options menu
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
+008. No computer operated opponents - make a frame for AI!!!
009. Make AI in the existing frame
010. It is impossible to look up a number of parachutes left.
+011. Colouring the top status lines in a colour of the active tank.
012. Decreased number of bullets should be displayed just after the shoot.
013. Check LineTable - possibly it is unnecessarily long
+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?)
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
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 frame 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?)
+153 -2
View File
@@ -1,4 +1,4 @@
; @com.wudsn.ide.asm.mainsourcefile=scorch.asm
; @com.wudsn.ide.asm.mainsourcefile=../scorch.asm
/***************************************/
/* Use MADS http://mads.atari8.info/ */
/* Mode: DLI (char mode) */
@@ -7,7 +7,26 @@
;icl "HIMARS14.h"
;ICL '../lib/atari.hea'
org $f0
org $80
chn_copy .ds 9
chn_pos .ds 9
bptr .ds 2
cur_pos .ds 1
chn_bits .ds 1
bit_data .byte 1
.proc get_byte
lda song_data+1
inc song_ptr
bne skip
inc song_ptr+1
skip
rts
.endp
song_ptr = get_byte + 1
fcnt .ds 2
fadr .ds 2
@@ -47,7 +66,132 @@ pmg .ds $0300
eif
eif
song_data
ins 'mmm_16.lzs'
song_end
POKEY = $D200
buffers
.ds 256 * 9
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Song Initialization - this runs in the first tick:
;
.proc init_song
; Example: here initializes song pointer:
;mwa #song_data song_ptr
; Init all channels:
ldx #8
ldy #0
clear
; Read just init value and store into buffer and POKEY
jsr get_byte
sta POKEY, x
sty chn_copy, x
cbuf
sta buffers + 255
inc cbuf + 2
dex
bpl clear
; Initialize buffer pointer:
sty bptr
sty cur_pos
rts
.endp
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Wait for next frame
;
.proc wait_frame
lda 20
delay
cmp 20
beq delay
.endp
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Play one frame of the song
;
.proc play_frame
lda #>buffers
sta bptr+1
lda song_data
sta chn_bits
ldx #8
; Loop through all "channels", one for each POKEY register
chn_loop:
lsr chn_bits
bcs skip_chn ; C=1 : skip this channel
lda chn_copy, x ; Get status of this stream
bne do_copy_byte ; If > 0 we are copying bytes
; We are decoding a new match/literal
lsr bit_data ; Get next bit
bne got_bit
jsr get_byte ; Not enough bits, refill!
ror ; Extract a new bit and add a 1 at the high bit (from C set above)
sta bit_data ;
got_bit:
jsr get_byte ; Always read a byte, it could mean "match size/offset" or "literal byte"
bcs store ; Bit = 1 is "literal", bit = 0 is "match"
sta chn_pos, x ; Store in "copy pos"
jsr get_byte
sta chn_copy, x ; Store in "copy length"
; And start copying first byte
do_copy_byte:
dec chn_copy, x ; Decrease match length, increase match position
inc chn_pos, x
ldy chn_pos, x
; Now, read old data, jump to data store
lda (bptr), y
store:
ldy cur_pos
sta POKEY, x ; Store to output and buffer
sta (bptr), y
skip_chn:
; Increment channel buffer pointer
inc bptr+1
dex
bpl chn_loop ; Next channel
inc cur_pos
.endp
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Check for ending of song and jump to the next frame
;
.proc check_end_song
lda song_ptr + 1
cmp #>song_end
;bne wait_frame
lda song_ptr
cmp #<song_end
;bne wait_frame
.endp
end_loop
rts
main
jsr init_song
; --- init PMG
ift USESPRITES
@@ -98,6 +242,12 @@ stop
mva #$40 nmien ;only NMI interrupts, DLI disabled
cli ;IRQ enabled
lda #0
ldx #8
@ sta POKEY,x
dex
bpl @-
rts ;return to ... DOS
; --- DLI PROGRAM
@@ -266,6 +416,7 @@ x0 lda #$00
mwa #DLI.dli_start dliv ;set the first address of DLI interrupt
;this area is for yours routines
jsr play_frame
quit
lda regA
Binary file not shown.
Binary file not shown.
Binary file not shown.
+1 -1
View File
@@ -77,7 +77,7 @@ PlotLine = display + screenHeight*screenBytes ; the last line is plot pointer
;Screen displays go first to avoid crossing 4kb barrier
;-----------------------------------------------
OptionsScreen
dta d"Welcome to Scorch ver. 128 (un)2000-2022"
dta d"Welcome to Scorch ver. 129 (un)2000-2022"
dta d" Please select option with cursor keys "
dta d" and press (Return) to proceed "
OptionsHere
-2
View File
@@ -54,11 +54,9 @@
;-------------------------------------
.MACRO halt
?stop
/*
lda RANDOM
and #$05
sta COLBAK
*/
jmp ?stop
.ENDM
;-------------------------------------
+6 -5
View File
@@ -69,6 +69,7 @@
.zpvar modify .word
.zpvar weaponPointer .word
displayposition = modify
;-------------------------------
;constants
FlyDelay = 150
@@ -158,21 +159,21 @@ MainGameLoop
mva #0 Erase
jsr PMoutofScreen ;let P/M disappear
; here gains and looses should be displayed (dollars)
; here gains and losses should be displayed (dollars)
; finally we have changed our minds and money of players
; is displayed only in weapons shop
; Results are number of other deaths
; before the player dies itself
; add gains and substract looses
; 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 looses during
; By analogy, loss is energy that given player losses during
; each Round.
; Important! If player has 10 energy and gets central hit
; from nuke that would take 90 energy points his loss
; 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
BIN
View File
Binary file not shown.
+23 -23
View File
@@ -1097,11 +1097,10 @@ rightnumber
DecimalEnd
; displaying
mwa displayposition modify
ldy #3
displayloop
lda decimalresult,y
sta (modify),y
sta (displayposition),y
dey
bpl displayloop
@@ -1147,11 +1146,10 @@ TooLittle001 dex
decimalend1
; displaying
mwa displayposition modify
ldy #1
displayloop1
lda decimalresult,y
sta (modify),y
sta (displayposition),y
dey
bpl displayloop1
@@ -1342,12 +1340,12 @@ EndOfTypeLine4x4
rts
;--------------------------------
DisplayResults ;
.proc DisplayResults ;
;displays results of the round
;using 4x4 font
;centering the result screen
mwa #((ScreenWidth/2)-(7*4)) ResultX
mwa #((ScreenWidth/2)-(8*4)) ResultX
mva #((ScreenHeight/2)-(8*4)) ResultY
@@ -1455,25 +1453,25 @@ TankNameCopyLoop
cpx #8 ; end of name
bne TankNameCopyLoop
inx
lda #26 ;it means ":"
sta ResultLineBuffer,x
ldy TankNr
lda ResultsTable,y
sta decimal
mwa #(ResultLineBuffer+10) displayposition
jsr displaybyte ;decimal (byte), displayposition (word)
ldx #12 ;justafter the digits
lda #3 ;it means |
sta ResultLineBuffer,x
inx
lda #$ff ;it means end of line
sta ResultLineBuffer,x
mva #0 decimal+1
mwa #(ResultLineBuffer+9) displayposition
jsr displaydec ;decimal (byte), displayposition (word)
; overwrite the first digit of the points (max 255)
;it means ":"
mva #26 ResultLineBuffer+9
;just after the digits
;it means |
mva #$3 ResultLineBuffer+13
;it means end of line
mva #$ff ResultLineBuffer+14
;result line display
mwa #ResultLineBuffer LineAddress4x4
@@ -1510,10 +1508,10 @@ FinishResultDisplay
mva #1 plot4x4color
jsr TypeLine4x4
rts
.endp
;-------------------------------------------------
DisplayingSymbols
.proc DisplayingSymbols
;-------------------------------------------------
;---------------------
@@ -1647,8 +1645,9 @@ DisplayWindValue
mwa #textbuffer+77 displayposition
jsr displaybyte
rts
.endp
;-------------------------------------------------
PutTankNameOnScreen
.proc PutTankNameOnScreen
; puts name of the tan on the screen
ldy #$00
lda tanknr
@@ -1664,6 +1663,7 @@ NextChar02
cpy #$08
bne NextChar02
rts
.endp
;-------------------------------------------------
.endif
+6 -7
View File
@@ -288,7 +288,6 @@ LevelNameBeginH
;-------------------------------------------------
;displaydecimal
decimal .word 0
displayposition .word 0
decimalresult dta d"0000"
;xmissile
@@ -369,25 +368,25 @@ LineXdraw
LineYdraw
.byte 0
LineTop
dta d"(%%%%%%%%%%%)"
dta d"(%%%%%%%%%%%%)"
.byte $ff
;# - vertical, () * +, % - horizontal
LineBottom
dta d"*%%%%%%%%%%%+"
dta d"*%%%%%%%%%%%%+"
.byte $ff
LineEmpty
dta d"# #"
dta d"# #"
.byte $ff
LineHeader1
dta d"# ROUND: "
RoundNrDisplay
dta d" #"
dta d" #"
.byte $ff
LineHeader2
dta d"# RESULTS #"
dta d"# RESULTS #"
.byte $ff
LineGameOver
dta d"# GAME OVER #"
dta d"# GAME OVER #"
.byte $ff
+2 -2
View File
@@ -593,7 +593,7 @@ PositiveVelocity
adw tempXROLLER xdraw
SeekLeft
dew tempXROLLER
.nowarn dew tempXROLLER
lda (tempXROLLER),y ;fukk! beware of Y value
cmp HeightRol
bne HowMuchToFallLeft
@@ -673,7 +673,7 @@ UpNotYet
lda HowMuchToFall
cmp #1
beq HowMuchToFallRight2
dew xdraw
.nowarn dew xdraw
lda xdraw
bne RollinContinues
lda xdraw+1