Jump to content
IGNORED

My POKEY experiments using nonstandard settings


Recommended Posts

So, new discovery ... a stable C distortion bass without need for polycounters!

 

Here's how:  AUDCTL=$41, set two tone mode, distortion 4 in channel 1, silence 2.

 

In channel 1, use mod 15 values, starting at $0B then every 15 steps.  The higher, the fuzzier it sounds.

 

In channel 2, your frequencies are in this pattern:  T1, T2, T2, T1, silence.  They correspond to mod 3 C distortion timbers, but stable regardless of polycounters.

 

 

 

Chart attached.  Values are for T1, T2, and normal C distortion at 15 khz.  The range is a bit better here.

 

Quote

mod 15 fuzzy C distortion

AUDF1 where (freq+4) mod 15 = 0
Higher AUDF1 = more fuzz
* = better tonal match to actual note

tone    1    2     normal C distortion (mod 3) at 15khz

c1    95*    96    96
c#    90*    91    90
d    85    86*    87
d#    80*    81    81
e    75*    76    75
f    70    71*    72
f#    68    67*    66
g    63*    62    63
g#    60*    61    60
a    55    56*    57
a#    53*    52    --
b    50*    51    51
c2    48    47*    48
c#    45*    46    45
d    43    42*    42
d#    40    --    --
e    37*    38    36
f    35*    36    --
f#    33    --    33
g    --    31    --
g#    30    --    30
a    28    --    --
a#    --    26    27
b    25    --    --
c3    23    --    --
c#    --    22    --
d    --    21    --
d#    --    --    --
e    18    --    --
f    --    17    --
f#    --    16    --
g    15    --    --
g#    --    --    --
a    13    --    --
a#    --    12    --
b    --    --    --
c4    --    11    --
c#    10    --    --
d    --    --    --
d#    --    --    --
e    --    --    --
f    8    --    --
f#    --    --    --
g    --    7    --
g#    --    --    --
a    --    6    --
a#    --    --    --
b    --    --    --
c5    --    5    --

tone 1 is a slightly buzzy tone
tone 2 is a non buzzy tone

 

Edited by Synthpopalooza
  • Like 4
  • Thanks 1
Link to comment
Share on other sites

So, this happened:

 

 

I did music and sfx for a 5200 port of the Intellivision classic Tron:  Deadly Discs.  Of note:  The echoing effects are produced through setting the SKCTL=$8B two tone mode, and using mod 31 settings on the carrier frequency.  A decay on the sound gives the echoing effect.  This works with the $4x and $0x distortions, and even the $8x as well.

 

The title music uses the hi pass filter on $Ax distortion,  double 1.79, to make a saw wave.  @VinsCool nicknamed it the "croissant wave" because of its shape :)

  • Like 5
  • Haha 1
Link to comment
Share on other sites

Two new tunes ...

 

First off, EXO Area 4 ... these settings:

 

AUDCTL=$41 (1.79 on first channel plus 15 khz base clock)

SKCTL=$8B (two-tone mode)

 

00 - $4x distortion - Modulation for two-tone mode

01 - Silent.  Carrier frequency for two-tone mode

02 - $Ax square

03 - $Ax square

 

In the first part of the tune, the $Ax does the heartbeat sound, the metroid-style frequency sweep, while the alien crunchy sounds are the $4x two-tone mode.  By putting mod 31 frequencies in the first channel (specifically where (freq+4) mod 31=0), you get these crunchy tones

 

The $Ax does bass and the ostinato part in the second part of the tune, while $4x two-tone now makes the guitar sounds.  In this case, you want a low modulation frequency not in the mod 31 or the mod 5 range.  Unlike the 1.79+64 mode, mod 3's are not distinguished from non-mod 3's.

 

In the third part, $Ax switches to the lead sound, while $4x two-tone does a fuzzy C-distortion style bass.  In this case, (freq+4) mod 15 = 0 is the magic number.  You then put in notes from the bass table I showed above.  By increasing the modulation frequency in steps of 15, a fuzzbox distortion is introduced.  And of important note:  There are two buzzy timbres and no gritty ones ... and the tones stay stable regardless of polycounters!

 

The last part goes back to $Ax on bass and frequency sweeps, and $4x two-tone to do low growling guitars

 

 

exo-area4.asm exo-area4.s exo-area4.xex

  • Like 5
Link to comment
Share on other sites

Second one:  L'abbaye des morts - converted from the C64

 

Settings:

 

AUDCTL=$10 (16-bit mode, standard 64 khz clock)

SKCTL=$03 (no special settings)

 

00 - $Ax (bass harmonic, high trills)

01 - $Ax (bass)

02 - $Ax (64 khz lead)

03 - free for game sfx

 

This one uses reverse 16 ... in past usage, I played the first channel and silenced the second.  But @VinsCool turned me on to a helpful tip:  By playing both channels at the same time, a deep bass is made, with the first channel introducing a harmonic.  The result is a deep saw wave bass.

 

One caveat:  You can play the standard $Ax 64 khz table in first channel starting at B2=$FF, but you have to then silence the second channel ... failure to do so will randomly cause notes not to be played.  In this case, I played $FE (detected by my routine as a note rest) in 2nd channel to silence that channel, so that the high arpeggio trills at the beginning would play properly.

 

 

 

abbayes-main3.asm abbayes-main3.s abbayes-main3.xex

  • Like 6
  • Thanks 1
Link to comment
Share on other sites

So, I am going to tag in @phaeron here ... do you have a documentation on 2-tone mode and how it works?  I understand part of it ... like the frequency in the first channel must be higher than in the second, and the second channel carries the frequency, modulated by the first.

 

I have it kind of figured out with A distortion, but I am slogging my way through 4 distortion at 1.79 (with both 15 and 64khz) and it's slow going, mainly because of all the mod 3/5/15/31/non mod combinations.  I want to understand how the modulation works.  Example:  I know the hi-pass filter uses an XOR gate on the sampled bits, or in the case of A distortion, the square pulses.  How exactly are the squares and sampled bits handled in the 4 distortion ... specifically, for example, in those instances where you get the mod 15 frequencies starting at 11 decimal (11, 26, 41, etc.) and it makes the C distortion sound with fuzz ... or why the same setting in 15 khz makes stable tones with no mod 3's apparent.   If I can better understand how it all works, it might make this all go a lot faster.

  • Like 4
Link to comment
Share on other sites

10 hours ago, Synthpopalooza said:

So, I am going to tag in @phaeron here ... do you have a documentation on 2-tone mode and how it works?  I understand part of it ... like the frequency in the first channel must be higher than in the second, and the second channel carries the frequency, modulated by the first.

It's not really modulation, just resynchronization. Timer 1 resets both timers 1+2 on underflow if current serial out bit is a 1, timer 2 resets both timers 1+2 on underflow regardless of the serial output bit. This reset reloads the timers without sending a clock pulse to the audio circuits. You need the timer 1 to have a shorter period for it to be useful or else it just gets always preempted by timer 2 and never finishes. The extra timer reset causes a two cycle delay, which increases the period, except in 15/64KHz where it is 'absorbed' by that clock.

 

10 hours ago, Synthpopalooza said:

I have it kind of figured out with A distortion, but I am slogging my way through 4 distortion at 1.79 (with both 15 and 64khz) and it's slow going, mainly because of all the mod 3/5/15/31/non mod combinations.  I want to understand how the modulation works.  Example:  I know the hi-pass filter uses an XOR gate on the sampled bits, or in the case of A distortion, the square pulses.  How exactly are the squares and sampled bits handled in the 4 distortion ... specifically, for example, in those instances where you get the mod 15 frequencies starting at 11 decimal (11, 26, 41, etc.) and it makes the C distortion sound with fuzz ... or why the same setting in 15 khz makes stable tones with no mod 3's apparent.   If I can better understand how it all works, it might make this all go a lot faster.

The 15KHz clock has a period of 114 cycles and the 4-bit generator has a period of 15 cycles. 114 mod 15 = 9 and gcm(9, 15) = 3, so this is always going to skip two-thirds of the pattern bits.

 

In a high-pass configuration, only the noise settings for channels 1+2 matter; the distortion settings for channel 3+4 are ignored by the high-pass circuit, which only uses the clocking pulses.

  • Like 4
Link to comment
Share on other sites

One thing I always found interesting, and I have a theory for it:

 

Those settings on 4 distortion 1.79 using two tone filter, but mod 15 values starting with $0B.  It makes standard C distortion (set from second channel) but increases fuzziness as you step up channel 1 by 15.  I think it's because the silence randomly samples all 0's or all 1's, and these get differentiated in the output.  The lower the frequency the more present this is.  Am I right here?  

 

And in 15khz mode, a bass table made up of only buzzy (not gritty) tones replaces the normal C bass.  Wonder why that's different?

Link to comment
Share on other sites

  • 2 weeks later...

So here's a peek at my attempt to document SKCTL $4x distortion 1.79mhz+15khz clock.  Far from complete by any means.

 

The final result will have four tables:

 

1.  AUDF1 mod 15:  Fuzzy C distortion.  It makes two of the three buzzy tones of RMT C distortion bass.  These timbres remain stable regardless of polycounters.  As AUDF1 increases a fuzzbox distortion effect is introduced.

 

2. AUDF1 mod 5:  Fuzzy guitar, which appears on AUDF2=mod 5.  Others produce a stutter effect.

 

3.  AUDF1 all others:  Various guitar timbres.  This is a huge table, one I am currently documenting.  Octave range extends up to C5 without tuning errors.

 

4.  AUDF2 mod 31 (for all settings of AUDF1):  Solid notes, usually all in G# or C#. 

 

Also, when AUDF1 is mod 31 some weird alien crunchy sounds are made.  Useful for fx.

 

I have a partial table for setting 3 above.  The guitar timbres here are pulsating, and have differing qualities.  The table is not complete yet, by any means, but hundreds of note tables could potentially be made from this when finished.  In addition, some of the settings match Distortion A frequencies in 15 khz, so playing the A distortion on the second channel will add a harmonic.  The table covers approximately $D0 to $FF for AUDF1, but with some gaps.  Not complete by any means, and there may be some tuning errors, the notes were transcribed by ear using distortion $Ax 16-bit as a reference.

 

More as it happens.  Still to do in this fashion:  $4x 1.79+64, plus both iterations of the $8x distortion (15 and 64) with poly 9's enabled, should produce similar results.

 

 

SKCTL=$8B AUDCTL=$41 Distortion 4.xlsx

Edited by Synthpopalooza
  • Like 4
Link to comment
Share on other sites

46 minutes ago, ivop said:

Now that sounds very nice :)

It is ... and the range you get is slightly better because you're not limited to every three steps, and you can go down the full bass range.  You only miss one out of every 5 steps.

 

In addition, if it's not fuzzy distorted enough for you, playing actual C distortion in the 2nd channel atop the filtered first one adds a bit more fuzz to it.

  • Like 3
Link to comment
Share on other sites

Some demo tunes which show off the above mentioned Fuzzy C bass, all from the upcoming EXO game.

 

1.  Launchbay tune.

 

AUDCTL=$61 (1.79 on 00 and 02, 15 khz base clock)

SKCTL=$8B (two tone)

 

00 - $4x distortion (modulation) - bass

01 - silent (frequency carrier for 00)

02 - $2x @1.79 - lead sound

03 - $Ax 15 khz - arpeggio

 

In this case, the bass is taken from the Tone 1 table of the Fuzzy C 15khz mod 15 bass table I posted above.  These are the less buzzy tones.  Storing a $FB (251 decimal) in the 00 channel makes the bass very fuzzy.  And as mentioned before, the timbres stay stable, regardless of polycounter settings (no need to reset them).

exo-launchbay2.asm

exo-launchbay2.s

exo-launchbay2.xex

 

 

2.  Arrival tune.  (played for cutscenes when the ship is arriving at a planet)

 

AUDCTL=$61 (1.79 on 00 and 02, 15 khz base clock)

SKCTL=$8B (two tone)

 

00 - $4x (modulation) - bass

01 - Silent

02 - $2x @1.79 - lead

03 - $Ax @15khz - aarpeggio

 

In this case, bass is taken from the Tone 2 table, Fuzzy C 15khz mod 15.  This gives the bass a slightly rougher sound.  Again, $FB in AUDF1 makes the fuzz, and the timbres are stable.

exo-arrival.asm

exo-arrival.s

exo-arrival.xex

 

 

3.  Game Over.

 

AUDCTL=$61 (1.79 on 00 and 02, 15 khz base clock)

SKCTL=$8B (two tone)

 

00 - $4x (modulation) - bass

01 - Silent

02 - $2x @1.79 - lead

03 - $Ax @15khz - aarpeggio

 

Same settings as above, with the Tone 2 table, and $FB in AUDF1

exo-gameover2.asm

exo-gameover2.s

exo-gameover2.xex

 

 

 

  • Like 5
  • Thanks 1
Link to comment
Share on other sites

Tonight's piece:  The end credits theme for EXO, using Reverse 16-bit!

 

AUDCTL=$71 (16-bit plus 1.79 on 0 and 2)

SKCTL=$03 (no special settings)

 

00 - $4x (warbling guitars)

01 - silent

02 - $2x bell @1.79 (arpeggio)

03 - $Ax square wave @15khz (bass)

 

Another way to do guitars.  Advantage:  By varying the second channel frequency a few steps, a warbling effect is introduced and can be modulated for speed.  Disadvantage:  The guitar has a limited range, at A#3 it starts to get out of tune, then notes start getting dropped from the table.

 

I have a table for this mapped out already.  Two guitar tables have been mapped.  This one uses the first table.  The second allows for $Ax distortion to be played atop the guitar, for added harmonics.

 

I reused the launch theme for EXO, added to it, and also reused a motif from the area 1 theme.

 

I added the table which I used here.  Please go to the distortion $4x tab.  I will make a full release of this note table soon.

exo-launch.asm exo-launch.s exo-launch.xex pokey notes - reverse 16.xlsx

  • Like 5
  • Thanks 1
Link to comment
Share on other sites

On 6/18/2021 at 12:19 AM, Synthpopalooza said:

So here's a peek at my attempt to document SKCTL $4x distortion 1.79mhz+15khz clock.  Far from complete by any means.

 

The final result will have four tables:

 

1.  AUDF1 mod 15:  Fuzzy C distortion.  It makes two of the three buzzy tones of RMT C distortion bass.  These timbres remain stable regardless of polycounters.  As AUDF1 increases a fuzzbox distortion effect is introduced.

 

2. AUDF1 mod 5:  Fuzzy guitar, which appears on AUDF2=mod 5.  Others produce a stutter effect.

 

3.  AUDF1 all others:  Various guitar timbres.  This is a huge table, one I am currently documenting.  Octave range extends up to C5 without tuning errors.

 

4.  AUDF2 mod 31 (for all settings of AUDF1):  Solid notes, usually all in G# or C#. 

 

Also, when AUDF1 is mod 31 some weird alien crunchy sounds are made.  Useful for fx.

 

 

 

Discovered another table:

 

5.  AUDF1 mod 5 (not 15) and AUDF2 non mod 5:  This is the 15khz equivalent of what I have termed the $4x $Cx mode.  In channel 2 you place the notes from Fuzzy C table 1.  In channel 1 you use mod 5 (but not mod 15) values.  This makes some really ferocious guitar sounds.  On some of these, you can play C distortion in channel 2 to add a harmonic.  I am working up a table.  One major difference between this and the equivalent 64 khz $4x $Cx mode:  Mod 3 settings do not come into it at all, so there are some better tuning combinations available here in some ranges.

 

The range only begins to work at about AUDF2=98 which is C1 on the Fuzzy C distortion table.  Below that, the vibrations begin to deteriorate into a stuttering effect.

 

Demo song soon.

 

 

  • Like 3
Link to comment
Share on other sites

  • 3 weeks later...

So, new discovery:

 

Using C distortion in 15khz produces the stable C bass I mentioned above. :)

 

As a recap:  Two tones exist, from the three buzzy tones that you get with mod 3 frequencies at 64 khz.  Which of those two tones you get, depends on which channel (0 thru 3) you play the notes in.  Some experimentation is needed, but by alternating notes between two channels, it is possible to extend the range of both tones, and have access to three distinct and stable timbres in this mode.

 

Meanwhile, another tune ... the title music for E.X.O.

 

Setup: 

 

AUDCTL=$61 (1.79 on 0 and 2, 15 khz bass)

SKCTL=$8B (two tone mode)

 

0 - $Ax (sequencer saw wave - modulation frequency)

1 - silent (frequency carrier)

2 - $2x (1.79 mhz - bell lead)

3 - $Cx (15.khz - Tone 1 bass, buzzy)

 

As discussed above, the bass is in a stable timbre.  The high saw sequence is done in two-tone mode, 1.79+15, with modulation tricks in the first channel to simulate the delay echoing effect.

 

Also attached:  A full documentation of SKCTL mode in the $Ax distortion.  4 tables:  64khz, 15khz, 1.79+64, 1.79+15.  Enjoy. :)

exo-title4.xex exo-title4.asm exo-title4.s pokey notes - skctl.xlsx

Edited by Synthpopalooza
  • Like 6
  • Thanks 1
Link to comment
Share on other sites

So I did some more experimentation ... partially influenced by @pavros and his experiments with his C distortion experiments.  In the normal 64 khz mode, C distortion using mod 3 frequencies randomly outputs three differing tones depending on polycounter settings.  By resetting the polycounter before playing a note, the tones become more stable.

 

However, all this is completely different in 15khz mode.  Though I am not sure how it works completely yet, it appears that only 5 bits from the polycounter are being sampled!    As an explanation:

 

%000111011001010 ... this is a 15-bit binary generated by the polycounter for C distortion.  In standard 64 khz mode, bits are pulled down from this polynomial, dependent on the frequency interval.  In the mod 3 frequencies, One of the following patterns is generated:

 

Tone 0:  00111 (60% duty cycle wave)

Tone 1:  01000 (20% duty cycle wave)

Tone 2:  01011 (irregular pulse wave)

 

These are distinct timbres which vary depending on the current polycounter setting.  For other non mod 3 intervals, a 9 bit pattern is pulled down which makes the rougher gritty bass tones.  For mod 5's, either a 33% duty cycle wave, or silence.  mod 15's make the polycounter sample the same bit (1 or 0) and generate silence.

 

All this goes out the window in 15 khz mode.  Only 5 bits seem to get sampled, and the tones are generated in all four channels, dependent on these settings:

 

(AUDFx) mod 5 = 0 generates what I will label Tone A

(AUDFx +1) mod 5=0 generates Tone B

(AUDFx +2) mod 5=0 generates Tone B

(AUDFx +3) mod 5=0 generates Tone A

(AUDFx +4) mod5 =0 generates silence

 

Now, which Tones get generated into Tones A and B, depend on what channel you play the note in.  Here's a sample screenshot I did in Altirra with the wave display on:

 

1555274427_DistortionC15khzcomparison.thumb.jpg.5b4584cfb15e8b35bba31257349aef92.jpg

 

On the left, I played frequency $0D in all four channels.  On the right, I played $0C, which changes the tone

 

You will notice, that with the first example, these four waveforms are present:

 

Channel 1:  $0D: 10100  $0C: 11000

Channel 2:         11000          10100

Channel 3:         10000          10000

Channel 4:         01011          00111

 

Two things to notice:

 

* Channel 3 outputs the stable tone 1 (20% duty cycle) regardless of frequency settings

* Channels 1 and 2 will alternately switch between tone 2 (irregular pulse) and tone 0 (60% duty cycle) dependent on the frequency setting.

 

So in the second case, to get a stable sound, you will intersperse notes across the two channels, which channel you play them in dependent on the frequency step, and what waveform you are trying to generate.  This will make a bass tuning which is not only stable every time, but actually has a better range than 64khz C distortion because you only skip once every 5 frequencies!

 

So use this table here:

 

* = better tonal match to actual note

tone	1	2 	

c1	95*	96	
c#	90*	91	
d	85	86*	
d#	80*	81	
e	75*	76	
f	70	71*	
f#	68	67*	
g	63*	62	
g#	60*	61	
a	55	56*	
a#	53*	52	
b	50*	51	
c2	48	47*	
c#	45*	46	
d	43	42*	
d#	40	--	
e	37*	38	
f	35*	36	
f#	33	--	
g	--	31	
g#	30	--	
a	28	--	
a#	--	26	
b	25	--	
c3	23	--	
c#	--	22	
d	--	21	
d#	--	--	
e	18	--	
f	--	17	
f#	--	16	
g	15	--	
g#	--	--	
a	13	--	
a#	--	12	
b	--	--	
c4	--	11	
c#	10	--	
d	--	--	
d#	--	--	
e	--	--	
f	8	--	
f#	--	--	
g	--	7	
g#	--	--	
a	--	6	
a#	--	--	
b	--	--	
c5	--	5	

 

The starred frequencies should be played, when interspersing notes.  Playing the first column in channel 1 and the second in channel 2, will generate the 10100 tone every time.  By reversing this, the 11000 60% duty cycle is played every time.  By playing these same notes in channel 3, the 10000 20% duty cycle is always generated.  Channel 4 is identical to Channel 1, but with the bits inverted, so it should be matched with channel 2.  This is best accomplished in a tracker environment such as a hack RMT (like what @VinsCool is doing now).

 

So, we now have a better tuned C distortion, with a better range, from C0 all the way up to almost C3 before tuning errors creep in and notes get dropped from the table!

Edited by Synthpopalooza
  • Thanks 1
Link to comment
Share on other sites

I went ahead with all that new information and got a reference based on my tuning table :) 

 

* Channel 3 outputs the stable tone 1 (20% duty cycle) regardless of frequency settings

* Channels 1 and 2 will alternately switch between:
tone 2 (irregular pulse) and tone 0 (60% duty cycle) dependent on the frequency setting.

* Channel 4 outputs the inverted waveform of Channel 1

8-bit	            Ch1    Ch2    Ch3    Ch4
note     dec   hex  timbre timbre timbre timbre
				
C-0	 188    BC	 2      0      1      2
C#0	 178    B2	 2      0      1      2
D-0	 168    A8	 2      0      1      2
D#0	 158    9E	 2      0      1      2
E-0	 150    96	 2      0      1      2
F-0	 141    8D	 0      2      1      0
F#0	 133    85	 2      0      1      2
G-0	 126    7E	 0      2      1      0
G#0	 118    76	 2      0      1      2
A-0	 112    70	 0      2      1      0
A#0	 106    6A	 0      2      1      0
B-0	 100    64	 2      0      1      2
C-1	 95	5F	 2      0      1      2
C#1	 88	58	 2      0      1      2
D-1	 83	53	 2      0      1      2
D#1	 78	4E	 2      0      1      2
E-1	 75	4B	 2      0      1      2
F-1	 70	46	 2      0      1      2
F#1	 66	42	 0      2      1      0
G-1	 62	3E	 0      2      1      0
G#1	 58	3A	 2      0      1      2
A-1	 55	37	 2      0      1      2
A#1	 52	34	 0      2      1      0
B-1	 50	32	 2      0      1      2
C-2	 46	2E	 0      2      1      0
C#2	 43	2B	 2      0      1      2
D-2	 41	29	 0      2      1      0
D#2	 38	26	 2      0      1      2
E-2	 37	25	 0      2      1      0
F-2	 35	23	 2      0      1      2
F#2	 33	21	 2      0      1      2
G-2	 31	1F	 0      2      1      0
G#2	 28	1C	 2      0      1      2
A-2	 27	1B	 0      2      1      0
A#2	 26	1A	 0      2      1      0
B-2	 25	19	 2      0      1      2
C-3	 23	17	 2      0      1      2
C#3	 22	16	 0      2      1      0
D-3	 21	15	 0      2      1      0
D#3	 20	14	 2      0      1      2
E-3	 18	12	 2      0      1      2
F-3	 17	11	 0      2      1      0
F#3	 16	10	 0      2      1      0
G-3	 15	F	 2      0      1      2
G#3	 13	D*	 2      0      1      2
A-3	 13	D	 2      0      1      2
A#3	 12	C	 0      2      1      0
B-3	 12	C*	 0      2      1      0

* offtune

 

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

  • 5 weeks later...

And here are my partial tables for $4x two-tone + 15khz.  Far from complete and probably out of tune in bits

 

I have finished the mod 5 guitars (AUDF1 at mod 5 values), and the Fuzzy C distortion (C 15khz distortion where AUDF1=mod 15, higher settings here make a fuzzbox distortion)

 

Not even near complete yet, the mod 5 one lets you play standard $Cx distortion in channel 2 atop the first channel. This makes ferocious guitars and bass timbres.

 

In progress:  Mod 3 guitars ...not even 10% complete yet ... but you can use some of it, may be out of tune though.

SKCTL=$8B AUDCTL=$41 Distortion 4.xlsx

Edited by Synthpopalooza
  • Like 3
Link to comment
Share on other sites

  • 3 weeks later...

So, a startling discovery!

 

I have found that certain frequencies in $Ax distortion in two-tone mode 1.79mhz mode (paired with both the standard 64khz clock and the 15khz clock) do not play correctly in PokeyMax.  As another odd coincidence, this error is duplicated exactly in the latest Altirra emulator (it was correct in 3.22).

 

So an explanation of how this mode works:  You get two possible waveforms here.  First is a very tinny square wave, which I have named the Save to Cassette bell, as it recalls that hi pitched CSAVE whine.  The second is a saw wave.  The different waveforms are a result of the ratio between channel 2 frequency (carrier) and channel 1 frequency (modulation).

 

The error comes in, because PokeyMax (and Altirra 4.0) gets the start of some of the sawtooth ranges wrong on some notes, they are out by one frequency step.  A workaround has been found, though:  Pitch the modulation frequency down one step.  By doing this, it will play both in real POKEY, and in PokeyMax ... POKEY will only show a negligible decrease in volume.

 

So these are the two updated test tunes:  Title music, and Area 3 music, from E.X.O.  Both these play correctly in POKEY and in PokeyMax

 

Also attached is an updated note table for these settings.  Frequencies marked in red are ones which do not work correctly in PokeyMax, so you will add 1 to that frequency to get it to play correctly in PokeyMax.

 

 

UPDATE:  Table has also been redlined for the square wave frequencies.

 

 

 

exo-area3.xex exo-title4.xex

pokey notes - skctl.xlsx

Edited by Synthpopalooza
  • Like 7
  • Thanks 1
Link to comment
Share on other sites

11 hours ago, Synthpopalooza said:

I have found that certain frequencies in $Ax distortion in two-tone mode 1.79mhz mode (paired with both the standard 64khz clock and the 15khz clock) do not play correctly in PokeyMax.  As another odd coincidence, this error is duplicated exactly in the latest Altirra emulator (it was correct in 3.22).

Perhaps tag @foft and @phaeron, so they can fix it :)

Link to comment
Share on other sites

  • 5 months later...

So, some more music for your listening pleasure.  This is some music from an upcoming 7800 game called "Robots Rumble".

 

Music #1

 

Settings are:

 

AUDCTL=$F1 (engages 9-bit poly, 16-bit mode, 1.79 mode on channels 0 and 2, and 15 khz base clock)

 

0 - $8x @1.79mhz (Reverse 16-bit warbling guitars)

1 - silent

2 - $Cx @1.79mhz (hi-pitched arpeggio)

3 - $Cx @15khz stable bass

 

There are two guitar settings used in the Distortion $8x channel with 9-bit poly:

 

First setting:  Frequency $00 is played in channel 1, while a frequency is played in the first channel.  These are very buzzy guitar sounds.  This happens in the middle of the tune

 

Second setting:  These are the warbling guitars.  The table is in my current POKEY notes table, under reverse 16-bit settings, $8x poly 9.  The warbling effect is introduced by varying the frequency of the second channel up or down by several steps.   The greater the variation, the faster the warble, until eventually noise is introduced.

 

There are actually two warbling tables used.  With the second one, playing an $Ax square distortion in the second channel will actually introduce a harmonic atop the guitar.

 

robots-music1.xexrobots-music1.srobots-music1.asm

Edited by Synthpopalooza
  • Like 7
  • Thanks 1
Link to comment
Share on other sites

Danger Zone - converted from the NES version used in the "Top Gun" game.

 

Settings are:

 

AUDCTL=$10 (Engage 16-bit mode but at the standard 64khz clock)

 

0 - $Ax (pulse wave)

1 - silent

2 - $Cx (mod 3 bass aka RMT C)

3 - $Ax (accompaniment/harmony for channel 0)

 

This is one of the more creative ways to get a NES style pulse wave on POKEY.  The trick is, use $Ax distortion reverse 16-bit mode at the standard 64khz clock, playing the first channel while silencing the second.  This gives you about an octave's worth of pulse notes covering the third octave.  You are limited as to what notes can be played, so the original NES tune had to be transposed down two semitones to fit properly.

 

The other limitation, is that you are required to use the standard 64khz clock here, not the 1.79 clock.  This means you are forced to use $Cx distortion for bass sounds in the other channel.

 

 

topgun-dzone.asm topgun-dzone.s topgun-dzone.xex

  • Like 7
  • Thanks 1
Link to comment
Share on other sites

Another one ... the new title theme for the 7800 game E.X.O.

 

Settings:

 

AUDCTL=$61 (1.79 on 0 and 2, engage 15khz clock)

SKCTL=$8B (engage two-tone mode, 1.79+15 mode)

 

0 - $Ax (high pitched saw sequence)

1 - silent (frequency carrier for 0)

2 - $2x bell lead @1.79 mhz

3 - $Cx stable saw bass @15khz

 

As with the E.X.O. Area 5 tune earlier, the two-tone modulation produces a high pitched saw wave.  Other modulations are introduced to mimic a delay/echo effect.  The 15 khz mode also allows for the stable $Cx bass as well, while the $2x triangle wave at 1.79 mhz handles the lead very well.

 

 

exo-title4.asm exo-title4.s exo-title4.xex

Edited by Synthpopalooza
  • Like 6
  • Thanks 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...