Closed sarah-walker-pcem closed 11 months ago
Thanks for a nice update for the sound code, the speech demo is much better than it was before.
One thing I noticed was that on macOS there's the following build warning:
sysvia.c:87:17: warning: unused variable 'oldIC32' [-Wunused-variable] uint8_t oldIC32 = IC32;
I have pushed a further commit to fix this warning. The compiler is right, the variable was unused.
Polling the SN76489 at 125 kHz (the native "update" rate on real hardware, 4 MHz / 32) improves the audio quality of multi-voice sample playback, by significantly reducing the time spent in "in-between" states where not all voices have yet had their volumes updated.
As part of this, the handling of SN write is modified to a poll as part of the 125 kHz update routine. This allows multiple writes with the chip enable held active to be honoured (eg the Castlevania III music conversion).