Login
Search for:


Previous | Next

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

> actually, I do remember that INTRO you mentioned. Yeah, actually the "bar"
> I created kinda looked the same. However, TCFS's one was creating a
> "monchrome" screen (probably 'caused by writing an odd number in an even
> $ff1d line!?) and I can't tell if mine did the same. I'll check my notes
> before I post the code (Hi Crown, VERIFYING rules ;) ). Still, it was just
> a small loop...

O.K.

Hmm, TCFS should have used something more, since writing just one odd value to $ff1d doesn't switch the colors off, but mixes them up a bit. Check Gotu Mega 1, one of my parts for an effect which was based on this :-).

> If I find the disk with DYNAMIX I'll disassemble the intro
> to see what TCFS did. (Though I recall him mentioning that the FX was
> somebody else's idea...) I hope one of my deprotecting routines works on
> that one 'cause TCFS used to protect his code. By the way, I coded
> deprotectors (just for kicks since there wasn't anything REAL to crack)
> for a bunch of protectors. Some were easy to "crack". Though, I remeber
> that WACKY's (a real old one, used in SAVAGE RIPP) was tough (even
> without using $ff1e/d)!

Try TLC's defender V2.0 (on Outrun Demo, the same one I supposed to try Minus 4 with), you can't miss it ;-)

> Something else: I saw or better said heard one of
> your WAVE CONVERTERS and was suprized by its quality... Did you get
> those $ff11 values by using a scope or whatever? Are more PSEUDO VOLUME
> LEVELS (Do ya know what I mean?) possible?

Nope; the table was invented by Doky, I just played with it a lot and experienced some things by ears. BTW I suppose, he should really have used a scope for the work.

BTW this digital SID playing was originally invented by WIT, and I always credit him for this. I guess he made something really '__GREAT'. His megademo,
Bluekeeps is still one of my favourite demos (was released in the middle of '90).

[Crown]
> So there is 13 different levels can be outputted by the TED.

Hmmm, in general, yes; but with some easy tricks: no. Have you seen the mzx converters of Doky, or some others of mine?

> Now about the noise. These level sygnals are not straight level lines.
> There is a low amplitude triangle wave is imposed on it, and it comes
> from the Clock Generator, it's freq is 1.6Mhz. If I zoomed it closer
> I also could see the noise from the dot-clock, so one triangle
> consist of 8 parts, and the noise from the dot-clock is a very low
> amplitude diminishing sinus wave.

Yes, but those noises are also on the TED's squarewave output voices,
and since these don't hear noisy, I bet they shouldn't be too serious (even if you meant the amplitude modulation of this noise). The only noticeable noise from the computer inside, I guess, is the 50Hz (or 60Hz) of the videosignal (and it's harmonics), and the 15625Hz of the horizontal blank.
They are more or less noticeable, at least if you turn the volume up.

But if you claim, they make a significant difference in the output levels in constant + or - values (I mean, they modify the output levels constantly),
I assume it.

> The quality of a WAVE player can be improved by some of the following
> methods I can think of. Well the most easier is to reduce the noise,
> by guaranteeing that the write into $ff11 are happening at equal cycle
> distant, and I think this was what Levente did.

You mean, I tried to write a replay routine which tries to determine whether it's in right cycle to write to $ff11 or not? ...No, I tried this just once, when trying the 1-bit + duty cycle level replay method where I really needed this one (else, the replayer was whistling constantly). It doesn't get very serious, unless you try higher sampling rates.

> Well you need the exact
> cycle map for this, but we have that already, so this can be done.
> An other way is using pseudo-levels, somekind of a method which was
> described in one of the C-hacking magz. You have to double the $ff11
> write freq, and if you switch between two levels than you will hear
> it as the level between them. (This introduces noise, but if the
> switching freq is high enough than this is acceptable) Actually
> I used a similar technique in Iron Maiden Demo to emulate the
> 3 channel voices with a low switch freq.

Hmmm, multiplexing frequency values is something else than dithering output levels. But yes, the analogue is convincing.

> There is one more way, and I don't know if this was ever tried on
> a Plus4 or on a C64. Some of you might have heard digitized sounds
> on the PC-s 1 bit speaker. Well actually they were 8-bit samples.
> This method works the following, one loop takes 256 cycles, we take
> the 8-bit sampled value, and keep the output in level 1 for so
> many cycles as the sampled value is, than keep the output for
> the remaining cycles in level 0. I guess the Plus4 is just not fast
> enough for this, but this should be verified (maybe with lower
> bit-sample rate).

Yes, I did.

It's easy for PC's since this duty cycle task is fully done by the
8254 timer chip (...it seems to be a bit more programmable than actually a 6526 or the TED is). If your sampling rate is below 20Khz, you will hear a constant whistling noise because of the resulting (well, in pulse width constantly modifying ) squarewave. For generating this squarewave, you have to achieve at least twice the sampling rate you want to use for playing the digital wave you originally wanted to play, that makes about 40Khz.

I tried it on Plus/4, and since I had to achieve a bit fast sampling rate
(...note, or better: compare to the timing of the screen: if you set the timer to 57, which equals to one scanline time, you made exactly 15625Hz sampling which is still far below the needed value). I noticed noise, which seemed to be originated from the slow cycles where the memory gets refreshed,
so I even had to give twiee clock mode up (of course, all this with blank screen). The result was a short programmed cycle, no IRQ, no screen, and it did it's task without whistle but also without any other tasks. It also,
haven't been able to do 8-bit sampling, but it was able to make levels between two 'normal' levels, so it was enough for me to achieve resolution of 4-5 bits for this try.

> In the C64 with SID it should be possible, as
> you can set the impulse length of a square wave which would just
> do the above mentioned ($D402 $D403), and as there is 3 generator
> and this can be set separately, there should be possible to play
> 3 digital channels independently. Anyone used this on the C64?

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've seen/heard some very good digital players on Plus4. One was
> done by Pigmy, it played three digital channel sampled musics.

Are you referring to the TFSS/PIGMY/CSORY digital converter, or something else which rather played customizable samples? In the former, Charly should be able to help since one of their musicdisks utilized this mconverter routine back in '91 or '92.

Well. What my converters utilize, they may be divided into two or three parts.

I use a custom $ff11 table which was originally invented by Doky and maybe,
TCFS. This does not just use $90, 91, 92... b4, b5 etc. but also uses some more values, as $10 and others. How and why to do it? Before this, you must set some custom values into the TED squarewave generators and wait some cycles until it takes effect.

The main thought beneath these, that if you set a very high frequency value, the output will be cut by the output lowpass filter. Since the TED generates asymmetric squarewave signals, the crippled squarewave will seem more or less a constant signal, and it's level will depend on it's frequency. With this, not just 4 but even 5 bit level-table can be built
(with more or less loose parts, or rather, it will seem like a logarithmic scale in the end.) ...Well personally I didn't apply some measurements onto the TED for experiencing this correctly.

My converter routines utilize this table (except the optimized ones in which I had to make the fastest code I can do, so I had to avoid indexing in the replay routine). Check them, they should be found on www.funet.fi (look for something like Coroners, TLC or similar keyword in the subdirs)).

The second part, everything depends on the replay routine. It must be very fast. So all my converter routines had replayers running on the zeropage. All of them are self-modifying with also the other usual stuff.

And finally (...maybe, this latter has something to do with the former) the mixing frq must be as high as possible, in contrast with the actual purpose of the videochip. It's not a real problem with blank screen, but if screen is enabled, one shouldn't make a replay routine run faster than 114 ($72) on
$ff00-ff01 (2 screenlines, = 15625/2 = 7812Hz sampling) since the TED's fetches will actually fuck a lot of things up, whether you want to run it faster. Note that this sampling is actually below the sampling rate of the regular telephone tech, and I can say, it's a quite rare example for a Plus/4
waveconverter running such high sampling. Also note that you still used no antialiasing filter and didn't care about the appearing extra harmonics coming from the bad sampling rate.

In reality, it's even more worse since most of the digital music converters used in Plus/4 intros or demos utilized $d0, $dd or $e4 timing for the replayer, which means 4254, 4004 and even 3900Hz sampling. This is actually,
the sampling rate; and the highest harmonics the replaying signal should contain is half of these. This is a lot under the frq range a good music player should utilize, it is far inside the hearable frq area. So I must assume that most of the noise come from this: whether you want to achieve high sampling, it's still too low comparing to the appropriate needed sampling rate. If it's low, and you start to play waves without taking care of the resulting off signal components (I mean, without cutting them before playing, ie. using samples passed through a low-pass filter before playing),
the signal will contain a lot of harmonics which didn't appear in the original waveforms.

Levente

Copyright © Plus/4 World Team, 2001-2024. Support Plus/4 World on Patreon