Thursday, January 24, 2013

MAME Table: Debugging and JAMMA Config {Stage 9}

 

Post Overview:

This post follows on from the previous wiring and first power-on blog entry and covers the debugging and configuration of the JAMMA table.

Introduction:

Following on from the failed first power-on attempt, this post covers the debugging and configuration of the JAMMA table. Thus, it covers the steps taken to debug the problems with the currently 'dead' table before looking at the JAMMA configuration via the onboard menu system.

Links to the full photo set for this build stage are also provided, but they contain no context information and thus are best reviewed after reading the blog entry.

The blog entry closes with post-build thoughts and where possible, suggested 'next time' improvement ideas.

Internal Component Wiring- Construction:

Recap: Where's my lights?
Overview/Background: Following the previous wiring post, the current root problem is that the JAMMA shows no outward signs of activity.   More specifically we ought to have a power light to indicate that the board is receiving power.  Thus the logic flow is: no power light indicates (we think) no power, which means no display, and no display, means no JAMMA configuration. Hence we need to figure out the root cause of the power issues.

Two general principles are employed when debugging (this project): 'known good' and 'bare bones'. 

For me, 'known good' mean using components that we 'know' are 'good and fully working.  For example, if we've got another working fully system, we can swap out components from the working, 'known good' system into the failed system and see what stops/starts working.  This principle provides the baseline that we're dealing with at least something that is working or 'known good'.

The 'bare bones' principles involves disconnecting as many components as possible, until we are left with the 'bare bones' needed to test the current component.  A mixture of known good and unknown-status components can be added, one at a time, until something fails/works  or  we get enough new information to narrow down our search to a specific item.

"Bare Bones" - we only need these to test the power.
The hindrance is that we have nothing that is known good - all components are new, thus untested and we don't have another fully working system.  However, there are several items that aren't needed to test the base functionality and thus we can 'bare bone' the system.  Also, we are getting some output from the PSU (as the speaker grill lights up), so the PSU seems ok. 

Thus, the wiring between the JAMMA and PSU needs investigating and is the most likely source of the problem.

First all the connections were removed from the JAMMA PSU, then just the JAMMA power was re-connected.  Nothing! Dead board and no lights. Ok. Bare bones in mind: we'd ideally just connect the JAMMA power but remember the other post....
""Both types of connections (power and control) are contain on this one strip, so when the WL is connected (providing the other end is wired to something) everything gets connected at the same time (this will become important later)""
 

Known Good: Power source from a PC PSU into the JAMMA
This makes it a little trickier as we can't completely bare bone (i.e have only the to-be-tested-items connected to) the system, so it's not clear if something else (other than the power) is the problem.  However, there is another way to power the JAMMA - via a PC PSU and the white molex connector.

We also have a known good PC PSU. Thus disconnect the JAMMA power cables, in with the PC PSU lead........




It works...... from another power source. Hmmmmmm

...... and bingo! Green lights. We've now got a known good JAMMA board and thus have narrowed down the problem to the JAMMA PSU or cables..... but what the hell is wrong? 











Variable output, white round item, top.





The JAMMA PSU has variable output voltage.













Voltage too low......


Voltage check of the JAMMA PSU gives 4.71Volts, compared with 5.32Volts of the PC PSU power.  Bingo!










...... That's better.
The voltage is too low, so time to turn up the power on the JAMMA PSU.  That done, plug in the JAMMA power again and...... nothing? Hmmmm.
Let's check those voltages again.  Minus 5.32 volts. 

Minus 5.32 volts? Minus? MINUS? Well, well, well, well.

I didn't see this problem for looking.  We've got the wrong connectors.... we need the PLUS 5volts. 



-5Volts (top), PLUS 5V bottom.
A problem so darn obvious my eyes hurt.  To test the wrong connection theory, we can swap the red and black power input cables that lead to the JAMMA - it's risky, if we've made the wrong assumption...... Cable swapped and yeah, there's the problem confirmation.  A school boy error, but thankfully, a school boy fix. Re-cabled to the correct 5V+ and the JAMMA board boots-up a treat.


<interlude>
Why didn't I spot this issue? Primarily and quite simply, I didn't see the minus symbol on the PSU <shoulder shrug>

Secondly, on the JAMMA PSU one 5V outlet is marked 15A (amps), while the other is marked 1A (amp).  These values, I now realise but already knew, aren't what the connections pumps out continuously.  They are instead what the terminals are able to supply if the 'pull' (from the connected components) requires that much humph.

I'm oversimplifying, but think about a standard (UK), wall socket power plug - it has a 13amp fuse. If the 'power' drawn ('load') is more than 13 amps, the fuse blows..... why, even for a second, I mixed-up this distinction must remain in the realms of speculation.
<interlude over>

With the power fixed it's time to get some form of display.  Remember the post information that said......
""it is Critical (but not disastrous) that Player One's switch 2 and 3 ('fire' buttons') are identified and correctly connected [...] make sure they are correctly connected""
.....the reason for this is the JAMMA menu system.  The JAMMA board has a built-in menu system which allows for several options to be configured.  Moving around the menu pages is achieved via control panel buttons.  Moving around on-screen options (within the current menu page) is achieved via the joystick.  Changing a specific option (on/off) is normally achieved via a control panel button.
 
DIP Switches - #4 ON if you want the menus.
If the buttons aren't working, then navigation is impossible (Brief troubleshooting note: press every button and see if anything happens and use the 'known good' approach). 

Either way, it is still possible to access the first menu page as there are two ways to get into the JAMMA menu, (1) Set DIP switch four to ON or (2) hold down one of the test switches (if connected) while applying power to the JAMMA. 

I would recommend option one, because if the switches aren't connected....well, it won't work. 


No common ground lead meant the test switches didn't work




For this build I'd accidentally forgotten to connect the common/ground wire to the test switches (an easy to fix problem).











First page of the JAMMA menus, the test screen and cryptic "S2" message.
Once in the JAMMA menus, the first menu page is the test screen with the slightly cryptic "S2 : Next" message.  The test screen is a full screen, test card output which allows for the monitor to be correctly sized. 

The "S2" relates to switch 2, more specifically, Player One, fire button two (P1 FB2).  Pressing the S2 button ("Switch") moves the on-screen JAMMA menu onto the next menu page.  The S3 button, moves backwards thru the menu pages. 



Button Test, via the 'I/O Test' menu
The S2 button was pressed until the "I/0 Test" menu page appeared - from here the button contacts can be tested. 

When input is detected (by pressing a button, joystick, trackball, coin, etc) the corresponding on-screen item is switched on/off.  We can in the photo that P1 S2 has been switched on and that DIP-2 and DIP-4 are also 'on'.

This enables the different switches to be tested; press/move the controls and see if the items light-up.


And again, I was unlucky on two counts as the S3 button, one of the key menu navigation buttons, was shorted out (not shown).  The soultion: remove the wire, add tape and refit.  Secondly the joystick connections where incorrectly connected.  Soultion, remove all joystick cables, re-add them one at a time, see what lights-up on-screen and move cable to correct location, repeat procedure until everything was correct.

"Mr. Do!" Just begging for one more game.........


 

 

 

With all that work done, the table is operational and 95% complete.











Stage Review/'Next Time' Thoughts:

This stage was all about resolving problems and as such, is all about 'next time' thoughts.  The core issue was that of PSU power - both low voltage and wrong connections. 

Getting into the JAMMA menu via the test buttons wasn't initially possible as the common ground wasn't connected - an easily corrected mistake with the addition of the missing wires and using by using the alternative, 'set pin four on' method.  Once in the menus, navigating was tricky due to the wrongly connected joysticks, but the I/O test screen helped to solve that problem.

Closing thoughts: the problems could have been much worse, with a dead JAMMA board being highest on the nightmare list.  Having worked so long, wanting to get the wiring done in one day, I made mistakes (missing wires/wrong connections) - performing the work in two sessions might have helped.

Last post ahoy: "final touches, costs and total project overview" coming soon.

Links to photo set:

=


=