mirror of
https://github.com/pkali/scorch_src.git
synced 2026-05-20 22:34:21 +02:00
unsignificants
This commit is contained in:
+57
-71
@@ -542,7 +542,7 @@ NotHigherByte02
|
|||||||
; x correction for P/M
|
; x correction for P/M
|
||||||
; --
|
; --
|
||||||
.IF XCORRECTION_FOR_PM = 1
|
.IF XCORRECTION_FOR_PM = 1
|
||||||
and #$fe
|
and #$fe
|
||||||
.ENDIF
|
.ENDIF
|
||||||
; --
|
; --
|
||||||
sta xtankstableL,x
|
sta xtankstableL,x
|
||||||
@@ -585,7 +585,7 @@ UnequalTanks
|
|||||||
jsr PMoutofScreen
|
jsr PMoutofScreen
|
||||||
mva #1 Erase ; erase tanks flag
|
mva #1 Erase ; erase tanks flag
|
||||||
.endp
|
.endp
|
||||||
;--
|
;-------------------------------------------------
|
||||||
.proc drawtanks
|
.proc drawtanks
|
||||||
;-------------------------------------------------
|
;-------------------------------------------------
|
||||||
lda TankNr
|
lda TankNr
|
||||||
@@ -705,12 +705,12 @@ NoMissile
|
|||||||
ClearPM
|
ClearPM
|
||||||
cpy temp
|
cpy temp
|
||||||
bne ZeroesToGo
|
bne ZeroesToGo
|
||||||
@ lda (xbyte),y
|
@ lda (xbyte),y
|
||||||
and #%11110000
|
and #%11110000
|
||||||
ora #%00001111 ; (2 bits set) we set on two pixels in three lines
|
ora #%00001111 ; (2 bits set) we set on two pixels in three lines
|
||||||
sta (xbyte),y
|
sta (xbyte),y
|
||||||
dey
|
dey
|
||||||
dex
|
dex
|
||||||
bne @-
|
bne @-
|
||||||
ZeroesToGo
|
ZeroesToGo
|
||||||
lda (xbyte),y
|
lda (xbyte),y
|
||||||
@@ -725,12 +725,12 @@ PMForTank6
|
|||||||
ClearPM6
|
ClearPM6
|
||||||
cpy temp
|
cpy temp
|
||||||
bne ZeroesToGo6
|
bne ZeroesToGo6
|
||||||
@ lda (xbyte),y
|
@ lda (xbyte),y
|
||||||
and #%00001111
|
and #%00001111
|
||||||
ora #%11110000 ; (2 bits set) we set on two pixels in three lines
|
ora #%11110000 ; (2 bits set) we set on two pixels in three lines
|
||||||
sta (xbyte),y
|
sta (xbyte),y
|
||||||
dey
|
dey
|
||||||
dex
|
dex
|
||||||
bne @-
|
bne @-
|
||||||
ZeroesToGo6
|
ZeroesToGo6
|
||||||
lda (xbyte),y
|
lda (xbyte),y
|
||||||
@@ -743,9 +743,8 @@ NoPlayerMissile
|
|||||||
noTankNoPM
|
noTankNoPM
|
||||||
ldy #$01
|
ldy #$01
|
||||||
lda Erase
|
lda Erase
|
||||||
beq @+
|
seq:dey
|
||||||
dey
|
sty color
|
||||||
@ sty color
|
|
||||||
; draw defensive weapons like shield ( tank number in X )
|
; draw defensive weapons like shield ( tank number in X )
|
||||||
; in xdraw, ydraw we have coordinates left LOWER corner of Tank char
|
; in xdraw, ydraw we have coordinates left LOWER corner of Tank char
|
||||||
ldx TankNr
|
ldx TankNr
|
||||||
@@ -786,9 +785,8 @@ NoShieldDraw
|
|||||||
BarrelChange
|
BarrelChange
|
||||||
ldy #$01
|
ldy #$01
|
||||||
lda Erase
|
lda Erase
|
||||||
beq @+
|
seq:dey
|
||||||
dey
|
sty color
|
||||||
@ sty color
|
|
||||||
jsr DrawBarrel
|
jsr DrawBarrel
|
||||||
ldx TankNr
|
ldx TankNr
|
||||||
DoNotDrawTankNr
|
DoNotDrawTankNr
|
||||||
@@ -879,7 +877,7 @@ tankflash_loop
|
|||||||
.nowarn dew xdraw ; 1 pixel left
|
.nowarn dew xdraw ; 1 pixel left
|
||||||
sbw ydraw #$0a ; 10 pixels up
|
sbw ydraw #$0a ; 10 pixels up
|
||||||
jsr plot
|
jsr plot
|
||||||
.nowarn dew ydraw
|
.nowarn dew ydraw
|
||||||
inw xdraw
|
inw xdraw
|
||||||
jsr plot
|
jsr plot
|
||||||
sbw xdraw #$0d ; 13 pixels left
|
sbw xdraw #$0d ; 13 pixels left
|
||||||
@@ -895,14 +893,14 @@ tankflash_loop
|
|||||||
; this proc draws bold top on shield.
|
; this proc draws bold top on shield.
|
||||||
; Symbol of ablative shield ? :)
|
; Symbol of ablative shield ? :)
|
||||||
;--------------------------------------------------
|
;--------------------------------------------------
|
||||||
sbw xdraw #$04 ; 5 pixels left
|
sbw xdraw #$04 ; 5 pixels left
|
||||||
sbw ydraw #$0b ; 11 pixels up
|
sbw ydraw #$0b ; 11 pixels up
|
||||||
; draw additional top horizontal line of shield ( _ )
|
; draw additional top horizontal line of shield ( _ )
|
||||||
mva #6 temp
|
mva #6 temp
|
||||||
@
|
@
|
||||||
jsr plot
|
jsr plot
|
||||||
.nowarn dew xdraw
|
.nowarn dew xdraw
|
||||||
dec temp
|
dec temp
|
||||||
bne @-
|
bne @-
|
||||||
rts ; Z allways set
|
rts ; Z allways set
|
||||||
.endp
|
.endp
|
||||||
@@ -910,7 +908,7 @@ tankflash_loop
|
|||||||
.proc DrawTankParachute
|
.proc DrawTankParachute
|
||||||
;Tank number in X
|
;Tank number in X
|
||||||
;--------------------------------------------------
|
;--------------------------------------------------
|
||||||
lda #char_parachute ; parachute symbol
|
lda #char_parachute ; parachute symbol
|
||||||
sta CharCode
|
sta CharCode
|
||||||
lda Ytankstable,x
|
lda Ytankstable,x
|
||||||
cmp #16
|
cmp #16
|
||||||
@@ -953,18 +951,18 @@ ToHighToParachute
|
|||||||
dec temp
|
dec temp
|
||||||
bne @-
|
bne @-
|
||||||
|
|
||||||
sbw xdraw #2 ; 2 pixels left
|
sbw xdraw #2 ; 2 pixels left
|
||||||
inw ydraw ; 1 pixel down
|
inw ydraw ; 1 pixel down
|
||||||
|
|
||||||
; draw second horizontal line
|
; draw second horizontal line
|
||||||
mva #3 temp
|
mva #3 temp
|
||||||
@
|
@
|
||||||
jsr plot
|
jsr plot
|
||||||
.nowarn dew xdraw
|
.nowarn dew xdraw
|
||||||
dec temp
|
dec temp
|
||||||
bne @-
|
bne @-
|
||||||
|
|
||||||
adw xdraw #2 ; 2 pixels right
|
adw xdraw #2 ; 2 pixels right
|
||||||
inw ydraw ; 1 pixel down
|
inw ydraw ; 1 pixel down
|
||||||
|
|
||||||
; and last pixel
|
; and last pixel
|
||||||
@@ -995,14 +993,14 @@ ToHighToParachute
|
|||||||
inw xdraw
|
inw xdraw
|
||||||
; plot 6 random color pixels
|
; plot 6 random color pixels
|
||||||
mva #6 temp
|
mva #6 temp
|
||||||
@ lda Erase
|
@ lda Erase
|
||||||
eor #%00000001
|
eor #%00000001
|
||||||
and random
|
and random
|
||||||
and #%00000001
|
and #%00000001
|
||||||
sta color
|
sta color
|
||||||
jsr plot
|
jsr plot
|
||||||
inw xdraw
|
inw xdraw
|
||||||
dec temp
|
dec temp
|
||||||
bne @-
|
bne @-
|
||||||
; clear last pixel under tank
|
; clear last pixel under tank
|
||||||
mva #0 color
|
mva #0 color
|
||||||
@@ -1046,11 +1044,11 @@ NoFallingSound
|
|||||||
and #01
|
and #01
|
||||||
beq DoNotClearParachute
|
beq DoNotClearParachute
|
||||||
; here we clear the parachute
|
; here we clear the parachute
|
||||||
; ldx TankNr
|
; ldx TankNr
|
||||||
jsr DrawTankParachute
|
jsr DrawTankParachute
|
||||||
DoNotClearParachute
|
DoNotClearParachute
|
||||||
mva #0 Erase
|
mva #0 Erase
|
||||||
; ldx TankNr
|
; ldx TankNr
|
||||||
lda EndOfTheFallFlag ; We only get byte below the tank if still falling
|
lda EndOfTheFallFlag ; We only get byte below the tank if still falling
|
||||||
bne NoGroundCheck
|
bne NoGroundCheck
|
||||||
; coordinates of the first pixel under the tank
|
; coordinates of the first pixel under the tank
|
||||||
@@ -1062,8 +1060,8 @@ DoNotClearParachute
|
|||||||
; time in our lives! Tada! It opens a new chapter!!!
|
; time in our lives! Tada! It opens a new chapter!!!
|
||||||
sta ydraw
|
sta ydraw
|
||||||
;
|
;
|
||||||
; UnderTank1 ; byte under tank
|
; UnderTank1 ; byte under tank
|
||||||
; UnderTank2 ; byte under tank reversed (for simple check right direction)
|
; UnderTank2 ; byte under tank reversed (for simple check right direction)
|
||||||
lda #08
|
lda #08
|
||||||
sta temp ; Loop Counter
|
sta temp ; Loop Counter
|
||||||
ByteBelowTank
|
ByteBelowTank
|
||||||
@@ -1569,14 +1567,14 @@ SetYofNextTank
|
|||||||
ldy #0
|
ldy #0
|
||||||
ldx #screenheight-1
|
ldx #screenheight-1
|
||||||
nextPointChecking
|
nextPointChecking
|
||||||
txa
|
txa
|
||||||
cmp (modify),y
|
cmp (modify),y
|
||||||
bcc NotHigher
|
bcc NotHigher
|
||||||
lda (modify),y
|
lda (modify),y
|
||||||
tax
|
tax
|
||||||
NotHigher
|
NotHigher
|
||||||
inw modify
|
inw modify
|
||||||
cpw modify #(mountaintable+screenwidth)
|
cpw modify #(mountaintable+screenwidth)
|
||||||
bne nextPointChecking
|
bne nextPointChecking
|
||||||
txa
|
txa
|
||||||
rts
|
rts
|
||||||
@@ -1596,9 +1594,8 @@ notZero
|
|||||||
jsr _calc_inverse_display
|
jsr _calc_inverse_display
|
||||||
|
|
||||||
; now find length of the text
|
; now find length of the text
|
||||||
@
|
@ iny
|
||||||
iny
|
lda (LineAddress4x4),y
|
||||||
lda (LineAddress4x4),y
|
|
||||||
bpl @-
|
bpl @-
|
||||||
iny
|
iny
|
||||||
sty fx
|
sty fx
|
||||||
@@ -2046,8 +2043,8 @@ ybarrel
|
|||||||
;--------------------------------------------------
|
;--------------------------------------------------
|
||||||
lda #$00 ; let all P/M disappear
|
lda #$00 ; let all P/M disappear
|
||||||
ldy #7
|
ldy #7
|
||||||
@ sta hposp0,y
|
@ sta hposp0,y
|
||||||
dey
|
dey
|
||||||
bpl @-
|
bpl @-
|
||||||
;:8 sta hposp0+# ; optimized... but Y!
|
;:8 sta hposp0+# ; optimized... but Y!
|
||||||
rts
|
rts
|
||||||
@@ -2057,27 +2054,16 @@ ybarrel
|
|||||||
lda #%01010101
|
lda #%01010101
|
||||||
sta sizem ; all missiles, double width
|
sta sizem ; all missiles, double width
|
||||||
ldy #3
|
ldy #3
|
||||||
@ lda #$00
|
@ lda #$00
|
||||||
sta sizep0,y ; P0-P3 widths
|
sta sizep0,y ; P0-P3 widths
|
||||||
lda TankColoursTable,y ; colours of sprites under tanks
|
lda TankColoursTable,y ; colours of sprites under tanks
|
||||||
sta PCOLR0,y
|
sta PCOLR0,y
|
||||||
dey
|
dey
|
||||||
bpl @-
|
bpl @-
|
||||||
LDA TankColoursTable+4
|
LDA TankColoursTable+4
|
||||||
STA COLOR3 ; joined missiles (5th tank)
|
STA COLOR3 ; joined missiles (5th tank)
|
||||||
rts
|
rts
|
||||||
.endp
|
.endp
|
||||||
;--------------------------------------------------
|
|
||||||
.proc Lissajous
|
|
||||||
;--------------------------------------------------
|
|
||||||
; x = Asin(at + fi)
|
|
||||||
; y = Bsin(bt)
|
|
||||||
; center: xdraw, ydraw
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
rts
|
|
||||||
.endp
|
|
||||||
|
|
||||||
.endif
|
.endif
|
||||||
+34
-45
@@ -52,19 +52,23 @@ AdditionalZPvariables = $20
|
|||||||
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
|
||||||
.zpvar RandomMountains .byte ; mountains type change after each turn flag - (0 - round only, >0 - each turn)
|
; (0 - round only, >0 - each turn)
|
||||||
.zpvar FastSoilDown .byte ; 0 - standard, >0 - fast
|
.zpvar RandomMountains .byte ; mountains type change after each turn flag
|
||||||
|
; (0 - round only, >0 - each turn)
|
||||||
|
.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
|
||||||
.zpvar SpyHardFlag .byte ; >$7f - run SpyHard after inventory
|
; 0 - nothing
|
||||||
.zpvar Vdebug .byte ; "visual debug" flag ($00 - off, $ff - on)
|
.zpvar SpyHardFlag .byte ; >$7f - run SpyHard after inventory
|
||||||
.zpvar xdraw .word ;= $64 ;variable X for plot
|
.zpvar Vdebug .byte ; "visual debug" flag ($00 - off, $ff - on)
|
||||||
.zpvar ydraw .word ;variable Y for plot (like in Atari Basic - Y=0 in upper right corner of the screen)
|
.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 xbyte .word
|
.zpvar xbyte .word
|
||||||
.zpvar ybyte .word
|
.zpvar ybyte .word
|
||||||
.zpvar CharCode .byte
|
.zpvar CharCode .byte
|
||||||
@@ -73,12 +77,12 @@ FirstZpageVariable = $51
|
|||||||
.zpvar TankSequencePointer .byte
|
.zpvar TankSequencePointer .byte
|
||||||
.zpvar oldplot .word
|
.zpvar oldplot .word
|
||||||
.zpvar xc .word
|
.zpvar xc .word
|
||||||
.zpvar temp .word ;temporary word for the most embeded loops only
|
.zpvar temp .word ; temporary word for the most embeded loops only
|
||||||
.zpvar temp2 .word ;same as above
|
.zpvar temp2 .word ; same as above
|
||||||
.zpvar modify .word ;origially used to replace self-modyfying code
|
.zpvar modify .word ; origially used to replace self-modyfying code
|
||||||
.zpvar tempXROLLER .word ;same as above for XROLLER routine (used also in result display routine)
|
.zpvar tempXROLLER .word ; same as above for XROLLER routine (used also in result display routine)
|
||||||
.zpvar xtempDRAW .word ;same as above for XDRAW routine
|
.zpvar xtempDRAW .word ; same as above for XDRAW routine
|
||||||
.zpvar ytempDRAW .word ;same as above for XDRAW routine
|
.zpvar ytempDRAW .word ; same as above for XDRAW routine
|
||||||
.zpvar tempor2 .word
|
.zpvar tempor2 .word
|
||||||
.zpvar CreditsVScrol .byte
|
.zpvar CreditsVScrol .byte
|
||||||
;--------------temps used in circle routine
|
;--------------temps used in circle routine
|
||||||
@@ -103,7 +107,7 @@ FirstZpageVariable = $51
|
|||||||
.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
|
||||||
@@ -129,10 +133,11 @@ FirstZpageVariable = $51
|
|||||||
.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
|
||||||
@@ -147,7 +152,8 @@ FirstZpageVariable = $51
|
|||||||
.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
|
||||||
@@ -163,7 +169,7 @@ FirstZpageVariable = $51
|
|||||||
.zpvar goleft .byte
|
.zpvar goleft .byte
|
||||||
.zpvar OffsetDL1 .byte
|
.zpvar OffsetDL1 .byte
|
||||||
.zpvar L1 .byte
|
.zpvar L1 .byte
|
||||||
HotNapalmFlag = FunkyBombCounter ; reuse variable!
|
HotNapalmFlag = FunkyBombCounter ; variable reuse!
|
||||||
displayposition = modify
|
displayposition = modify
|
||||||
LineAddress4x4 = xcircle
|
LineAddress4x4 = xcircle
|
||||||
;* RMT ZeroPage addresses in artwork/sfx/scorch_str9-NTSC.rmt
|
;* RMT ZeroPage addresses in artwork/sfx/scorch_str9-NTSC.rmt
|
||||||
@@ -184,23 +190,6 @@ FirstZpageVariable = $51
|
|||||||
icl 'Atari/lib/5200SYS.ASM'
|
icl 'Atari/lib/5200SYS.ASM'
|
||||||
icl 'Atari/lib/5200MACRO.ASM'
|
icl 'Atari/lib/5200MACRO.ASM'
|
||||||
.enum @kbcode
|
.enum @kbcode
|
||||||
/*
|
|
||||||
_0
|
|
||||||
_1
|
|
||||||
_2
|
|
||||||
_3
|
|
||||||
_4
|
|
||||||
_5
|
|
||||||
_6
|
|
||||||
_7
|
|
||||||
_8
|
|
||||||
_9
|
|
||||||
_asterisk = $0a
|
|
||||||
_hash = $0b
|
|
||||||
_start = $0c
|
|
||||||
_pause = $0d
|
|
||||||
_reset = $0e
|
|
||||||
*/
|
|
||||||
_space = $00
|
_space = $00
|
||||||
_Y = $01
|
_Y = $01
|
||||||
_up = $02
|
_up = $02
|
||||||
@@ -266,15 +255,15 @@ StatusBufferCopyEnd
|
|||||||
;--------------------------------------------------
|
;--------------------------------------------------
|
||||||
FirstSTART
|
FirstSTART
|
||||||
.IF TARGET = 5200
|
.IF TARGET = 5200
|
||||||
; start in 5200 diagnostic mode
|
; start in 5200 diagnostic mode
|
||||||
; move original startup procedure to RAM
|
; move original startup procedure to RAM
|
||||||
|
|
||||||
Modified5200Splash = $2100 ; apparently there is some free space here
|
Modified5200Splash = $2100 ; apparently there is some free space here
|
||||||
; check kernel version
|
; check kernel version
|
||||||
Atari5200KernelByte = $fff8
|
Atari5200KernelByte = $fff8
|
||||||
; $32 - 4 joy
|
; $32 - 4 joy
|
||||||
; $00 - 2 joy
|
; $00 - 2 joy
|
||||||
; $ff - Altirra kernel
|
; $ff - Altirra kernel
|
||||||
|
|
||||||
lda Atari5200KernelByte
|
lda Atari5200KernelByte
|
||||||
beq rom2joy
|
beq rom2joy
|
||||||
|
|||||||
Reference in New Issue
Block a user