Skip to content

Conversation

@m1macrophage
Copy link
Contributor

@m1macrophage m1macrophage commented Nov 9, 2025

Added and improved CEM3394 functionality relevant to the sixtrak while working on audio for that driver.

Sending as a separate PR to keep the scope manageable, given there are also changes to sente6vb.

Incidental improvements to sente6vb:

  • Unlocked some sounds. An obvious one is the post-tuning chirp for each voice during boot.
  • Centered audio around 0.

sound/cem3394 changes:

  • Made VCO output range [-1, 1], instead of [0, 1].
  • Added pulse-width dependent DC level of pulse waveform, as described in the datasheet.
  • Waveform selection logic now works for voltages outside the bounds provided in the datasheet.
    • Both the sixtrak and sente6vb will some times use voltages outside those ranges.
  • Added AC coupling between VCF output and VCA input.
  • Forcing parameter computation in device_start().
  • Added ability to stream voltage inputs. The sixtrak needs that for the VCA gain and VCF frequency.
  • New configuration interface:
    • New configure() method computes VCO and VCF zero frequencies based on the attached passive components.
    • Exposed method for enabling pulse-width limiting for drivers that need it. Now disabled by default.
  • Fixed compilation for FILTER_TYPE_ESQ1.

midway/sente6vb changes:

  • Using new CEM3394 configuration interface.
    • Verified that it produces almost the same VCO and VCF zero frequencies.
  • Reduced CEM3394->speaker gain to compensate for increased loudness of CEM3394
    • Old range: [0, 1] nominal. New range: ~[-1, 1] x 0.5 = ~[-0.5, 0.5] nominal (can be exceeded in some cases).
  • Added AC coupling to noise output.
    • Also changed the noise->CEM3394 gain from 0.5 to 1.0, to keep relative loudness the same.
    • Old range: [0, 1] x 0.5 = [0, 0.5]. New range: [-0.5, 0.5] x 1

Added and improved CEM3394 functionality relevant to the `sixtrak` while working on
audio for that. Sending as a separate PR to keep the scope manageable, given there are also changes to `sente6vb`.

Incidental improvements to `sente6vb`:
* "unlocked" some sounds. An obvious one is the post-tuning chirp for each voice during boot.
* Centered audio around 0.

sound/cem3394 changes:
* Made VCO output range [-1, 1], instead of [0, 1].
* added pulse-width dependent DC level of pulse waveform, as described in the datasheet.
* Waveform selection logic now works for voltages outside the bounds provided in the datasheet.
  * Both the sixtrak and sente6vb will some times use voltages outside those ranges.
* Added AC coupling between VCF output and VCA input.
* Forcing parameter computation in device_start().
* Added ability to stream voltage inputs. The sixtrak needs that for the VCA gain and VCF frequency.
* New configuration interface:
  * New configure() method computes VCO and VCF zero frequencies based on the attached passive components.
  * Exposed method for enabling pulse-width limiting for drivers that need it. Now disabled by default.
* Fixed compilation for FILTER_TYPE_ESQ1.

midway/sente6vb changes:
* Using new CEM3394 configuration interface.
  * Verified that it produces almost the same VCO and VCF zero frequencies.
* Reduced CEM3394->speaker gain to compensate for increased loudness of CEM3394
  * Old range: [0, 1]. New range: [-1, 1]
* Added AC coupling to noise output.
  * Also changed the noise->CEM3394 gain from 0.5 to 1.0, so that the relative
    loudness remains the same.
  * Old range: [0, 1] x 0.5 = [0, 0.5]. New range: [-0.5, 0.5] x 1
@rb6502 rb6502 merged commit eabc4eb into mamedev:master Nov 9, 2025
7 checks passed
@m1macrophage m1macrophage deleted the cem3394 branch November 9, 2025 22:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants