1
0
mirror of https://github.com/TomHarte/CLK.git synced 2025-04-09 15:39:08 +00:00

Add comments on the noise generator.

Thomas Harte 2021-06-25 14:41:11 -04:00
parent b174424cec
commit 16b732e941

@ -69,7 +69,17 @@ At reset all four paging registers are cleared to 0, making the first 16kb of th
IstvánV provides detailed Hungarian notes [http://ep128.hu/Ep_Konyv/Exos.htm#242a](here). The following is a result of machine translating those via a couple of different online translators and synthesising the results.
#### Sound Generators
#### Polynomial Counters
Four polynomial counters are implemented.
The smallest three are 4, 5 and 7 bits in length. These three run continuously at 250 kHz. They may be sampled by the tone generators.
The fourth is of variable length, being configurable to either 9, 11, 15 or 17 bits in length. It is clocked according to the configuration of the noise channel.
The programmer can opt to provide the noise channel's polynomial counter the tone generators, replacing the 7 bit counter.
#### Tone Generators
Each channel has a flip flop specifying its current state — high or low.
@ -77,10 +87,35 @@ Standard operation: a 12-bit counter counts downwards from the specified reload
* if no distortion is specified, the output switches state;
* otherwise the specified polynomial output is sampled and becomes the generator's new state.
The polynomial counters run continuously at 250 kHz.
If high-pass filtering is enabled, any falling edge on the linked channel's output resets this channel's state.
If ring modulation is enabled, the channel's actual output is the XNOR of its output and that of the other channel.
In both cases, the other channel's output is that after the application of distortion, high-pass filtering and ring modulation.
In both cases, the other channel's output is that after the application of distortion, high-pass filtering and ring modulation.
The order of operations is:
1. update square wave;
2. apply the high-pass filter;
3. apply ring modulation.
### Noise Generator
This clocks its own polynomial counter, selectably either 9, 11, 15 or 17 bits in length. It will advance each time it observes a falling edge on its input.
It is clocked at the programmed rate, being any of:
* 31.25 kHz, i.e. upon every falling clock of the 250 kHz clock, divided by four; or
* upon the falling edge of any tone channel's output (i.e. after distortion, high-pass filtering and ring modulation).
The optional high-pass filter and ring modulator work as they do for the tone channels.
If the low-pass filter is enabled then falling edges of the noise generator's state sample output channel 2 in order to generate the noise output.
The order of operations is:
1. update polynomial;
2. apply the low-pass filter;
3. apply the high-pass filter;
4. apply ring modulation.
### Circular Dependencies
This isn't covered overtly but the documentation makes reference to time-division multiplexing for channel output; a guess might therefore be that channels are merely updated sequentially, with reference to the most recent prior output of other channels to which they refer.