Author Topic: Replacing a Color Prom on a Donkey Kong Jr Arcade with a GAL22v10  (Read 2242 times)

0 Members and 1 Guest are viewing this topic.

Offline RiddledTVTopic starter

  • Newbie
  • Posts: 3
  • Country: us
    • RiddledTV.com
Goal: replace an 82s129 Bipolar PROM from a Donkey Kong Jr with a GAL G22v10. 
Footprint and pin outs of the GAL does NOT need to match the order of the PROM, as it already has more pins so I will be building an adapter PCB. 
I was able to complete the equations and compile everything in WinCupl and get the correct outputs. 
Now I would like to mimic the Chip Enable (active low) feature of the PROM.  The prom actually has 2 CE pins, but in my application they are tied together, so I only need one CE.

I see in the documentation that the G22v10 has a tristate output feature, but I can't seem to find an example or documentation that shows how to implement the High-Z state. 

My Question:  How can I create the appropriate code so that when the CE is HIGH, the output pins are all "HIGH-Z" state. 

Attached is my sample code
 

Offline mikeselectricstuff

  • Super Contributor
  • ***
  • Posts: 13649
  • Country: gb
    • Mike's Electric Stuff
Re: Replacing a Color Prom on a Donkey Kong Jr Arcade with a GAL22v10
« Reply #1 on: November 21, 2023, 04:19:02 pm »
Goal: replace an 82s129 Bipolar PROM from a Donkey Kong Jr with a GAL G22v10. 
Footprint and pin outs of the GAL does NOT need to match the order of the PROM, as it already has more pins so I will be building an adapter PCB. 
I was able to complete the equations and compile everything in WinCupl and get the correct outputs. 
Now I would like to mimic the Chip Enable (active low) feature of the PROM.  The prom actually has 2 CE pins, but in my application they are tied together, so I only need one CE.

I see in the documentation that the G22v10 has a tristate output feature, but I can't seem to find an example or documentation that shows how to implement the High-Z state. 

My Question:  How can I create the appropriate code so that when the CE is HIGH, the output pins are all "HIGH-Z" state. 

Attached is my sample code


outputname.oe=!ce
Youtube channel:Taking wierd stuff apart. Very apart.
Mike's Electric Stuff: High voltage, vintage electronics etc.
Day Job: Mostly LEDs
 

Offline woofy

  • Frequent Contributor
  • **
  • Posts: 318
  • Country: gb
    • Woofys Place
Re: Replacing a Color Prom on a Donkey Kong Jr Arcade with a GAL22v10
« Reply #2 on: November 21, 2023, 04:20:49 pm »
I can't test it, but from page 2-10 of the WinCUPL User’s Manual:
Outputx.OE = !InputCE

Offline RiddledTVTopic starter

  • Newbie
  • Posts: 3
  • Country: us
    • RiddledTV.com
Re: Replacing a Color Prom on a Donkey Kong Jr Arcade with a GAL22v10
« Reply #3 on: November 21, 2023, 07:02:52 pm »
Thanks for your quick responses...  I'm doing my best to understand.  Do I just add another statement after the output equation like this? 
Code: [Select]
/* *************** INPUT PINS *********************/
PIN  1   = CE
/* *************** OUTPUT PINS *********************/
PIN  23 = OUT1                  ; /* supports 8  OR terms */
PIN  22 = OUT2                  ; /* supports 10 OR terms */


OUT1 = !B & !A                 
# F & D & !A         
# !E & !D & C & !A     
# F & E & !C & !A     
# !G & F & C & !A     
# !G & !E & D & C & B & A
# !G & !F & E & !C & B & A; 

OUT1.OE = !CE;
 

Offline RiddledTVTopic starter

  • Newbie
  • Posts: 3
  • Country: us
    • RiddledTV.com
Re: Replacing a Color Prom on a Donkey Kong Jr Arcade with a GAL22v10
« Reply #4 on: November 21, 2023, 07:19:01 pm »
It seems to compile like that.  Thanks for your help.  I'll follow up if that does not work as hoped.
« Last Edit: November 21, 2023, 07:29:31 pm by RiddledTV »
 

Offline mikeselectricstuff

  • Super Contributor
  • ***
  • Posts: 13649
  • Country: gb
    • Mike's Electric Stuff
Re: Replacing a Color Prom on a Donkey Kong Jr Arcade with a GAL22v10
« Reply #5 on: November 21, 2023, 07:46:16 pm »
Thanks for your quick responses...  I'm doing my best to understand.  Do I just add another statement after the output equation like this? 
Code: [Select]
/* *************** INPUT PINS *********************/
PIN  1   = CE
/* *************** OUTPUT PINS *********************/
PIN  23 = OUT1                  ; /* supports 8  OR terms */
PIN  22 = OUT2                  ; /* supports 10 OR terms */


OUT1 = !B & !A                 
# F & D & !A         
# !E & !D & C & !A     
# F & E & !C & !A     
# !G & F & C & !A     
# !G & !E & D & C & B & A
# !G & !F & E & !C & B & A; 

OUT1.OE = !CE;

yes
Youtube channel:Taking wierd stuff apart. Very apart.
Mike's Electric Stuff: High voltage, vintage electronics etc.
Day Job: Mostly LEDs
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf