Monthly Archive for February, 2014

StepMania (In The Groove) Improved Light Output

I have a Dance Dance Revolution machine that I installed a PC in to play StepMaia instead. I wanted to get full light output working on StepMania only to discover that because of the way it was programmed the port addresses are hard-coded and because my StepMania PC uses a PCI based parallel port card I would have to modify the source and recompile…

I thought this was a exceedingly DUMB design so I did something about it.

I have some programming abilities (albeit not with C++) so rather than modify the source I decided to write a new parallel_lights_io.dll that works the way SM should have worked from the start. That way anyone who wants to add light output to SM can do so by simply adding these files to to their installation directory. Basically all this does is provide you with a .ini file that you can modify with your port addresses instead of having to do it in your source code. (also it uses the freely available and better inpout32.dll instead of the licensed and buggy io.dll that SM was built to use)

Download it here: Improved StepMania parallel_lights_io.dll

If anyone is interested in the source code let me know.

Supported Versions:
This is tested and working on SM 3.9 Plus Redux and OpenITG Beta 2 in Windows XP… I wont work on any version that has light output intentionally disabled in source (which means vanilla SM 3.9 and 4.0 will not work) I haven’t tested it on any other releases or OSs…

If you’re using a Linux build then you don’t need this… this is only for Windows.

If you’re at all interested in getting light output working please feel free to download and try this out… I’m interested to see how it works for other people. You’ll obviously need some hardware output on your parallel ports to see it working.

Hardware:
I’m using a Rosewill RC-304 dual parallel port PCI card (it’s also low-profile if you’re using a half-height PC case) though any properly installed parallel ports should work

As for building a light driver board for your parallel ports there are literally hundreds of ways you can do it… some great info can be found here: http://www.epanorama.net/circuits/parallel_output.html#realworld

If your intention is to hook this up to a real DDR Arcade machine. DDR has a light driver board already installed, you simply need to invert the parallel port outputs by using an opto-isolator OR a few 74 series inverter chips…. OR utilize the transistor/diode/resistor circuit for relay output described in the link above. The circuit requires a lot more soldering but I’m using that because it’s self-powered from the parallel port which makes for a cleaner install (opt-isolators or inverter chips would require an outside power source)… the DDR driver boards don’t draw much current, they’re just checking for an on/off value on the pin…. If you try to power a lamp any larger than an LED then you’ll likely blow out your parallel port which would be bad.

Here are the pinouts for the DDR light connectors as well as the parallel port pins used by StepMania:
Player 1 Platform Lights (10-pin White Connector)
1 black logical ground
2 green-red player 1 up arrow lights
3 blue-red player 1 down arrow lights
4 purple-red player 1 left arrow lights
5 gray-red player 1 right arrow lights
6 white enable pad (tie to logical ground)
7 brown (unknown)
8 N/C
9 N/C
10 N/C

Player 2 Platform Lights (10-pin Orange Connector)
1 black logical ground
2 green-red player 2 up arrow lights
3 blue-red player 2 down arrow lights
4 purple-red player 2 left arrow lights
5 gray-red player 2 right arrow lights
6 white enable pad (tie to logical ground)
7 brown (unknown)
8 N/C
9 N/C
10 N/C

Cabinet Lights (10-pin Red Connector)
1 black logical ground
2 N/C
3 N/C
4 purple-brown player 1 button lights
5 gray-brown player 2 button lights
6 green marquee lower right floodlight
7 blue marquee upper right floodlight
8 purple-red marque lower left floodlight
9 gray-red marquee upper left floodlight
10 green/yellow earth ground

Sub Woofer Lights (6-pin White Connector)
1 black logical ground
2 gray subwoofer lights (both)
3 N/C
4 N/C
5 N/C
6 N/C

For reference here are the parallel port pinouts for stepmania 3.9

SM Parallel Light Output
Parallel Port 1 (LPT1):
1 N/C
2 marquee upper left floodlight
3 marquee upper right floodlight
4 marquee lower left floodlight
5 marquee lower right floodlight
6 player 1 button lights
7 player 2 button lights
8 subwoofer light left
9 subwoofer light right
10-17 N/C
18-25 logical ground

Parallel Port 2 (LPT2):
1 N/C
2 player 1 left arrow lights
3 player 1 right arrow lights
4 player 1 up arrow lights
5 player 1 down arrow lights
6 player 2 left arrow lights
7 player 2 right arrow lights
8 player 2 up arrow lights
9 player 2 down arrow lights
10-17 N/C
18-25 logical ground

I’m also opting to go with 36-pin Centronics connectors on my light board so that I can use off-the-shelf printer cables… for reference here is how the DB-25 (parallel port) connector maps to a Centronics-36: http://www.lammertbies.nl/comm/cable/parallel.html

The Centroincs 36-pin connector ends up being mapped out like this:
Output pins (same numbers as DB-25): 2-9
Ground pins: 16-17, 19-30, 33
Pins with No Connection: 1, 10-15, 18, 31-32, 34-36

Parallel Port Hardware Testing:
If you’re having problems and you want to test your hardware with a program other than StepMania then I recommend this app: http://lpt-port-test-utility.software.informer.com/3.0/

I used that myself quite a bit when developing this little dll. you just plug in your port address and you can turn on and off the output pins on the parallel port to test out your hardware without the use of StepMania.

—————

I’m just happy to get this working for myself but if it this helps someone else then that’s even better…