Pac-land graphics glitches

Sprint

Newbie
Credits
55CR
So I started my first arcade project with a pac-land PCB. I wanted to know a bit about how arcade machines tick so I got a fixer-upper
smiley1.gif


Symptoms are graphics not displaying correctly, with the colours of sprites and some text wrong; the scrolling background graphics weren't displaying at all (although the scrolling foreground was there, although the colours weren't always right)

Example pic:

pacland_screenshot.jpg


Looking at the schematics, the EEPROMS at PL1-1 and PL1-2 generate output straight to the video RGB, so I figured these were colour palette memory and a good place to start looking. Noted one of the inputs seemed to be stuck high.

This chips are, in turn, driven by some 74LS298 2-to-1 mux chips. Probing these confirmed that the output at pin 13 of the chip at 2N was stuck high, but both of the corresponding inputs (pins 5 and 9) did have changing logic levels. Some scope traces below:

Pin 13 at 2N, stuck high (not very exciting this one!):

pac_pin13_2n_ls298.jpg


Example inputs for 2N, this is an input from CUS29, which includes sprites / text / foreground:

pac_pin1_2n_ls298.jpg


And an example input to 2N driven by the PROM at 4N. This one is open collector so looks a little different:

pac_pin3_2n_ls298.jpg


Clearly, there seems to be something wrong with the gate on this IC (the other gates are clocking through fine). But while probing I noticed that pin 10 looked a bit odd:

pac_pin10_2n_ls298.jpg


This is showing just over a volt - for a TTL input, that isn't very healthy, as it is in the "undefined" region between logic low and logic high. This traces back to the 74LS30 (8-input NAND) at 1N. The chip at 1N switches between the background and the sprites / foreground / characters, switching in the background when the foreground has a colour code of 127 or 255. The inputs to this again all seemed healthy, with traces similar to the input from CUS29 above.

I couldn't find any unexpected shorts or open circuits on these traces, so I suspected that a failed 74LS30 at 1N was causing the loss of the background, and the stuck output on the 74LS298 at 2N was causing the colours to become corrupted.

Well my local Maplins had a 74LS30 in stock so I couldn't resist popping down and having a go... my soldering skills are okay but I will admit I wasn't sure whether to have a go myself or pay someone else to do it! I decided to give it a shot, desoldered the 74LS30, soldered a socket in to take a new one, and this was the result:

pacland_backfix.jpg


The backgrounds are back! I will have to wait for the replacement 74LS298 to be delivered before I can see if that is the cause of pac-man's bad case of sunburn
smiley7.gif
smiley36.gif
 

Sprint

Newbie
Credits
55CR
Thanks, I have experience of digital electronics, but new to the internal workings of arcade machines. So I'm still learning quite a bit as I go.

I was originally going to reverse engineer pac-land's software but cmonkey already beat me to that, so I'll have a go at reverse engineering the hardware instead!

Already seen some of the neat design in pac-land. They use a clever trick to avoid having proper dual-port video RAM, instead using the fact that the hitachi processors only ever read memory when the E clock line is at logic low. So the graphics chips access the memory whenever the E clock is logic high. Nice trick, and requires no complex logic to arbitrate between the two circuits.

I think I've worked out the design behind the foreground / background scrolling generators, the clock distribution and cmonkey has already explained to me what the sub processor (CUS60) is. But the sprite custom ICs are still a bit of a mystery to me, on my list to figure out one I get the colours sorted.
 

tb2000

Active member
Feedback
4 (100%)
Credits
3,158CR
Nice work! I had a Pacland with graphics glitches (they were there when I bought it) a couple of years ago. It had part of the background missing, complete character squares, just black squares where there should've been graphics! Turns out it was a faulty rom on mine.
smiley1.gif


What you need really is to get hold of some knackered pcbs that are too far gone for repairing but have plenty of good ic's on them, saves buying every time you need one!
 

Sprint

Newbie
Credits
55CR
Yeah I do need to pick up a few bits, I don't even have an EPROM programmer at the moment. I'm more used to programming up boards via JTAG, it is going to take a while to get myself kitted out for this old school stuff!
 

Sprint

Newbie
Credits
55CR
OK, during the week I had a replacement 74LS298 delivered, but only just got a chance yesterday to put it in. I had a "did I leave the oven on" moment, and decided I should absolutely double check that it is the chip at 2N that had the problem, not the identical chip that performs the exact same function (on the other nibble) at location 1P. So I quickly probed the board to confirm that pin 13 of the chip at 2N was stuck high.

Only problem... when I probed it, it wasn't stuck high any more. It was changing. I did wonder at this point whether the invalid output from the NAND gate at 1N was causing it to produce incorrect output, as it was being held at between 1.0v and 1.5v at which point the behaviour of TTL chips is "undefined". On the other hand, the failure was exactly right for the symptoms I was seeing, and it was difficult to see what else was likely to cause the symptoms, other than a fault in CUS29 (which I really didn't want to happen!) since the colour fault was not present in the background, but was present in the foreground and sprites, and these only go through a handful of chips.

So I wanted to be sure the 74LS298 was not working, by comparing logic in and out. This requires monitoring a minimum of 4 lines (two inputs, select pin, output). This means digging out my heavy 4-channel scope or logic analyser, for which I'm missing a clip, so being lazy I came up with a way of testing with my little 2-channel hand held scope.

For 7 of the 8 inputs to the 74LS298 devices from CUS29, we can be sure when they are logic low, that the output from the NAND gate at 1N must be high and selecting the CUS29 output. When they are logic high, it is possible that either input may be selected. So by just monitoring the input from CUS29 and the output, we should see when the input goes low, the output should also go low. When the input from CUS29 is "high", the output could be in either state.

So here is a "good" trace, monitoring pin 1 at 2N as the top trace, and pin 14 at 2N as the bottom trace. This is a good trace - where we see a logic low at the top, we should see a matching logic low at the bottom. A logic high at the top would match with either high, low or changing on the bottom trace. (Sorry about the reflection from the window behind
smiley9.gif
)

pacland_2n_goodtrace.jpg


And now we see an example of the pin that was playing up earlier - input pin 5 to 2N at the top, and output pin 13 from 2N on the bottom trace. Where the logic goes low on the top trace, it is not being correctly passed through.

pacland_2n_badtrace.jpg


It isn't obvious from this plot, but the output from pin 13 isn't always high - at other times it goes low, but it is clear from this scope trace that the chip output is not correct. This check can be applied to all gates on the LS298s at 1P and 2N, except pin 2 to 15 on 2N, which isn't used as part of the gate switching logic.

Having confirmed that this chip was definitely faulty, out with the soldering iron and desolder the chip at 2N, add socket and replacement chip, and the result is pac-man has been cured of his sunburn, and the street furniture looks to be the right colour too:

pacland_allgood.jpg


smiley4.gif
 

smarty

Ready Player One
vacBacker
Feedback
12 (100%)
Credits
1,290CR
Well done, good write up.

Now why dont you add cmonkeys high score save so you can keep you scores on a power down. From memory you'll need a replacement ROM and an NV RAM to replace one if the existing ones. The info is on the forum.
 

Sprint

Newbie
Credits
55CR
Certainly cmonkey's high score save mod is on the list, although I do need to get a few things together at the moment. If I want the ability to tinker with the board (and lets face it, I do want the ability to tinker with the board) I'm going to need an EPROM eraser and programmer. And the high score save kit could be one of the first things I do with it
smiley2.gif


Any recommendations on good cheap options that cover most of the chips on typical arcade boards?

Something I noticed on the pac-land board were bipolar PROMS (MB7132/MB7122). These are in the video circuit and are used for their very short access time (circa 20ns), something that would have been difficult to achieve in other EPROM tech of that era. I noticed that these are very poorly supported by most budget programmers.

I also assume they are one-time programmable / non-erasable as well, although I could be mistaken about that, so likely to be more scarce? Or do these devices tend to be fairly reliable? Perhaps I should not be worrying about these at the moment!
 

cmonkey

Active member
vacBacker
Feedback
4 (100%)
Credits
1,640CR
I use a MiniPro TL866A and it programs everything I've thrown at it so far. It also has the ability to check a wide range of TTLs and rams.

http://www.ebay.co.uk/itm/MINI-PRO-USB-TL866A-UNIVERSAL-EEPROM-PROGRAMMER-ISP-ICSP-SPI-MCU-GAL-/121178338817?pt=LH_DefaultDomain_3&hash=item1c36cab601

I also have one of these cheapo erasers, although to be honest I've migrated most of my boards to EEPROMs these days so rarely have the need to erase eproms.

http://www.ebay.co.uk/itm/High-Speed-Durable-UV-Light-Lamp-EPROM-Chip-Eraser-Erase-Eraseable-Timer-/261568294800?pt=LH_DefaultDomain_3&hash=item3ce6af6f90

As you're probably aware, the proms on a Pac-Land board are for RGB lookups, tile lookups (both foreground and background) and sprite lookups. They're not erasable. Blank replacements aren't too hard to find but the proms seem to be pretty bullet proof, so I wouldn't worry too much about them. If you want to read them out you can make up an adapter board and read them like an eprom. There's a guy on J+ who sells these very adapter boards.
 

Sprint

Newbie
Credits
55CR
Thanks for the suggestion - I'll look into programmers, the one you link looks like a good balance between price and supported devices. Using EEPROMs does make sense, at lot less messing around! I definitely want to retain the original EPROMs as well with the original labels, might need them if I ever want to record a high score!

And after leaving the game on for around 3 hours without problem Saturday evening (with about 1 hour of gameplay), I powered it up yesterday evening to find the background colours have now gone wrong
smiley19.gif


I was expecting a fault caused by my mods, perhaps a damaged connection or track or a blob of solder from the desoldering getting somewhere it shouldn't. A quick check with the scope, and the new chip seems well behaved, but now the other LS298 (at location 1P) is showing similar behaviour, an input stage seems to have died and it only gives the "right" output for the sprites/foreground. Although it is a bit too much of a coincidence, there is no sign of any PCB work causing it, so it seems to have just died (with the same failure mode as the other one did, an input stage to the device).

Oh well back to ordering another chip and socket! Hopefully I'll get more than 3 hours after this fix...
smiley36.gif
 

Sprint

Newbie
Credits
55CR
I know what you mean - one thing is for sure, next time I'm at a retro event, I won't be amazed at the number of machines not working, I'll be amazed at the number of machines that are still working after two days
smiley36.gif
 
Top