james1095

Pac Man minor video corruption

15 posts in this topic

After spending a good bit of time sorting out the required ROM images I've managed to get PacMan running on my new Papilio One with the arcade megawing. It works well for the most part and looks good, but I've noticed that during the intermission scenes there is some video corruption with lines through the large Pacman and some of the yellow pixels flickering across the top edge of the screen. Is this a bug in the VHDL that implements the game hardware or is it likely something else?

Share this post


Link to post
Share on other sites

for sorting the required ROM images I put a clrmame/romvault DAT in the games folder that you can use.
(if you cant find it, let me know and i will help you find it)


 

Share this post


Link to post
Share on other sites

as for the glitch, check this thread out

http://forum.gadgetfactory.net/index.php?/topic/1379-super-glob-sprglbpg/

 

its a variant of the same problem as it uses the same hardware with different input mappings.

 

i have asked a few people, including

Don Hodges -> http://umlautllama.com/projects/pacdocs/

 

and the guy who originally wrote the vhdl, and noone seems to have a clue what causes it.

 

not really sure what the next step is as i suck at vhdl.

Share this post


Link to post
Share on other sites

Did you happen to find out if it's something that happens on other FPGA hardware as well, or is it specific to the Papilio? I haven't recently had a close look at the Pacman schematic to see how it handles foreground objects.

Share this post


Link to post
Share on other sites

sadly, i dont have another fpga.

 

jack or hamster may have a different fpga to test the original vhdl tho

Share this post


Link to post
Share on other sites

I don't have other FPGA hardware to test with, but I think we can rule out a hardware problem. If the issue was caused by hardware then we should see the same problem with all of the games instead of just one.

 

Jack.

Share this post


Link to post
Share on other sites

I didn't mean so much a defect in the hardware, but perhaps a quirk caused by timing issues which will vary from one FPGA type to another and may depend on the system clock frequency. IIRC the original PacMan FPGA implementation ran on an older development board with external memory.

 

I encountered some similar issues in my attempt to implement Pong on an Altera CPLD. Some of the issues I resolved by inverting signals here and there but I eventually had to shelve it for now as I really hit a wall.

Share this post


Link to post
Share on other sites

actually all games that run on the pacman hardware vhdl exhibit the same type of problem. 

(pacman / super glob / shoot the bull / pacman plus / some basketball game i forget the name of )

 

i dont think its the papilio itself but could easily be the vhdl

 

i also figured out what the distortion is, but i have no clue whats causing it.

Share this post


Link to post
Share on other sites

The fact that the yellow pixels from PacMan flicker across the top of the screen (left edge if the monitor is horizontal) provides some clues. It makes me wonder if there is a clock phasing issue somewhere, or maybe something is overflowing. Whatever the case it seems it's occasionally drawing something in the horizontal blanking interval instead of out in the middle of the screen. I'm not familiar enough with the original hardware to come to any solid conclusions though. It would be interesting to see just what states trigger the issue in each of the different games that run on that hardware. I'd really be curious to know whether it happens on the FPGA used in the original implementation. Timing differences do exist between different FPGA families, a great deal of the datasheets for these things covers timing and signal propagation delays and it's certainly possible for there to be significant differences between what the fitter wires up in the FPGA and the original discrete logic design.

Share this post


Link to post
Share on other sites

Well I ported the original code from fpga arcade to my recently acquired Spartan3A starter kit, just a matter of updating the constraints file. The corruption during the cutscene doesn't occur on the Xilinx board, so that strongly suggests that it's the result of something that was done to get it running on the Papilio board.

 

At some point I'll pop a 32 MHz oscillator in the Xilinx board and tweak the Papilio code to run on that and see what happens.

Share this post


Link to post
Share on other sites

Tonight I ported MikeJ's original code to the P1-500K and was pleased to find that it works perfectly, no corruption. All I did was use the clocks file from the Papilio build and create a new constraints file to work with the Logicstart wing. So the problem is something in the original port to the Papilio, I suspect that it's related to the revamped scan doubler. I don't have the background here but I'm not sure why that was changed in the first place as MikeJ's scan doubler works just fine on the P1-500K. I've also retained the ability to switch it off and on with one of the switches and it can be switched on the fly.

Share this post


Link to post
Share on other sites

Hmmm, thats good to know, I'll have to take a deeper look. I don't remember changing the scan doubler... I do remember experimenting with it in order to get it to work the the atari 2600 code, maybe I introduced a problem when I was doing that.

 

Jack.

Share this post


Link to post
Share on other sites

@james - old thread.. sorry.. but all you did is replace the included file with the original and it works?

 

if so, do you happen to have a copy of the original one?

Share this post


Link to post
Share on other sites

Which original one? I've got a copy of the Pacman code from fpgaarcade and I'm pretty sure it's archived elsewhere. My memory is a little fuzzy since this was quite a while ago but I'm pretty sure all I did was make the required adjustments to get the fpga arcade Pacman running on the Papilio without re-writing the scan doubler. This involved adjusting the DCM to accept the 32MHz clock instead of 50MHz or whatever the code was originally written for and a new constraints file to match the arcade megawing. I can post the files when I get home if you can't find them elsewhere. I normally run with the scan doubler disabled anyway since I've got a monitor that can do 15 kHz and it looks more authentic that way.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now