02 March 2010, 11:50 | #1 |
Retired Scener
Join Date: Oct 2009
Location: Oslo / Norway
Posts: 86
|
Assigning keys manually in WinUAE config files
Heya,
I've just finished building my 2nd arcade cabinet and I've just configured WinUAE to run perfectly in Maximus Arcade (using WinUAE Loader) on a WG D9800 and an ArcadeVGA2. The developer of WinUAE Loader has used some internal hook routines for keymaps and WinUAE Loader has very limited options regarding setting keys, so I want to set some keys manually in the WHDLoad.uae file (this is the name of the WinUAE config file WinUAE Loader reads). Now, what I want to do is assign the keyboard key 'F5' to 'Quick save state' and the key 'F7' to 'Quick restore state' and normally it should be as easy as entering something like: input.1.keyboard.0.button.63=SPC_STATESAVE.0 input.1.keyboard.0.button.65=SPC_STATERESTORE.0 in the WinUAE config file (WHDLoad.uae). This doesn't seem to do anything though, as the F5 and F7 keys do absolutely nothing when I press them. Now, the input mapping in WinUAE always confuses me. How do I know if I want to use input.1 or input.2 and what's the difference between keyboard.0 and keyboard.1 etc.? I'm also trying to map Amiga keys F1, F2, F3 etc. to keyboard output Z, X, C etc. as many Amiga games use the F-keys. I'd really appreciate some help here guys. Thanks! |
02 March 2010, 11:59 | #2 |
HOL/FTP busy bee
Join Date: Sep 2006
Location: Germany
Age: 46
Posts: 31,759
|
I'm not sure, but do you have the line 'input.config=1' in your config aswell?
|
02 March 2010, 12:35 | #3 |
Retired Scener
Join Date: Oct 2009
Location: Oslo / Norway
Posts: 86
|
|
02 March 2010, 12:38 | #4 |
HOL/FTP busy bee
Join Date: Sep 2006
Location: Germany
Age: 46
Posts: 31,759
|
Change it to 'input.config=1' and I'm pretty sure your config will work the way you want it to (input.config=0 means you use the 'Compatibility mode' for the input panel and that's why your keys don't work ).
|
02 March 2010, 12:40 | #5 | |
Retired Scener
Join Date: Oct 2009
Location: Oslo / Norway
Posts: 86
|
Quote:
Edit: Worked! Awesome! Thanks a lot. BTW, do you also have any idea how I can assign Amiga's F1/F2/F3 etc. buttons to keyboard keys like 'Z', 'X' etc? |
|
02 March 2010, 12:44 | #6 |
HOL/FTP busy bee
Join Date: Sep 2006
Location: Germany
Age: 46
Posts: 31,759
|
You're welcome
Do you mean change the keys on a real Amiga? |
02 March 2010, 12:46 | #7 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,534
|
Use Input GUI to test mappings and when it works as expected, save the config and compare changes.
input.x.<device>.y: x = number of select input set (1-4), y = index of device type. (keyboard is always 0 unless you have multiple keyboards) |
02 March 2010, 12:48 | #8 |
Retired Scener
Join Date: Oct 2009
Location: Oslo / Norway
Posts: 86
|
|
02 March 2010, 12:50 | #9 |
Retired Scener
Join Date: Oct 2009
Location: Oslo / Norway
Posts: 86
|
Thanks Toni, will give it a shot!
|
02 March 2010, 12:51 | #10 |
HOL/FTP busy bee
Join Date: Sep 2006
Location: Germany
Age: 46
Posts: 31,759
|
|
02 March 2010, 12:53 | #11 |
Retired Scener
Join Date: Oct 2009
Location: Oslo / Norway
Posts: 86
|
|
02 March 2010, 13:19 | #12 |
Retired Scener
Join Date: Oct 2009
Location: Oslo / Norway
Posts: 86
|
Oh my god.. Just played Pinball Dreams on the cabinet..
Now everything works flawlessly. The amiga joystick, the amiga mouse, F1-F4 keys and save/restore states is mapped to the control panel and I can spend the rest of the day playing. Thanks again! |
02 March 2010, 13:37 | #13 |
Retired Scener
Join Date: Oct 2009
Location: Oslo / Norway
Posts: 86
|
Ok, I was a little bit too quick on the trigger. Pinball Dreams worked fine, but I didn't test any games that actually used the joystick.
I want to assign the following: Keyboard key 'Cursor up' > 'Joystick up' Keyboard key 'Cursor down' > 'Joystick down' Keyboard key 'Cursor left' > 'Joystick left' Keyboard key 'Cursor right' > 'Joystick right' Keyboard key 'LALT' > 'Joystick button 1' Keyboard key 'LCTRL' > 'Joystick button 2' Keyboard key 'END' > 'Amiga ESC key' Keyboard key 'A' > 'Amiga F1 key' Keyboard key 'S' > 'Amiga F2 key' Keyboard key 'Q' > 'Amiga F3 key' Keyboard key 'W' > 'Amiga F4 key' -- I have used the following parameters in the .uae config file: input.1.keyboard.0.button.200=JOY0_UP.0 input.1.keyboard.0.button.203=JOY0_LEFT.0 input.1.keyboard.0.button.205=JOY0_RIGHT.0 input.1.keyboard.0.button.208=JOY0_DOWN.0 input.1.keyboard.0.button.29=JOY0_FIRE_BUTTON.0 input.1.keyboard.0.button.56=JOY0_2ND_BUTTON.0 input.1.keyboard.0.button.207=KEY_ESC.0 input.1.keyboard.0.button.30=KEY_F1.0 input.1.keyboard.0.button.31=KEY_F2.0 input.1.keyboard.0.button.16=KEY_F3.0 input.1.keyboard.0.button.17=KEY_F4.0 input.1.keyboard.0.button.63=SPC_STATESAVE.0 input.1.keyboard.0.button.65=SPC_STATERESTORE.0 -- Now, the F1-F4 and save/restore state key assignments works, but the joystick won't work (no directions, none of the buttons). Also the 'END' key doesn't seem to be assigned to the Amiga ESC key either. Any more input? It's probably just a small mistake but I can't really see it. Thanks! |
02 March 2010, 13:42 | #14 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,534
|
You probably want JOY1, not JOY0 (mouseport)
END is semi-hardcoded special key for END+Fx etc.. shortcuts. (don't remember if it can be remapped currently) |
02 March 2010, 13:44 | #15 | |
Retired Scener
Join Date: Oct 2009
Location: Oslo / Norway
Posts: 86
|
Quote:
Ok, I can live without using the END-key, I'll find another key for ESC then. Thanks! |
|
02 March 2010, 14:13 | #16 |
Retired Scener
Join Date: Oct 2009
Location: Oslo / Norway
Posts: 86
|
I still can't seem to get the joystick working at all. Also I tried assigning Amiga ESC key to 'P' but it didn't work either.
Here's my .uae config (irrelevant lines removed): Code:
joyport0=mouse1 joyport1=kbd1 input.config=1 input.joymouse_speed_analog=20 input.joymouse_speed_digital=10 input.joymouse_deadzone=33 input.joystick_deadzone=33 input.mouse_speed=100 input.autofire=10 input.1.keyboard.0.button.16=KEY_F3.0 input.1.keyboard.0.button.17=KEY_F4.0 input.1.keyboard.0.button.25=KEY_ESC.0 input.1.keyboard.0.button.29=JOY1_FIRE_BUTTON.0 input.1.keyboard.0.button.30=KEY_F1.0 input.1.keyboard.0.button.31=KEY_F2.0 input.1.keyboard.0.button.56=JOY1_2ND_BUTTON.0 input.1.keyboard.0.button.200=JOY1_UP.0 input.1.keyboard.0.button.203=JOY1_LEFT.0 input.1.keyboard.0.button.205=JOY1_RIGHT.0 input.1.keyboard.0.button.208=JOY1_DOWN.0 input.1.keyboard.0.button.63=SPC_STATESAVE.0 input.1.keyboard.0.button.65=SPC_STATERESTORE.0 input.1.joystick.0.disabled=0 input.1.joystick.0.axis.0=JOY1_HORIZ.0 input.1.joystick.0.axis.1=JOY1_VERT.0 input.1.joystick.0.axis.6=JOY1_HORIZ.0 input.1.joystick.0.axis.7=JOY1_VERT.0 input.1.joystick.0.button.0=JOY1_FIRE_BUTTON.0 input.1.joystick.0.button.1=JOY1_2ND_BUTTON.0 input.1.joystick.0.button.2=JOY1_3RD_BUTTON.0 input.1.joystick.1.disabled=0 input.1.joystick.1.axis.0=JOY2_HORIZ.0 input.1.joystick.1.axis.1=JOY2_VERT.0 input.1.joystick.1.button.0=JOY2_FIRE_BUTTON.0 input.1.joystick.1.button.1=JOY2_2ND_BUTTON.0 input.1.joystick.1.button.2=JOY2_3RD_BUTTON.0 input.1.joystick.2.disabled=1 input.1.joystick.2.axis.0=JOY1_HORIZ.0 input.1.joystick.2.axis.1=JOY1_VERT.0 input.1.joystick.2.button.0=JOY1_FIRE_BUTTON.0 input.1.joystick.2.button.1=JOY1_2ND_BUTTON.0 input.1.joystick.2.button.2=JOY1_3RD_BUTTON.0 input.1.joystick.3.disabled=1 input.1.joystick.3.axis.0=JOY2_HORIZ.0 input.1.joystick.3.axis.1=JOY2_VERT.0 input.1.joystick.3.button.0=JOY2_FIRE_BUTTON.0 input.1.joystick.3.button.1=JOY2_2ND_BUTTON.0 input.1.joystick.3.button.2=JOY2_3RD_BUTTON.0 input.1.joystick.4.disabled=1 input.1.joystick.4.axis.0=JOY1_HORIZ.0 input.1.joystick.4.axis.1=JOY1_VERT.0 input.1.joystick.4.button.0=JOY1_FIRE_BUTTON.0 input.1.joystick.4.button.1=JOY1_2ND_BUTTON.0 input.1.joystick.4.button.2=JOY1_3RD_BUTTON.0 input.1.joystick.5.disabled=1 input.1.joystick.5.axis.0=JOY2_HORIZ.0 input.1.joystick.5.axis.1=JOY2_VERT.0 input.1.joystick.5.button.0=JOY2_FIRE_BUTTON.0 input.1.joystick.5.button.1=JOY2_2ND_BUTTON.0 input.1.joystick.5.button.2=JOY2_3RD_BUTTON.0 input.1.joystick.6.disabled=1 input.1.joystick.6.axis.0=JOY1_HORIZ.0 input.1.joystick.6.axis.1=JOY1_VERT.0 input.1.joystick.6.button.0=JOY1_FIRE_BUTTON.0 input.1.joystick.6.button.1=JOY1_2ND_BUTTON.0 input.1.joystick.6.button.2=JOY1_3RD_BUTTON.0 input.1.joystick.7.disabled=1 input.1.joystick.7.axis.0=JOY2_HORIZ.0 input.1.joystick.7.axis.1=JOY2_VERT.0 input.1.joystick.7.button.0=JOY2_FIRE_BUTTON.0 input.1.joystick.7.button.1=JOY2_2ND_BUTTON.0 input.1.joystick.7.button.2=JOY2_3RD_BUTTON.0 input.1.mouse.0.disabled=0 input.1.mouse.0.axis.0=MOUSE1_HORIZ.0 input.1.mouse.0.axis.1=MOUSE1_VERT.0 input.1.mouse.0.axis.2=MOUSE1_WHEEL.0 input.1.mouse.0.button.0=JOY1_FIRE_BUTTON.0 input.1.mouse.0.button.1=JOY1_2ND_BUTTON.0 input.1.mouse.0.button.2=JOY1_3RD_BUTTON.0 input.1.mouse.0.button.3=KEY_ALT_LEFT.0,KEY_CURSOR_LEFT.0 input.1.mouse.0.button.4=KEY_ALT_LEFT.0,KEY_CURSOR_RIGHT.0 input.1.mouse.1.disabled=1 input.1.mouse.1.axis.0=MOUSE1_HORIZ.0 input.1.mouse.1.axis.1=MOUSE1_VERT.0 input.1.mouse.1.axis.2=MOUSE1_WHEEL.0 input.1.mouse.1.button.0=JOY1_FIRE_BUTTON.0 input.1.mouse.1.button.1=JOY1_2ND_BUTTON.0 input.1.mouse.1.button.2=JOY1_3RD_BUTTON.0 input.1.mouse.1.button.3=KEY_ALT_LEFT.0,KEY_CURSOR_LEFT.0 input.1.mouse.1.button.4=KEY_ALT_LEFT.0,KEY_CURSOR_RIGHT.0 input.1.mouse.2.disabled=1 input.1.mouse.2.axis.0=MOUSE1_HORIZ.0 input.1.mouse.2.axis.1=MOUSE1_VERT.0 input.1.mouse.2.axis.2=MOUSE1_WHEEL.0 input.1.mouse.2.button.0=JOY1_FIRE_BUTTON.0 input.1.mouse.2.button.1=JOY1_2ND_BUTTON.0 input.1.mouse.2.button.2=JOY1_3RD_BUTTON.0 input.1.mouse.2.button.3=KEY_ALT_LEFT.0,KEY_CURSOR_LEFT.0 input.1.mouse.2.button.4=KEY_ALT_LEFT.0,KEY_CURSOR_RIGHT.0 input.1.mouse.3.disabled=1 input.1.mouse.3.axis.0=MOUSE2_HORIZ.0 input.1.mouse.3.axis.1=MOUSE2_VERT.0 input.1.mouse.3.button.0=JOY2_FIRE_BUTTON.0 input.1.mouse.3.button.1=JOY2_2ND_BUTTON.0 input.1.mouse.3.button.2=JOY2_3RD_BUTTON.0 input.1.mouse.4.disabled=1 input.1.mouse.4.axis.0=MOUSE1_HORIZ.0 input.1.mouse.4.axis.1=MOUSE1_VERT.0 input.1.mouse.4.axis.2=MOUSE1_WHEEL.0 input.1.mouse.4.button.0=JOY1_FIRE_BUTTON.0 input.1.mouse.4.button.1=JOY1_2ND_BUTTON.0 input.1.mouse.4.button.2=JOY1_3RD_BUTTON.0 input.1.mouse.4.button.3=KEY_ALT_LEFT.0,KEY_CURSOR_LEFT.0 input.1.mouse.4.button.4=KEY_ALT_LEFT.0,KEY_CURSOR_RIGHT.0 input.1.mouse.5.disabled=1 input.1.mouse.5.axis.0=MOUSE2_HORIZ.0 input.1.mouse.5.axis.1=MOUSE2_VERT.0 input.1.mouse.5.button.0=JOY2_FIRE_BUTTON.0 input.1.mouse.5.button.1=JOY2_2ND_BUTTON.0 input.1.mouse.5.button.2=JOY2_3RD_BUTTON.0 input.1.mouse.6.disabled=1 input.1.mouse.6.axis.0=MOUSE1_HORIZ.0 input.1.mouse.6.axis.1=MOUSE1_VERT.0 input.1.mouse.6.axis.2=MOUSE1_WHEEL.0 input.1.mouse.6.button.0=JOY1_FIRE_BUTTON.0 input.1.mouse.6.button.1=JOY1_2ND_BUTTON.0 input.1.mouse.6.button.2=JOY1_3RD_BUTTON.0 input.1.mouse.6.button.3=KEY_ALT_LEFT.0,KEY_CURSOR_LEFT.0 input.1.mouse.6.button.4=KEY_ALT_LEFT.0,KEY_CURSOR_RIGHT.0 input.1.mouse.7.disabled=1 input.1.mouse.7.axis.0=MOUSE2_HORIZ.0 input.1.mouse.7.axis.1=MOUSE2_VERT.0 input.1.mouse.7.button.0=JOY2_FIRE_BUTTON.0 input.1.mouse.7.button.1=JOY2_2ND_BUTTON.0 input.1.mouse.7.button.2=JOY2_3RD_BUTTON.0 |
02 March 2010, 14:35 | #17 |
HOL/FTP busy bee
Join Date: Sep 2006
Location: Germany
Age: 46
Posts: 31,759
|
Try 'JOY2_'
|
02 March 2010, 14:47 | #18 |
Retired Scener
Join Date: Oct 2009
Location: Oslo / Norway
Posts: 86
|
Tried JOY2 with no luck.
The more I look at the config file the less I understand... JOY0 is port 1 (mouse port) and JOY1 is port 2 (joystick port) on the Amiga, right? Or is it JOY1 and JOY2? |
02 March 2010, 14:48 | #19 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,534
|
I think I said something about testing with Input GUI first.
|
02 March 2010, 14:50 | #20 |
Retired Scener
Join Date: Oct 2009
Location: Oslo / Norway
Posts: 86
|
Yeah I did, that's how I found out the keycodes for LALT/LCTRL and F1/F2/F3/F4 etc., but when I inserted the code into the .uae file that WinUAE Loader uses it doesn't work. The F1/F2/F3/F4 key assignments works but the joystick doesn't.
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Assigning joystick buttons to keyboard keys in PUAE | Gaula92 | support.OtherUAE | 3 | 16 September 2011 14:39 |
Are WinUAE config files backward compatible? | antonvaltaz | support.WinUAE | 5 | 30 November 2009 00:41 |
WinUAE Config Files | MrTwister | New to Emulation or Amiga scene | 17 | 27 December 2008 12:47 |
Assigning tooltypes to files? | Gnorman | project.ClassicWB | 2 | 06 March 2006 20:42 |
Config files | marguitar | New to Emulation or Amiga scene | 5 | 21 November 2001 19:55 |
|
|