Page 1 of 1

Joystick not the right one

Posted: Sat Oct 24, 2020 4:13 pm
by amypond1702
When i open in gamebase a game with winuae that is marked with Joystick port 2, winuae always use port 1. I must change it everytime in port 2.

Btw i use an ipega Bluetooth joystick.

With the c64 gamebase i solve the Problem with gemus using "use realjoysticks=1"

Re: Joystick not the right one

Posted: Sun Oct 25, 2020 12:50 pm
by .mad.
The Joystick settings are not scripted for every possible option.
They also require the CORRECT scripted setting in the gamebase control tab.

if the game is for 2 players using 2 joysticks.
change control to Joystick Port#1
custom GEMUS setting to swap player 1 port.

port1=joy1
port2=joy2

default is always
Mouse port#1 (named "joy0" in winuae)
Joystick port#2 (named "joy1" in winuae)


the joyport numbers and names change with every USB joypad inserted in the PC.
so if you have 2 joypad attached it maybe using the other one.
also try changing "djoy" (digital) to "default" in script.

Code: Select all

;-----------------------------------------------------------------------
; Joystick Settings
; Plug a USB Joystick into your PC or nothing will be configured.
;-----------------------------------------------------------------------

If Control = JoyPort2
; Default - Mouse in Port#1
Set_CFG_Value(%dbpath%\Scripts\GameBase Amiga.uae||joyport0||mouse)
Set_CFG_Value(%dbpath%\Scripts\GameBase Amiga.uae||joyport0autofire||none)
Set_CFG_Value(%dbpath%\Scripts\GameBase Amiga.uae||joyport0mode||mousenowheel)
Set_CFG_Value(%dbpath%\Scripts\GameBase Amiga.uae||joyportfriendlyname0||Windows mouse)
Set_CFG_Value(%dbpath%\Scripts\GameBase Amiga.uae||joyportname0||WINMOUSE1)

; Default - Use USB Joystick in Port#2
Set_CFG_Value(%dbpath%\Scripts\GameBase Amiga.uae||joyport1||joy0)
Set_CFG_Value(%dbpath%\Scripts\GameBase Amiga.uae||joyport1mode||djoy)
Set_CFG_Value(%dbpath%\Scripts\GameBase Amiga.uae||joyport1autofire||none)
Set_CFG_Value(%dbpath%\Scripts\GameBase Amiga.uae||joyportfriendlyname1||)
Set_CFG_Value(%dbpath%\Scripts\GameBase Amiga.uae||joyportname1||)
;Same as this
;Set_CFG_Value(%dbpath%\Scripts\GameBase Amiga.uae||joyportfriendlyname1||SPEED-LINK Competition Pro)
;Set_CFG_Value(%dbpath%\Scripts\GameBase Amiga.uae||joyportname1||6533040B-0000-0000-0000504944564944 F112B8C0-AE20-11E4-8001444553540000)


;*****************************************************************
ElseIf Control = JoyPort1
Set_CFG_Value(%dbpath%\Scripts\GameBase Amiga.uae||joyport0||joy0)
Set_CFG_Value(%dbpath%\Scripts\GameBase Amiga.uae||joyport0autofire||none)
Set_CFG_Value(%dbpath%\Scripts\GameBase Amiga.uae||joyport0mode||djoy)
Set_CFG_Value(%dbpath%\Scripts\GameBase Amiga.uae||joyportfriendlyname0||)
Set_CFG_Value(%dbpath%\Scripts\GameBase Amiga.uae||joyportname0||)

Set_CFG_Value(%dbpath%\Scripts\GameBase Amiga.uae||joyport1||joy1)
Set_CFG_Value(%dbpath%\Scripts\GameBase Amiga.uae||joyport1autofire||none)
Set_CFG_Value(%dbpath%\Scripts\GameBase Amiga.uae||joyport1mode||djoy)
Set_CFG_Value(%dbpath%\Scripts\GameBase Amiga.uae||joyportfriendlyname1||)
Set_CFG_Value(%dbpath%\Scripts\GameBase Amiga.uae||joyportname1||)
;*****************************************************************

ElseIf Control = Keyboard
;Game uses most keys, CURSOR and NUMPAD, so remove any keymap which will conflict with Amiga keyboard.
; Best option for Pinball - (Original keys can be used for flippers CTRL,ALT, SHIFT, CURSOR)
; Default - Mouse in Port#1
Set_CFG_Value(%dbpath%\Scripts\GameBase Amiga.uae||joyport0||mouse)
Set_CFG_Value(%dbpath%\Scripts\GameBase Amiga.uae||joyport0autofire||none)
Set_CFG_Value(%dbpath%\Scripts\GameBase Amiga.uae||joyport0mode||mousenowheel)
Set_CFG_Value(%dbpath%\Scripts\GameBase Amiga.uae||joyportfriendlyname0||Windows mouse)
Set_CFG_Value(%dbpath%\Scripts\GameBase Amiga.uae||joyportname0||WINMOUSE1)

; select USB Joypad - if no USB Pad is attachd to PC, none is selected (no control - buy a Joystick!).
Set_CFG_Value(%dbpath%\Scripts\GameBase Amiga.uae||joyport1||joy0)
Set_CFG_Value(%dbpath%\Scripts\GameBase Amiga.uae||joyport1mode||djoy)
Set_CFG_Value(%dbpath%\Scripts\GameBase Amiga.uae||joyport1autofire||none)
Set_CFG_Value(%dbpath%\Scripts\GameBase Amiga.uae||joyportfriendlyname1||)
Set_CFG_Value(%dbpath%\Scripts\GameBase Amiga.uae||joyportname1||)

ElseIf Control = Mouse
; Default - Mouse in Port#1
Set_CFG_Value(%dbpath%\Scripts\GameBase Amiga.uae||joyport0||mouse)
Set_CFG_Value(%dbpath%\Scripts\GameBase Amiga.uae||joyport0autofire||none)
Set_CFG_Value(%dbpath%\Scripts\GameBase Amiga.uae||joyport0mode||mousenowheel)
Set_CFG_Value(%dbpath%\Scripts\GameBase Amiga.uae||joyportfriendlyname0||Windows mouse)
Set_CFG_Value(%dbpath%\Scripts\GameBase Amiga.uae||joyportname0||WINMOUSE1)

; Default - Use USB Joystick in Port#2
Set_CFG_Value(%dbpath%\Scripts\GameBase Amiga.uae||joyport1||joy0)
Set_CFG_Value(%dbpath%\Scripts\GameBase Amiga.uae||joyport1mode||djoy)
Set_CFG_Value(%dbpath%\Scripts\GameBase Amiga.uae||joyport1autofire||none)
Set_CFG_Value(%dbpath%\Scripts\GameBase Amiga.uae||joyportfriendlyname1||)
Set_CFG_Value(%dbpath%\Scripts\GameBase Amiga.uae||joyportname1||)

ElseIf Control = LightGun
Show_Message(This game requires a LightGun, control is not yet emulated.)
; Default - Mouse in Port#1
Set_CFG_Value(%dbpath%\Scripts\GameBase Amiga.uae||joyport0||mouse)
Set_CFG_Value(%dbpath%\Scripts\GameBase Amiga.uae||joyport0autofire||none)
Set_CFG_Value(%dbpath%\Scripts\GameBase Amiga.uae||joyport0mode||mousenowheel)
Set_CFG_Value(%dbpath%\Scripts\GameBase Amiga.uae||joyportfriendlyname0||Windows mouse)
Set_CFG_Value(%dbpath%\Scripts\GameBase Amiga.uae||joyportname0||WINMOUSE1)

; Default - Use USB Joystick in Port#2
Set_CFG_Value(%dbpath%\Scripts\GameBase Amiga.uae||joyport1||joy0)
Set_CFG_Value(%dbpath%\Scripts\GameBase Amiga.uae||joyport1mode||lightpen)
Set_CFG_Value(%dbpath%\Scripts\GameBase Amiga.uae||joyport1autofire||none)
Set_CFG_Value(%dbpath%\Scripts\GameBase Amiga.uae||joyportfriendlyname1||)
Set_CFG_Value(%dbpath%\Scripts\GameBase Amiga.uae||joyportname1||)
End If

;---------------------------------------------
;Remove USB Joysticks if keymap stops working
;Goes without saying. Do not map 2 ports the same.
;--------------------------------------------------
If key_port1 CONTAINS(keya)
Set_CFG_Value(%dbpath%\Scripts\GameBase Amiga.uae||joyport0||kbd1)
Set_CFG_Value(%dbpath%\Scripts\GameBase Amiga.uae||joyport0autofire||none)
Set_CFG_Value(%dbpath%\Scripts\GameBase Amiga.uae||joyport0mode||)
Set_CFG_Value(%dbpath%\Scripts\GameBase Amiga.uae||joyportfriendlyname0||)
Set_CFG_Value(%dbpath%\Scripts\GameBase Amiga.uae||joyportname0||)

ElseIf key_port1 CONTAINS(keyb)
Set_CFG_Value(%dbpath%\Scripts\GameBase Amiga.uae||joyport0||kbd2)
Set_CFG_Value(%dbpath%\Scripts\GameBase Amiga.uae||joyport0autofire||none)
Set_CFG_Value(%dbpath%\Scripts\GameBase Amiga.uae||joyport0mode||)
Set_CFG_Value(%dbpath%\Scripts\GameBase Amiga.uae||joyportfriendlyname0||)
Set_CFG_Value(%dbpath%\Scripts\GameBase Amiga.uae||joyportname0||)

ElseIf key_port1 CONTAINS(keyc)
Set_CFG_Value(%dbpath%\Scripts\GameBase Amiga.uae||joyport0||kbd3)
Set_CFG_Value(%dbpath%\Scripts\GameBase Amiga.uae||joyport0autofire||none)
Set_CFG_Value(%dbpath%\Scripts\GameBase Amiga.uae||joyport0mode||)
Set_CFG_Value(%dbpath%\Scripts\GameBase Amiga.uae||joyportfriendlyname0||)
Set_CFG_Value(%dbpath%\Scripts\GameBase Amiga.uae||joyportname0||)

ElseIf key_port1 CONTAINS(joy1)
Set_CFG_Value(%dbpath%\Scripts\GameBase Amiga.uae||joyport0||joy0)
Set_CFG_Value(%dbpath%\Scripts\GameBase Amiga.uae||joyport0autofire||none)
;change "djoy" to nothing for DEFAULT setting in port#1
Set_CFG_Value(%dbpath%\Scripts\GameBase Amiga.uae||joyport0mode||djoy)
Set_CFG_Value(%dbpath%\Scripts\GameBase Amiga.uae||joyportfriendlyname0||)
Set_CFG_Value(%dbpath%\Scripts\GameBase Amiga.uae||joyportname0||)
End If

If key_port2 CONTAINS(keya)
Set_CFG_Value(%dbpath%\Scripts\GameBase Amiga.uae||joyport1||kbd1)
Set_CFG_Value(%dbpath%\Scripts\GameBase Amiga.uae||joyport1autofire||none)
Set_CFG_Value(%dbpath%\Scripts\GameBase Amiga.uae||joyport1mode||)
Set_CFG_Value(%dbpath%\Scripts\GameBase Amiga.uae||joyportfriendlyname1||)
Set_CFG_Value(%dbpath%\Scripts\GameBase Amiga.uae||joyportname1||)

ElseIf key_port2 CONTAINS(keyb)
Set_CFG_Value(%dbpath%\Scripts\GameBase Amiga.uae||joyport1||kbd2)
Set_CFG_Value(%dbpath%\Scripts\GameBase Amiga.uae||joyport1autofire||none)
Set_CFG_Value(%dbpath%\Scripts\GameBase Amiga.uae||joyport1mode||)
Set_CFG_Value(%dbpath%\Scripts\GameBase Amiga.uae||joyportfriendlyname1||)
Set_CFG_Value(%dbpath%\Scripts\GameBase Amiga.uae||joyportname1||)

ElseIf key_port2 CONTAINS(keyc)
Set_CFG_Value(%dbpath%\Scripts\GameBase Amiga.uae||joyport1||kbd3)
Set_CFG_Value(%dbpath%\Scripts\GameBase Amiga.uae||joyport1autofire||none)
Set_CFG_Value(%dbpath%\Scripts\GameBase Amiga.uae||joyport1mode||)
Set_CFG_Value(%dbpath%\Scripts\GameBase Amiga.uae||joyportfriendlyname1||)
Set_CFG_Value(%dbpath%\Scripts\GameBase Amiga.uae||joyportname1||)

ElseIf key_port2 CONTAINS(joy2)
Set_CFG_Value(%dbpath%\Scripts\GameBase Amiga.uae||joyport1||joy1)
Set_CFG_Value(%dbpath%\Scripts\GameBase Amiga.uae||joyport1autofire||none)
Set_CFG_Value(%dbpath%\Scripts\GameBase Amiga.uae||joyport1mode||djoy)
Set_CFG_Value(%dbpath%\Scripts\GameBase Amiga.uae||joyportfriendlyname1||)
Set_CFG_Value(%dbpath%\Scripts\GameBase Amiga.uae||joyportname1||)
End If

Re: Joystick not the right one

Posted: Tue Oct 27, 2020 1:02 pm
by amypond1702
I tried to open winuae during starting a game with f12 and change the Joystick settings.
Then save the config in the gamebase amiga dir.
For the moment it works. The games i tested are now playable with port 2.

I think most of the amiga games were played in port 2 joystick because port 1 was the mouse...