Login
Search for:


Previous | Next

From: TLC (all posts)
Date: 1998-05-30
Subject: Re: 2 Levente...
Hi!

> As far as I know these wave converters were based on timer 0 irq,
> and because the CPU must execute the current instruction when an IRQ
> hits, the $ff11 writes will be delayed between 1-6 cycles randomly.
> This I guess should introduce a low freq noise.

Yes, but the TED transparent DMA's make this matter much worse, since sometimes the IRQ must wait about 40 cycles until it gets control.
Since most waveconv $ff00 timings don't care of being multiple of a line time, this delay changes randomly, even because it's initialization was made in a random time.

But using a relative low mixing, ie. $d0 or so, appears like there are no problems in the replay at all (ie. playing a song in normal mode doesn't appear more noisy than playing with blanked screen).
When you go higher, about $90 or $80, of course it'll change a lot.
Maybe, a well set IRQ position would help in this (or blank the screen).

>> Larry just coded such one for the 64. ...Well, he should have used some
>> more tricks, since the SID's FRQ's are too low for achieving pulse
>> width modulation without whistling.
> I guess the whistling could be killed by using one of the generators
> to emit the whistling freq but with a half cycle delay.

I guess he used more channels, and he shifted their phase, thus making higher frequencies. ...Or I don't know.

> Hmmm, as far as I know there is no lowpass filter in the Plus4, but
> I think I know what happens here. As the hardware is not an 'ideal'
> digital equipment, the change from level 0 to level 1 is not
> instant, it needs some time. If I measured it correctly it needs
> 4 sound generator counts, which is 32 TED cycles to reach the output
> level, if you set the generator freq higher then it doesn't have time
> to rise to the maximum level, so indeed this makes it possible
> to achieve all levels. (The rising edge is not linear, more logarithmic
> also). Well I guess this was a very cool idea to utilize this feature!!!

Yes, as I think it over, all things point to the same direction.

Speaking of the custom table, the frq values which must be set into the TED, are almost the absolute maximum $03fe. One is I guess, $03fd and the other is $03fe. So indeed, if TED fails generating squarewaves,
it will do it here.

My supposition, that, again, since the TED is an NMOS device ( :-) ),
it's outputs are assymetric. It can sink huge, while it emits small currents.

So, also, an output pulse must be also different in time, if the transition went from 0 to 1 or 1 to 0. TED can pull it's output to '0' very fast, while raising it to '1' must occupy much longer time. And it should be even more serious if the output is loaded with something.

..If you set a squarewave whose frq is fast enough to be in the same scale as this transition time is, this 50% squarewave will transform more or less a saw waveform, because it's rising edge will be blurred while the dropping is still sharp. The faster the frq of the squarewave, the less the level can rise (since the rising speed is constant, but it has less time to raise). So, in overall, modifying the frq results in changing the amplitude of the output, and if this is an assymetric wave ( I mean,
it has a DC offset), integrating it will result in a constant level which is determined by the frq of the squarewave.

Hmmmm, do you still have that scope?... :-)

> At every 8th TED cycle the generators are decrementing their inner
> counters, and if after the decrementation, the inner counter is 0
> they switch their output levels between 0 and 1, then
> they reload their inner counter from the appropriate TED registers.
> Actually the valuse which is written into the inner counters is
> the value of the TED register xored with $3ff. (This is why $3ff
> is the lowest freq and $3fe is the highest.)

Once I played with my VIC-20 to get the correct formula of the sound generators. I guess TED must have much more to do with the 6561 VIC-I -
than seems at the first look. Their soundgenerators are very similar to each other. I also noticed this 'ff=lowest, fe=highest frq' behaviour there.
Hmmm, personally I have no supposition for the generator inside (maybe,
it should have been an incrementing timer or so with the appropriate load rules etc. but that was enough for me. Or, I guess your idea may be also adapted to the VIC-I because of the similarities).

Levente

Copyright © Plus/4 World Team, 2001-2024