Jump to content
ivop

Pokey Explorer v1.0 release

Recommended Posts

Here's the release of v1.0 of Pokey Explorer!

 

Pokey Explorer is a tool to explore all possible register combinations of the Atari 8-bit Pokey chip.

 

default-screen.png.60395661ae77e5bcb55a490074a5a1a3.png

 

Here's the source, and some kind of manual :)

 

This originated in this thread, where you can see how it came to be, and why :)

 

There are two binaries. One for PAL and one for NTSC, because the sweep timing is different (edit: and the tuning notes are different!)

 

Have fun and explore ;)  

 

Please report any bugs you find.

pokeyexp-v1.0-ntsc.xex pokeyexp-v1.0-pal.xex

Edited by ivop
  • Like 12
  • Thanks 3

Share this post


Link to post
Share on other sites
7 hours ago, archon800 said:

There's no way to halt a sweep.

Thanks for the feedback. I knew I'd forgotten something. Probably add that for version 1.1. Right now, I'm thinking/working on a native batch version without any user interaction, so one can run 20 sweeps overnight.

Share this post


Link to post
Share on other sites

You can now hold START during a sweep to stop it prematurely.

 

I chose not to include checks for START in every loop to not clutter the code anymore than necessary for this functionality. It responds once per play and gap time loop. Worst case (now) is 4s play time and 1s gap time. So it could take up to five seconds to abort the sweep. IMHO that's tollerable during experimentation with sweeps (average is 2.5s and that's with maximum play and gap time settings). After that, you prepare specific sweeps upfront anyway.

 

 

pokeyexp-v1.1rc1-ntsc.xex pokeyexp-v1.1rc1-pal.xex

Edited by ivop
  • Like 2

Share this post


Link to post
Share on other sites

So as not to crowd your thread, I may start another, dedicated to mapping out settings using this tool ... thanks to this I've already gotten a bit of a head start on two more settings. :)  Unless you are ok that I put such material in here ...

Share this post


Link to post
Share on other sites

You can post your results here, or in a thread of your own. Whatever you find most comfortable :)

 

Share this post


Link to post
Share on other sites

In that case ...

 

I have been working on AUDCTL=$64 and AUDC1=$Ax ... hi pass filter with both 1 and 3 set to 1.79 mhz.  This makes sawtooth waves.

 

There are several scales, which come about due to the offset between AUDF1 and AUDF3 ... so far I have scales for +/- 1, +/- 2, and will be investigating the 3 and 4 ratios.  With the 1 offset, we start at a#0 and go up to about c3 before tuning errors start happening.  At the 2 ratio, the range goes up an octave.  At 3, the range goes up a 4th interval.  At 4, we are at 2 octaves (about a2) ... haven't explored beyond there, but  I have a pattern down and a note table is forthcoming. :)

  • Like 1

Share this post


Link to post
Share on other sites

Wow, that's a very interesting setting!

 

Untitled.thumb.png.fa2b8e4e9d8c2bdda448d06a962e8d68.png

 

This is plus/minus 8. C4/CC but CC/C4 is also a note. But for example, C3/CB is not nice to the ears, as you get a high whistle note, too.

 

The resulting sawtooth is pretty nice. I hope it will be possible to find a proper table with all tones close to tuned and without whistle notes. The eventual table could mix different offsets and which AUDF is the higher value.

 

Edit: wanted to do a sweep with an interval of $0808 (start at $040c or $0c04), but I don't support 16-bit intervals :D  *sigh* feature request to myself ;)

 

 

Edited by ivop

Share this post


Link to post
Share on other sites

Yes, there are many combinations that introduce high whistle notes, that interfer with our work ;)

 

 

This is what my ears say:

 

+/-1 is always listenable

 

+/-2 is listenable if the values are multiples of 2. the odd values have an out of tune harmonic.

 

+/-3 similar, one out of three is a clear sawtooth (e.g. $6568, $6265), the rest is meh...

 

+/-4 is only without disharmonics for multiples of 4 and both least significant bits set to zero.

 

+/-8 same as 4, but three bits set to zero

 

+/-16 similar, but four bits....

 

The lower frequencies are more subject to whistle notes, and the bigger the offset, the sooner it starts when you increase the values and lower the frequency.

 

 

Bottom line: we need 16-bit intervals for sweeps. An interval of $0101, and start with $0001 or $0100, and the same for $0202, $0303, etc... intervals with matching start values. These sawtooths really sound good, without the low-pass filter muffling we know from some other soundchip ;)

Share this post


Link to post
Share on other sites

+/-5 also works, $5b60, $6065, $656a, etc...

 

+/-6 are the same as +/-3

 

+/-7 prime! :) $5e65, $656c, $6c73, $737a, and so on

 

8 and 16 overlap with 4, (edit: and 2!)

 

9 and 12 overlap with 3.

 

10 and 15 overlap with 5.

 

That leaves us:

 

+/-11 prime. $7580, $808b, $8b96, and so on (interval is $0b0b)

 

and

 

+/-13 prime. $7e8b,  $8b98, $98a5, interval $0d0d

 

Edit: next prime is 17. $95a6, $a6b7, $b7c8, $c8d9, etc.. interval $1111

 

Final edit: reverse 16-bit is also without disharmonics, i.e. both $7580 and $8075 sound clean (interval $0b0b), but if my ears don't fool me, they are not the same frequency.

 

SO, bottom line is see previous post :)

Edited by ivop
  • Like 1

Share this post


Link to post
Share on other sites

I enabled 16-bit intervals. Most of the code was already prepared for that.

 

sweep-synth-0101.png.ea58d1dba7c00c51c2b59cabb686acde.png

 

Here's a sweep of one of synthpopalooza's discoveries. Filter 1+3, 1 and 3 @1.79MHz, 16-bit sweep of 1+3, start value $0001, interval $0101, short play time, no gap, just an example :)

 

Notice how after $8081 you slowly hear a high note that messes things up in the bass range :(

 

But, here's v1.1rc2 with 16-bit intervals :)

 

pokeyexp-v1.1rc2-ntsc.xex pokeyexp-v1.1rc2-pal.xex sweep-synth-0101.mp3

  • Like 3

Share this post


Link to post
Share on other sites

Here are the settings I think are all without disharmonics:

 

(n) start_value --> interval

 

(1) $0001 --> $0101

 

(n=prime) start_value --> interval

 

(2) $0002 --> $0202        ($0001 --> $0202 doesn't sound that bad, too)

(3) $0205 --> $0303

(5) $0106 --> $0505

(7) $030a --> $0707

 

And all the sweeps work with both 16-bit and reverse 16-bit! (where $030a turns into $0a03 for example, for prime number 7).

 

I don't think the next primes (11,13,17) are useful.

 

 

Edit: All sweeps eventualy end up with that high pitched overtone I mentioned earlier. It depends on your age when you start hearing it ;)

Edited by ivop

Share this post


Link to post
Share on other sites

So, its now just a matter of taking these sweeps, mapping them, and sorting out which frequencies match closest to get an optimal note table.

Share this post


Link to post
Share on other sites
8 hours ago, ivop said:

I enabled 16-bit intervals. Most of the code was already prepared for that.

 

sweep-synth-0101.png.ea58d1dba7c00c51c2b59cabb686acde.png

 

Here's a sweep of one of synthpopalooza's discoveries. Filter 1+3, 1 and 3 @1.79MHz, 16-bit sweep of 1+3, start value $0001, interval $0101, short play time, no gap, just an example :)

 

Notice how after $8081 you slowly hear a high note that messes things up in the bass range :(

 

But, here's v1.1rc2 with 16-bit intervals :)

 

pokeyexp-v1.1rc2-ntsc.xex 6.63 kB · 5 downloads pokeyexp-v1.1rc2-pal.xex 6.63 kB · 5 downloads sweep-synth-0101.mp3 522.04 kB · 16 downloads

This is only not shown in RMT, because RMT doesn't support 16 bit values.

At least it shows the possibility of wave shaping , forward sawtooth, backward sawtooth.. and so on, at 16 bit resolution. 

Pulses a "3.58 MHz" allow clean mid to high range waves of all possiblities. "digital playback via hardware! given. 

Share this post


Link to post
Share on other sites
12 hours ago, Synthpopalooza said:

So, its now just a matter of taking these sweeps, mapping them, and sorting out which frequencies match closest to get an optimal note table.

Yes, "just" that :)

12 hours ago, emkay said:

This is only not shown in RMT, because RMT doesn't support 16 bit values.

Yeah, that's a pity. But a new player routine will be written. Expect the tracker late 2025 or early 2026 ;)

  • Like 1
  • Haha 2

Share this post


Link to post
Share on other sites
1 hour ago, ivop said:

But a new player routine will be written.

This part was not joking BTW. Either Synthpopalooza, or I, or both, or together, or somebody else, will probably write a new player that can handle all these exotic settings and note tables. Except for STIMER reset and SKCTL (reset and two-tone mode), everything can be captured to SAP-R and replayed with dmsc's LZSS player. ~1140 cycles per frame. So the new player does not have to be optimized for performance, but for features :)

 

And then implementing a tracker is an exersice for the reader ;)

 

  • Like 6

Share this post


Link to post
Share on other sites

A new tracker that supports such features would be awesome. 
 

I was wondering ... Could openmpt be used along with sample packs like this to compose for pokey/sid?

http://little-scale.blogspot.com/2009/01/atari-pokey-noise-sample-pack.html?m=1

http://little-scale.blogspot.com/2009/10/commodore-64-sid-8580-basic-sample-pack.html?m=1

 

Then a pattern replay routine could be used that does everything mod like except the samples, adjusting pokey/sid settings each frame instead to match the samples?

  • Like 1

Share this post


Link to post
Share on other sites

I decided to keep the version number the same for the new batch processor, so here is v1.1rc2 of Pokey Batch Explorer.

 

The batch sweep settings are seperated from the main source in sweep.s.

 

Spoiler

; SWEEP 1

;

; Synthpopalooza's 1+3 filter, 1 and 3 @1.79MHz

; Interval of $0101 and reverse 16-bit

 

; SWEEP 2

; Plain $Ax sweep

 

SWEEP 3

; $8x, poly counter 9-bit, channel 1 clock 1.79MHz, 8-bit sweep

; $03 + n*7

 

Audacity screenshot of amplitudes:

 

pokeyexp-batch-sweep-audacity.thumb.png.7d35f1c4f879c2fea6fdf4104b56724d.png

 

You can clearly see that during the "plain $ax" sweep, the volume increases when the frequency decreases. I suppose that's what emkay means when he complains about volume problems ;)

 

 

first-batch-3-sweeps.mp3 pokeyexp-batch-v1.1rc2-ntsc.xex pokeyexp-batch-v1.1rc2-pal.xex

  • Like 1

Share this post


Link to post
Share on other sites
2 hours ago, foft said:

A new tracker that supports such features would be awesome. 
 

I was wondering ... Could openmpt be used along with sample packs like this to compose for pokey/sid?

http://little-scale.blogspot.com/2009/01/atari-pokey-noise-sample-pack.html?m=1

http://little-scale.blogspot.com/2009/10/commodore-64-sid-8580-basic-sample-pack.html?m=1

 

Then a pattern replay routine could be used that does everything mod like except the samples, adjusting pokey/sid settings each frame instead to match the samples?

If I understand it correctly, that's a sample pack for a MOD tracker. If you carefully sequence your MOD file to not use more than 3 (SID) or 4 (Pokey) channels at the same time, you can indeed replay the same patterns and song data on a real machine. I think both Goat Tracker (C64) and Raster Music Tracker (Atari) can import MOD song and pattern data. But after that, you have to create your own instruments.

 

Edited by ivop

Share this post


Link to post
Share on other sites
2 hours ago, ivop said:

If I understand it correctly, that's a sample pack for a MOD tracker. If you carefully sequence your MOD file to not use more than 3 (SID) or 4 (Pokey) channels at the same time, you can indeed replay the same patterns and song data on a real machine. I think both Goat Tracker (C64) and Raster Music Tracker (Atari) can import MOD song and pattern data. But after that, you have to create your own instruments.

 

I think he means using openmpt with a standard Pokey sample pack which mimics your note tables to avoid having to write a new tracker and instead 'simply' write an openmpt player on the A8 (since you were planning to write a player anyway)?

 

 

  • Like 1

Share this post


Link to post
Share on other sites

 

Would it be possible to use opentmpt + a sample pack and simply export the raw pokey data ( possibly LZSed ) ?

 

That way it would be possible to export fancy stuff like stereo @ 400hz and it would be playable on a real machine.

Edited by rensoup

Share this post


Link to post
Share on other sites
3 hours ago, ivop said:

I decided to keep the version number the same for the new batch processor, so here is v1.1rc2 of Pokey Batch Explorer.

 

The batch sweep settings are seperated from the main source in sweep.s.

 

  Reveal hidden contents

; SWEEP 1

;

; Synthpopalooza's 1+3 filter, 1 and 3 @1.79MHz

; Interval of $0101 and reverse 16-bit

 

; SWEEP 2

; Plain $Ax sweep

 

SWEEP 3

; $8x, poly counter 9-bit, channel 1 clock 1.79MHz, 8-bit sweep

; $03 + n*7

 

Audacity screenshot of amplitudes:

 

pokeyexp-batch-sweep-audacity.thumb.png.7d35f1c4f879c2fea6fdf4104b56724d.png

 

You can clearly see that during the "plain $ax" sweep, the volume increases when the frequency decreases. I suppose that's what emkay means when he complains about volume problems ;)

 

 

first-batch-3-sweeps.mp3 1.89 MB · 3 downloads pokeyexp-batch-v1.1rc2-ntsc.xex 5.37 kB · 3 downloads pokeyexp-batch-v1.1rc2-pal.xex 5.37 kB · 2 downloads

Yes, this volume issue occurs with most settings involving hi pass filter.  I noticed it too.  This can be used to advantage tho ... for example, putting in delay echoes without altering the volume settings.

Share this post


Link to post
Share on other sites

I did some experimenting using SAP and a music routine that involves using frequency and duration on each channel.  It even worked with SKCTL.

Share this post


Link to post
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.

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...