Login
Back to forumSee the full topicGo to last reply

Posted By

TLC
on 2009-04-01
12:36:57
 Re: Commodore Free issue 28 on-line (fwd)

We did analyze that music routine... wink))

It utilitizes two major tricks that makes it all possible. One is a software, the other one is a hw one.

The software trick is that (like possibly seen in zoomer routines on the C64) frequency control is not done by incrementing accumulators in realtime (done by ADC's, as seen in digi routines of Plus/4 digiconverter routines), but by indexing samples with pre-calculated tables, whose increment has been calculated purposely. By that, dealing with independent frequency per channels is quick, very quick (the downside is, that it needs memory for tables, and the number of frequency settings are limited by the number of pre-calculated tables).

With that, and, with the absence of independent volume settings per channels (...yes, there is no volume control at all), it can mix 4 channels of 6-bit samples at about 7.8KHz (two rasterlines).

The hardware trick is, that it mis-uses a SID voice to play the digi in a revolutionary way. This has something to do with how the SID phase accumulating oscillator and the waveform selector work; in short, if you turn on some waveform, _then_ turn it off (set "0" waveform), the analog voltage provided by the waveform DAC will remain for some time. ...Consequently, the trick is to reset the SID oscillator (by setting the test bit of the channel), set some increment in the frequency register, release the oscillator (resetting test-bit), wait some time while waveform is 0, then, at the next sampling time, turn on/off triangle waveform, and start again with the procedure. The higher the increment set in the frequency register, the higher the analog value that will be D/Aed at the time of setting the triangle waveform on, and, consequently, remain on the output as result until no waveform is asserted (which would be until next sampling time). ...It has some drawbacks (jitter of accepting the interrupt request converts straight to amplitude noise, and there aren't as many useable increment settings so that it could make it for a full 8-bit wavetable), but nevertheless, it's indeed very clever, say, revolutionary. ...With this approach, it's also possible to filter the mixed digi channel by the SID filters, just as it were (as it indeed is) a "normal" SID channel, something that hasn't been possible before.

With a TED in mind, the "8-bit" (...which would be closer to about 6-bit in reality, considering the noise added by the jitter problem, and the waveform table found in the player) D/A conversion (provided by this trick) would be absent, but the rest is certainly possible to do on the Plus/4.



Back to top


Copyright © Plus/4 World Team, 2001-2024