PGM single game PCB assembly and troubleshooting

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • PGM single game PCB assembly and troubleshooting

      This collects the information from other threads about assembling and troubleshooting my PGM single game PCBs.

      First of all, important:
      Make sure you double check the orientation of PCBs before switching on power on the motherboard! Connecting them the wrong way will cause a short circuit that can damage your motherboard and cartridge.
      Attached to this message are the required PAL, both the source code for WinCUPL and the compiled files you can write to your GAL.

      PGM_RG_U6.jed
      Write this to the GAL that goes into position U6. This controls the background/tile ROMs.

      PGM_RG_U5.jed
      This is a generic GAL to control the program ROM that can be configured with jumpers:
      - J1 maps the ROM to 0 or to 1MB
      - J2 maps the first 2MB or the second 2MB
      - J3 selects a special 4MB mode

      PGM_RG_U5_DDP.jed
      This maps the ROM to 1MB and selects the motherboard BIOS below that.
      - J2 selects the first 2MB or the second 2MB of the ROM

      PGM_RG_U5_ESP.jed
      This maps the ROM to 0 and permanently disables the motherboard BIOS.
      - J2 selects the first 2MB or the second 2MB of the ROM

      PGM_RG_U5_QB.jed
      This is an addition to the previous version of the zip. It is a variant of PGM_RG_U5_ESP with the full 4MB mapped. Use this if you have a BIOS at the start of the EPROM.
      - J1 selects the cartridge BIOS or the motherboard BIOS

      The idea is that you can play a game without populating the jumpers, but advanced users can use them for special features.

      The second zip file contains a python script to generate the required ROM files. In most cases it just copies or splits files, so you can get exactly the same result manually with a hex editor. It decrypts the program file for DDP3, which is required as the PCBs don't contain the custom ASIC that handles decryption normally.

      You'll need python 3: python.org/

      Running it without arguments shows the help:

      Source Code

      1. python rom_gen.py
      2. usage: rom_gen.py [-h] [-o OUTPUT] [-b BIOS] file [file ...]
      3. rom_gen.py: error: the following arguments are required: file
      It can read zip files directly, so if you put the Mame sets into the same directory you can write:

      Source Code

      1. python rom_gen.py *.zip
      Single files work as well.

      This will pull out the required ROMs and generate directories with the required files. You can use "PGM Program Files.zip" as well to get various alternative versions of the program ROMs.

      A new feature is the -b switch to install a BIOS file to the start of the ROM, and the game itself to 1MB+. This makes sense for DDP3 and the stand-alone PCB BIOS that GC8Tech found:

      Source Code

      1. python rom_gen.py -b "..\single pcb bios\pgm_bios_single_pcb_vxxxJP.u42" "PGM Program Files.zip"
      This will write ROMs to a separate *_qb.bin file. You'll need either the PGM_RG_U5_QB.jed PAL or the generic PAL configured for 4MB mode for this to work.


      Which program files to use?
      - ddp3_p1_dual.bin is the white label/black label dual boot version.
      - espgal_p1.bin only choice for that...
      - ketsui_p1_trap.bin this has the original version in bank 0 and a remixed version in bank 1. Use JP2 to select which one you want to play.

      If you don't want to use the script to identify the program ROMs, make sure you use the *bl version from the Mame set:
      github.com/mamedev/mame/blob/2…ame/drivers/pgm.cpp#L4568
      github.com/mamedev/mame/blob/2…ame/drivers/pgm.cpp#L4515
      github.com/mamedev/mame/blob/2…ame/drivers/pgm.cpp#L4762

      These are the versions that have the ASIC code patched out and are taken from converted carts.
      Files
      • rg_pal.zip

        (9.51 kB, downloaded 77 times, last: )
      • rom_gen.zip

        (3.91 kB, downloaded 82 times, last: )

      The post was edited 1 time, last by Fluffy ().

    • Which parts do you need:
      • 10x 27c322 EPROMs
      • 2x 74LS257
      • 1x 74LS139
      • 1x 74LS138
      • 16x 0.1uF capacitor (5mm lead spacing)
      • 4x 10uF capacitor (electrolytic, 16V, though anything higher should work as well. The capacitance doesn't need to match exactly, either.) (2.5mm lead spacing)
      • 2x GAL16V8 (I bought ATF16V8B-15PU but any brand should work.)
      • 1x 100 Ohm Resistor
      • 2x 10k Ohm resistor array 8 res 9 pin



      Optional:
      • 3x 42 pin socket (Advisable!)
      • 2x 20 pin socket (Advisable!)
      • 3x jumper pin header + jumper, standard 2.54mm spacing
      • 1x an on/off switch of your choice (if you want to switch banks frequently)



      You can buy sockets for the chips on the char board as well, though you will not be able to fit it in a standard cartridge.

      Jumper pin headers are sold in 10-pin or 40-pin rows, you can break off however many you need. I bought a bag from eBay ages ago. You used to get extra jumpers with hard drives or motherboards, I don't think I ever bought them.

      acblunden2 found these links:
      ebay.com/itm/5PCS-NEW-40Pin-2-…e86f76:g:rH8AAOSw~NRdJsrs
      ebay.com/itm/10-Pcs-2-54mm-Sta…92259a:g:AfEAAOSwHk9dP7bh

      Alternatively you can try 90 degree angled pin headers:
      ebay.co.uk/itm/12Pcs-2-54mm-Pi…-Header-S9Q4/202574077441

      There should be enough space for either style, so use whatever you like or have already in your junk drawer.

      For decoupling capacitors I used this style:

      The lead spacing is 5mm, and there should be enough space to lay them flat. But virtually anything you may have in your junk drawer should work.

      The electrolytic capacitors I bought look like this:


      They need to lay flat so that you can close the cartridge, so make sure you check the diameter.

      There seems to be a confusing number of 16V8 GAL available. From what I can tell the major differences are low power sleep modes, temperature ranges and speed. I bought a 15ns type, which is plenty for the CPU side, and seems to work for the tile ROM.

      The resistor array I bought looks like this:


      It is labelled: 9a103g royal, and the datasheet shows the internal circuit. The same circuit is available from other manufacturers, I just searched for pin count and resistance on eBay...



      You get these resistor arrays in various types. There is no standard for the naming, but you want 9 pin with circuit A: The same resistance connected to a common pin.

      acblunden2 produced a shopping cart:
      Make sure you check the store pages for price details, there are sometimes significant discounts if you buy multiple of a device, and check how close to crossing the "free shipping" threshold you are. Sometimes buying more stuff can save you money. Also, if you use the shopping cart above make sure you remove the unwanted optional parts, or parts you already have laying around.

      The post was edited 8 times, last by Fluffy ().

    • Assembling the char board:

      There is nothing special to look out for. The footprints are labelled with the required chips, and you can use the ROM images generated with the script from the first post. You can split ROMs manually as well.
      github.com/mamedev/mame/blob/6…ame/drivers/pgm.cpp#L4482
      The graphics board takes the "sprcol", "sprmask" and "ics" files. Position "B1"-"B2" take the sprmask ROMs, "A1"-"A4" take the sprcol ROMs, and "M1" takes the ics ROM.

      Make sure you lay the electrolytic capacitors flat before soldering them in.

      Double check that you don't have a short circuit between +5V and GND. If you have a continuity tester there should be a short "bleep" as capacitors are charged or discharged. Make sure that no pin on a chip is bent.

      Unfortunately I missed some silkscreen information when I replaced the footprints which I only noticed when I made pictures of the tests...

      Please use this printout as a reference for the logic chips:

      char_silkscreen.pdf


      Assembling the prog board:

      All chips are in the area of the cartridge that allows sockets, so it is highly advisable to place all chips in sockets. Especially if you want to try different games, or different game revisions.
      The jumpers are optional, but you can connect an on/off switch to JP2 if you want to switch ROM banks frequently. Make sure you install the resistor array the right way around. (Pin 1 is marked with a dot, you can verify with your voltmeter switched to Ohm: Pin 1 to any other pin should be 10k, any other pin to any other pin should be 20k.)
      To install the resistor arrays I soldered down one pin, then straightened it while heating the pin. If you are quick enough you don't burn your fingers.

      ROM files:
      If you use the python script to generate the ROM images you need to burn "P1", "T1" and "T2", and put them into the corresponding sockets. Otherwise you'll need to identify the program ROM and the tile ROM from the Mame driver source: "maincpu" goes into the P1 spot, "tiles" needs to be split into "T1" and "T2. The DDP3 ROM is encrypted, so you need to decrypt it before it can be used. Espgaluda and Ketsui are not encrypted. If you use the Ketsui ROM directly from the Mame set you'll need to set JP2, as the game is in the second bank.

      PAL files:
      For U6 there is only one choice, as all games have the same tile ROM mapping. For U5 you've got three choices: A generic PAL that supports all games, the U5_DDP version that is used for DoDonPachi DaiOuJou, and the U5_ESP version that is used for Espgaluda and Ketsui. The U5_QB version is used if you merged a custom BIOS into the ROM. The file with the extension ".jed" is written onto the chip, the file with the extension ".pld" contains the input equations and can be compiled with WinCUPL.

      Installation:
      Double check that you don't have a short circuit, and that all chips are oriented correctly. The program ROM and the tile ROMs face into opposing directions. If you use sockets make sure both the socket and the chip are oriented correctly. Sometimes a leg can "fold up" while it is inserted into the socket, especially if it is recycled.

      If you use the generic U5 PAL and DoDonPachi you need to place a jumper on JP1.
      If you burned the "Trap" version of Ketsui you need to place a jumper into JP2 to select the trap version.

      If you check with a continuity tester between +5V and GND, there should be no continuity, other than a short "blip" as the capacitors are charged or discharged.

      Setup:
      The prog board is the upper board, and the components need to face up. The char board is the lower board, and components need to face down. Make sure you have a non conducting spacer between the boards to prevent short circuits.
      Double check against an original cartridge before switching on.

      The post was edited 6 times, last by Fluffy ().

    • Troubleshooting:
      First of all, most common problems for me were connection problems, where a pin of a ROM folded up when inserting it into a socket or made another bad connection. After that I had a solder bridge on one of the logic chips.
      Apparently the slot connectors on the PGM can wear out or get dirty, so check for bent pins and clean the contacts.
      • game doesn't boot:
        • check for solder bridges on PAL U5, the EPROM P1 and the resistor array
        • check that chips are oriented correctly. Pin 1 is marked with a notch or a dot.
        • check that PAL U5 and PAL U6 are in the correct slot
        • check that the P1 ROM contains valid data (verify in the EPROM programmer against the input data)
        • if you're planning to run DoDonPachi, make sure you use an unencrypted version. There should be some "IGS PGM GAME SYSTEM" text near the start. (Low and high bytes are switched, so letters are swapped.)
        • Make sure the resistor array is installed the right way around. Pin 1 is marked with a dot.
        • make sure the 100 Ohm resistor is installed
        • if you see the PGM BIOS logo but then go into the test menu:
          • make sure that you're running DoDonPachi
          • if you want to run Ketsui or Espgaluda make sure you use the U5_ESP PAL or leave JP1 open with the generic PAL
        • if you see a screen of random noise:
          • make sure that you're running Ketsui or Espgaluda
          • if you use the Ketsui ROM from the Mame set directly make sure you close JP2 to select the second bank
          • if you want to run DoDonPachi make sure you use the U5_DDP PAL or close JP1 with the generic PAL
        • I think there is a known crash on the second loop on DDP3 at the moment... if someone works out a fix you can update the ROM if you used a socket...
      • graphics corrupted:
        • the text during the initial legal screen and the scrolling ground textures are produced by the T1 and T2 ROMs
          • check for solder bridges on PAL U6 and the EPROMs T1 and T2
          • check that the T1 and T2 ROMs contain valid data (verify in the EPROM programmer)
          • check that the U6 pal contains valid data/the correct JED file
        • the title screen for Ketsui and ESPGaluda and all sprites are rendered by the A1-A4 ROMs and the B1 and B2 ROMs
          • check for solder bridges on the EPROMs, U11 and U10. Check that U11 and U10 contain the correct chips: U10 should be 74LS139 and U11 should be 74LS138. (On U10 pin 9-16 are used for address decoding, double check for short circuits and dodgy connections)
          • check that the ROMs contain valid data
          • if your EPROM programmer contains a chip tester, check that U10 and U11 are working correctly
          • missing parts of the graphics point more to problems with B1 and B2
          • corrupted graphics point more to problems with A1-A4
        • There seems to be some corruption during the game when lots of enemies and explosions are visible. That still seems to happen with the game on original hardware, so may be a limitation of the graphics hardware
      • music missing/wrong sounds:
        • sounds are contained in the M1 ROM
          • check that the M1 ROM contains valid data (I accidentally burned the BIOS M-ROM instead if the game M-ROM on my first try...)
          • check for solder bridges on M1, U8, U9 and U10 (On U10 pin 1-8 are used for address decoding, double check for short circuits and dodgy connections)
          • if you use revision 1 of the char board check that you swapped pin 2 and 3 of U10
          • if your EPROM programmer contains a chip tester, check that U8, U9 and U10 are working correctly.



      If you get open flames use a fire extinguisher, then hide the evidence.

      If that doesn't work I'm stumped. Those are the things I would try. Double-check for solder bridges and dodgy chips.

      To help with diagnostics, here is how the components work together:
      • blue is the M68k program ROM and the PAL controlling the mapping. Any problems here mean the game doesn't run or crashes.
      • green is the tile ROM and the PAL controlling the mapping. Any problems here mean no text is displayed, and the scrolling background graphics are missing or corrupted.
      • yellow is the music ROM, two 74ls257 breaking the 16 bit ROM value into two 8 bit halves, and one half of 74ls139 selecting between the motherboard ROM and the cartridge ROM. Problems here mean no or wrong sound is played.
      • pink are the "A" sprite ROMs and one 74ls138 selecting which chip is active. Problems here mean that sprites are discoloured. (The title screen is a huge sprite.) The 74ls138 is a 3-to-8 decoder, so there is some expansion room for extra ROMs for advanced users.
      • cyan are the "B" sprite ROMs and the other half of 74ls139 to select the chips. Problems here mean that sprites are square or invisible. The 74ls139 is a 2-to-4 decoder, so there is some room for extra ROMs.


      If you have problems it is probably best to ask in this thread - I expect most problem are common, and other people will be able to quickly answer them, or a solution will be already in this thread.

      The post was edited 6 times, last by Fluffy ().

    • acblunden2 wrote:

      Let me update that Mouser project list now with quantities for a single PCB and ceramic capacitors with 5.00mm spacing (or close to it).
      FYI, I updated the Mouser project list. Since I've posted this on the other thread, these changes have been made:
      • The listed quantities are now for a single unit
        • Be sure to order the project quantities for the amount of PCB's you will get from Fluffy
      • 0.1uF caps have been updated to ceramics caps and are as close to the ones the ones that Fluffy recommended in terms of lead spacing (5.00mm)
      • All optional items are included in the parts list
        • With the exception of the slide switches
        • Need some help with the specs for the slide switches @Fluffy. What are the following for them?
          • Function: ON-OFF/ON-OFF-ON?
          • Spacing is 2.54mm?
          • How many should be needed?

      The post was edited 2 times, last by acblunden2 ().

    • acblunden2 wrote:


      • With the exception of the slide switches, all optional items are included in the parts list
      • Need some help with the specs for the slide switches @Fluffy. What are the following for them?
        • Function: ON-OFF/ON-OFF-ON?
        • Spacing is 2.54mm?
        • How many should be needed?

      1 switch, on-off. You basically replace JP2.
      Spacing and size are up to personal taste. Someone had a picture on the pgm conversion thread about fitting a switch in the space next to the cartridge connector so it still fits into a box.
      Something like this? digikey.co.uk/product-detail/e…02SHZQE/CKN1549-ND/484203
      You get them in various sizes, something small should be good.

      The post was edited 1 time, last by Fluffy ().

    • And here is the Digikey parts list.


      EDIT: Something is wrong with this cart at Digikey. Doesn't show up correctly. You might not be able to order it correctly.


      NOTE

      • Digikey does not carry IC sockets needed for this project. You need to source them elsewhere.
      • 10x 27c322 EPROMs are OOP and have to be sourced in the aftermarket

      The post was edited 2 times, last by acblunden2 ().

    • I'm just poking round your rom_gen script @Fluffy (while waiting for pcbs to come! :D ), and I have a doubt about ketsui arrange rom.

      What arrange version is supported by your script? I'm using ketarr.zip from MAME (newest one: 2014/07/16 ARRANGE 1.7 VER) but generated file 'ketsui_p1.bin' is only filled with the original program rom in the first half (2MB), and second one is completely empty (all "1s")

      The post was edited 1 time, last by sergiopolog ().

    • sergiopolog wrote:

      I'm just poking round your rom_gen script @Fluffy (while waiting for pcbs to come! :D ), and I have a doubt about ketsui arrange rom.

      What arrange version is supported by your script? I'm using ketarr.zip from MAME (newest one: 2014/07/16 ARRANGE 1.7 VER) but generated file 'ketsui_p1.bin' is only filled with the original program rom in the first half (2MB), and second one is completely empty (all "1s")
      You need "KETSUI TRAP.bin" from "PGM Program Files.zip"

      The post was edited 1 time, last by Fluffy ().

    • Fluffy wrote:

      sergiopolog wrote:

      I'm just poking round your rom_gen script @Fluffy (while waiting for pcbs to come! :D ), and I have a doubt about ketsui arrange rom.

      What arrange version is supported by your script? I'm using ketarr.zip from MAME (newest one: 2014/07/16 ARRANGE 1.7 VER) but generated file 'ketsui_p1.bin' is only filled with the original program rom in the first half (2MB), and second one is completely empty (all "1s")
      You need "KETSUI TRAP.bin" from "PGM Program Files.zip"
      Thank you! It's some kind of file that was been decrypted/modified, like DDP one, right?


      Out of curiosity, what base version of ketsui arrange was used to make it?
    • The first half is identical to another ketsui ROM, I don't remember which, the "arrange" version is with the patch from daifukkat.su/hacks/ketarr/ applied. You'll notice the green logo on the title screen and the different legal text.
      Ketsui is not encrypted, all it does is identify files by checksum and give them consistent names to prevent errors when burning eproms.

      sergiopolog wrote:

      Out of curiosity, what base version of ketsui arrange was used to make it?
      No idea, I've taken then ROMs from the archive as-is.

      EDIT: interestingly, ketarr DOES seem to be encrypted. I'll decrypt it and see which version it is.
      UPDATE: It is different from the trap version from the PGM Program Files zip file, but I can't tell if that is because it is a different patch, or if that is the fix to run without the ASIC.

      The post was edited 3 times, last by Fluffy ().

    • Fluffy wrote:

      The first half is identical to another ketsui ROM, I don't remember which, the "arrange" version is with the patch from daifukkat.su/hacks/ketarr/ applied. You'll notice the green logo on the title screen and the different legal text.
      Ketsui is not encrypted, all it does is identify files by checksum and give them consistent names to prevent errors when burning eproms.

      sergiopolog wrote:

      Out of curiosity, what base version of ketsui arrange was used to make it?
      No idea, I've taken then ROMs from the archive as-is.
      EDIT: interestingly, ketarr DOES seem to be encrypted. I'll decrypt it and see which version it is.
      UPDATE: It is different from the trap version from the PGM Program Files zip file, but I can't tell if that is because it is a different patch, or if that is the fix to run without the ASIC.
      Uhmm... I think that version from "PGM Program Files.zip" should be one of the availables in MAME

      According to MAME driver, there are 7 versions of Ketsui Arrange. Here is the relationship I figured out between romset names in MAME, and romset names in daifukkat.su by applying each patch script to the original ketsui_v100.u38 file, and these are the results:


      MAME daifukkat.su
      ketarrketarr17
      ketarr151?? not found (maybe ketback ?)
      ketarr15?? not found (maybe ketback, older version?)
      ketarr10ketarr
      ketarrs151ketstoic_
      ketarrs15ketstoic_ (older not available)
      ketarrfketfast




      but all of them seem to be encrypted, different than "PGM Program Files.zip" one.

      The post was edited 1 time, last by sergiopolog ().

    • Thanks again for a great project! I bought from @acblunden2's digikey list, so that all worked fine. I just booted up Espgaluda. Only thing that was confusing was I tried the mame program rom in P1 first. Then switched to the one in the PGM Program Files link and it booted right up.

      Looking forward to the next batch!
      multis: cps* ttx1/2 gnet f3 mvs sega st-v/16b/24/c2/naomi(netboot) sys2x6 m72
      cabs: sega blast city x2 | taito vewlix c + egret ii
      links: klov/vaps games list | custom fight sticks
      projects: re2 stuff, back to conversions