Login
Back to forumReply to this topicGo to last reply

Posted By

Degauss
on 2008-07-01
17:38:45
 TED-Oscillators

Hi!

I really don't remember if i asked for this already: Does anybody (Hello, TLC! wink) know if its possible to "synchronize" the two sound-voices in TED? It'd be nice to have the option to bring the two square-waves in phase.

Posted By

IstvanV
on 2008-07-01
17:42:06
 Re: TED-Oscillators

Yes, by setting bit 7 of $FF11, you can reset both oscillators and the noise generator as well, and reload the internal counters to whatever was written to $FF0E-$FF12, if that is what you meant.

Posted By

IstvanV
on 2008-07-01
18:32:31
 Re: TED-Oscillators

Some additional information: while the above mentioned bit is set, the output of both sqaure oscillators is continuously held at the high level (which is why it can be used for simple digital sample playback), and when you clear the bit, both oscillators start counting from the value written to the frequency registers, while staying at the high level initially.

Posted By

Degauss
on 2008-07-01
18:39:27
 Re: TED-Oscillators

Thanks. wink Where did you get that information from? I can't believe its from the official manual wink

Posted By

IstvanV
on 2008-07-01
19:18:21
 Re: TED-Oscillators

The manual is a good starting point, but I found out much more by running various tests on the real machine, and examining the output in a sound editor, as part of the emulator development. The full algorithm of how I assume the TED sound generators work is in TED7360::calculateSoundOutput() (http://plus4emu.svn.sourceforge.net/viewvc/plus4emu/plus4emu/src/ted_snd.cpp?view=markup), which runs a single 221681 Hz cycle of sound emulation (note the various hacks for emulating the oddities of setting the frequency to $3FE).

Posted By

Gaia
on 2008-07-02
17:55:35
 Re: TED-Oscillators

How did you come up with the cycle (?) count of 20000h for the "digi fade" (the thing you called decay)? I guess that's more or less an approximation because I used to find it a bit unstable. I recall it being quite long, sometimes 2-3 secs, though I might be wrong (I never cared emulating it and maybe mix it up with something else).

Posted By

IstvanV
on 2008-07-02
18:06:36
 Re: TED-Oscillators

It is set to 131072/221681 seconds, but the value is just an arbitrarily chosen one, as it varies between machines, and if I recall correctly, it is not even always the same on my own machine, so I guess it could depend on e.g. the temperature. In any case, it is better than not emulating the effect at all, as it can, and sometimes does make difference in programs (for example, Csabo's part in 8 Shades of Black).

Posted By

IstvanV
on 2008-07-02
18:21:17
 Re: TED-Oscillators

One thing that is not emulated accurately yet is the exact way the noise generator is reset by the MSB of $FF11. If the bit is set for a "long" time, then the noise pattern just restarts from the beginning (starting with 01100100001...) as expected, but setting it for a very short time (only a few cycles) only seems to reset it partly on the real machine, as if e.g. the shift register is not immediately set to $FF, but rather the 1 bits are shifted in one at a time at some rate.
For the square oscillators, I found that setting the "test" bit immediately resets the state to 1, but the counter is only reloaded on the next 221.7kHz cycle; this seems to emulate the output of the real machine correctly.

Posted By

IstvanV
on 2008-07-04
17:47:27
 Re: TED-Oscillators

I think I found that out too now, so it can be fixed in the next version.



Back to topReply to this topic


Copyright © Plus/4 World Team, 2001-2024