Missile Command: arcade rules, crafts, trail system v2, emulator wave skip
Game (examples/MissileCommand): - Trails rewritten as an analytic flight path (pos is a pure function of distance travelled): paint and erase replay the exact same pixels, so blinking trails leave zero residue. Smart bombs wiggle (S-curves) with deterministic paths; erase band widened to a symmetric 7px so the ±1px Bresenham slope jitter between paint/erase endpoints can never leak paint ink (verified zero strays across dense frame captures). - 2600 look: bright steady missile head dot with a flashing trail (shared blink phase), trails vanish on death/impact; AA rockets stay moving dots. - Arcade rules: bomber planes (100x mult) and satellites (250x mult) cross the sky dropping bombs; max 3 city kills per wave; bonus cities at every 10k kept in reserve and deployed between waves; battery silos rebuilt and replenished at each wave start (they no longer stay dead across levels); center battery fires fast rockets, sides slow. - Wave-start attack alarm (four falling tones, once); volume U/V/M with OSD; sound task zeroes the I2S DMA ring when the queue drains so a finished sound's tail no longer loops forever. Emulator: - --wave N flag to skip straight to a wave for quick testing - --dump-interval N rolling frame captures (seq%05d.bmp) - shim: uxQueueMessagesWaiting added
This commit is contained in:
@@ -72,6 +72,14 @@ void SoundEngine::task()
|
||||
case SND_SWEEP: renderSweep(e.freq, e.freq2, e.dur, e.amp); break;
|
||||
case SND_NOISE: renderNoise(e.dur, e.amp); break;
|
||||
}
|
||||
// After the LAST queued event the I2S TX DMA ring would keep
|
||||
// replaying its remaining ~64 ms of buffer forever — heard as the
|
||||
// sound's tail (rocket sweep, melody tone) repeating endlessly.
|
||||
// Zero the ring once the queue is empty (not between queued events,
|
||||
// which would punch silence-gaps into back-to-back melodies).
|
||||
if (uxQueueMessagesWaiting(q_) == 0) {
|
||||
i2s_zero_dma_buffer(SND_I2S_PORT);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user