5

From the comments on this question, the SAM on the Apple II seemed to use some proprietary hardware to produce the waveform. (I am not counting the option to produce a horrendous 1-bit PWM using the clicker).

But why not use the Mockingboard? That has an AY-3-8910 which has a master volume control just like the SID does. That means a only a little modification from the C64 version would be needed. And I suppose, that using hardware which was already widely available would have meant a cheaper product and/or a wider audience.

5
  • 3
    It optionally uses its own hardware, which is essentially the same sort of thing as e.g. the Covox — set a current output level, it persists until you set another. It can just use the built-in Apple II speaker. I've no idea about SAM versus the Mockingboard though.
    – Tommy
    Dec 18, 2018 at 10:28
  • @Tommy that's the idea. Apparently the Apple II also had an internal speaker which SAM could use, and which sounded positively awful. Dec 18, 2018 at 10:30
  • Well, 'Aweful' isn't a real category. It wasn't worse than on other computers - the whole idea behind SAM was to let it be done in software. To follow that though, a real life comparison would be apropriate.
    – Raffzahn
    Dec 18, 2018 at 12:42
  • 2
    @Wilson as output by my very own emulator (as usual, no hacks, no special cases, just the raw megahertz-ish audio resampled for output on current hardware) S.A.M. via the built-in speaker: youtu.be/IIejqWEV_8w ; it could have been a lot worse.
    – Tommy
    Dec 18, 2018 at 15:01
  • @Tommy: How far have people managed to push "built-in speaker bit-bash" audio on the Apple II? I've seen some two-voice music functions, but have people gone beyond? I've been thinking of porting my Stella's Stocking 4-voice wave-table-based music driver from the Atari 2600 which uses 46 cycles out of 76 to generate audio data. I think it should be possible to achieve good sound if there are 32 copies of the main audio player which differ in the timing of their second `STA $C030. Have such things been done?
    – supercat
    Dec 18, 2018 at 22:10

2 Answers 2

4

In addition to having a volume control, it's also necessary that an audio chip have a means of forcing a waveform generator to produce a DC output, it's necessary that setting the volume be quick, and it's necessary that the volume control be linear. On the SID chip, I think there's a "test" function that can be used for that, and if not I think setting a PWM width to maximum at a high frequency and passing that through a low-pass filter should yield something that's basically a DC level.

I don't know of any way to make the AY-3-8910 wave generators produce a solid "on" signal. The volume control is by design not linear. If one didn't mind limiting volume to 1/6 of maximum, it might be possible to program one of the channels for a maximum-frequency square wave (32,000Hz) and amplitude-modulate that, but the even if one used a translation table the non-symmetric distribution of output steps would likely make it impossible to get good results. Using multiple generators could improve overall volume, but would require storing four stores or six to the I/O port to select the first channel amplitude register, write a value to it, select the second channel output register, and write a value to that.

0

Sam's DAC was a very simple 8 bit to analog circuit with an amplifier and a speaker attached.

No hocus pocus, just Digital to Analog.

The 1 bit "clicker" output using the internal speaker is a hack. Don't Ask Software never released it that way.

Commodore and Atari versions used built in hardware for DAC (highest resolution being 6 bits IIRC) while the Apple II came with the card.

I don't know the prices, but the SAM card was definitely done on the cheap and probably no where near as expensive as the much more complex Mockingboard.

2
  • Was the Mockingboard even available at the time of the SAM release?
    – bjb
    Apr 22, 2022 at 15:51
  • Unknown. But since the mockingboard had on board synethsis for both music and (optionally) speech, it was a superior product. SAM would use software and therefore the CPU for the things the Mockingboard did via hardware, freeing the CPU for other tasks, like graphics and gameplay. Aug 26, 2022 at 15:55

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .