smol edits + wip

This commit is contained in:
2023-08-26 09:44:47 -04:00
parent 8651e33619
commit d716e02e12
2 changed files with 126 additions and 120 deletions
+12
View File
@@ -2065,6 +2065,18 @@ ybarrel
bpl @- bpl @-
LDA TankColoursTable+4 LDA TankColoursTable+4
STA COLOR3 ; joined missiles (5th tank) STA COLOR3 ; joined missiles (5th tank)
rts
.endp
;--------------------------------------------------
.proc Lissajous
;--------------------------------------------------
; x = Asin(at + fi)
; y = Bsin(bt)
; center: xdraw, ydraw
rts rts
.endp .endp
+114 -120
View File
@@ -39,19 +39,19 @@
;--------------------------------------------------- ;---------------------------------------------------
FirstZpageVariable = $51 FirstZpageVariable = $51
.zpvar DliColorBack .byte = FirstZpageVariable .zpvar DliColorBack .byte = FirstZpageVariable
.zpvar FirstKeypressDelay .byte .zpvar FirstKeypressDelay .byte
.zpvar ClearSky .byte ; $ff - Crear sky during drawmountains, 0 - no clear sky .zpvar ClearSky .byte ; $ff - Crear sky during drawmountains, 0 - no clear sky
.zpvar PaddleState .byte ; old state 2nd button for 2 buttons joysticks .zpvar PaddleState .byte ; old state 2nd button for 2 buttons joysticks
.zpvar GradientNr .byte .zpvar GradientNr .byte
.zpvar GradientColors .word .zpvar GradientColors .word
.zpvar WindChangeInRound .byte ; wind change after each turn (not round only) flag - (0 - round only, >0 - each turn) .zpvar WindChangeInRound .byte ; wind change after each turn (not round only) flag - (0 - round only, >0 - each turn)
.zpvar RandomMountains .byte ; mountains type change after each turn flag - (0 - round only, >0 - each turn) .zpvar RandomMountains .byte ; mountains type change after each turn flag - (0 - round only, >0 - each turn)
.zpvar FastSoilDown .byte ; 0 - standard, >0 - fast .zpvar FastSoilDown .byte ; 0 - standard, >0 - fast
.zpvar JoystickNumber .byte .zpvar JoystickNumber .byte
.zpvar LazyFlag .byte ; 7 bit - run Lazy Darwin, 6 bit - run Lazy Boy or Darwin (!) after inventory, 0 - nothing .zpvar LazyFlag .byte ; 7 bit - run Lazy Darwin, 6 bit - run Lazy Boy or Darwin (!) after inventory, 0 - nothing
.zpvar SpyHardFlag .byte ; >$7f - run SpyHard after inventory .zpvar SpyHardFlag .byte ; >$7f - run SpyHard after inventory
.zpvar Vdebug .byte ; "visual debug" flag ($00 - off, $ff - on) .zpvar Vdebug .byte ; "visual debug" flag ($00 - off, $ff - on)
.zpvar xdraw .word ;= $64 ;variable X for plot .zpvar xdraw .word ;= $64 ;variable X for plot
.zpvar ydraw .word ;variable Y for plot (like in Atari Basic - Y=0 in upper right corner of the screen) .zpvar ydraw .word ;variable Y for plot (like in Atari Basic - Y=0 in upper right corner of the screen)
.zpvar xbyte .word .zpvar xbyte .word
@@ -71,92 +71,91 @@ FirstZpageVariable = $51
.zpvar tempor2 .word .zpvar tempor2 .word
.zpvar CreditsVScrol .byte .zpvar CreditsVScrol .byte
;--------------temps used in circle routine ;--------------temps used in circle routine
.zpvar xi .word ;X (word) in draw routine .zpvar xi .word ; X (word) in draw routine
.zpvar fx .byte .zpvar fx .byte
.zpvar yi .word ;Y (word) in draw routine .zpvar yi .word ; Y (word) in draw routine
.zpvar fy .byte .zpvar fy .byte
.zpvar xk .word .zpvar xk .word
.zpvar fs .byte .zpvar fs .byte
.zpvar yc .byte ;ycircle - temporary for circle .zpvar yc .byte ; ycircle - temporary for circle
.zpvar dx .word .zpvar dx .word
.zpvar dy .word .zpvar dy .word
.zpvar dd .word .zpvar dd .word
.zpvar di .word .zpvar di .word
.zpvar dp .word .zpvar dp .word
;---------------------------- ;----------------------------
.zpvar UnderTank1 .byte .zpvar UnderTank1 .byte
.zpvar UnderTank2 .byte .zpvar UnderTank2 .byte
;---------------------------- ;----------------------------
.zpvar TestFlightFlag .byte ; For AI test flights ($ff - test, $00 - standard shoot flight) .zpvar TestFlightFlag .byte ; For AI test flights ($ff - test, $00 - standard shoot flight)
.zpvar weaponPointer .word .zpvar weaponPointer .word
.zpvar dliCounter .byte .zpvar dliCounter .byte
.zpvar pressTimer .byte .zpvar pressTimer .byte
.zpvar NTSCcounter .byte .zpvar NTSCcounter .byte
.zpvar IsEndOfTheFallFlag .byte ; for small speedup ground falling .zpvar IsEndOfTheFallFlag .byte ; for small speedup ground falling
.zpvar sfx_effect .byte .zpvar sfx_effect .byte
.zpvar RMT_blocked .byte .zpvar RMT_blocked .byte
.zpvar ScrollFlag .byte .zpvar ScrollFlag .byte
.zpvar SkStatSimulator .byte .zpvar SkStatSimulator .byte
.zpvar FloatingAlt .byte ; floating tank altitude .zpvar FloatingAlt .byte ; floating tank altitude
.zpvar OverTankDir .byte ; (0 go right, $ff go left) direction of bypassing tanks on screen .zpvar OverTankDir .byte ; (0 go right, $ff go left) direction of bypassing tanks on screen
; --------------OPTIMIZATION VARIABLES-------------- ; --------------OPTIMIZATION VARIABLES--------------
.zpvar Force .word .zpvar Force .word
.zpvar Force_ .byte ; Force is 3 bytes long .zpvar Force_ .byte ; Force is 3 bytes long
.zpvar Angle .byte .zpvar Angle .byte
.zpvar Parachute .byte ; are you insured with parachute? .zpvar Parachute .byte ; are you insured with parachute?
.zpvar color .byte .zpvar color .byte
.zpvar Erase .byte ; if 1 only mask of the character is printed .zpvar Erase .byte ; 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
.zpvar radius .byte .zpvar radius .byte
.zpvar decimal .word .zpvar decimal .word
.zpvar NumberOfPlayers .byte ;current number of players (counted from 1) .zpvar NumberOfPlayers .byte ; current number of players (counted from 1)
.zpvar Counter .byte ;temporary Counter for outside loops .zpvar Counter .byte ; temporary Counter for outside loops
.zpvar ExplosionRadius .byte .zpvar ExplosionRadius .byte
.zpvar FunkyBombCounter .byte .zpvar FunkyBombCounter .byte
.zpvar ResultY .byte .zpvar ResultY .byte
.zpvar xcircle .word .zpvar xcircle .word
.zpvar ycircle .word .zpvar ycircle .word
.zpvar vy .word .zpvar vy .word
.zpvar vy_ .word ; 4 bytes .zpvar vy_ .word ; 4 bytes
.zpvar vx .word .zpvar vx .word
.zpvar vx_ .word ; 4 bytes .zpvar vx_ .word ; 4 bytes
.zpvar HitFlag .byte ;$ff when missile hit ground, $00 when no hit, $01-$06 tank index+1 when hit tank .zpvar HitFlag .byte ;$ff when missile hit ground, $00 when no hit, $01-$06 tank index+1 when hit tank
.zpvar PositionOnTheList .byte ; pointer position on the list being displayed .zpvar PositionOnTheList .byte ; pointer position on the list being displayed
.zpvar XHit .word .zpvar XHit .word
.zpvar delta .word .zpvar delta .word
.zpvar HowMuchToFall .byte .zpvar HowMuchToFall .byte
.zpvar magic .word .zpvar magic .word ; worst var name in the whole business
.zpvar xtraj .word .zpvar xtraj .word
.zpvar xtraj_ .byte ; 3 bytes .zpvar xtraj_ .byte ; 3 bytes
.zpvar ytraj .word .zpvar ytraj .word
.zpvar ytraj_ .byte ; 3 bytes .zpvar ytraj_ .byte ; 3 bytes
.zpvar Wind .word .zpvar Wind .word
.zpvar Wind_ .word ; 4 bytes .zpvar Wind_ .word ; 4 bytes
.zpvar RangeLeft .word .zpvar RangeLeft .word
.zpvar RangeRight .word .zpvar RangeRight .word
.zpvar NewAngle .byte .zpvar NewAngle .byte
.zpvar escFlag .byte ; 7 bit - Exit game, 6 bit - Exit to GameOver (cleared - exit to Menu), 0 - nothing .zpvar escFlag .byte ; 7 bit - Exit game, 6 bit - Exit to GameOver (cleared - exit to Menu), 0 - nothing
.zpvar LineYdraw .byte .zpvar LineYdraw .byte
.zpvar LineXdraw .word .zpvar LineXdraw .word
.zpvar plot4x4color .byte ; $00 / $ff .zpvar plot4x4color .byte ; $00 / $ff
.zpvar Multiplier .word .zpvar Multiplier .word
.zpvar Multiplier_ .byte ; 3 bytes .zpvar Multiplier_ .byte ; 3 bytes
.zpvar HowToDraw .byte .zpvar HowToDraw .byte
.zpvar DrawDirFactor .byte .zpvar DrawDirFactor .byte
.zpvar gravity .byte .zpvar gravity .byte
.zpvar LineLength .word .zpvar LineLength .word
.zpvar tracerflag .byte .zpvar tracerflag .byte
.zpvar isInventory .byte .zpvar isInventory .byte
.zpvar DifficultyLevel .byte .zpvar DifficultyLevel .byte
.zpvar goleft .byte .zpvar goleft .byte
.zpvar OffsetDL1 .byte .zpvar OffsetDL1 .byte
.zpvar L1 .byte .zpvar L1 .byte
HotNapalmFlag = FunkyBombCounter ; reuse variable! HotNapalmFlag = FunkyBombCounter ; reuse variable!
;* RMT ZeroPage addresses in artwork/sfx/rmtplayr.a65
displayposition = modify displayposition = modify
LineAddress4x4 = xcircle LineAddress4x4 = xcircle
;* RMT ZeroPage addresses in artwork/sfx/scorch_str9-NTSC.rmt
;----------------------------------------------- ;-----------------------------------------------
; libraries ; libraries
@@ -202,14 +201,13 @@ FirstZpageVariable = $51
_down = $08 _down = $08
_I = $09 _I = $09
_esc = $0a _esc = $0a
_help = $0b ;Visual Debug in 5200 _help = $0b ; Visual Debug in 5200
_del = $fc ;$0c ;not used in 5200 _del = $fc ; $0c ;not used in 5200
_M = $0d _M = $0d
_S = $0e _S = $0e
_atari = $fd ; not used in 5200 _atari = $fd ; not used in 5200
_ret = $fd ; not used in 5200 _ret = $fd ; not used in 5200
_none = $0f _none = $0f
.ende .ende
.ENDIF .ENDIF
@@ -251,7 +249,6 @@ StatusBufferCopyEnd
icl 'Atari/display_static.asm' icl 'Atari/display_static.asm'
;----------------------------------------------
;-------------------------------------------------- ;--------------------------------------------------
; Game Code ; Game Code
@@ -330,9 +327,9 @@ no5200splash
; set gradient to the full LGBTIQQAAPP+ flag on start ; set gradient to the full LGBTIQQAAPP+ flag on start
.IF CART_VERSION = 1 .IF CART_VERSION = 1
mva #$ff GradientNr ; #1 to set gradient number 2 :) (next one) - 0 (B/W) mva #$ff GradientNr ; #1 to set gradient number 2 :) (next one) - 0 (B/W)
.ELSE .ELSE
mva #0 GradientNr ; #1 to set gradient number 2 :) (next one) - 1 (polish rainbow) mva #0 GradientNr ; #1 to set gradient number 2 :) (next one) - 1 (polish rainbow)
.ENDIF .ENDIF
jsr SelectNextGradient.NotWind jsr SelectNextGradient.NotWind
@@ -341,7 +338,7 @@ no5200splash
.IF TARGET = 800 .IF TARGET = 800
; pokeys init ; pokeys init
lda #3 ; stereo lda #3 ; stereo (pseudo)
sta POKEY+$0f ; stereo sta POKEY+$0f ; stereo
sta POKEY+$1f ; stereo sta POKEY+$1f ; stereo
@@ -372,20 +369,20 @@ NoRMT_PALchange
; RMT INIT ; RMT INIT
lda #$f0 ;initial value lda #$f0 ; initial value
sta RMTSFXVOLUME ;sfx note volume * 16 (0,16,32,...,240) sta RMTSFXVOLUME ; sfx note volume * 16 (0,16,32,...,240)
lda #$ff ;initial value lda #$ff ; initial value
sta sfx_effect sta sfx_effect
RMTSong 0 RMTSong 0
.IF TARGET = 5200 .IF TARGET = 5200
mva #$0f STICK0 mva #$0f STICK0
mva #$04 CONSOL5200 ;Speaker off, Pots enabled, port #1 selected mva #$04 CONSOL5200 ; Speaker off, Pots enabled, port #1 selected
mwa #kb_continue VKEYCNT ;Keyboard handler mwa #kb_continue VKEYCNT ; Keyboard handler
.ENDIF .ENDIF
VMAIN VBLinterrupt,7 ;jsr SetVBL VMAIN VBLinterrupt,7 ; jsr SetVBL
mva #2 chactl ; necessary for 5200 mva #2 chactl ; necessary for 5200
@@ -396,11 +393,11 @@ NoRMT_PALchange
.proc SetJoystickPort .proc SetJoystickPort
sta JoystickNumber sta JoystickNumber
.IF TARGET = 800 ; second joy button state update only on A800 .IF TARGET = 800 ; second joy button state update only on A800
jsr WaitOneFrame ; is necessary for update shadow registers (PADDL0) in VBI jsr WaitOneFrame ; is necessary for update shadow registers (PADDL0) in VBI
jmp GetKey.Check2button ; update state second joy button jmp GetKey.Check2button ; update state second joy button
.ELSE .ELSE
rts rts
.ENDIF .ENDIF
.endp .endp
@@ -490,14 +487,14 @@ Check2button
;-------------------------------------------------- ;--------------------------------------------------
jsr WaitForKeyRelease jsr WaitForKeyRelease
lda kbcode lda kbcode
and #$3f ;CTRL and SHIFT ellimination and #$3f ; CTRL and SHIFT ellimination
rts rts
.endp .endp
;-------------------------------------------------- ;--------------------------------------------------
.proc WaitForKeyRelease .proc WaitForKeyRelease
;-------------------------------------------------- ;--------------------------------------------------
lda #128-KeyRepeatSpeed ; tricky lda #128-KeyRepeatSpeed ; tricky
sec sec
sbc FirstKeypressDelay ; tricky 2 :) sbc FirstKeypressDelay ; tricky 2 :)
sta pressTimer sta pressTimer
@@ -574,7 +571,7 @@ MakeDarkScreen
;-------------------------------------------------- ;--------------------------------------------------
lda CONSOL lda CONSOL
and #%00000001 ; START KEY and #%00000001 ; START KEY
seq:wait ; or waitRTC ? seq:wait ; or waitRTC ?
rts rts
.endp .endp
@@ -619,7 +616,7 @@ MakeDarkScreen
bpl nokeys bpl nokeys
;---O pressed-quit game to game over screen--- ;---O pressed-quit game to game over screen---
QuitToGameover QuitToGameover
mva #$C0 escFlag ; bits 7 and 6 set mva #$C0 escFlag ; bits 7 and 6 set
rts rts
CheckEsc CheckEsc
cmp #@kbcode._esc ; 28 ; ESC cmp #@kbcode._esc ; 28 ; ESC
@@ -654,14 +651,14 @@ noShellDelay
; starting song line 0-255 to A reg ; starting song line 0-255 to A reg
;-------------------------------------------------- ;--------------------------------------------------
cmp #song_main_menu cmp #song_main_menu
beq noingame ; noMusic blocks only ingame songs beq noingame ; noMusic blocks only ingame songs
bit noMusic bit noMusic
spl:lda #song_silencio spl:lda #song_silencio
noingame noingame
mvx #$ff RMT_blocked mvx #$ff RMT_blocked
ldx #<MODUL ;low byte of RMT module to X reg ldx #<MODUL ; low byte of RMT module to X reg
ldy #>MODUL ;hi byte of RMT module to Y reg ldy #>MODUL ; hi byte of RMT module to Y reg
jsr RASTERMUSICTRACKER ;Init jsr RASTERMUSICTRACKER ; Init
mva #0 RMT_blocked mva #0 RMT_blocked
rts rts
.endp .endp
@@ -720,14 +717,13 @@ font4x4
asl asl
asl ; 8 chars per name asl ; 8 chars per name
tax tax
@ @ lda CheatName,y
lda CheatName,y sec
sec sbc tanksnames,x
sbc tanksnames,x cmp #$27
cmp #$27 bne NoCheat
bne NoCheat inx
inx dey
dey
bpl @- bpl @-
YesCheat YesCheat
ldx TankNr ldx TankNr
@@ -736,9 +732,9 @@ YesCheat
lda TanksWeaponsTableH,x lda TanksWeaponsTableH,x
sta temp+1 sta temp+1
lda #99 lda #99
@ iny @ iny
sta (temp),y sta (temp),y
cpy #(number_of_weapons - 1) cpy #(number_of_weapons - 1)
bne @- bne @-
NoCheat NoCheat
rts rts
@@ -752,14 +748,12 @@ CheatName
bne EndofBFGDLI bne EndofBFGDLI
lda dliColorsFore lda dliColorsFore
bit random bit random
bmi @+ smi:lda DliColorBack
lda DliColorBack sta COLPF2
@ sta COLPF2
lda dliColorsFore lda dliColorsFore
bit random bit random
bmi @+ smi:lda DliColorBack
lda DliColorBack sta COLPF1
@ sta COLPF1
EndofBFGDLI EndofBFGDLI
inc dliCounter inc dliCounter
pla pla
@@ -770,7 +764,7 @@ EndofBFGDLI
SetDLI DLIinterruptBFG ; blinking on SetDLI DLIinterruptBFG ; blinking on
ldy #50 ldy #50
jsr PauseYFrames jsr PauseYFrames
SetDLI DLIinterruptGraph ; blinking off SetDLI DLIinterruptGraph ; blinking off
rts rts
.endp .endp
;-------------------------------------------------- ;--------------------------------------------------
@@ -797,9 +791,9 @@ MODULEND
.IF * > ROM_SETTINGS-1 .IF * > ROM_SETTINGS-1
.ERROR 'Code and RMT song too long to fit in 5200' .ERROR 'Code and RMT song too long to fit in 5200'
.ENDIF .ENDIF
org ROM_SETTINGS ; 5200 ROM settings address $bfe8 org ROM_SETTINGS ; 5200 ROM settings address $bfe8
; "01234567890123456789" ; "01234567890123456789"
.byte " scorch supersystem " ;20 characters title .byte " scorch supersystem " ; 20 characters title
.byte " ", $ff ;$BFFD == $ff means diagnostic cart, no splash screen .byte " ", $ff ; $BFFD == $ff means diagnostic cart, no splash screen
.word FirstSTART .word FirstSTART
.ENDIF .ENDIF