diff --git a/artwork/HIMARS14.asm b/artwork/HIMARS14.asm index c658213..57adb4d 100644 --- a/artwork/HIMARS14.asm +++ b/artwork/HIMARS14.asm @@ -456,7 +456,7 @@ quit ini main ; --- - opt l- + ;opt l- .MACRO SPRITES missiles diff --git a/scorch.asm b/scorch.asm index f4b3fb8..f8f58b2 100644 --- a/scorch.asm +++ b/scorch.asm @@ -55,26 +55,33 @@ .zpvar xc .word .zpvar temp .word ;temporary word for the most embeded loops only .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 xtempDRAW .word ;same as above for XDRAW routine .zpvar ytempDRAW .word ;same as above for XDRAW routine + .zpvar tempor2 .byte ;--------------temps used in circle 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 fy .byte .zpvar xk .word .zpvar fs .byte .zpvar yc .byte ;ycircle - temporary for circle .zpvar dx .word - .zpvar tempor2 .byte .zpvar dy .word .zpvar dd .word .zpvar di .word .zpvar dp .word - .zpvar modify .word + ;---------------------------- .zpvar weaponPointer .word .zpvar dliCounter .byte + .zpvar pressTimer .byte + .zpvar NTSCcounter .byte + ;.zpvar dliA .byte + ;.zpvar dliX .byte + ;.zpvar dliY .byte + ;* RMT ZeroPage addresses .zpvar p_tis .word .zpvar p_trackslbstable .word @@ -889,7 +896,8 @@ ClearResults bne ClearResults mva #1 CurrentRoundNr ;we start from round 1 - + mva #6 NTSCcounter + ; RMT INIT lda #$f0 ;initial value sta RMTSFXVOLUME ;sfx note volume * 16 (0,16,32,...,240) @@ -908,7 +916,9 @@ ClearResults .endp .proc DLIinterruptGraph - pha + ;sta dliA + ;sty dliY + pha phy ldy dliCounter lda dliColorsBack,y @@ -919,17 +929,21 @@ ClearResults sta COLPF1 sty COLPF2 inc dliCounter - ply + ;ldy dliY + ;lda dliA + ply pla rti .endp .proc DLIinterruptText - pha + ;sta dliA + pha sta WSYNC mva #TextBackgroundColor colpf2 mva #TextForegroundColor colpf3 - pla + ;lda dliA + pla DLIinterruptNone rti .endp @@ -940,6 +954,21 @@ DLIinterruptNone phy 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 bmi lab2 asl @ ; * 2 @@ -947,13 +976,14 @@ DLIinterruptNone ldx #0 ;X = 0 channel (0..3 or 0..7 for stereo module) lda #0 ;A = 12 note (0..60) jsr RASTERMUSICTRACKER+15 ;RMT_SFX start tone (It works only if FEAT_SFX is enabled !!!) -; + lda #$ff sta sfx_effect ;reinit value -; lab2 jsr RASTERMUSICTRACKER+3 ;1 play + ; ------- RMT ------- +exitVBL ply plx pla diff --git a/scorch.xex b/scorch.xex index 92e363e..5d1ba23 100644 Binary files a/scorch.xex and b/scorch.xex differ diff --git a/weapons.asm b/weapons.asm index 1f72fc4..c0198aa 100644 --- a/weapons.asm +++ b/weapons.asm @@ -1025,8 +1025,6 @@ ContinueToCheckMaxForce2 ; $f3 - shift+key notpressed - lda TRIG0S - beq notpressed lda SKSTAT cmp #$ff jeq checkJoy @@ -1091,10 +1089,17 @@ notpressedJoy ;fire lda TRIG0S jeq pressedSpace + mva #$ff pressTimer ; stop counting frames jmp notpressed ; pressedUp + lda pressTimer + spl:mva #0 pressTimer ; if >128 then reset to 0 + cmp #25 ; 1/2s + bcs CTRLPressedUp + + ;force increaseeee! ldx TankNr inc ForceTableL,x @@ -1131,6 +1136,11 @@ CTRLPressedUp 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 ldx TankNr