mirror of
https://github.com/Pecusx/scorch_src.git
synced 2026-05-21 21:34:20 +02:00
power timer 1/2s to speed up #75
This commit is contained in:
@@ -456,7 +456,7 @@ quit
|
|||||||
ini main
|
ini main
|
||||||
; ---
|
; ---
|
||||||
|
|
||||||
opt l-
|
;opt l-
|
||||||
|
|
||||||
.MACRO SPRITES
|
.MACRO SPRITES
|
||||||
missiles
|
missiles
|
||||||
|
|||||||
+35
-5
@@ -55,26 +55,33 @@
|
|||||||
.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 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 .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 ;circle drawing variables
|
.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 tempor2 .byte
|
|
||||||
.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 modify .word
|
;----------------------------
|
||||||
.zpvar weaponPointer .word
|
.zpvar weaponPointer .word
|
||||||
.zpvar dliCounter .byte
|
.zpvar dliCounter .byte
|
||||||
|
.zpvar pressTimer .byte
|
||||||
|
.zpvar NTSCcounter .byte
|
||||||
|
;.zpvar dliA .byte
|
||||||
|
;.zpvar dliX .byte
|
||||||
|
;.zpvar dliY .byte
|
||||||
|
|
||||||
;* RMT ZeroPage addresses
|
;* RMT ZeroPage addresses
|
||||||
.zpvar p_tis .word
|
.zpvar p_tis .word
|
||||||
.zpvar p_trackslbstable .word
|
.zpvar p_trackslbstable .word
|
||||||
@@ -889,6 +896,7 @@ ClearResults
|
|||||||
bne ClearResults
|
bne ClearResults
|
||||||
|
|
||||||
mva #1 CurrentRoundNr ;we start from round 1
|
mva #1 CurrentRoundNr ;we start from round 1
|
||||||
|
mva #6 NTSCcounter
|
||||||
|
|
||||||
; RMT INIT
|
; RMT INIT
|
||||||
lda #$f0 ;initial value
|
lda #$f0 ;initial value
|
||||||
@@ -908,6 +916,8 @@ ClearResults
|
|||||||
.endp
|
.endp
|
||||||
|
|
||||||
.proc DLIinterruptGraph
|
.proc DLIinterruptGraph
|
||||||
|
;sta dliA
|
||||||
|
;sty dliY
|
||||||
pha
|
pha
|
||||||
phy
|
phy
|
||||||
ldy dliCounter
|
ldy dliCounter
|
||||||
@@ -919,16 +929,20 @@ ClearResults
|
|||||||
sta COLPF1
|
sta COLPF1
|
||||||
sty COLPF2
|
sty COLPF2
|
||||||
inc dliCounter
|
inc dliCounter
|
||||||
|
;ldy dliY
|
||||||
|
;lda dliA
|
||||||
ply
|
ply
|
||||||
pla
|
pla
|
||||||
rti
|
rti
|
||||||
.endp
|
.endp
|
||||||
|
|
||||||
.proc DLIinterruptText
|
.proc DLIinterruptText
|
||||||
|
;sta dliA
|
||||||
pha
|
pha
|
||||||
sta WSYNC
|
sta WSYNC
|
||||||
mva #TextBackgroundColor colpf2
|
mva #TextBackgroundColor colpf2
|
||||||
mva #TextForegroundColor colpf3
|
mva #TextForegroundColor colpf3
|
||||||
|
;lda dliA
|
||||||
pla
|
pla
|
||||||
DLIinterruptNone
|
DLIinterruptNone
|
||||||
rti
|
rti
|
||||||
@@ -940,6 +954,21 @@ DLIinterruptNone
|
|||||||
phy
|
phy
|
||||||
mva #0 dliCounter
|
mva #0 dliCounter
|
||||||
|
|
||||||
|
lda PAL
|
||||||
|
and #%00001110
|
||||||
|
beq itsPAL
|
||||||
|
;it is NTSC here
|
||||||
|
dec NTSCcounter
|
||||||
|
bne itsPAL
|
||||||
|
mva #6 NTSCcounter
|
||||||
|
bne exitVBL ; skip doing VBL things each 6 frames in Amerika, Amerika
|
||||||
|
; We're all living in Amerika, Coca Cola, Wonderbra
|
||||||
|
|
||||||
|
itsPAL
|
||||||
|
; pressTimer is trigger tick counter. always 50 ticks / s
|
||||||
|
bit:smi:inc pressTimer ; timer halted if >127. max time measured 2.5 s
|
||||||
|
|
||||||
|
; ------- RMT -------
|
||||||
lda sfx_effect
|
lda sfx_effect
|
||||||
bmi lab2
|
bmi lab2
|
||||||
asl @ ; * 2
|
asl @ ; * 2
|
||||||
@@ -947,13 +976,14 @@ DLIinterruptNone
|
|||||||
ldx #0 ;X = 0 channel (0..3 or 0..7 for stereo module)
|
ldx #0 ;X = 0 channel (0..3 or 0..7 for stereo module)
|
||||||
lda #0 ;A = 12 note (0..60)
|
lda #0 ;A = 12 note (0..60)
|
||||||
jsr RASTERMUSICTRACKER+15 ;RMT_SFX start tone (It works only if FEAT_SFX is enabled !!!)
|
jsr RASTERMUSICTRACKER+15 ;RMT_SFX start tone (It works only if FEAT_SFX is enabled !!!)
|
||||||
;
|
|
||||||
lda #$ff
|
lda #$ff
|
||||||
sta sfx_effect ;reinit value
|
sta sfx_effect ;reinit value
|
||||||
;
|
|
||||||
lab2
|
lab2
|
||||||
jsr RASTERMUSICTRACKER+3 ;1 play
|
jsr RASTERMUSICTRACKER+3 ;1 play
|
||||||
|
; ------- RMT -------
|
||||||
|
|
||||||
|
exitVBL
|
||||||
ply
|
ply
|
||||||
plx
|
plx
|
||||||
pla
|
pla
|
||||||
|
|||||||
BIN
Binary file not shown.
+12
-2
@@ -1025,8 +1025,6 @@ ContinueToCheckMaxForce2
|
|||||||
; $f3 - shift+key
|
; $f3 - shift+key
|
||||||
|
|
||||||
notpressed
|
notpressed
|
||||||
lda TRIG0S
|
|
||||||
beq notpressed
|
|
||||||
lda SKSTAT
|
lda SKSTAT
|
||||||
cmp #$ff
|
cmp #$ff
|
||||||
jeq checkJoy
|
jeq checkJoy
|
||||||
@@ -1091,10 +1089,17 @@ notpressedJoy
|
|||||||
;fire
|
;fire
|
||||||
lda TRIG0S
|
lda TRIG0S
|
||||||
jeq pressedSpace
|
jeq pressedSpace
|
||||||
|
mva #$ff pressTimer ; stop counting frames
|
||||||
jmp notpressed
|
jmp notpressed
|
||||||
|
|
||||||
;
|
;
|
||||||
pressedUp
|
pressedUp
|
||||||
|
lda pressTimer
|
||||||
|
spl:mva #0 pressTimer ; if >128 then reset to 0
|
||||||
|
cmp #25 ; 1/2s
|
||||||
|
bcs CTRLPressedUp
|
||||||
|
|
||||||
|
|
||||||
;force increaseeee!
|
;force increaseeee!
|
||||||
ldx TankNr
|
ldx TankNr
|
||||||
inc ForceTableL,x
|
inc ForceTableL,x
|
||||||
@@ -1131,6 +1136,11 @@ CTRLPressedUp
|
|||||||
|
|
||||||
|
|
||||||
pressedDown
|
pressedDown
|
||||||
|
lda pressTimer
|
||||||
|
spl:mva #0 pressTimer ; if >128 then reset to 0
|
||||||
|
cmp #50 ; 1s
|
||||||
|
bcs CTRLPressedDown
|
||||||
|
|
||||||
mva #sfx_set_power_1 sfx_effect
|
mva #sfx_set_power_1 sfx_effect
|
||||||
|
|
||||||
ldx TankNr
|
ldx TankNr
|
||||||
|
|||||||
Reference in New Issue
Block a user