Jump to content

Photo

ABBUC hardware contest entry: Pokeymax

abbuc hardware pokey replacement chip fpga

47 replies to this topic

#1 foft ONLINE  

foft

    Dragonstomper

  • 744 posts
  • Location:Nyon, Switzerland

Posted Wed Aug 22, 2018 1:18 PM

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, Wed Aug 22, 2018 2:05 PM.


#2 Albert OFFLINE  

Albert

    Quadrunner

  • 34,721 posts

Posted Wed Aug 22, 2018 1:45 PM

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



#3 foft ONLINE  

foft

    Dragonstomper

  • Topic Starter
  • 744 posts
  • Location:Nyon, Switzerland

Posted Wed Aug 22, 2018 2:02 PM

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, Wed Aug 22, 2018 2:04 PM.


#4 tane OFFLINE  

tane

    Star Raider

  • 56 posts

Posted Wed Aug 22, 2018 3:27 PM

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?



#5 emkay OFFLINE  

emkay

    Quadrunner

  • 9,450 posts
  • What's up?
  • Location:Holy Grail ;)

Posted Wed Aug 22, 2018 3:43 PM

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?

#6 Gunstar OFFLINE  

Gunstar

    Gunstar

  • 9,314 posts
  • Location:Kellyville, Oklahoma

Posted Wed Aug 22, 2018 3:50 PM

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, Wed Aug 22, 2018 3:53 PM.


#7 Stephen OFFLINE  

Stephen

    Quadrunner

  • 7,128 posts
  • A8 Gear Head
  • Location:No longer in Crakron, Ohio

Posted Wed Aug 22, 2018 4:02 PM

Excellent!  I love my Eclaire beta, and I hope this project brings about replacements for the 3 VLSI chips in our beloved 8-bitters!  The originals won't be around forever.



#8 pixelmischief OFFLINE  

pixelmischief

    Stargunner

  • 1,076 posts

Posted Wed Aug 22, 2018 4:17 PM

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?



#9 Mathy OFFLINE  

Mathy

    River Patroller

  • 2,679 posts
  • Location:Heerlen, NL

Posted Wed Aug 22, 2018 5:40 PM

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



#10 adam242 OFFLINE  

adam242

    Dragonstomper

  • 941 posts
  • Location:Michigan

Posted Wed Aug 22, 2018 7:06 PM

Very, very nice... If this will comfortably live in an 800, I'm a sure sale. Probably am anyway for one of my other machines.



#11 tane OFFLINE  

tane

    Star Raider

  • 56 posts

Posted Wed Aug 22, 2018 7:47 PM

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.



#12 Kyle22 OFFLINE  

Kyle22

    River Patroller

  • 3,509 posts
  • Call my BBS! telnet://broadway1.lorexddns.net
  • Location:McKees Rocks (Pittsburgh), PA

Posted Wed Aug 22, 2018 7:50 PM

 

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.

 

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



#13 tane OFFLINE  

tane

    Star Raider

  • 56 posts

Posted Wed Aug 22, 2018 8:06 PM

 

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, Wed Aug 22, 2018 8:15 PM.


#14 mytek ONLINE  

mytek

    River Patroller

  • 2,922 posts
  • Location:Santa Rosa, CA

Posted Wed Aug 22, 2018 8:16 PM

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



#15 Level42 OFFLINE  

Level42

    River Patroller

  • 2,367 posts
  • Location:Ridderkerk, The Netherlands

Posted Wed Aug 22, 2018 11:18 PM

never mind this post... :)

Edited by Level42, Wed Aug 22, 2018 11:34 PM.


#16 Level42 OFFLINE  

Level42

    River Patroller

  • 2,367 posts
  • Location:Ridderkerk, The Netherlands

Posted Wed Aug 22, 2018 11:28 PM


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, Wed Aug 22, 2018 11:37 PM.


#17 foft ONLINE  

foft

    Dragonstomper

  • Topic Starter
  • 744 posts
  • Location:Nyon, Switzerland

Posted Thu Aug 23, 2018 10:52 AM

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, Thu Aug 23, 2018 10:53 AM.


#18 foft ONLINE  

foft

    Dragonstomper

  • Topic Starter
  • 744 posts
  • Location:Nyon, Switzerland

Posted Thu Aug 23, 2018 1:34 PM

A video, as requested...

 



#19 Level42 OFFLINE  

Level42

    River Patroller

  • 2,367 posts
  • Location:Ridderkerk, The Netherlands

Posted Thu Aug 23, 2018 2:10 PM

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:



#20 killersquirel ONLINE  

killersquirel

    Dragonstomper

  • 694 posts

Posted Thu Aug 23, 2018 2:56 PM

This looks awesome. Great work! I'm definitely interested in this if they become available for sale. 



#21 Mathy OFFLINE  

Mathy

    River Patroller

  • 2,679 posts
  • Location:Heerlen, NL

Posted Thu Aug 23, 2018 5:32 PM

Hello foft

 

Re: JHV: Yes, please come!  We'd like to meet you.  (And you like to meet us.  We're a nice bunch of people!   :grin:  )

 

Sincerely

 

Mathy



#22 Mathy OFFLINE  

Mathy

    River Patroller

  • 2,679 posts
  • Location:Heerlen, NL

Posted Thu Aug 23, 2018 5:43 PM

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



#23 mytek ONLINE  

mytek

    River Patroller

  • 2,922 posts
  • Location:Santa Rosa, CA

Posted Thu Aug 23, 2018 5:46 PM

Hello Michael

 

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

 

Sincerely

 

Mathy

 

Hi Mathy

 

Opps I missed that. Must have been  :sleep: on the job.



#24 SS OFFLINE  

SS

    Quadrunner

  • 6,032 posts
  • Location:Lehigh Valley, Pennsylvania

Posted Thu Aug 23, 2018 6:38 PM

A video, as requested...


The music in Kaboom sounds pretty spot on. :)

#25 tane OFFLINE  

tane

    Star Raider

  • 56 posts

Posted Thu Aug 23, 2018 7:45 PM

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, Thu Aug 23, 2018 8:44 PM.






Also tagged with one or more of these keywords: abbuc, hardware, pokey, replacement, chip, fpga

0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users