LPT port controller support?

Hi Is there any way to enable parallel port controller support in Lakka? They are supported in linux kernel for many years. There should be kernel module called gamecon, but Lakka missed it. https://www.kernel.org/doc/html/v4.12/input/devices/joystick-parport.html Thank you in advance for any opinions.

Please try Lakka 2.1 RC4 (i386 or x86_64) it is enabled as a module.

I’ve got a lpt adapter that I want to use with sega saturn controllers. Any guidance? From what I’ve found I have to use the db9 module and set it up to work with saturn controllers. My adapter is based on the old DirectPad schematics.

This is from the module source: #define DB9_MULTI_STICK 0x01 #define DB9_MULTI2_STICK 0x02 #define DB9_GENESIS_PAD 0x03 #define DB9_GENESIS5_PAD 0x05 #define DB9_GENESIS6_PAD 0x06 #define DB9_SATURN_PAD 0x07 #define DB9_MULTI_0802 0x08 #define DB9_MULTI_0802_2 0x09 #define DB9_CD32_PAD 0x0A #define DB9_SATURN_DPP 0x0B #define DB9_SATURN_DPP_2 0x0C #define DB9_MAX_PAD 0x0D

I want to use DB9_SATURN_DPP_2 (for two controllers)

My lpt port is on lp0

Calling modprobe -v db9 dev=0,12 seems to run. (no error message) but the joy is not mapped at /dev/input/js*

I’m doing something wrong?

Hi @sonik,

Can you make a test with this image ? As we enabled db9 module driver.

Thank you.

Thanks for the reply. This image can be used to live boot? Or it need to be installed on a hard disk?

Also… I discovered that the module is broken. Tested it on latest ubuntu. The setting for dual controllers wont work. Only if using just one controller. My adapter is fine as it works with dual controllers on windows (win98. driver is very old).

Hi,

No problem you are welcome.

You can use live boot which is the default boot mode.

Please let us know how it goes.

Image flashed… On first boot I enabled the module with modprobe. Seems like retroarch detected it but I could not control the menu with the controller. Then I rebooted my system and lakka stopped working. Cant boot lakka anymore. The image link expired. Can you upload it again?

On first boot I enabled the module with modprobe. Seems like retroarch detected it but I could not control the menu with the controller.

You should try to bind your controller Settings tab > Input > Port 1 Controls

If it is still not working try to change Controller driver in Settings tab > Drivers > Controller to linuxraw or parport.

Then I rebooted my system and lakka stopped working. Cant boot lakka anymore.

So try first to make a test in live mode.

Can you upload it again?

You can try here.

Thank you for your test.

Driver is loading!

No need to change driver in retroarch. Default works (I think it’s udev?)

Just need to call modprobe with the correct settings.

The tests:

Playstation controller using gamecon driver

modprobe -v gamecon map=0,7

Works fine

Single saturn controller connected to a dual controller adapter using DPP (Direct Pad Pro) scheme and db9 driver

modprobe -v db9 dev=0,11

Retroarch detects two saturn ports. Controller works on the first port only

Two saturn controllers connected to a dual controller adapter using DPP scheme and db9 driver

modprobe -v db9 dev=0,12

Retroarch detects two ports but neither works. Connecting only a single controller does not work too.

I think the db9 driver is faulty. I never got it to work with dual controllers. The wiring is correct as it works in windows. Even the saturn multi tap works with multiple controllers.

Hi,

Thank you for the feedback.

According to modinfo db9, you have 3 parameters you can use

parm:           dev:Describes first attached device (<parport#>,<type>) (array of int)
parm:           dev2:Describes second attached device (<parport#>,<type>) (array of int)
parm:           dev3:Describes third attached device (<parport#>,<type>) (array of int) 

So you should try to use dev2 parameter ?

Also are you sure about the type id ? Because I don’t see 11 neither 12 in this documentation.

I will try with dev2. But I think it’s for using a second parallel port. 11 and 12 are defined in the source code. Indeed it’s not on the documentation. Please take a look at the source code and search for “DB9_SATURN_DPP”. From what I could understand DB9_SATURN_DPP is for the adapter with only one controller and DB9_SATURN_DPP2 is for two controllers. Also DPP stands for “Direct Pad Pro”. It’s the scheme for the adapter.

Indeed, the source code gives 11 and 12.

Can you give some dmesg output after you load the module driver ?

Sure. I will test it again later today.

By the way, looking at the code seems like it should support the saturn multitap too. 6 controllers using a single port. That would be amazing :slight_smile:

Using dev2 parameter does not works. Not trow any errors but simply does not work.

kernel log:

modprobe -v db9 dev=0,11

[ 279.486995] input: Saturn dpp as /devices/virtual/input/input11

[ 279.487162] input: Saturn dpp as /devices/virtual/input/input12

dprobe -v db9 dev=0,12

[ 71.638023] input: Saturn dpp dual as /devices/virtual/input/input11

[ 71.638244] input: Saturn dpp dual as /devices/virtual/input/input12

Thank you for the information.

But you have also /dev/input/js0 and /dev/input/js1? Does it work ?

jstest /dev/input/js0
jstest /dev/input/js1

There’s no joystick device available in retroarch before loading the db9 module.

After loading it, retroarch detects two controllers.

Controller works on the first port only. And only if selecting the first controller index in retroarch.

Did you try also to make a test by changing the controller driver ?

I did not find something in linux-input mailing list so you may try to open a bug report here ?

Tested changing the driver.

udev is the default.

linuxraw - does not work with the sega saturn controller.

parport - it auto creates 16 “generic parallel port” devices. No need to manually load the kernel driver. Does not work with the sega saturn controller.

I will report a bug but I think anyone cares for this kind of stuff anymore :frowning:

Thank you for the report.