# PopnIO v2

## Words of caution

Do not put pcb on bare metal or otherwise conductive surface (you can easily mount it with screws against a wood surface inside the cab once you confirm everything works as planned)

## How to install the board

### BemaniPC (original IO board replacement)

- Open the BemaniPC
- Unplug the internal USB connector going from the IO board to the motherboard
- Close the BemaniPC

- Replace button lamps with 12v leds

- (for Animelo cabs) Unplug CN22 and CN21 from behind the power distribution box and plug them on PopnIO instead (CN22 on top)
- (for other SD cabs) Unplug CN7 and CN8 connectors from behind the power distribution box and plug them on PopnIO instead
- Keep or remove the jumper on PopnIO DIP4 pins according to the original IO board DIP4 position
- Plug the PopnIO on a free usb port of the BemaniPC
- Lamps should light up when you press buttons
- Run popnio.exe /poll or testapp.exe to verify it's working correctly (console display can be slow to refresh, it's not a problem)

### Custom PC in a non-PC cab

#### Notes about your CRT

if your cab is not originally a pc cab, it probably has a 15/24kHz CRT
if you have a 31kHz CRT available, that's way better and I recommend switching
if you don't, you'll need to mod the PC with software like winmodlines / Soft15kHz / calamity drivers / crt unidriver depending on your GPU so that it can output a 480i video signal suitable for popn in 15kHz mode

The rest of this guide assumes you have the PC installed in the cab and able to display the windows desktop correctly on the CRT

#### Installation

- Replace button lamps with 12v leds
- (for Animelo cabs) Unplug CN22 and CN21 from behind the power distribution box or the firebeat and plug them on PopnIO instead (CN22 on top)
- (for other SD cabs) Unplug CN7 and CN8 connectors from behind the power distribution box or firebeat adapter and plug them on PopnIO instead
- Plug the PopnIO on a free usb port of your PC
- Install the FX2LP driver following the provided instructions in `driver` folder
- Lamps should light up when you press buttons
- Run popnio.exe /poll or testapp.exe to verify it's working correctly (console display can be slow to refresh, it's not a problem)

## How to use ingame

### BemaniPC

Can work as is, but you can also follow the "enhanced polling" instructions if you wish to benefit from it.

Note: enhanced polling won't work if your data is encrypted (if you need dongles to play the game, then it is encrypted)

### Custom PC

Assuming you are familiar with data setup on a custom pc with a gamepad, the main difference is:

- you need to run the game without IO hooks (e.g. specify dll name and do not use -io with spice but use -acio if required, or keep the original ezusb.dll with BT4)

Note: you can also disable the ACIO hook if you have a real card reader connected to COM1 on your PC, or you can use a cardio if you wish

### Enhanced polling

- Install popnhax 2.3 or above following the instructions from https://github.com/CrazyRedMachine/popnhax
- In `popnhax.xml`, set `enhanced_polling` to 1
- Add `popnio.dll` from extra folder to your contents folder

Self-test screen before boot should display "ENHANCED USB I/O" instead of "USB I/O" to indicate it worked.

## Troubleshooting

### lamps

If lamps don't work properly (no lights at all or weird behavior), either use a +12V PSU on the PopnIO (there's a barrel jack connector for 5.5*2.1mm (make sure to use a center positive PSU), or a jst xh 2pin connector (take good note of the + and - markings on the popnio)).

It is also possible to harvest 12v straight from a 2pin connector inside your cab:

- (for Animelo cabs) locate the CN17 connector, behind the cab along the right wall
- (for other SD cabs) locate the CN63 connector, near the CN7/CN8 connectors

orange wire should be +12v while black wire should be ground, but BE SURE TO CHECK WITH A MULTIMETER FIRST, JUST IN CASE

**Note:** when harvesting from the cab 12v line, only the gnd part is important for lamps, the +12 is only used for powering the coin blocker in this case

### enhanced polling

If ENHANCED USB I/O doesn't show up on self-test screen, check popnhax.log file in your contents folder for more information

### DIP switches

In the original Popn IOBoard, only DIP4 has a use, which is setting the resolution to 15kHz or 31kHz.

In PopnIO v2, it is slightly different:

- DIP1 can be used to change between realio and gamepad modes
- DIP2 can be used to enable hd cab compatibility mode (it changes top lamp 2-3-4 pins to woofer rgb pins instead)
- DIP3 is unused
- DIP4 keeps original behavior (15/31kHz)

If you don't have jumpers available to set dip switches on the board, it is always possible to force values with the popnio.exe config tool instead.

## extra

Extra contains additional tools

### ezusb.dll

This is latest pop'n music original ezusb.dll file, here for your convenience

### forwarder.exe

This is a small app which turns your button presses into keyboard presses with the popnio in RealIO mode.

Note: requires popn's ezusb.dll to be present in the folder
Note: alternatively you can use joy2key with the popnio in Gamepad mode.

### popnio.dll

This dll enables hardware-based enhanced polling for popnhax, just place it in your contents folder, enable enhanced_polling in popnhax.xml, then make sure ENHANCED USB I/O is showing up when game boots.

### popnio.exe

This is the config app for popnio. Will allow to setup debouncing, light mode, force DIP values, switch between realio and gamepad modes, or perform an input test

Note: popnio.exe input test might run slowly on your system, this is just meant to ensure the buttons are working, not representative of how it performs ingame

### testapp.exe

This is a test app which loads popnio.dll and ezusb.dll to compare both

Note: requires popnio.dll and popn's ezusb.dll to be present in the folder

### ezusb-forwarder

This tools allows to run popn 15 to 18 using PopnIO in RealIO mode (reminder: enhanced polling is only compatible with pop'n usaneko and higher since it requires popnhax)