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.

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:

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:

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:

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…

3 Responses to “StepMania (In The Groove) Improved Light Output”

  • Ohh Man you save my life 😀 I always wanted to try to make it work in a pci express card now only plays search and test your new dll not really know how long this issue has been here but I appreciate your taking the time to write..

    if you know how to build a serial port card and monitor lights stepmania I’d appreciate it thank you very much

    You can see my projet here :3

    keep it up !!

  • Thanks for listing the pinouts! I just set up my cabinet with Stepmania. Stepmania 5 apparently doesn’t yet support the light outputs and I have no clue where to begin hacking stepmania or making dlls, so I’m setting up an arduino with a stereo in and out. It will go inline between the sound card and the amp to detect bass/beat for the lights.
    One thing that’s got me stumped though (I’m an amateur so maybe this is something simple): The arduino 5V digital pins cause the subwoofer lights to come on even when it’s switched off. It’s like there’s a voltage leak or something. Adding a 1k or 10k resistor didn’t seem to help. All the other lights work as expected. Any idea why the subwoofer lights would be behaving differently than the floodlights do?

  • I haven’t yet figured out the nuances at to how to interface with all the DDR lights, I actually ended up going a different direction and built a driver to use a PAC Drive to control lights ( Open ITG already has support for this but unfortunately adding support in SM requires modification to the source code. I’ve posted up my source on the official SM forums and I’ve even worked with Beware to have it added to his build of SM 3.9, you can read about that build here:

    I’ve got Beware’s SM outputting lights through PAC Drive to an LED test setup but I haven’t yet built a circuit to interface the PAC Drive to a DDR Cab. I had a setback where I miswired something and fried my PAC Drive and I haven’t had a chance to revisit the project since.

Leave a Reply

You must login to post a comment.