Jump to content
IGNORED

ABBUC hardware contest entry: Pokeymax


foft

Recommended Posts

I've been meaning to start a topic about my abbuc hardware competition entry, a replacement for the Pokey chip. It's been mentioned in a couple of threads but I thought many people may have overlooked it.

 

I tried to be sensitive to cost in my design, though once the full details are released (after competition result) it will be fun here to brainstorm ideas to make it even cheaper! Clearly there are still plenty of real pokey chips, however the supply is starting to become more limited and prices are on the increase.

 

---

 

PokeyMAX

 

Introduction

The PokeyMAX is a complete replacement for the Pokey chip. It is derived from the work on the EclaireXL project, a complete FPGA based Atari 800XL clone. The intention is to build replacements for all of the Atari custom chips using this technology and Pokey has been built first. It can be used either to replace a broken/missing pokey, as a stereo upgrade, or just for fun!

 

Features

If pokey is socketed, zero wire installation (mono)

Dual pokey mode

Pins for 3 audio outputs (left channel/right channel/mixed)

Small footprint, only a few mm larger than original IC

Supports all features: 8x paddle inputs, IRQ, serial I/O, audio output, two tone mode, high pass filter and keyboard scan

High level of compatibility

 

Digital logic

The PokeyMAX is built around the Altera MAX10 FPGA. This was chosen due to its integrated flash memory, power conversion, small size and low cost. The contained logic itself is described in VHDL and Verilog and then synthesized using the Quartus II software.

 

Level conversion

Most modern FPGAs no longer support 5V logic. While it is possible to find a few they are a vanishing breed. The MAX10 only supports up to 3.3V logic, so an IDT quickswitch level converter IC is used to connect to the high speed lines (A/D/IRQ/serial io etc) safely.

 

Chip select

Unfortunately I needed more level conversion lines than provided. TI came to the rescue with some 5V tolerant multi-function logic chips with which I was able to combined CS/!CS into one.

 

Power

The MAX10 requires a single 3.3V power supply, it then internally generates the rest of its supplies. This is very convenient, since often FPGAs require 3 or more different voltage levels. There is a switch mode regulator (LM3670) to convert from 5V to 3.3v in an efficient fashion.

 

Paddles

These are handled by charging a capacitor that we then check the level of using an LMV339. This is similar to the well-known LM339 comparator, except much smaller! The comparator is used since the level can be set very precisely rather than relying on when the FPGA detects a logic high. The level itself is set to 2.2v using the voltage divider on the right. It is also convenient since its open drain output means there are no level conversion issues. For the drain transistors, a 5V tolerant IO extender chip is used. The FPGA communicates

with this over an I2C bus.

 

Keyboard scan

An IO extender chip drives the 6 keyboard lines and then reads the response. This is convenient since it only requires an I2C bus to the FPGA and the IC is much smaller than the level converters.

 

JTAG

The core may be upgraded or debugged using an Altera USB blaster connected here. Several of the JTAG pins are dual use and can be used as general IO. So we could for instance in future plug in i2c devices here or use for A5 (with external level converter) to allow quad pokey or sid etc.

 

Audio filter

The audio output uses a delta sigma dac. An RC circuit is used as a simple audio filter to smooth the output from this. There are four audio outputs, which are currently fed to pin 37 and 3 header pins (left/right and mixed). Note that the next stage much not draw a lot of current from the rc filter or it will cause distortion.

 

A4

Pokey has 4 address pins (A0-A3). To make space for a 2nd pokey another address line is needed. For stereo connect to A4.

 

pokeymax_labelled.jpg

 

Errata: Note that the "paddle capacitors" should not be populated and RA1 should be 0 ohm since these are already on the main board, this was a schematic error.

Edited by foft
  • Like 38
Link to comment
Share on other sites

This looks great! I'd love to have one that just has a single POKEY so I can use them for homebrew games. Obviously this would be a great POKEY replacement for Atari 8-bit computers and the 5200 (due to inclusion of other features), but it looks somewhat expensive for my purposes. How much do you think it would cost in its current form?

 

Also, I'm not sure I'd state there are plenty of POKEY chips. While they are out there, they are getting more expensive.

 

..Al

Link to comment
Share on other sites

The current bom is about 18usd for components + 2 layer pcb with 5/5 mil spacing + assembly. It uses small parts so I am not sure if it could be assembled at home. I got some spare pcbs to try!

 

If no keyboard or pots are needed the bottom part of the board would not need populating, saving a few usd.

Edited by foft
Link to comment
Share on other sites

Sounds good.

 

A very important operational question: current stereo upgrades out there have the problem that if stereo mode is activated, and there is a non-stereo (mono) game working (as the 99% of the games), it will work only one audio channel (for example only the left channel).

 

So the question is: Will both audio channels work automatically with a mono game? Or will a switch be required to change from stereo mode to mono mode?

  • Like 3
Link to comment
Share on other sites

You know having stereo output jacks doesn't stop you from still using the normal mono out on the Video jack to a TV or monitor...I use mine for "center channel" and for normal mono games. no problem here.

Edited by Gunstar
Link to comment
Share on other sites

I appreciate everything that enhances the Atari. But this "enhancement" has a sour side effect. POKEY isn't really explored yet , so how can such an enhancement help to put the thing to the real limit?

 

How would this device prevent further exploration of the POKEY? People who want to explore a real POKEY can still do so, no?

  • Like 4
Link to comment
Share on other sites

You know having stereo output jacks doesn't stop you from still using the normal mono out on the Video jack to a TV or monitor...I use mine for "center channel" and for normal mono games. no problem here.

 

Certainly it does the job, but it's still a 'detail' to make manual connections. It should be done automatically.

It's a nice cake but without its cherry.

  • Like 2
Link to comment
Share on other sites

 

How can it be done automatically when A4 and Right channel out AREN'T CONNECTED TO THE SOCKET?

 

I've no idea how can it be done, if so I'd have. If can't be done in a hardware way maybe with software. If it's not detected a signal in a channel for a time, you can assume it's a mono signal, then 'copy' channel A to channel B. Better, you can assume always it's a mono signal, until you have the 2nd channel working for the first time, then it's a stereo signal.

A simple answer: most TV and electronics do the job. How? no idea, not my field.

Edited by tane
  • Like 1
Link to comment
Share on other sites

Hello foft

 

Would be nice if two of those would fit on a dual pokey stereo upgrade PCB (not quite sure what these things are called). Now all we need is somebody that can write some Quad-Pokey software.

 

Sincerely

 

Mathy

 

Unless I'm mistaken, it would only take one to have stereo. By addressing A4 like on a dual Pokey board, you get the right channel. Stereo outputs are already provided.

 

So my question, just like Albert's is how much for an assembled unit? But I'm interested in the stereo core instead of a mono version (not sure if there is any difference).

 

BTW, looks very nice :thumbsup: :) .

Link to comment
Share on other sites

 

This looks great! I'd love to have one that just has a single POKEY so I can use them for homebrew games. Obviously this would be a great POKEY replacement for Atari 8-bit computers and the 5200 (due to inclusion of other features), but it looks somewhat expensive for my purposes. How much do you think it would cost in its current form?

 

Also, I'm not sure I'd state there are plenty of POKEY chips. While they are out there, they are getting more expensive.

 

..Al

A single POKEY version would also be loved by our arcade machine collecting friends, dont forget that there is a market for POKEYs there too, and Stereo is absolutely useless for arcade PCBs so I second the suggestion of creating two versions.

 

Awesome project, and a very worthy competitor to AntiX in the Abbuc contest ;)

 

The most important thing to everyone will probably be 100% compatibility.

 

You mention High level of compatibilitys.....which sounds it is not 100%.

 

For me to buy it, it will have to sound EXACTLY like the original POKEY AND provide all the other features without any delays or lag or other issues.....

 

Will you be demoing it at the JHV ?

 

It is great that there will be an alternative to real POKEY chips as they indeed are getting rare and expensive.

It is also nice and small in footprint compared to a stereo POKEY PCB.

 

It would be great if the selection of stereo could still be controlled by U1MB without needing the extra little switch PCB, maybe this could be integrated ?

 

Looking forward to see/hear it ! Do you have any video of it in use with a real machine ?

Edited by Level42
  • Like 2
Link to comment
Share on other sites

To answer some questions:

1) mono version: the price would not change much and the current one works as mono if A4 is simply not connected.

2) Total price: TBD, will depend very much on quantity. The more, the cheaper. These ones cost me about 40usd but it was a small prototype run and I had to make the pcbs twice due to a mistake.

3) Auto right channel=left channel: Very doable, would have to come up with a way of detecting. No writes to pokey2 in 30 seconds and no audio out perhaps?

4) Compatibility: Well even Commodore couldnt make sid match sid exactly! I think its pretty good but it isnt the original chip. Im sure emkay will help me find things to fix:)

5) Stereo switch via Ultimate mb: I guess this is easy, does it output lvttl levels?

6) JHV: No plans but I could be convinced!

7) Video: Ill make one.

Edited by foft
  • Like 7
Link to comment
Share on other sites

To answer some questions:

1) mono version: the price would not change much and the current one works as mono if A4 is simply not connected.

2) Total price: TBD, will depend very much on quantity. The more, the cheaper. These ones cost me about 40usd but it was a small prototype run and I had to make the pcbs twice due to a mistake.

3) Auto right channel=left channel: Very doable, would have to come up with a way of detecting. No writes to pokey2 in 30 seconds and no audio out perhaps?

4) Compatibility: Well even Commodore couldnt make sid match sid exactly! I think its pretty good but it isnt the original chip. Im sure emkay will help me find things to fix:)

5) Stereo switch via Ultimate mb: I guess this is easy, does it output lvttl levels?

6) JHV: No plans but I could be convinced!

7) Video: Ill make one.

 

1) Sounds that solves it :) And one version = lower price per unit

3)No idea how, but it would be very nice...constantly having to switch from the menu (or with TV menu's) to mono becomes a PITA after a while

4) ......mmmmm.....now that's not a really good example is it ? :grin: :grin: :grin: :grin: :grin: Yes we need some POKEY wizards to put it to the test :)

5) Uhmmm.... low or 3,7V but that is enough for a high for TTL.

6) Please come ! (Was that convincing enough ? :D)

7) Thanks ! (although a PVM isn't exactly the best in sound output....but it looks good inside the machine and seems to do what it should do....I'd say you did a better job than Commodore with SID :grin: :grin:

Link to comment
Share on other sites

Hello Michael

 

 

Unless I'm mistaken, it would only take one to have stereo. By addressing A4 like on a dual Pokey board, you get the right channel. Stereo outputs are already provided.

 

 

That's why I mentioned "Quad-Pokey" :D

 

Sincerely

 

Mathy

  • Like 1
Link to comment
Share on other sites

3) Auto right channel=left channel: Very doable, would have to come up with a way of detecting. No writes to pokey2 in 30 seconds and no audio out perhaps?

 

An algorithm could be:

  1. State 0: turning on the Atari: starting and assuming it's always a mono signal. Then right channel = left channel. (Also with probabilities: it's more likely to use a mono game, as they are the 99%).
  2. At the first write to pokey2, it will indicate it's a stereo signal. Then right and left channels are different (State 1).
  3. Always when turning on the Atari, it starts with State 0.
  4. For internal cartridges installations: Every time you press the cartridge reset button (without turning off the Atari), it will change to State 0. In this case will be required a simple push switch (input) in the PCB in order to make connections. This is useful for internal installations, so a single switch will tell both the cartridge and the Pokeymax to restart with a State 0, and will no be required to turn off the Atari in order to select State 0.
  5. The auto change from State 1 to State 0 could be waiting some time (30 secs) with no signal in both channels. This case is subjective.
  6. The option of wait a time (30 seconds) and no audio maybe could be subjective, but it could also be added with a jumper in the PCB (in order to disable it). The use of jumpers could be a good option to choose different scenarios / uses for everyone's Atari.
Edited by tane
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...