Jump to content
IGNORED

Prickle - My POKEY Programming Helper


MobiusAqua

Recommended Posts

I wanted to try my hand at making a fun little utility, that programmers, whether they code in machine language, or 7800basic, could use to help them write commands to send to the POKEY chip in their own programs. It's a program that lets you set the volume, frequency and waveform settings for each of the POKEY's four channels, and hear what kinds of sounds each combination makes, to help you make music and sound effects easier. Kind of a "what you hear is what you get" sort of thing.

I call it "Prickle", because the chip is called POKEY, and GCC was going to make a low-cost sound chip called GUMBY for the Atari 7800, so I figured I'd stay within that character set.

This was inspired by Random Terrain's Tone Toy 2008, which I find is a great help for programming the TIA's two sound generators. When I started to think about adding POKEY sound and music to the game I'm working on, I looked to see if there was something similar for programming the POKEY. I don't know if I didn't look hard enough, or if there really wasn't anything like that (unless Raster Music Tracker counts?), but I couldn't find anything that worked like Tone Toy, so I decided to make my own, and share it with you guys, hoping that you might be able to use it, as well.

Here's a screenshot of the interface. It's not much, but since it's more of a utility, I figured I'd draw up something basic. I am thinking about making it look a bit more graphical in a future update, though.
post-40666-0-21009400-1439268896_thumb.png

Basically, you have a context-sensitive help bar at the top of the screen, which tells you what each of the joystick movements (and the fire button) do, at any given moment. All four channels are laid out, for you to tinker around with, until you find a combination of settings that you like. It starts out with the word one highlighted, and if you move the joystick up or down from that point, you can switch between the other four channels, as well. With any of the channels by themselves highlighted, pushing the joystick to the left or right highlights one of the channel settings, like volume, frequency and the waveform ("square wave", "sawtooth wave", "pink noise", etc.). With any of these highlighted, moving the joystick up or down will change that setting. It'll increase or decrease the volume or frequency, and in the case of the waveform selector, change the type of waveform. If you hold the fire button down while you do this, it will slow down the increase or decrease, so you can have a bit finer control over what you want to change each setting to.

And, when you push the joystick to the left or right, so only the channel number is highlighted, you can press the fire button to mute or unmute that channel. I figured that might be helpful, if you're trying to program in a two-, three- or four-part harmony with the other channels, and wanted to adjust each one, without hearing the others, and without needing to turn the volume all the way down on each channel, first.

This is version 0.9, which I put the finishing touches on about an hour ago. It's version 0.9, because aside from the idea of making the interface look a bit more graphical (and because I've been itching to try 320B mode out), there's one thing I'm not sure how to do, that I'm pretty sure might come in handy: 16-bit mode. If anyone knows how to do this, and would like to help me add it in for version 1.0, that would be great.

I'm going to release this under version 3 of the GNU GPL, but if that's not a good idea, I can change it.

 

Here's the attached files:

  1. prickle.zip contains all of the source files 7800basic generated, along with the font I used, the A78 and BIN files. I figured I'd include everything, just in case.
  2. prickle-v09.a78 is the program itself. I tested it under MESS, both with and without the XM, and it worked both times. I haven't tried it in ProSystem, but if it doesn't work for you (or it complains of no POKEY chip), please let me know.
  3. prickle-v09.bin is a BIN file, because I wasn't sure if anyone would wanna try this on a Cuttle Cart 2, or CPUWIZ's MCP development cart, while they're programming. Maybe I'm just being silly. :D

If you have any questions, the interface is too confusing, or you found a bug, please feel free to let me know.

prickle.zip

prickle-v09.a78

prickle-v09.bin

  • Like 10
Link to comment
Share on other sites

I call it "Prickle", because the chip is called POKEY, and GCC was going to make a low-cost sound chip called GUMBY for the Atari 7800, so I figured I'd stay within that character set.

.

 

It sounds like it might work with a Hokey, since it's a more or less what GUMBY was going to be.

Link to comment
Share on other sites

  • 1 month later...

One other thing you could try, is the various AUDCTL settings, which change how the POKEY works. The most useful ones I have found are the settings for 16-bit mode, in which channels 0 and 1 (or 2 and 3) are combined into one 16-bit channel.

 

There is also a hi-pass setting where channel 2's frequency acts as a hi-pass filter on channel 0 (and you can also set channel 3 to modulate channel 1 in the same way).

 

The other interesting bits are bit 0 which changes the clock rate. It essentially transposes your notes up an octave. And also bit 7, which changes the poly register from 17 bit to 9 bit. This works best with distortion 8, instead of just white noise, the noise actually has a pitch! The pitch corresponds with the same pitches used for distortion 10 (pure tone square wave).

 

A bit of a warning: Most 7800 emulators (except maybe MESS) will not emulate these AUDCTL settings properly.

 

https://en.wikipedia.org/wiki/POKEY#AUDCTL_.24D208_Write

  • Like 3
Link to comment
Share on other sites

One other thing you could try, is the various AUDCTL settings, which change how the POKEY works. The most useful ones I have found are the settings for 16-bit mode, in which channels 0 and 1 (or 2 and 3) are combined into one 16-bit channel.

 

There is also a hi-pass setting where channel 2's frequency acts as a hi-pass filter on channel 0 (and you can also set channel 3 to modulate channel 1 in the same way).

 

The other interesting bits are bit 0 which changes the clock rate. It essentially transposes your notes up an octave. And also bit 7, which changes the poly register from 17 bit to 9 bit. This works best with distortion 8, instead of just white noise, the noise actually has a pitch! The pitch corresponds with the same pitches used for distortion 10 (pure tone square wave).

 

A bit of a warning: Most 7800 emulators (except maybe MESS) will not emulate these AUDCTL settings properly.

 

https://en.wikipedia.org/wiki/POKEY#AUDCTL_.24D208_Write

 

Nailed down by MAME/MESS for quite some time now. :)

  • Like 2
Link to comment
Share on other sites

  • 4 years later...

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