Page 1 of 3
Tutorial: How to set up your MiSTer with a J-PAC/I-PAC
Posted: Thu Jun 11, 2020 4:00 am
by bdlou
Hello all. With the recent change I added to MiSTer to support the J-PAC/I-PAC, there is some confusion as to how to set things up. Hopefully this tutorial will help clarify things. Please let me know if you have any questions or comments. This should work for any USB device that follows the "MAME standard" for keyboard keys.
Note: You
CANNOT change the key mappings for Player 2. This is a limitation of the current implementation of MiSTer, as it expects each player to have a unique device. A J-PAC/I-PAC etc is treated as a single keyboard, so it is impossible to map each side separately.
Prerequisites:
- MiSTer needs to be updated to the latest using the updater script, or manually updating to MiSTer_20200608 or later.
- The VID/PID of your J-PAC/I-PAC (or similar) device
- A USB keyboard to drive the UI initially
How to determine your VID/PID
- Plug in your J-PAC/I-PAC into the DE-10 Nano
- Plug in your USB keyboard into the DE-10 Nano
- Turn on your MiSTer device
- From the initial Cores menu, using the USB keyboard, press F12 to bring up the System Settings menu
- With the USB keyboard, select "Define joystick buttons" and press Enter
- Press Right on the Player 1 joystick that is connected to your PAC device
- The "Define buttons" UI will display "Joystick ID: XXXX:YYYY" where XXXX is your VID and YYYY is your PID
- Example: Joystick ID: d209:0301
- Write those values down and shut down your MiSTer device
Update your MiSTer.ini
- Move your MicroSD card to your computer
- Open your MiSTer.ini file (or download the latest from https://github.com/MiSTer-devel/Main_Mi ... MiSTer.ini)
- If your MiSTer.ini file has the following variables already defined, please rename them:
- jammasd_vid (rename to jamma_vid)
- jammasd_pid (rename to jamma_pid)
- If your MiSTer.ini file does not have jamma_vid and jamma_pid variables, please add the following:
Code: Select all
; JammaSD/J-PAC/I-PAC keys to joysticks translation
; You have to provide correct VID and PID of your input device
; Examples: Legacy J-PAC with Mini-USB or USB capable I-PAC with PS/2 connectors VID=0xD209/PID=0x0301
; USB Capable J-PAC with only PS/2 connectors VID=0x04B4/PID=0x0101
; JammaSD: VID=0x04D8/PID=0xF3AD
jamma_vid=0x04D8
jamma_pid=0xF3AD
- Now you need to change the jamma_vid and jamma_pid values to match what the MiSTer "Define buttons" UI told you the VID/PID were for your PAC device above.
- Example:
- jamma_vid=0xD209
- jamma_pid=0x0301
- Save the changes and place the MicroSD card back in your MiSTer device
Map Player 1's keys
- Turn on your MiSTer device
- From the initial Cores menu, using the USB keyboard, press F12 to bring up the System Settings menu
- With the USB keyboard, select "Define joystick buttons" and press Enter
- Press Right on the Player 1 joystick that is connected to your PAC device
- Walk through mapping your Player 1 joystick and buttons
- For Select, I hold P1 Start and Press Left
- Press Space on the USB keyboard for any keys you do not need (such as mouse buttons)
- For the Menu 2-button combo, for now I hold P1 Start and Press Right. P1 Start + P2 Start unfortunately causes the "Define buttons" menu to go away (presses ESC), cancelling the configuration
- Map "Menu OK" and "Menu Back" buttons so you will be able to drive the MiSTer OSD
- When you have mapped and skipped all keys, you will wind up back at the System Settings menu. You should now be able to control the OSD with your P1 Joystick and Buttons
You're done! If all of the above was followed correctly, you've now mapped Player 1's keys, and Player 2's keys have been automatically mapped per the key definitions at
https://www.ultimarc.com/control-interf ... interface/.
I hope you find this useful. This has allowed me to use my J-PAC on my Capcom Impress candy cabinet unmodified using the J-PAC with kick buttons wired from the kick harness to the J-PAC B4-6 on each player.
Re: Tutorial: How to set up your MiSTer with a J-PAC/I-PAC
Posted: Tue Jun 30, 2020 6:26 pm
by Zeosstud
I found it very useful, Thanks !!
I think it might be good to note for the Joystick you plan on being Player 2
Up = R
Down = F
Left = D
Right = G
Button 1 = A
Re: Tutorial: How to set up your MiSTer with a J-PAC/I-PAC
Posted: Wed Jul 01, 2020 9:47 am
by lnielsen
This is a great help. What about the other direction where you want two HID devices for player 1? I have the Ultimarc UltraStik 360 and want to add a trackball or spinner. Each has their own VID/PID.
Re: Tutorial: How to set up your MiSTer with a J-PAC/I-PAC
Posted: Fri Jul 03, 2020 6:07 pm
by Spunkworks
I have this same issue with a JVS-PAC in a Sega Naomi cabinet, I will try your solution and see if it helps, thanks for this info!
Re: Tutorial: How to set up your MiSTer with a J-PAC/I-PAC
Posted: Mon Jul 06, 2020 9:28 pm
by Derick2k
Thank you.
Im trying to get my MiSTer working with a JVS-PAC2 by
https://irkenlabs.com/jvs-pac2/introduction
And this will definitely help, hopefully full support for the JVS-PAC2 will be implemented as this will let a lot of people get controls working with a MisTer on their JVS arcade cabinet.
Re: Tutorial: How to set up your MiSTer with a J-PAC/I-PAC
Posted: Tue Jul 07, 2020 10:03 am
by Spunkworks
Derick2k wrote: ↑Mon Jul 06, 2020 9:28 pm
Thank you.
Im trying to get my MiSTer working with a JVS-PAC2 by
https://irkenlabs.com/jvs-pac2/introduction
And this will definitely help, hopefully full support for the JV-PAC2 will be implemented as this will let a lot of people get controls working with a MisTer on their JVS arcade cabinet.
It will only partially work, I have it working on my Naomi cab but one player only, 2 players will not work at all trough JVS.
I have a JVS-PAC and flashing it with PS3 firmware made it work a little better.
This is something Sorgelig has to take a look at I guess.
It would be awesome if MiSTer would be fully working in a JVS cabinet.
Re: Tutorial: How to set up your MiSTer with a J-PAC/I-PAC
Posted: Wed Jul 08, 2020 1:44 pm
by Morfious
I am still having issues on some games and need to tweak/test a few different options. For history and scientific research purposes I have a 2015+ I-PAC2. I think some extra info from the people that have things working would be helpful. My main goal is to play Robotron with 2 joysticks as the original was intended. I have heard of this working from someone with an I-PAC2.
The 2 main firmware versions I have running on my I-PAC are 1.49 (Non Gamepad version) works well with INI hack above to get SF2 working as intended. Problems (inability to run RObotron with 2 joysticks; no way to remap player 2)
1.53 Multimode Firmware (Latest version appears to be 1.55) - I have heard that this works when you put the I-PAC into Mode 3 (Dual x-input) to show up as 2 different controllers that share the same VID / PID. This mode is activated by holding start and P1 button 3 when the unit is plugged in.
I had issues with the multimode firmware as not being recognized in the mister setup. This may be my fault as I'm still learing how the multimode firmware works.
For anyone that h as things working I would love for you to give us a detailed explanation on how and what you used to get it working.
I can confirm that CPS0/1 games, bubble bobble, pacman, donkey kong etc run as expected when using firmware 1.49 and using the INI settings listed above.
Robotron does not allow you to map both sticks to control for player 1.
I plan to try to update my unit to firmware 1.55 and try x-input mode while removing the INI settings. Hopefully this will allow for greater ability to remap controls.
I am also confused about the way mister interprets the keyboard. It would seem the easiest way to get things working is to just have the MiSTer think the I-Pac is a keyboard and map everything as needed. I am unsure if MiSTer can have 2 player controls tied to 1 keyboard. Any help, guidance, advice etc would be appreciated. I am very familiar with the I-Pac unit and reprogramming it, just not the new multimodes as it relates to MiSTer.
Re: Tutorial: How to set up your MiSTer with a J-PAC/I-PAC
Posted: Wed Jul 08, 2020 4:20 pm
by lnielsen
This goes back to my earlier post:
lnielsen wrote: ↑Wed Jul 01, 2020 9:47 am
This is a great help. What about the other direction where you want two HID devices for player 1? I have the Ultimarc UltraStik 360 and want to add a trackball or spinner. Each has their own VID/PID.
You could combine the two players on the iPAC or the UltraStik with a trackball. In both cases you have a pair of VID/PIDs you want to combine into a single player...
Re: Tutorial: How to set up your MiSTer with a J-PAC/I-PAC
Posted: Sat Jul 11, 2020 8:46 pm
by invzim
Just updated my mister to give it another go with the JVS-PAC 2, I defined the VID/PID in the mister.ini, fired it up and with an external keyboard via F12 go to the Define Joystick stuff, when I'm asked to press DPAD right, mister crashes:
Code: Select all
Input event: type=EV_KEY, code=293(0x125), value=1, jnum=1, ID:16d0:09ab:02
FileOpenEx(open) File:/media/fat/config/inputs/input_16d0_09ab_v3.map, error: No such file or directory.
FileOpenEx(open) File:/media/fat/config/input_16d0_09ab_v3.map, error: No such file or directory.
FileOpenEx(open) File:/media/fat/config/inputs/input_16d0_09ab_v3.map, error: No such file or directory.
FileOpenEx(open) File:/media/fat/config/input_16d0_09ab_v3.map, error: No such file or directory.
Input event: type=EV_KEY, code=293(0x125), value=0, jnum=1, ID:16d0:09ab:02
Segmentation fault
As I mentioned in this post,
viewtopic.php?f=25&t=94 , I think the gampad oriented input model is inherently broken.
Re: Tutorial: How to set up your MiSTer with a J-PAC/I-PAC
Posted: Sun Jul 12, 2020 5:14 am
by Zeosstud
- Mister Control Panel with Labels.png (100.1 KiB) Viewed 267594 times
I am using my Ipac-2 in straight keyboard mode, not doing anything fancy and use it almost exclusively for arcade games.. here is a labeled picture of how I have it setup. I play Robotron a lot, have had great luck. I think the key is how you setup the right joystick.
I have literally used every button on the Ipac-2, all 32.. Kinda funny
Re: Tutorial: How to set up your MiSTer with a J-PAC/I-PAC
Posted: Sun Jul 12, 2020 6:11 pm
by Morfious
Zeosstud wrote: ↑Sun Jul 12, 2020 5:14 am
I am using my Ipac-2 in straight keyboard mode, not doing anything fancy and use it almost exclusively for arcade games.. here is a labeled picture of how I have it setup. I play Robotron a lot, have had great luck. I think the key is how you setup the right joystick.
I have literally used every button on the Ipac-2, all 32.. Kinda funny
How did/do you configure the Ipac to be in straight keyboard mode? Ipac firmware used etc. Some extra info would be greatly appreciated. I keep trying options only to have some other game not work correctly.
Re: Tutorial: How to set up your MiSTer with a J-PAC/I-PAC
Posted: Mon Jul 13, 2020 12:53 am
by Zeosstud
- keyboard mode.JPG (71.15 KiB) Viewed 267573 times
with the arcade cores.. not uncommon to have to map the keys game by game.. When I say "keyboard mode", In the IPAC software I mean each button is just mapped as a key. Looks like I am using Firmware 1.32.. Have not messed with that forever..
Re: Tutorial: How to set up your MiSTer with a J-PAC/I-PAC
Posted: Fri Sep 04, 2020 8:02 am
by parski
I keep getting stuck on step 5.
Walk through mapping your Player 1 joystick and buttons
When tilting the joystick on step four takes me to the expected "assign joystick and buttons" state but the joysticks and buttons are completely unresponsive.
- kswtXJC.jpg (1.67 MiB) Viewed 267486 times
Pictured above is my left index finger tilting the left stick right.
In my
MiSTer.ini I got:
Code: Select all
; JammaSD/J-PAC/I-PAC keys to joysticks translation
; You have to provide correct VID and PID of your input device
; Examples: Legacy J-PAC with Mini-USB or USB capable I-PAC with PS/2 connectors VID=0xD209/PID=0x0301
; USB Capable J-PAC with only PS/2 connectors VID=0x04B4/PID=0x0101
; JammaSD: VID=0x04D8/PID=0xF3AD
jamma_vid=0xD209
jamma_pid=0x0450
Re: Tutorial: How to set up your MiSTer with a J-PAC/I-PAC
Posted: Fri Sep 04, 2020 1:39 pm
by Megamoose
The “tilt” prompts just apply to specific controllers (those with gyroscopes I assume) so you can skip those.
Re: Tutorial: How to set up your MiSTer with a J-PAC/I-PAC
Posted: Sun Sep 13, 2020 6:39 pm
by Krieger
FYI: MiSTer_20200907 Crash with I-PAC 4
For anyone running an Ultimarc I-PAC Four from 2005+ (before 2015) when you set your Mister.ini to use
jamma_vid=0xD209
jamma_pid=0x0301
(Which matches Windows Hardware ID USB\VID_D209&PID_0301)
Pressing the following keys causes MiSTer, at least appears to be the Linux side to crash (FPGA cores continue to run, just without input)
Whether I map it or not, even with the input dir/file deleted it crashes. Not sure why it's these keys specifically, but pressing the arcade control or the pass-through keyboard gets me a hung mister menu/no input in another core. A quick reboot (pressing the h/w IO board reset or power cycle restores it).
Crash Keys in I-PAC mode:
H
R
U
[
]
;
M
.
Pgup
Numpad 3 8 * -
Not sure if this is my I-PAC 4, same crash on 3 different MiSTer boards, however it works fine in Windows 10/7/XP with MAME and other emulators.
At minimum I hope this helps somebody else who might run into this with an older Arcade Cab w/I-PAC 4.
Re: Tutorial: How to set up your MiSTer with a J-PAC/I-PAC
Posted: Thu Apr 08, 2021 12:50 pm
by metalfacemark
Im having a little trouble setting this up.
Ive added the config line in and amended them with my vid and pid, ive had some success, player one now controls whats happening on screen, but some of my buttons dont want to map. When i am doing the joystick setup, up/down/left/right a, c, d, f all work, b and e dont assign to anything, do i need to re-assign these maybe in windows? All buttons work fine on x-input. (and register as keys in windows)
Any ideas?
The buttons work fine when im on my pc.
I can get it working with xinput - but obviously i only get one player controls with this.
Re: Tutorial: How to set up your MiSTer with a J-PAC/I-PAC
Posted: Wed May 05, 2021 8:31 pm
by Escape-To-88
I've having issues with this - solely the menu key. I'm using a JPAC. As I start to define the keys all is fine, but I cannot then use the USB keyboard to skip any button inputs and it gives me no option to define a menu key.
Edit. Sorted now.
Re: Tutorial: How to set up your MiSTer with a J-PAC/I-PAC
Posted: Fri Jun 18, 2021 6:06 pm
by KULLRAITH
Please can you explain how you sorted the problem?, i have the same in my arcade, can't skip any input with jammasd.
Thanks.
Escape-To-88 wrote: ↑Wed May 05, 2021 8:31 pm
I've having issues with this - solely the menu key. I'm using a JPAC. As I start to define the keys all is fine, but I cannot then use the USB keyboard to skip any button inputs and it gives me no option to define a menu key.
Edit. Sorted now.
Re: Tutorial: How to set up your MiSTer with a J-PAC/I-PAC
Posted: Fri Jun 18, 2021 8:56 pm
by mr_mr_mr
I had the same problem with not being able to skip any keys with JPAC, but it went away doing one or both of following (don't remember exactly):
1) Restart Mister
2) When going to define keys I didn't use the USB keyboard to enter the menu but instead I used the DualShock 4 gamepad I had configured earlier
With those the User/Space to skip reappeared and then I was able to use the USB keyboard connected to press Space. I must say that I am very happy now with the arcade cabinet setup.
Re: Tutorial: How to set up your MiSTer with a J-PAC/I-PAC
Posted: Fri Jul 16, 2021 2:49 pm
by jitu757
I was able to map player 1 successfully but player 2 doesn't work. I know the connectors work because when I hook up the jamma harness to a cps2 board, everything works. Any suggestions?
Re: Tutorial: How to set up your MiSTer with a J-PAC/I-PAC
Posted: Sat Jul 31, 2021 11:02 pm
by Takosuke
For people having issues with the nd players buttons with a JVSpac2 I finally made it work for 2 players:
https://github.com/MiSTer-devel/NeoGeo_ ... issues/135
Note though that MiSTer is using the outdated keyboard mapping for mame where p2 button 5 is using the key "i' instead of "e", so it might created some issues when defaulting to p2 buttons in some cores.
Re: Tutorial: How to set up your MiSTer with a J-PAC/I-PAC
Posted: Sun Nov 07, 2021 9:45 pm
by Robgus
I’m going to reveal my ignorance here, but anyway…
Is there any benefit with having the ipac in gamepad mode rather than keyboard mode?
And, is it possible, when in keyboard mode, to activate lets say right + start equals F12?
Thanks!
Re: Tutorial: How to set up your MiSTer with a J-PAC/I-PAC
Posted: Sun Nov 07, 2021 10:33 pm
by caad
I simply used the JPAC software to make 1p start + up emit F12. Works nicely. In general I'm happy with keyboard mode except that 2p controls don't work in all cores for some reason. I never got the jamma_vid/pid feature in MiSTer to work so I'm stuck like this right now.
Re: Tutorial: How to set up your MiSTer with a J-PAC/I-PAC
Posted: Mon Nov 08, 2021 7:16 am
by Robgus
caad wrote: ↑Sun Nov 07, 2021 10:33 pm
I simply used the JPAC software to make 1p start + up emit F12. Works nicely. In general I'm happy with keyboard mode except that 2p controls don't work in all cores for some reason. I never got the jamma_vid/pid feature in MiSTer to work so I'm stuck like this right now.
Thanks! I have never had any problems so far with the games I'm playing, so I'll just let it be in keyboard mode.
When you mention the JPAC software, is that something you manage under the general tab?
Re: Tutorial: How to set up your MiSTer with a J-PAC/I-PAC
Posted: Mon Nov 08, 2021 7:25 am
by caad
I don't recall exactly but it was just in the normal button mapping UI. You want to change the "shifted" output for the joystick direction (up or right, whichever you pick), since with the JPAC, "shifted" means you're holding down 1p start.
Might want to look at the other shifted outputs as well, since by default the outputs for start + buttons 1-6 are different keys. I just set them so they output the normal keys even when shifted.
Re: Tutorial: How to set up your MiSTer with a J-PAC/I-PAC
Posted: Mon Nov 08, 2021 3:05 pm
by Robgus
caad wrote: ↑Mon Nov 08, 2021 7:25 am
I don't recall exactly but it was just in the normal button mapping UI. You want to change the "shifted" output for the joystick direction (up or right, whichever you pick), since with the JPAC, "shifted" means you're holding down 1p start.
Might want to look at the other shifted outputs as well, since by default the outputs for start + buttons 1-6 are different keys. I just set them so they output the normal keys even when shifted.
Thanks, that did the trick! I'll just let it be in keyboard mode for the time being. All the best!
Re: Tutorial: How to set up your MiSTer with a J-PAC/I-PAC
Posted: Tue Dec 07, 2021 8:19 pm
by thorr
Does anyone know if the above will work with an Arduino if you set the jamma_vid/pid to the Arduino's values? I want to set up an arcade control panel with two joysticks using keyboard keys for two players with one Arduino device instead of an IPAC-2. Will this work, or do I need an IPAC-2? Thanks!
Re: Tutorial: How to set up your MiSTer with a J-PAC/I-PAC
Posted: Tue Dec 07, 2021 10:03 pm
by caad
If you have your Arduino emulating a keyboard (like the IPAC/JPAC does default), you don't need those settings.
Re: Tutorial: How to set up your MiSTer with a J-PAC/I-PAC
Posted: Tue Dec 07, 2021 10:28 pm
by thorr
caad wrote: ↑Tue Dec 07, 2021 10:03 pm
If you have your Arduino emulating a keyboard (like the IPAC/JPAC does default), you don't need those settings.
I thought they were needed in order to get it to work with two players using the mame keyboard mappings. Are you saying the keyboard mame mappings will just work with both players without those settings? Or, I could just use a keyboard and the mame keys just work? Usually, the MiSTer only supports one player per device and this is a way around that. Thanks.
Edit: I got home and tried just using the keyboard and it works in arcade cores for two players! I wish I knew this all along. It also allows me to map everything to the same keys so I can play Super Smash TV in the SNES core with the same sets of keys.
Is there a way to get two players to work with the keyboard in non-Arcade cores? I figured out pressing Numlock changes the keyboard between player 1 and player 2, but uses the same keys so both players can't play a the same time with the keyboard.
Re: Tutorial: How to set up your MiSTer with a J-PAC/I-PAC
Posted: Wed Dec 08, 2021 2:42 pm
by caad
Yes, I'm using a JPAC and it just works. The only thing I remapped in the JPAC software was to make 1p START + UP emit the F12 key, so that I can open the OSD.
The only other "snag" I've had is that I need to use button 3 as "menu ok". But that's far less annoying than the jamma_vid/pid thing, which never worked for me. It's apparently meant to emulate two joypads.