Every thruster that catches pops, not only the first
A pilot already burning upwards who then adds a sideways thruster has lit an engine, and that is what an engine lighting sounds like. So what is watched is now the SET of thrusters rather than whether any of them is lit: the bits on now that were not on before, which is an exclusive or and an and and no comparison at all. The rumble still asks the old question, because it is the right question for it - struck when the first lights and not again until every one has gone out. Restriking it when a second joins would start its attack over, which is a stutter rather than an engine, so it keeps a flag of its own. Pitches are as tuned by ear: 36 for the pop, 60 for the rumble. Checked by two flights of the same length, one thruster held throughout against one that gains a second in the middle. The rumble is identical in both, so the whole of the difference is the extra pop: peak 11,452 against 15,540, and the recordings diverge at 3.19 seconds, which is the frame the second thruster lights.
This commit is contained in:
@@ -2817,40 +2817,72 @@ putThrust:
|
||||
; tank is a pilot doing nothing. What is watched is the edge - a rumble restruck every frame
|
||||
; would never get past its own attack, and a bang struck every frame is a buzz.
|
||||
thrustSound:
|
||||
; ---- WHICH thrusters are lit, not merely whether any is ----
|
||||
;
|
||||
; Kept as the set of them, because the two sounds want different questions asked of it: the
|
||||
; pop is about each engine and the rumble is about all of them together.
|
||||
SETD.0 Fuel
|
||||
LDA.0
|
||||
BRA thrustOut
|
||||
BRA thrustNoneLit
|
||||
SETD.0 Held
|
||||
LDA.0
|
||||
INIB 0x0F
|
||||
AND
|
||||
BRQ thrustOut
|
||||
INIA 0x01
|
||||
BRI thrustNow
|
||||
thrustOut:
|
||||
MVQA
|
||||
BRI thrustHaveSet
|
||||
thrustNoneLit:
|
||||
RSTA
|
||||
thrustNow:
|
||||
thrustHaveSet:
|
||||
SETD.0 ThrustNow
|
||||
STA.0
|
||||
|
||||
; ---- A pop for every thruster that has just caught ----
|
||||
;
|
||||
; Not for the first one only. A pilot already burning upwards who then adds a sideways
|
||||
; thruster has lit an engine, and that is what an engine lighting sounds like - so what is
|
||||
; wanted is the bits that are on NOW and were not before, rather than "was anything on".
|
||||
;
|
||||
; What changed is an exclusive or, and of those the ones lit now is an and, which is two
|
||||
; instructions and no comparison at all.
|
||||
SETD.1 ThrustWas
|
||||
LDB.1
|
||||
STA.1 ; Now becomes what "last frame" means next time round.
|
||||
CCF
|
||||
SUB
|
||||
BRQ thrustDone ; The same as last frame, so nothing has lit or gone out.
|
||||
LDA.1
|
||||
BRA thrustStopped
|
||||
|
||||
XOR
|
||||
MVQB
|
||||
AND
|
||||
BRQ thrustNoPop ; Nothing newly lit, whatever else is still burning.
|
||||
RSTA
|
||||
OUTA 0x41
|
||||
INIA 0d48
|
||||
OUTA 0x44 ; The bang of it catching.
|
||||
INIA 0x01
|
||||
OUTA 0x41
|
||||
INIA 0d36
|
||||
OUTA 0x44 ; And the rumble under it, which is held.
|
||||
RET
|
||||
thrustStopped:
|
||||
CALL hushThrust
|
||||
thrustDone:
|
||||
OUTA 0x44 ; The bang of it catching.
|
||||
thrustNoPop:
|
||||
|
||||
; ---- And the rumble, which is about all of them at once ----
|
||||
;
|
||||
; Struck when the first lights and not again until every one has gone out. Restriking it
|
||||
; when a second thruster joins would start its attack over, which is a stutter rather than
|
||||
; an engine.
|
||||
SETD.0 ThrustNow
|
||||
LDA.0
|
||||
BRA thrustAllOut
|
||||
SETD.0 Rumbling
|
||||
LDA.0
|
||||
BNA thrustRemember ; Already running, and it should simply keep running.
|
||||
INIA 0x01
|
||||
STA.0
|
||||
OUTA 0x41
|
||||
INIA 0d60
|
||||
OUTA 0x44 ; Held, until the gate comes up.
|
||||
BRI thrustRemember
|
||||
thrustAllOut:
|
||||
SETD.0 Rumbling
|
||||
LDA.0
|
||||
BRA thrustRemember ; Already quiet.
|
||||
CALL hushRumble
|
||||
thrustRemember:
|
||||
SETD.0 ThrustNow
|
||||
LDA.0
|
||||
SETD.1 ThrustWas
|
||||
STA.1 ; Now becomes what "last frame" means next time round.
|
||||
RET
|
||||
|
||||
; ---- The rumble stopped, wherever the stopping is happening ----
|
||||
@@ -2863,11 +2895,19 @@ thrustDone:
|
||||
; Forgetting last frame with it, so that a thruster still held when the waiting ends counts as
|
||||
; lighting again rather than as never having stopped.
|
||||
hushThrust:
|
||||
CALL hushRumble
|
||||
RSTA
|
||||
SETD.0 ThrustWas
|
||||
STA.0 ; And nothing was lit, so anything still held counts as new.
|
||||
RET
|
||||
|
||||
; The held note stopped, wherever the stopping is happening.
|
||||
hushRumble:
|
||||
INIA 0x01
|
||||
OUTA 0x41
|
||||
RSTA
|
||||
OUTA 0x45 ; The gate up is the only thing that ends a held note.
|
||||
SETD.0 ThrustWas
|
||||
SETD.0 Rumbling
|
||||
STA.0
|
||||
RET
|
||||
|
||||
@@ -3841,9 +3881,15 @@ PendNote:
|
||||
0x00
|
||||
PendIn:
|
||||
0x00
|
||||
; Whether a thruster was lit last frame, since only the changes are worth a sound.
|
||||
; Which thrusters were lit last frame and which are now, since only the changes are worth a
|
||||
; sound - and which ones they are, not merely how many.
|
||||
ThrustWas:
|
||||
0x00
|
||||
ThrustNow:
|
||||
0x00
|
||||
; Whether the held rumble is running, which is a different question from any of the above.
|
||||
Rumbling:
|
||||
0x00
|
||||
; Whether the quarter tank warning has been given since the last time it was filled.
|
||||
AlarmSaid:
|
||||
0x00
|
||||
|
||||
Reference in New Issue
Block a user