Jump to content

A full-blown newb on the way to a POKEY synth


nILS
 Share

Recommended Posts

  • Replies 149
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

There you go: www.schickt.de/temp/pokey_test.mp3

Not really anything to drool about though. I've recorded this using the "wrong" oscillator which messes with the pokey quite a bit. It's just some random test notes. As soon as the parts from Smash get here I'll try to put something more interesting together.

If anyone doesn't know what the Pokey sounds like at all, I have an mp3 with some tunes from Raster tracker: http://www.schickt.de/pokey/pokey.mp3 (lousy quality)

Link to comment
Share on other sites

Some updates on the progress:

After receiving the nicely packed parts from SmashTV (thanks again!) I did some more research and fiddling. Amazingly, the POKEY works on basically any input frequency. So the frequency divider I put on the board basically works as an octave shifter atm :D

Even with the "correct" oscialltor/frequency I notice some glitches. These might be related to the PC's parallel port or the way the driver acts on Windows XP. I've obtained a copy of Windows 98 to find that out. Right now. Actually.

Link to comment
Share on other sites

When you say "works on basically any frequency", how big a range are we talking about?

Does it go as high a 14.318?

I think you'll have more luck with getting the pitch right if you clock it as high as it will allow you to go. You'll reduce your error for a given pitch, the trade-off being you'll get fewer western scale pitches in your range.

Be careful though, you might be running toward thermal overload territory (which could overheat/blow up your POKEY).

Also regarding the pitch issues, is there any other means of setting pitch with the POKEY?

As far as I get it, it's one 8-bit register (AUDF), and some means of selecting the clock frequency (Fin) to a selection of divisions of the master clock frequency?

If this is it, I can't imagine you'll have a lot of capability for pitch bend (in performance).

I'm now going to try plugging some other known crystal frequencies into that table, to see if there are some common oscillators which might work well.

Link to comment
Share on other sites

When you say "works on basically any frequency", how big a range are we talking about?

Does it go as high a 14.318?

By saying "basically any frequency" I was talking about anything *below* 1.8432 Mhz. I don't a huge variety of oscillators here so I couldn't really test a lot above that. Using the 3.57Mhz from the oscillator I use atm directly did not work. I'm using a binray counter to divide the frequency thus my choices of Fin are 3.57, 3.57/2 = 1.79, 3.57/4 = 0.89 (...). These all work and they do nicely as dividing the Fin by 2^n leads to Fout jumping in octaves.

I think you'll have more luck with getting the pitch right if you clock it as high as it will allow you to go. You'll reduce your error for a given pitch, the trade-off being you'll get fewer western scale pitches in your range.

Be careful though, you might be running toward thermal overload territory (which could overheat/blow up your POKEY).

Pitch is not that big a problem anymore, so I tend to stay within a reasonable range of the Fin intended for the pokey.

Also regarding the pitch issues, is there any other means of setting pitch with the POKEY?

As far as I get it, it's one 8-bit register (AUDF), and some means of selecting the clock frequency (Fin) to a selection of divisions of the master clock frequency?

Exactly right.

If this is it, I can't imagine you'll have a lot of capability for pitch bend (in performance).

Partially true. It greatly depends on the part of the scale you're in. If you move towards the high notes in the range of playable notes (determined by Fin) the needed AUDF values move a lot closer together leaving you with less steps for pitch bending.

Link to comment
Share on other sites

Okay, this is the hopefully final schematic for the mbPokey board. I'd greatly appreciate if some of you could help me double check it :D

What's new:

- added a 74HC151 do allow for software-triggered clock switching (might be removed again if it does not yield nice results)

- added serial out to allow for multiple pokeys

EDIT: Parts lists

name       value         descr.                 package
C1 - C6    100nF         ceramic cap            5.08mm
IC2, IC3   74HC595       shift register         DIL16
IC4        74HC151       muxer                  DIL16
IC5        74HC590       binary counter         DIL16   
IC1        C012294B-01   AMI Pokey Chip         DIL40   
J1         pin header    core connection        2x5   
J2         pin header    audio out              1x2   
J3         pin header    slave connection       2x5   
Q1         3.579545Mhz   crystal oscillator     DIL14/DIL8
R1         1k Ohm        resistor               0207/2V
R2         10k Ohm       resistor               0207/2V[/code]

IC sockets (4xDIL16, 1xDIL40) not listed.

pokey_prelim_schem_thumb.png

1745_pokey_prelim_schem_pngeb62ccc862780

Link to comment
Share on other sites

More updates!

  • Thanks the the ingenious Mr. Jimp support for software octave switching is now included as well. Hooray. New revision of the schematic is attached. Some minor flaws are fixed as well.
  • The untested source code for Core -> Pokey communication is done as well. It compiles so I assume it's working just fine ;)
  • Missing parts are ordered and will arrive here in a couple of days. This means I'll be sitting in a corner, crying out my eye-balls in about 5 days.

This is what it looks like:

void PokeySRWriteBit(unsigned char reg, unsigned char bit)
{
// bcf  POKEY_SR_LAT_OUT, POKEY_SR_PIN_OUT ; set out pin depending on register content (reg.bit)
LATDbits.LATD6 = 0;

// btfsc   reg, bit
if (reg & (1 << bit) == 1)
// bsf     POKEY_SR_LAT_OUT, POKEY_SR_PIN_OUT
LATDbits.LATD6 = 1;

// bsf     POKEY_SR_LAT_SCLK, POKEY_SR_PIN_SCLK  ; rising clock edge
LATDbits.LATD5 = 1;
   
// bcf     POKEY_SR_LAT_SCLK, POKEY_SR_PIN_SCLK  ; falling clock edge
LATDbits.LATD5 = 0;
}

void PokeyWriteSR(unsigned char addr, unsigned char byte)
{
// MIOS_PARAMETER2[7..0]: Data
// MIOS_PARAMETER1[4..0]: Address
// MIOS_PARAMETER1[5]   : Reset
// POKEY_SR_Write

// clock divisor for the muxer has to be added to the address first :D
addr = addr + clock_base << 4;

// bcf POKEY_SR_LAT_SCLK, POKEY_SR_PIN_SCLK  ; clear clock
LATDbits.LATD5 = 0;

// POKEY_SR_WRITE_BIT MACRO reg, bit
PokeySRWriteBit(byte, 0);
PokeySRWriteBit(byte, 1);
PokeySRWriteBit(byte, 2);
PokeySRWriteBit(byte, 3);
PokeySRWriteBit(byte, 4);
PokeySRWriteBit(byte, 5);
PokeySRWriteBit(byte, 6);
PokeySRWriteBit(byte, 7);

PokeySRWriteBit(addr, 0);
PokeySRWriteBit(addr, 1);
PokeySRWriteBit(addr, 2);
PokeySRWriteBit(addr, 3);
PokeySRWriteBit(addr, 4);
PokeySRWriteBit(addr, 5);
PokeySRWriteBit(addr, 6);
PokeySRWriteBit(addr, 7);

// bsf POKEY_SR_LAT_RCLK, POKEY_SR_PIN_RCLK ; latch POKEY values
LATCbits.LATC4 = 1;
   
// bcf POKEY_SR_LAT_OUT, POKEY_SR_PIN_OUT   ; clear out pin (standby)
LATDbits.LATD6 = 0;

// bcf POKEY_SR_LAT_RCLK, POKEY_SR_PIN_RCLK ; release latch
LATCbits.LATC4 = 0;
} // PokeySRWrite[/code]

Edit: Code change - I missed the 3 lines on SR1 for the muxer...

pokey_prelim_schem_thumb.png

1747_pokey_prelim_schem_pngeb62ccc862780

Link to comment
Share on other sites

The transistor will be left out for now (in my test setups) as the Pokey is virtually indestructable according to the information available to me at this point. It will most likely be in the final version though.

Just a small update on the status of the project: I finally got all the parts needed and will get started on the mbPokey board as soon as I find the time, which will most likely be the beginning of next week.

Link to comment
Share on other sites

  • 2 weeks later...

Yogi: Way cool ;D You'll be one of the first (or the first if you beat me to it) to build the mbPokey board. I'll post the source for the pokey app soon (it's compiling and looks correct BUT it's not been tested yet obviously).

Just in case someone's wondering - I'm rather busy with exams at the moment, but I'll be back to working on the Pokey after Christmas :D

Link to comment
Share on other sites

Just got two Pokeys (pokey and gumby) for this project.

I got eleven Pokeys!

Yogi: Way cool  You'll be one of the first (or the first if you beat me to it) to build the mbPokey board.

Can I be 2nd then?

Seriously guys, got 10 brand new Pokeys from Mikes Arcade shop in the US, VERY nice people to deal with.

Its only children that should be seen and not heard, where is the PCB thing for me to get going with this?  Can see the overlay but not an eagle file?  Am I missing something?

Thanks and regards

Sparx

PS Good luck with the exams.

Link to comment
Share on other sites

Sparx,  you mean buizness!

Yes I do, I really want to make these into a working synth.

Going to start with one board then see what happens.

Had built an LPT to Pokey but got sidetracked doing the 6582.

Now this has come along, great!

But am going to need an eagle file, where can I download it?

Or can someone send it to me so I can get on with it?

Thanx and regards

Sparx

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.

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


×
×
  • Create New...