audioControl Driver

Last updated: · In development
Moving streaming into the resident driver
The standalone helpers use the NextZXOS/esxDOS-compatible file interface. A production design still needs to decide who opens, reads and closes the file, who refills and hands off a free buffer, and what the resident audioControl .DRV does when a block ends or a read fails. The resident driver cannot assume it can call the helpers’ filesystem routines internally.
Build 48 remains the AY reference for PT3 music and AYFX effects at 50 Hz and 60 Hz. Build 54 supplies the single-shot DAC path used in the PCM tests. The two baselines give future integration work independent checks for chip audio and sample playback.
Why transfers still use single-shot DMA
The WR5 $A2 automatic-restart experiment produced severe corruption. WR5 $82, end-of-block polling and an explicit buffer handoff stayed clean from the first pair of tones to the final short block of the music file.
A rising pitch seemed to move across the speakers
The six Stage 7C3B tones used fixed centre routing. On speakers the rising pitches seemed to move from right to left. With headphones they stayed centred at both refresh rates. Frequency-dependent speaker or room localisation is the most plausible explanation.
Rejected: the MMU4 persistent window
Moving the persistent PCM source into MMU4 also produced corrupted audio and was rejected. Clean playback was recovered with the proven source arrangement at $C000. The finding is specific to these experiments, not a claim that MMU4 can never be used for audio.
Stereo routing: investigated and confirmed
The fixed-frequency DAC-only test confirmed strong left, centre and right routing. The apparent centre-to-right shift in the earlier multi-frequency sample points to perception or speaker/room acoustics, rather than a routing change. It is not an unresolved channel-selection defect.
Preserving the character of the music
A blanket reduction in PT3 volume damaged the sound of some tunes. Build 44 bypassed that remapping, and the tested music switching preserves the original playback. The attempted dynamic music lowering also produced unwanted crackling; a better approach remains future work.
Three positions are the AY limit for this design
The chosen AY approach uses left, centre and right placement with distance levels. Extra intermediate positions and the earlier pseudo-smooth panning approach have been rejected for this path. Smooth movement and enhanced stereo cues belong to the later sampled-audio system.
Resources must remain available during playback
The game owns any external music and effect resources it supplies. It must keep them available and unchanged while they are being played. Resource switching has now passed hardware testing; ownership remains an integration requirement rather than an unresolved playback failure.
Some game actions are deliberately silent
An event without an assigned sound is valid and should be harmless. Earlier confusing test wording was corrected without changing playback behaviour. Busy scenes still need sensible priorities and repetition limits.
Sample quality and spatial sound
Some hiss was audible during the tune. Eight-bit quantisation is a plausible source, and the 16 kHz sample rate limits the available high frequencies. The listening test did not isolate a single cause. It recorded continuous playback through the buffer boundaries. Higher-resolution formats would need new bandwidth and timing tests.
The mono stream feeds one fixed DAC destination. Earlier routing could place one mono tone left, centre or right. Independent stereo samples, smooth world-based positioning, distance processing and later Pi-assisted playback each require their own tests.