About me

My photo
Vanløse, Copenhagen, Denmark
Mathematician. Working programmer/system developer. Nerd. Married. Father of 3.
Showing posts with label Bootleg. Show all posts
Showing posts with label Bootleg. Show all posts

23.11.14

Capcom Ghost 'n Goblins Bootleg Repair Log

I snapped up this defective bootleg Ghost 'n Goblins along with some other defectives very cheap at a danish forum about a year ago. Up until now, it had just been sitting on the shelf; not even tested. It had adaptor wires soldered directly onto the edge connector.


As mentioned before I believe, that people who does these kind of things, will burn in a special level of Hell; the one they reserve for child molesters and people who talk at the theatre... The Special Hell! }:-(
Well, anyway... the fingerboard soldered to the other end of the wires wasn't JAMMA, so I made a QAD adaptor with a JAMMA fingerboard connecting only the power and video connections. The game booted, and I was greeted with the attract mode:



The backgrounds and sprites were perfect, but the layer displaying characters and the game logo was pretty messed up and the game was dead silent. The silence could, however, just be due to a dip switch setting turning off attract sound.
I did the usual visual inspection, but as nothing obvious was to find, I started doing (what I sometimes refer to as) "Playing the game of peeking and poking around". For this, I use either my scope, logic probe or both. The purpose of this, is to give me a rough idea of where the different elements of the game are generated. I usually start with the ROMs and RAMs trying to short adjacent data and address lines with the probe to see what that stirs up in the game. Also I peek a bit at the data and address signals. This time I started with the logic probe and quickly found that this ROM


and this RAM


both at the primary PCB (also containing the primary CPU, program-ROMs and the entire sound system) were definitely involved in making the character layer.
Next I went over all the data and address signal lines of the two with the scope, but didn't find anything unusual. But then these two these two guys


sort of in the middle of the ROM and RAM caugth my attention. Why just them you might ask? Well because they are Fujitsus, and Fujitsu TTLs from around the 80'es, just have a tendency to go bad at the moment. So they are all Usual Suspects when repairing PCBs from that period. In general this board is peppered with Fujitsu TTLs, but these sort of sat there in the middle of this cluster of non-Fujitsus and happen to be in the same area as the RAM and ROM. The 74LS86s are packs of 4 XOR gates. So again I tried to short some of the signal pins and found, and when I shorted pin 8 and 9 on the right of the twins


the character layer changed to this



Hmmm, all the letters displayed correctly, but upside-down. Then tried flipping the dip switch to flip the picture


and when shortening the 2 pins again got this


Perfect character layer. Ha! Haaaaa! Surely on to something now };-P I peeked the inputs and the output of that gate



and found one of the inputs floating. I traced the input to the output at pin 8 on the left Fujitsu 74LS86. I salvaged a 86 from a scrap board, piggybacked it on the left one


And got perfect character layer with both orientations };-P



So out it went.


In my eager I accidently pulled out a via with it, but luckily it isn't connected to anything on the component side, so no worries. A socket was fitted and the salvaged 86 installed.


So now the graphics was a'okay... time to clean up that edge-connector-mess! With a combo of soldering iron, desoldering iron, solder wig, a whole lotta patience, and a final rub with rubbing alcohol


it actually ended up looking pretty okay in the end. I attached my full Capcom Classic adaptor and booted her up; but alas, no sound. So I dug up my external amp. It's actually just an old PC-speaker, where I've cut the jack plug and attached a crocodile clip for GND and an old multimeter probe for signal (actually it also good for listening on signal lines as well). Anyway, I heard sound from the speaker


Followed the sound to the fingerboard and found, that this was again a game that uses SPK- for signal and SKP+ for GND. As my SuperGun uses SPK+ for signal, that was why I didn't get any sound. So I finally pulled myself together, and installed a switch to flip the polarity of the sound in my SuperGun.


...better late that never, right };-P This closes the case...

Plz take care all you lovely people out there!

<3 Whole Lotta Love <3
};-P Elgen

7.4.14

Bubble Bobble Lost Cave & REDUX on same bootleg PCB

About a year ago, i managed to snap up a cheap defective bootleg Bobble Bobble that I fixed and installed the REDUX ROM set on. That works fantastic, but another exciting project is Lost Cave, that originally released on December 11, 2012. It's a very ambitious fan project made by the 2 good fellows Bisboch & Aladar and consists of 100 "new" levels for the original arcade game. "New" are in quotes, as it's actually the best levels from various ports, that have been backported to the original arcade platform. Along with that, it introduces a lot of new elements for example on the graphical side. The original release from 2012 only ran on original Taito hardware (and MAME), but when the authors discovered REDUX, they got inspired to try and do a bootleg-PCB version as well; and as of Lost Cave v1.2 (December 11, 2013) it also runs on bootleg boards (the kinds without a 68705; so the same criterion as running REDUX).

I downloaded the Lost Cave (bootleg) ROM set and installed it on my board, and it worked like a charm; jawsome game! };-P Now Lost Cave is a whole new game with new levels and stuff; the original levels are not present in the game anymore. So I started thinking about how I could find an easy way to run both Lost Cave and REDUX on my board, without having the fuzz of swapping the ROMs every time.

The first thing to notice is, that all the ROMs on the board are 27256


Next thing to notice is, that EPROMs in the 27-series comes in "clusters" of form factors given by the type of DIP packages. So ie 2716 and 2732 are both DIP24, whereas 2764, 27128, 27256, 27512 are all DIP28 and so on. Now if you compare the pinouts of 27256 and 27512


you'll find, that they are almost identical with the exception of pins 1 and 22. The 27512 uses pin 1 as the extra address pin and have pin 22 double as both Output Enable (in reading mode) and Programming Voltage (in programming mode). Now pin 22 we don't have to worry about, as the EPROM will only operate in reading mode on the board. But pin 1 will allow us to switch between the upper and the lower 256K bits of the EPROM. This scheme is often referred to as bank switching (at least when it's is done runtime, anyway), as you divide the address space of the ROMs into two separate banks that you can switch between.
Now to pull this through, I first had to identify the union set of all the ROMs that has to be swapped to go from straight bootleg to either REDUX or Lost Cave. Now the REDUX are marked with bow ties and the Lost Cave are marked with fezzes



...the union set is of cause just all the marked ROMs };-P. Please note, that on other bootlegs, these ROMs might have very different numbers/id's, so it's the position that's the important thing here.

Next I started doing the plumbing for the bank switching. First of all, I would need an ON-ON switch with +5V on one pole and GND on the other; the middle will then be the "bank switcher". I just happened to have a bag of tiny ON-ON switches stocked that fits into 3 successive holes on a DIL, so as bootlegs often has a lot of unused holes, I easily found some usable ones to clean up.


and installed the switch


Next, the wires got soldered on on the solder side


The red wire is +5V, the unisolated is GND, and the blue is the bank switch-wire.
Now on the main PCB, 3 of the 4 ROMs to be swapped (the 3 ones on a line), already had pin 1 tied to a GND-rail individually, so these connections had to be cut of course.


These are marked with 3 red arrows; I also accidentally (it was late at nite }:-S) cut the connection to pin 2 on the middle ROM (blue arrow). So that's why there is also a piece of red kynar to patch this up on the next pic showing how the pin 1's are connected to the bank switch-wire.


As you can see, the blue switch-wire ends at the ribbon cable connector


That's because the switch-signal needs to be passed on to the secondary board. And as I didn't want any extra wires (that would have to be desoldered every time the board is taken a part), I choose to hijack one of the many GND wires on the ribbon cable (notice the cut). Now that was all the plumbing needed on the primary board. The secondary board was actually easier. Here, all the pin 1's on the ROMs was already interconnected, with a GND-connection in one end, and a connection to a resistor array in the other end. So only 2 cuts on the component side needed to be made



And then of cause, the connection to the hijacked ribbon pin had to be cut and connected



The last thing needed to pull this off, was the actual ROMs. Now as I'd dumped all the ROMs during the repair, I had a full set of REDUX ROM files for my board. Also, before I even started, I'd checked that Lost Cave v1.2 would actually run on my board, so I had a full set of files for that too. So it was only a matter of combining the two sets, for each ROM that needed to be swapped. This is easily done ie in a Windows cmd prompt with the command
~> copy /b rom1 + rom2 combined_rom
for every pair of ROM files; of cause taking care, that the files from the same set were always first/last };-D

So I replaced all the 27256-ROMs to be swapped with the just programmed 27512-ROMs and fired up the board full of excitement };-P


Now that's just puuuure awesomeness, ain't it? };-P

As a last thing in this post, I wish to mention, that I've recently created a Facebook page, that'll make it a bit easier to follow the blog. Here I'll post every time I make a new blog post, but also make minor posts about progress of current projects etc. I welcome you to visit, and 'like' if you wish to be updated on the stuff I do.

A whole lotta love from Yours Truly };-P

23.3.14

Using GALs to replace small, sparse and/or redundant bipolar PROMs (Galaga bootleg)

If you've done repairs on some of the earlier arcade games (Galaga, Donkey Kong, Pac-Land etc.), you're likely to have encountered the type of components known as bipolar PROMs. These are PROMs based on TTL technology and are one-time-programmable (OTP), as you literally burn fuses when you program them. They are often pretty small in capacity but very fast, and on many boards, they are used for things like address decoding, sprite selection, pallets etc.
Now this whole project started out with me repairing an original Namco/Bally Midway Galaga for my friend Muerto. During this, I found, that a bipolar PROM used for selecting sprites from the sprite-ROMs (i think?!) had a dead pin. Luckily, I had a bootleg Galaga containing the same PROM sitting on the shelf, and replacing with that solved the problem. But now I just a non-working bootleg.
Now as bipolar PROMs are pretty old technology, blank ones are not easy and also a bit expensive to acquire; they will easily cost you $10 (or more) a piece + P&P on eBay. Also because of the technology being old, most new (even high end) programmers doesn't support programming them either; many doesn't even support reading them. So that means that you'll have to get some expensive hard-to-get vintage programmer and also expensive parts to get you PCB with broken bipolar PROMs up'n'running again. As I was not willing to spend that much green on a bootleg (that I btw had gotten for free at some point), I started thinking about alternatives to bipolar PROMs.
The first thing the pops into mind, is trying to use some kind of EPROM. But when you try to look at the specs side by side, you'll quickly realize, that most EPROMs are much bigger in capacity (and while that is not a direct problem, it seems like a bit of a waste), but more seriously, the speeds of EPROMs are often about a factor 10 slower than the bipolar PROMs! So EPROMs were out...
Next I started looking at different PLDs and found, that the speeds of standard PALs and GALs are often comparable to that of bipolar PROMs or a bit faster. Moreover, almost any cheap ass modern universal programmer supports programming GALs, you can get new GALs for about $1 a piece on eBay, and you can erase them electronically and reprogram them.

I actually had 2 defective bipolar PROMs on the bootleg Galaga, that needed replacing. That was because when I realized how easy it was to read these in my Top2005+ using my own software u2pa, I wanted to


on the Galaga PCB. But when I tried to get the one labeled "5" at position 5N out, I accidentally broke off the GND-pin. The break was so near the plastic, that a normal pin transplant wasn't an option, so enter Mr. Dremel. I managed to cut the plastic down so I could solder a bit of wire on the broken pin; it was good enough for dumping


but not at all durable enough to put back in the socket. This PROM must be involved in the final stages of the picture generation, cause when it's not in it's socket, all you get is a blank screen. I decided to start with that one, as it's a TI TBP18S030 (equivalent to the better known Philips N82S123),


that only holds 32 bytes (= 256 bits).
Now in order to get started, I needed some way to generate the equivalent equations, so I wrote a little QAD method that generated the Boolean equations in the format of WinCUPL, and hooked it up to the u2pa CLI


If we start by looking at the raw dump


we'll see, that the 2 lines of bytes, are actually pretty redundant, and that's good, as we want to fit then into a logic unit. Next we take the raw WinCUPL equations generated by u2pa


cut them out, and make them into a real WinCUPL project. And I have to admit, that I was a bit surprised to find, that it compiled to a GAL16V8 right away };-P


At this point, the observant reader should already have noticed, that all the outputs of the GAL are on the "wrong" side, compared to the data pins on the bipolar PROM. Some kind of adaptor had to be made in order to make it fit onto the Galaga PCB. I choose this configuration of pins


Again the observant reader might have discovered, that if you turn the GAL 180 degrees, you can get all but one pin to match the PROM (not including the Vcc and Gnd of cause).
When I dumped the GAL using u2pa with the above configuration and compared it to the original


it was a perfect match };-P
So I started soldering up a small adaptor



Actually pretty easy, as almost all the pins match up };-P I dumped it as per the original PROM and still got the same correct result. So I cut it up



installed it in the socket


and BAM! had picture back on screen };-P


The Galagas still didn't look right, but that was expected. So now on to the next PROM...
This one is a TI TBP24S10 (equivalent to the better known Philips N82S129), a 4 x 256 bit PROM. As I'd only read ROMs that had a number of outputs being 8 or 16 until now, I had to make a little adjustment to the coding of u2pa to make it work. The dump in MAME is made by just saving whole bytes padded with zeros, so I choose to do the same and use this configuration


Even though this PROM potentially contained 1024 bits of data, only the first part actually had non-zero entries


So I was still pretty confident, that this would fit onto a GAL. So ran my equation generator, and made a WinCUPL project with a GAL16V8. But when trying to compile


I got "excessive number of product terms" on all 4 outputs. Now at this point, being all new to WinCUPL, I didn't knew, that minimization was not 'on' by default, but that you have to turn it on (you should use Expresso) in the compiler options (this was something porchy told me later on)


So I started 'hand reducing' the equations. Actually now afterwards, I find it kind of cool, as you get a whole new feel for the equations, and they have a very satisfying aesthetic look (oh yeah, just go ahead and call me crazy; but being both a mathematician and a computer scientist, I can't help it };-P).
One of the first things I noticed from just looking at the raw dump in a binary editor was, that every 4th entry was F (1111). So every time A0 and A1 was 0, all 4 outputs was 1, meaning that all entries from the 4 outputs starting with 00 could be removed, and replaced by a single line for every output
 Dn = !A0 & !A1 & !(A2 &  A3 &  A4 &  A5) & !A6 & !A7
where the "!(A2 &  A3 &  A4 &  A5)" part is because, we want this to stop when we reach the point, where all entries are 0.
Next I found quite a few pairs of entries, where the only difference between the two, was that one started with 01 and the other with 10. Now these can of cause be combined into one starting with (A0 # A1) (XOR).
So now I was down to a respectable number of equations for each output, but when I compiled I still got "excessive number of product terms" for 3 of the outputs. It was actually also at this point, that I turned on minimizing, but that didn't do any difference at all }:-S
Then I got the idea of trying a bigger GAL with more available product terms per output, namely a GAL22V10. And when changing to that, it frakking compiled without errors };-P For this GAL-replacement, I'd choosen this pin configuration


That way, it could act like a drop-in replacement (with part of the IC hanging out to the back of the socket, though) if I just connected pin 8 and 12 for proper grounding.
My only problem now, was that I didn't have any of those gorram 22V10. So I ordered some on eBay and waited.... and Waited.... and WAITED!.... and FINALLY


they arrived from China };-P I rushed to program one, dump it with u2pa, and test it against the original image


A perfect match! Sweet! };-P Next up was the big test on the actual board


(using a little jumper wire for ground connection), AAAAAAAND


IT WORKED! The Galagas were now back to normal!
To finish this up nicely, I choose to desolder the old socket from the board, and install a slightly bigger one, with pin 8 and 12 interconnected



Of course there wasn't holes on the PCB for the extra pins, so these were just removed


By the way, after I finished this project, I actually (by mere coincidence while googling... I don't know why it hadn't occurred to me to google "bipolar prom gal" before, but it hadn't) found this page by retroclinic. Here he uses a truth table instead of (as I) equations, so I decided to try that out also, as it somehow seems easier. So I made a tiny addition to my processing method, so it could output a truth table as well. But when I compiled and programmed the resulting jed-file for the first GAL16V8 and dumped again, I actually got some differences compared to original image; a few bit were flipped. First I thought, that it was my simple method to generate the truth table that had a bug, but I've been over the code several times, and I can't find any errors (if you find one, please let me know, and I'll fix it). So my theory at the moment is, that I've found a bug in the WinCUPL compiler. So I think I'll stick to equations in the future... being a mathematician, I actually also fancy them more };-P

Should you ever want to try this at home yourself, the dumps of the bipolar PROMs for games containing them, is often part of the MAME ROMs. If you want to try my equation generator, it's now a part of u2pa; the help entry can be seen with the command
~>u2pa help bdump process
Remember, that if you own a Top2005+, u2pa also has support for reading a lot of bipolar PROMs now.

WinCUPL can be downloaded here.

Last but not least, the pld's and the jed's I produced for Galaga, can be downloaded here.

I wish to thank porchy for his big help and support on this project, as I didn't knew much about GALs or WinCUPL when I started out.