Is it possible to configure a gamepad without the gamepad ID?
to have a global ini setting for all joypads.
this seems to be the case in VICE, but i know this is far more advanced than that. :)
*i am only thinking of the digital DPAD part.
not analogue devices /controllers.
the reason:
i was just messing about scripting keys for joystick movement from gamebase.
while it works perfectly for me, it won't for anyone else who doesn't have the exact same gamepad.
Anonymous
A lot of joypads don't accept analogue as standard with the latest VICE release. You have to manually create a text file.
So that I understand this correctly, instead of the ID there could be a placeholder such as 'xxxxxx', in settings file, which then means that the first joypad that is detected should be used ?
yes, that would be a very good solution.
i think other emulators use that kind of method.
INI does not contain an ID, just uses what joypad is attached.
hopefully the direction (up,down,left,right) numbers are global for all pads?.
Some users have multiple joypads connected. The ID is necessary to distinguish between them. Okay, I'll put it on the to-do list. The first joypad that's recognized will be the one.
I hope, this doesn't cause huge problems for such people, who have lots of different controllers connected to their PC, because I'm almost afraid that it will.
Regards,
TOM
Hi TOM, that's my whole reason for the suggestion.
scripting is impossible with infinate gamepad ID's.
you need to choose one.
just say you setup your joypad controls, and the next time you load denise, you don't have that exact same controller attached to your PC.
you will need to setup the basic joypad controls again and re-save it.
with my ?idea?, any other attached pad should work.
i am only editing and loading a custom "controller.ini" file for use with gamebase frontend.
it will not affect or change any options stored in the original "c64_settings.ini".
PiCiJi, if you think my idea will break it?.
maybe have an option for use ID or 1st pad as default?.
Hy. In my default-settings, I've already mapped all my controllers at the same time, in Denise. Some to joyport1 and others to joyport 2. This way, I can easily switch controllers and control the games with all of them, everytime. In a running game, I can simply switch to any other controller and continue playing with it. However, to ensure that each controller is recognized correctly and nothing gets mixed up, it seems necessary for each controller to have its own ID. I think, otherwise it could be problematic? But maybe PiCiJi knows more?
Best regards,
TOM
The concept of IDs won't change. Otherwise, differentiating between multiple controllers would no longer be possible. I'm not sure yet how I'll redesign it. It will probably be that if the ID can no longer be found, the first detected joypad will be automatically used. This should combine both requirements.
more about this when I deal with it.
In the latest nightly, the first recognized joypad should now be used if a device ID from the settings file cannot be found anymore.
So, if no devices are swapped, everything should work as usual. However, if an assigned device is removed, the "unknown device" message should no longer appear if at least one joypad is detected.
The assignment of the individual directions remains unchanged. So, if the old joypad is mapped to the D-pad and the new one only has axes, it won't work. Manual assignment would be necessary in this case. To increase reusability, you could map the D-pad and, alternatively, the axes. This increases the likelihood that an unknown joypad can be used without manual assignment.
@both reporters: Please test your case
the attached pad gets conifigured when using a fake ID. :)
so this works!
joypad#1_0_alt:0|2222222222|0|1|1
joypad#1_1_alt:0|2222222222|0|1|2
joypad#1_2_alt:0|2222222222|0|0|1
joypad#1_3_alt:0|2222222222|0|0|2
joypad#1_4_alt:0|2222222222|3|0|0
but when mapping joystick movement to keyboard.
the attached joypad still shows unknown device.
keyboard_10_alt:0|1111111111|0|1|2
keyboard_11_alt:0|1111111111|0|1|1
keyboard_12_alt:0|1111111111|0|0|1
keyboard_13_alt:0|1111111111|0|0|2
And here no problems, with the latest nightly. All of my controllers, which are plugged in at the same time by default, still work without any problems, after this change. So, it looks good here.
Regards,
TOM
Yes, I tested that. I was hoping you had different controllers with D-pads and would unplug the working one and plug in an unknown one. Unfortunately, I only have two identical controllers with D-pads, a retro joystick adapter (which works via axes), and a flight stick with a thumb-sized D-pad. Of course, this thumb-sized D-pad is recognized, which isn't really suitable for controlling.
I forgot that. I'll add it in the next few days.
ok good to hear
i was only thinking of the DPAD for keys.
using a digital only signal for key presses.
didn't want to go down the analogue rabbit hole. ;)
most controllers (not all) have a Dpad part, and i was thinking the directional config numbers in the INI would be universal for all Dpads.
i guess analogue controls will give various results.
just an update:
i have tested another pad i borrowed.
PS Dual Shock 2 via BOOM PSX+N64 USB converter.
the DPAD configures with these numbers...
joypad#1_0_alt:0|2000939275|3|12|0
joypad#1_1_alt:0|2000939275|3|14|0
joypad#1_2_alt:0|2000939275|3|15|0
joypad#1_3_alt:0|2000939275|3|13|0
joypad#1_4_alt:0|2000939275|3|2|0
and Left Analogue is this
joypad#1_0_alt:0|2000939275|0|1|1
joypad#1_1_alt:0|2000939275|0|1|2
joypad#1_2_alt:0|2000939275|0|0|1
joypad#1_3_alt:0|2000939275|0|0|2
joypad#1_4_alt:0|2000939275|3|2|0
so scripting DPAD for my pad will configure left analogue for another.
i don't think it's going to work with the current config. :(
i will give it a test, before you put anymore time into it.
do your pad numbers for UP/DOWN/LEFT/RIGHT match up.
ok, i tested futher.
hot swapping pads works perfect!
it was a "user" error. :D
if [analog] button is switched ON (lit)
then DPAD assigns as more button numbers.
when it's off, it reverts back to X/Y hi/lo directions.
keep up the good work.
look forward to the next nightly with keyboard update. ;)
should be working with latest nightly.
it's all working here!
thanks :)
i did get 2 rogue keypress (not assigned to anything) from the gamepad.
i set to keyboard mode.
*i know all about the port#1 problems on real machine.
after mapping I,J,K,L,M as a test.
holding fire and moving up then to the right in a rotation displays @
holding fire and moving down to the right displays . (full stop)
mapping A,B,C,D,E
up/right shows a T
it only seems to happen when the fire button is pressed.
and changing the order of the map from U,D,L,R to U,R,D,L
or mapping other combination of keys and the problem seems to disappear.
maybe a real keyboard buffer problem as it was never meant to map joystick.
and it's not clearing quick enough.
i don't think it will cause any problems with what it will be used for.
just thought i would mention it. ;)
I'm not entirely sure what you mean but check the setting: Prioritization for double assignment.
yes, i am using keyboard prioitisation in all device options.
i reconfigured enitre keymap to c64 position on UK keyboard.
deleted virtual key and right shifted key maps.
then tweaked analogue sensitivity in all devices and it fixed the rogue key problem.
*i didn't keep the broken settings.ini, so not sure which exact setting broke it. ;/
i did find a strange event in the joystick to key config.
if i press and hold UP or RIGHT and press fire repatedly.
I = up, J = right, K = down, L = left, M = fire
i get this IMIMIM or JMJMJMJM
which i feel is correct in a shoot em up game movement.
but if i press and hold LEFT or DOWN and press fire repeatedly
i only get a K or an L.
but if i hold fire and press LEFT or DOWN repeatedly.
i get KMKMKM or LMLMLM
i should stop trying to experiment with these things
and let you get on with the important stuff. ;)
my last word on this. :D
here is a config with all keyboard and controller (normal/alt/hotkeys) maps cleared.
it only has A,B,C,D,E mapped to joystick movement.
if you press up.left diagonal with fire, you get a T.
some other key combinations work ok, and others can cause a crash.
i think it's like pressing 3 keys together in the keyboard buffer.
which it was never meant to do.
to emulate it correctly (joy2key).
i assume diagonals will need to be assigned or ignored in the code.
or keybuffer cleared on every press and possibly repeated if held down.
but this is only a guess on my part.
This "T" is a ghost key, not a bug. The C64 keyboard can't process certain inputs simultaneously. This is more likely to occur when using a joystick, as a diagonal movement causes two keys to be pressed simultaneously + fire key
yes pressing three keys together has a good probability for a ghost key.
Last edit: PiCiJi 2025-09-22