MiST - new joystick/gamepad mapping

https://github.com/mist-devel/mist-board/wiki

Moderators: Mug UK, Zorro 2, spiny, Greenious, Moderator Team

Televicious
Atariator
Atariator
Posts: 25
Joined: Sun Sep 24, 2017 6:18 pm

Re: MiST - new joystick/gamepad mapping

Postby Televicious » Wed Oct 24, 2018 12:24 am

Boy I'm Stuck. I have some INNEXT SNES style controllers. I have everything mapped except the X and Y buttons. Y duplicates whatever B is set to or maybe vice versa, and X does nothing. L and R map just fine though. Joystick test OSD says it's a Retrolink NES controller. Any ideas?

[mist]
led_animation=1
scandoubler_disable=0
ypbpr=0
keep_video_mode=0
reset_combo=0
keyrah_mode=0
mouse_boot_mode=0
joystick_ignore_hat=0
joystick_remap=0079,0011,1,2,4,8,10,20,40,80,400,800,100,200

Also, it makes no sense that it's working this way. Windows maps my buttons as 1-Y, 2-A, 3-B, 4-X, 5-L, 6-R, 7-0, 8-0, 9-Sel, 10-Start

DanyPPC
Captain Atari
Captain Atari
Posts: 437
Joined: Tue Feb 21, 2017 7:02 am

Re: MiST - new joystick/gamepad mapping

Postby DanyPPC » Wed Oct 24, 2018 7:11 am

Mine, a USB snes style gamepad is configured in the following manner:

joystick_remap=0810,E501,1,2,4,8,8,10,20,10,400,800,0,0,40,80

The X button replicates UP for C64/Amiga platform games where there isn't an option to jump with a button.
A and Y are the same button 1.

This is a standard config for me for most cores which support 2 button pad like nes, coleco, Amiga, MSX, PCe, Amstrad CPC and many others.

For Sega Megadrive i have changed the ini so i can use all 6 buttons for those games which support 6 button sega controller:

[genesis]
joystick_remap=0810,E501,1,2,4,8,200,40,20,10,100,400,0,0,40,80

Televicious
Atariator
Atariator
Posts: 25
Joined: Sun Sep 24, 2017 6:18 pm

Re: MiST - new joystick/gamepad mapping

Postby Televicious » Wed Oct 24, 2018 5:07 pm

It's detected as retrolink NES and X button doesn't register, Y and B are same button. I think the controller shares the same VID PID as retrolink NES, but it's a revised version with more buttons and MiST won't recognize the buttons as separate. Gravis Gamepad pro assigns all buttons except start and select, though it recognizes the button presses in the OSD test.

Televicious
Atariator
Atariator
Posts: 25
Joined: Sun Sep 24, 2017 6:18 pm

Re: MiST - new joystick/gamepad mapping

Postby Televicious » Wed Oct 31, 2018 12:39 am

So Genesis/MegaDrive Controllers don't support more than 2 buttons either. I kinda suspected as much. Is it possible to add support for them? It makes sense with the DB9 ports and the genesis core. I know they're digital signal instead of analog. It'd be nice if the controller OSD you could select the type of controller in use, like Atari/Amiga/Genesis. Or for USB like 2 button,4 button, 6 button, 8 button and map them inside the OSD. The core select OSD probably has all sorts of room to make configuration menu's. Just some thoughts and questions. Is anyone planning on expanding these already or is it not possible?

DanyPPC
Captain Atari
Captain Atari
Posts: 437
Joined: Tue Feb 21, 2017 7:02 am

Re: MiST - new joystick/gamepad mapping

Postby DanyPPC » Wed Oct 31, 2018 7:36 am

MiST DB9 ports are like Amiga ones, you cannot use MegaDrive pads without a converter.
At most you could connect a Joypad CD32, but not being supported by the Core of Genesis you could not use it anyway.
Only the Red and Blue button may work.

Televicious
Atariator
Atariator
Posts: 25
Joined: Sun Sep 24, 2017 6:18 pm

Re: MiST - new joystick/gamepad mapping

Postby Televicious » Wed Oct 31, 2018 9:31 am

If it's like the Amiga port then why can't you use a paddle, mouse, or light gun? If it's in the firmware/core it seems like a micro controller could be configured. Using USB even it seems to deem select as a C button and a lot of times buttons don't even map or read. Looking at how the minimig core works it says the DE9 goes straight to the FPGA, so why couldn't that replicate the controller input for a megadrive as well? I wouldn't think that as the most complicated component to replicate.

Aside from the DE9 ports being so futile, there is an issue with the usb VIN PIN recognition as well since many revisions use the same VIN PIN numbers as early models. Then the gravis gamepad I have no idea why, but two of the buttons on that even though they have recognizable presses in the OSD test they are unmappable. It has a terrible d-pad anyhow, but it at least recognized all the individual button presses, but still it can't be mapped.

I just have endless controller issues. It's like only a handful of controllers are actually compatible with this. Atari/Amiga style up to 2 buttons which is fine for older systems and an iBuffalo for usb. I have 8 controllers that are USB or DE9 and are useless for this. If I actually want to use it as intended I have to get 2 more very specific 20-50 dollar controllers, definitely not their revised versions though. At this point I wouldn't risk getting anything else. 2 types of controller ports and yet I have to get more controllers to try and work with this thing. 2 very ugly snes looking turbo switch ibuffalo controllers.

It's very a disenchanting controller situation. Makes me look at raspberry pi's like, that's fine.

DanyPPC
Captain Atari
Captain Atari
Posts: 437
Joined: Tue Feb 21, 2017 7:02 am

Re: MiST - new joystick/gamepad mapping

Postby DanyPPC » Wed Oct 31, 2018 10:02 am

Anyway you can connect and use a standard DB9 Mouse on MiST, you have to set it on mist.ini:

joystick0_prefer_db9
If set to 1, it disables joystick0 reordering. Default value is 0. Joystick reordering is used when one or more USB joystick devices are detected, and it moves any DB9 - connected devices to joystick numbers 3, 4, etc. When this setting is enabled, it allows use of a real Amiga DB9 mouse even if USB devices are present.

User avatar
fury23
Atari User
Atari User
Posts: 38
Joined: Sun Jan 10, 2016 2:08 pm

Re: MiST - new joystick/gamepad mapping

Postby fury23 » Sun Nov 04, 2018 11:36 am

I created small utility for Windows which helps me to map joystick buttons.

Image

Repository: https://github.com/loborec/mist_usb_joystick_mapper
Direct link to file: https://github.com/loborec/mist_usb_joystick_mapper/raw/master/mapper.exe

User avatar
vebxenon
Atari Super Hero
Atari Super Hero
Posts: 626
Joined: Fri Apr 24, 2015 12:10 pm

Re: MiST - new joystick/gamepad mapping

Postby vebxenon » Sun Nov 04, 2018 12:44 pm

fury23 wrote:I created small utility for Windows which helps me to map joystick buttons.

Image

Repository: https://github.com/loborec/mist_usb_joystick_mapper
Direct link to file: https://github.com/loborec/mist_usb_joystick_mapper/raw/master/mapper.exe


Outstading :D Thanks very very much! :cheers:
Just a computer and videogame lover :)

- Atari Jr 2600 clone
- Atari 7800 Peritel
- Atari XEGS
- Atari Lynx II
- Atari Jaguar
- MiST Board

DanyPPC
Captain Atari
Captain Atari
Posts: 437
Joined: Tue Feb 21, 2017 7:02 am

Re: MiST - new joystick/gamepad mapping

Postby DanyPPC » Sun Nov 04, 2018 2:01 pm

Excellent Fury23 :cheers:

User avatar
fury23
Atari User
Atari User
Posts: 38
Joined: Sun Jan 10, 2016 2:08 pm

Re: MiST - new joystick/gamepad mapping

Postby fury23 » Mon Nov 05, 2018 5:30 pm

vebxenon wrote:Outstading :D Thanks very very much! :cheers:

DanyPPC wrote:Excellent Fury23 :cheers:

My pleasure :cheers:

aleberhardt
Atarian
Atarian
Posts: 3
Joined: Sat Oct 20, 2018 7:54 am
Contact:

Re: MiST - new joystick/gamepad mapping

Postby aleberhardt » Sun Nov 11, 2018 6:46 am

fury23 wrote:I created small utility for Windows which helps me to map joystick buttons.

Image

Repository: https://github.com/loborec/mist_usb_joystick_mapper
Direct link to file: https://github.com/loborec/mist_usb_joystick_mapper/raw/master/mapper.exe


Thank you! At last I can configure buttons for Genesis the way I like.
Mist also needs the same builtin configuration options Mister has, where you can configure buttons from the menu.

Televicious
Atariator
Atariator
Posts: 25
Joined: Sun Sep 24, 2017 6:18 pm

Re: MiST - new joystick/gamepad mapping

Postby Televicious » Sun Nov 25, 2018 1:30 am

fury23 wrote:I created small utility for Windows which helps me to map joystick buttons.

Image

Repository: https://github.com/loborec/mist_usb_joystick_mapper
Direct link to file: https://github.com/loborec/mist_usb_joystick_mapper/raw/master/mapper.exe



Thought it was going to solve my problems because when I first ran it all the buttons were recognized. So put it in the .ini after config and then MiST OSD was doing the same thing and calling the controller an NES retrolink and not recognizing buttons instead doubling up buttons to single presses. Went to go check the configuration again, but it only recognizes the D-pad when I start it up now.

Restarted my computer and tried different usb ports and still just the D-pad. Using windows controller setup as a reference set buttons on another usb controller I have through the program anyhow and it came up with the same mapping I had made where the start and select buttons don't work. I don't know why a gamepad pro would be incompatible as a usb controller for the MiST.

Is there a way to keep the MiST firmware from "recognizing" predefined VID/PID's? I feel like that is what's happening with the SNES controllers I have since they are not retrolink NES controllers like the MiST reports, but the PID/VID values are the same. I'm hoping there's a fix for these because INNEXT makes like 70% of the SNES style controllers out there including the wireless ones so I'm kinda at a loss on controller hunting. Was thinking of maybe getting the Saturn style usb ones, but these INNEXT ones should work.

desUBIKado
Atari maniac
Atari maniac
Posts: 78
Joined: Sat Jan 06, 2018 11:49 pm

Re: MiST - new joystick/gamepad mapping

Postby desUBIKado » Thu Nov 29, 2018 7:27 pm

Televicious wrote:It's detected as retrolink NES and X button doesn't register, Y and B are same button. I think the controller shares the same VID PID as retrolink NES, but it's a revised version with more buttons and MiST won't recognize the buttons as separate. Gravis Gamepad pro assigns all buttons except start and select, though it recognizes the button presses in the OSD test.


Televicious wrote:Boy I'm Stuck. I have some INNEXT SNES style controllers. I have everything mapped except the X and Y buttons. Y duplicates whatever B is set to or maybe vice versa, and X does nothing. L and R map just fine though. Joystick test OSD says it's a Retrolink NES controller. Any ideas?


I have bought a Hyperkin GN6 USB (Genesis style)

Hyperkin-GN6-USB.jpg


Its identification is VID:0079 PID:0011 and MiST print "Retrolink NES"

On linux maps my buttons as A=1, B=2, C=3, X=4, Y=5, Z=6, MODE=9, Start=10

On MiST maps my buttons as A=B, B=A, C=B, X= don't work, Y=X, Z=Y, MODE= Sel & L2, Start= Start & R2
You do not have the required permissions to view the files attached to this post.
Last edited by desUBIKado on Sat Dec 01, 2018 5:37 pm, edited 1 time in total.

Televicious
Atariator
Atariator
Posts: 25
Joined: Sun Sep 24, 2017 6:18 pm

Re: MiST - new joystick/gamepad mapping

Postby Televicious » Sat Dec 01, 2018 12:38 am

I went an got a Sega Saturn to usb adapter since I have saturn controllers laying around and the ones i've gotten so far don't work, and the program worked with it. recognized all the buttons, put the config:
joystick_remap=0E8F,3010,1,2,4,8,10,20,40,100,200,400,1000,800,0,80

into the ini, that 10th button there is the start button assigned to 80 (start) in the OSD test is the only button not recognized, much like my gamepad pro usb.
OSD recognizes the button press, I moved the 80 around to different placeholders from the 0 before to two spots after. The button just can't be assigned to start.

What am I doing wrong?

User avatar
Newsdee
Atari God
Atari God
Posts: 1215
Joined: Fri Sep 19, 2014 8:40 am

Re: MiST - new joystick/gamepad mapping

Postby Newsdee » Sat Dec 01, 2018 7:12 am

When the gamepad is recognized as something (e.g. retrolink NES) it means that the VID/PID are being recognized from the list of known controllers by the firmware: https://github.com/mist-devel/mist-firm ... ymapping.c

VID is supposed to be a Vendor ID, and PID the Product ID, and in theory every controller is different. But it looks like the internals were reused in a bunch of places and we ended up with 3/4 controllers with the same VID/PID.

One solution would be to comment out / remove the mapping of the NES retrolink adapter; or to maybe try to find a configration that works for both controllers. In any case it needs a simple recompilation of the firmware. I no longer have my toolchain handy for it, but I can point out what to do if somebody gets it to compile.

slingshot
Captain Atari
Captain Atari
Posts: 325
Joined: Mon Aug 06, 2018 3:05 pm

Re: MiST - new joystick/gamepad mapping

Postby slingshot » Sat Dec 01, 2018 10:02 am

But as I see, mist.ini can override the built-in mappings.

slingshot
Captain Atari
Captain Atari
Posts: 325
Joined: Mon Aug 06, 2018 3:05 pm

Re: MiST - new joystick/gamepad mapping

Postby slingshot » Sat Dec 01, 2018 10:08 am

Televicious wrote:
What am I doing wrong?


Trying with the Genesis core?

desUBIKado
Atari maniac
Atari maniac
Posts: 78
Joined: Sat Jan 06, 2018 11:49 pm

Re: MiST - new joystick/gamepad mapping

Postby desUBIKado » Sat Dec 01, 2018 5:47 pm

slingshot wrote:But as I see, mist.ini can override the built-in mappings.


With my new Hyperkin GN6 USB (Genesis style) this occurs:

On linux maps my buttons as A=1, B=2, C=3, X=4, Y=5, Z=6, MODE=9, Start=10

On MiST maps my buttons as A=B, B=A, C=B, X= don't work, Y=X, Z=Y, MODE= Sel & L2, Start= Start & R2

How can I fix in mist.ini A=B & C=B (two buttons produce B output) and X= don't work ? I think that is impossible.

Televicious
Atariator
Atariator
Posts: 25
Joined: Sun Sep 24, 2017 6:18 pm

Re: MiST - new joystick/gamepad mapping

Postby Televicious » Sat Dec 01, 2018 7:08 pm

Newsdee wrote:When the gamepad is recognized as something (e.g. retrolink NES) it means that the VID/PID are being recognized from the list of known controllers by the firmware: https://github.com/mist-devel/mist-firm ... ymapping.c

VID is supposed to be a Vendor ID, and PID the Product ID, and in theory every controller is different. But it looks like the internals were reused in a bunch of places and we ended up with 3/4 controllers with the same VID/PID.

One solution would be to comment out / remove the mapping of the NES retrolink adapter; or to maybe try to find a configration that works for both controllers. In any case it needs a simple recompilation of the firmware. I no longer have my toolchain handy for it, but I can point out what to do if somebody gets it to compile.


Awesome, that makes sense, will have to give it a go. Still don't get why buttons don't map properly on other controllers, but if I can at least get the "retrolink" ones working that'll be huge.

slingshot
Captain Atari
Captain Atari
Posts: 325
Joined: Mon Aug 06, 2018 3:05 pm

Re: MiST - new joystick/gamepad mapping

Postby slingshot » Sun Dec 02, 2018 4:25 pm

desUBIKado wrote:
How can I fix in mist.ini A=B & C=B (two buttons produce B output) and X= don't work ? I think that is impossible.


I have no idea, but what if you try to restore the generic mapping? e.g.
joystick_remap=xxxx,yyyy,1,2,4,8,10,20,40,80,100,200,400,800,1000,2000,4000,8000

Televicious
Atariator
Atariator
Posts: 25
Joined: Sun Sep 24, 2017 6:18 pm

Re: MiST - new joystick/gamepad mapping

Postby Televicious » Sun Dec 02, 2018 6:17 pm

slingshot wrote:
desUBIKado wrote:
How can I fix in mist.ini A=B & C=B (two buttons produce B output) and X= don't work ? I think that is impossible.


I have no idea, but what if you try to restore the generic mapping? e.g.
joystick_remap=xxxx,yyyy,1,2,4,8,10,20,40,80,100,200,400,800,1000,2000,4000,8000


I've tried that, it still maps the first two buttons where Y and B will be the same and X will still do nothing. It's like there's a default mapping somewhere in the firmware that forces a two button controller setup on 4 button or more pads. I think all the pre configs need to be commented out since most of them were made for the 2 button setups on previous cores. Like Retrolink NES. Note that I am definitely using the latest firmware for multiple button support and it handles the extra buttons.

The controllers that certain buttons are recognized, but don't map to anything is much more strange though. That I'm guessing is another bug in the joystick firmware.

Gonna try and edit the .c file and compile it this week though when I'm free. Unless someone else gets to it first.

User avatar
Newsdee
Atari God
Atari God
Posts: 1215
Joined: Fri Sep 19, 2014 8:40 am

Re: MiST - new joystick/gamepad mapping

Postby Newsdee » Mon Dec 03, 2018 5:48 am

The idea of placing specific configs was to help support "known" gamepads without extra configuration. And many of these (e.g. NES) has less buttons than others so some mapping was added for pressing two buttons for one. This is useful for e.g. mouse emulation.

Now, unfortunately it turns out some VID/PID are duplicated among more than three devices, which means there is no way for the MiST (or any other device) to recognize it as unique. It should be enough to comment out the lines invovled; or a better option would be to put make the extra button mapping optional via e.g. flag in mist.ini.

User avatar
Newsdee
Atari God
Atari God
Posts: 1215
Joined: Fri Sep 19, 2014 8:40 am

Re: MiST - new joystick/gamepad mapping

Postby Newsdee » Mon Dec 03, 2018 5:49 am

(double post)
Last edited by Newsdee on Mon Dec 03, 2018 11:46 am, edited 2 times in total.

slingshot
Captain Atari
Captain Atari
Posts: 325
Joined: Mon Aug 06, 2018 3:05 pm

Re: MiST - new joystick/gamepad mapping

Postby slingshot » Mon Dec 03, 2018 9:50 am

Newsdee wrote:Now, unfortunately it turns out some VID/PID are duplicated among more than three devices, which means there is no way for the MiST (or any other device) to recognize it as unique. It should be enough to comment out the lines involved; or a better option would be to put make the extra button mapping optional via e.g. flag in mist.ini.


I didn't test myself, but don't understand a custom remap why doesn't override the built-in, applying joy_remap happens after the default mapping:
https://github.com/mist-devel/mist-firm ... ing.c#L312


Return to “MiST”

Who is online

Users browsing this forum: No registered users and 10 guests