Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bounty: $10] implement analog RetroPad controls #399

Open
markwkidd opened this Issue Oct 15, 2018 · 100 comments

Comments

Projects
None yet
5 participants
@markwkidd
Copy link
Collaborator

markwkidd commented Oct 15, 2018

Bounty contributions make a difference - please donate at this link today to support this feature

Currently MAME 2003-Plus only supports analog controls in RetroArch by virtue of the fact that RetroArch passes on some analog input data to the core regardless of whether the core has implemented the analog interface. It is out-of-spec behavior and it also doesn't encompass the full analog functionality of libretro.

I'm creating this issue to track ideas and progress towards fully implementing the analog RetroPad interface by connecting it to the existing MAME analog input system.

I'm also creating this issue to allow a bounty to be raised if there are users interested in contributing to one.

@markwkidd markwkidd changed the title implement analog RetroPad controls [Bounty] implement analog RetroPad controls Oct 15, 2018

@markwkidd

This comment has been minimized.

Copy link
Collaborator Author

markwkidd commented Oct 15, 2018

Even though I eventually want to add some bounty money to this issue myself and promote it to people who would be interested, I'm currently focused on hyping the RetroArch integral artwork bounty so this will have to wait its turn.

@markwkidd markwkidd changed the title [Bounty] implement analog RetroPad controls [Bounty: $10] implement analog RetroPad controls Oct 15, 2018

@markwkidd

This comment has been minimized.

Copy link
Collaborator Author

markwkidd commented Oct 15, 2018

There is information from fr500/radius about the scenario of using the RetroArch input system to emulate analog inputs with digital controls here: #160

That scenario would be as opposed to how things function when using the MAME functions to convert digital input to analog input, which is already part of this core. I include this information for reference even though the main use case for adding analog input support is to pass analog input from analog controls directly to games which support analog input.

@grant2258

This comment has been minimized.

Copy link
Contributor

grant2258 commented Oct 17, 2018

Well ive updated the code on my repo in another branch to use the mame interface like it should. The only part that is missing is actually mapping it through mame ui to set the desired button. just added code to go through mame more cleanly like it should.

if you change int osd_is_joystick_axis_code(int joycode)
{
return 1;
}

to zero the analog wont work at all. What the difference I hear you ask well if you have a joystick plugged in you can use the keyboard or digital pad or analog stick to control and x/y axsis game instead of just the analog stick taking over these games and nothing else works input wise.

its a cleaner hack working through the osd interface like it should it does work as is and is better but no need to add unless someone has a snes pad with no analog that cant play outrun because analog has taken over the building

https://github.com/grant2258/mame2003-plus-libretro/tree/analog

@markwkidd

This comment has been minimized.

Copy link
Collaborator Author

markwkidd commented Oct 17, 2018

so basically what you're saying is that you want to take my $10, is that right?

lol just kidding. I'm excited you have already made more progress than I did in either of my attempts.

@grant2258

This comment has been minimized.

Copy link
Contributor

grant2258 commented Oct 18, 2018

id never take cash is just a hobby lol. On serious note now do we update the analogue inputs in the descriptors libretro side.

#define EMIT_RETROPAD_GAMEPAD(DISPLAY_IDX)
{"RetroPad" #DISPLAY_IDX " Left", ((DISPLAY_IDX - 1) * 18) + RETRO_DEVICE_ID_JOYPAD_LEFT, JOYCODE_##DISPLAY_IDX##LEFT},
{"RetroPad" #DISPLAY_IDX " Right", ((DISPLAY_IDX - 1) * 18) + RETRO_DEVICE_ID_JOYPAD_RIGHT, JOYCODE
##DISPLAY_IDX##RIGHT},
{"RetroPad" #DISPLAY_IDX " Up", ((DISPLAY_IDX - 1) * 18) + RETRO_DEVICE_ID_JOYPAD_UP, JOYCODE
##DISPLAY_IDX##UP},
{"RetroPad" #DISPLAY_IDX " Down", ((DISPLAY_IDX - 1) * 18) + RETRO_DEVICE_ID_JOYPAD_DOWN, JOYCODE
##DISPLAY_IDX##DOWN},
{"RetroPad" #DISPLAY_IDX " B", ((DISPLAY_IDX - 1) * 18) + RETRO_DEVICE_ID_JOYPAD_B, JOYCODE
##DISPLAY_IDX##RIGHT_DOWN},
{"RetroPad" #DISPLAY_IDX " Y", ((DISPLAY_IDX - 1) * 18) + RETRO_DEVICE_ID_JOYPAD_Y, JOYCODE
##DISPLAY_IDX##RIGHT_LEFT},
{"RetroPad" #DISPLAY_IDX " X", ((DISPLAY_IDX - 1) * 18) + RETRO_DEVICE_ID_JOYPAD_X, JOYCODE
##DISPLAY_IDX##RIGHT_UP},
{"RetroPad" #DISPLAY_IDX " A", ((DISPLAY_IDX - 1) * 18) + RETRO_DEVICE_ID_JOYPAD_A, JOYCODE
##DISPLAY_IDX##RIGHT_RIGHT},
{"RetroPad" #DISPLAY_IDX " B", ((DISPLAY_IDX - 1) * 18) + RETRO_DEVICE_ID_JOYPAD_B, JOYCODE
##DISPLAY_IDX##BUTTON4},
{"RetroPad" #DISPLAY_IDX " Y", ((DISPLAY_IDX - 1) * 18) + RETRO_DEVICE_ID_JOYPAD_Y, JOYCODE
##DISPLAY_IDX##BUTTON1},
{"RetroPad" #DISPLAY_IDX " X", ((DISPLAY_IDX - 1) * 18) + RETRO_DEVICE_ID_JOYPAD_X, JOYCODE
##DISPLAY_IDX##BUTTON2},
{"RetroPad" #DISPLAY_IDX " A", ((DISPLAY_IDX - 1) * 18) + RETRO_DEVICE_ID_JOYPAD_A, JOYCODE
##DISPLAY_IDX##BUTTON5},
{"RetroPad" #DISPLAY_IDX " L", ((DISPLAY_IDX - 1) * 18) + RETRO_DEVICE_ID_JOYPAD_L, JOYCODE
##DISPLAY_IDX##BUTTON7},
{"RetroPad" #DISPLAY_IDX " R", ((DISPLAY_IDX - 1) * 18) + RETRO_DEVICE_ID_JOYPAD_R, JOYCODE
##DISPLAY_IDX##BUTTON3},
{"RetroPad" #DISPLAY_IDX " L2", ((DISPLAY_IDX - 1) * 18) + RETRO_DEVICE_ID_JOYPAD_L2, JOYCODE
##DISPLAY_IDX##BUTTON8},
{"RetroPad" #DISPLAY_IDX " R2", ((DISPLAY_IDX - 1) * 18) + RETRO_DEVICE_ID_JOYPAD_R2, JOYCODE
##DISPLAY_IDX##BUTTON6},
{"RetroPad" #DISPLAY_IDX " L3", ((DISPLAY_IDX - 1) * 18) + RETRO_DEVICE_ID_JOYPAD_L3, JOYCODE
##DISPLAY_IDX##BUTTON9},
{"RetroPad" #DISPLAY_IDX " R3", ((DISPLAY_IDX - 1) * 18) + RETRO_DEVICE_ID_JOYPAD_R3, JOYCODE
##DISPLAY_IDX##BUTTON10},
{"RetroPad" #DISPLAY_IDX " Start", ((DISPLAY_IDX - 1) * 18) + RETRO_DEVICE_ID_JOYPAD_START, JOYCODE
##DISPLAY_IDX##START},
{"RetroPad" #DISPLAY_IDX " Select", ((DISPLAY_IDX - 1) * 18) + RETRO_DEVICE_ID_JOYPAD_SELECT, JOYCODE
##DISPLAY_IDX##SELECT},
{"RetroMouse" #DISPLAY_IDX " Left Click", ((DISPLAY_IDX - 1) * 18) + 16, JOYCODE_MOUSE
##DISPLAY_IDX##BUTTON1},
{"RetroMouse" #DISPLAY_IDX " Right Click", ((DISPLAY_IDX - 1) * 18) + 17, JOYCODE_MOUSE
##DISPLAY_IDX##_BUTTON2},

3 parameters are needed RETRO_DEVICE_ANALOG, RETRO_DEVICE_INDEX_ANALOG_LEFT, RETRO_DEVICE_ID_ANALOG_X

Ill look at some code see how others implement it could be just doing the descriptors differently time will tell. Is there any docs the libretro end ?

@grant2258

This comment has been minimized.

Copy link
Contributor

grant2258 commented Oct 22, 2018

oh dear ive over written my analog branch ill need to do it again lol aaaaaaaaaaaaaaaarg

@markwkidd

This comment has been minimized.

Copy link
Collaborator Author

markwkidd commented Oct 22, 2018

holy s---. dang

@grant2258

This comment has been minimized.

Copy link
Contributor

grant2258 commented Oct 22, 2018

only a few lines of code will fix it haha thisi remember the gist of it. Okie dokie is fixed going to link to it physically incase i do something stupid like this again. To test this load up after burner the mouse works, the keys work, and the joystick analog works as well as the digital pad.

grant2258@cfdb02a

@markwkidd markwkidd added the bounty label Jan 7, 2019

@grant2258

This comment has been minimized.

Copy link
Contributor

grant2258 commented Jan 17, 2019

Before you say anything I dont want the bounty place it somewhere else you feel its needed.

@Wilstorm

This comment has been minimized.

Copy link

Wilstorm commented Jan 18, 2019

@grant2258 - I tested analog and it seems to be working good. I tested Lunar Lander which works great now mapped on the left stick for turns. It's very playable and looks great with the vector support. Ironman off-road felt better to me but I couldn't tell the difference so much in Double Axle, Outrun, Road Blasters and I just flat sucked in Pole Position. What I wouldn't give to have a steering to play that one. I will be testing more tonight.

I was hoping you could explain analog for me! ;) So when I race and turn left or right and then let go of the stick it snaps back to center and the wheels snap back straight also. So this the same as quickly turning your steering wheel back to center correct?

Does analog work like a steering wheel but the short throw of a stick makes it harder to feel those turns or I am understanding it all incorrectly. Digital turning would be like turning your wheel all the way to the left or right whereas analog should be more gradual. I know you can't expect miracles on a stick but I just wanted to verify I am understanding correctly.

Also I see all the new values filled in correctly in the TAB menu is it ok to work out of the TAB menu?

I like the RP designation vs RetroPad.

I noticed the hat is mapped together with the left stick. I tried focus mode but no luck.

It's great having left stick mapping capability. Great job on the analog!

@grant2258

This comment has been minimized.

Copy link
Contributor

grant2258 commented Jan 18, 2019

The left,right,up,down moved its isint mapped by default anymore, you will need to delete your old .cfg files. Yes analog is like a variable resistor.

to answer you questions.
iron man use a dial dials dont translate well to analog its the steed you turn them. Outrun should have a major difference it probably the old mapping sorry i dint mention to delete them thought i did.

@Wilstorm

This comment has been minimized.

Copy link

Wilstorm commented Jan 18, 2019

@grant2258 - Some of that is just my crappy driving skills. ;) Is the left stick and hat mapped together? I plan to test hard drivin' and some of those that weren't playable at all until this update.

@grant2258

This comment has been minimized.

Copy link
Contributor

grant2258 commented Jan 18, 2019

no they arent mapped together the same behavior as mame078 you need map the dpad if you want to use it.

outrun the digital tries to make things better by adding values until it reaches the peak level so it not a full on turn straight away when you use the analog stick turned a little it will stay on a slight turn. It varies from game to game and dials work better with the mouse than analog and the dial does work with the mouse.

@Wilstorm

This comment has been minimized.

Copy link

Wilstorm commented Jan 18, 2019

@grant2258 - Ok I see in your screenshots the hat isn't mapped with the left stick but I swear I tried focus mode last night and they were mapping together in the TAB menu. So left stick up mapped the hat with it and focus mode didn't change it. I am updating right now but will try here again shortly.

@Wilstorm

This comment has been minimized.

Copy link

Wilstorm commented Jan 18, 2019

@grant2258 - I mean they show both "labels" in the input field but they might not be mapped together if that makes sense.

@grant2258

This comment has been minimized.

Copy link
Contributor

grant2258 commented Jan 18, 2019

@Wilstorm it will be the old mame2003-plus/cfg files that need cleared they will map it like that.

Unfortunately because we have added the lstick these files need cleared because that was the rstick offset and all files created from that default config will have the old offsets. This only happens when we do input updates that changes the offsets. I try and avoid this as much as possible. all i can do is apologize for this it was unavoidable. It just part of getting the analog support in.

To answer your question the dpad and lstick are completely separate inputs because we mapped the lstick we have another 4 buttons to play with. Lstick works with digital as well as analog(mame knows when it needs to be analog or digital from the driver input setup) ,there is also no need to set the analog to digital in retroarch controls anymore it just works as is.

I hope I didnt miss anything. The triggers arent mapped yet either just so you know. Im just making sure what we have works before complicating matters.

@Wilstorm

This comment has been minimized.

Copy link

Wilstorm commented Jan 18, 2019

@grant2258 - Ok thanks! Since we don't need to set analog to digital anymore would best practice be to leave it disabled or enabled and it will work correctly or it doesn't matter which way it's set?

@grant2258

This comment has been minimized.

Copy link
Contributor

grant2258 commented Jan 18, 2019

as far as functionality its fine analog takes a higher priority when mame sees it.

But when setting inputs its not good (visually) it will still work as analog or digital automatically,

but it will set both as the once like hotkeys do with hotkeys on the keyboard when its on.

It will function as intended you would need to add a or dpad mapping either way to use the dpad on its own i would say leave it off unless you need it.

ps if you want to test if your analog is working press f2 on outrun then go to input and press f2 again and move the lstick a digital will keep on counting up and analog will set to where you move it.

Hope ive gave you clear enough info its not my best forte explaining things

@Wilstorm

This comment has been minimized.

Copy link

Wilstorm commented Jan 18, 2019

@grant2258 - No you're explaining it fine. I just have all these thoughts floating around now with analog here! :) One last question before I start messing around more. If in the input field you see something like this LEFT OR RP1 AXIS 0 X-. In that scenario when you're using a keyboard it will use digital and when using a joystick it will use analog automatically? Basically it knows when it's digital and when it's analog, like in the example above, when there's one of each in the input field.

Thanks for the tip on Outrun I will test that for sure, very cool! :)

@grant2258

This comment has been minimized.

Copy link
Contributor

grant2258 commented Jan 18, 2019

left (keyboard) a doesnt provide any analog readings so it will control the analog digitally and work like mame used too and axis will work right.

@Wilstorm

This comment has been minimized.

Copy link

Wilstorm commented Jan 18, 2019

Ok great. So the defaults work great for both scenarios. Nice work on the analog! I will do some more testing here.

@grant2258

This comment has been minimized.

Copy link
Contributor

grant2258 commented Jan 18, 2019

yea people with a snes pad or joystick that dont have an analog will just have to map in in the default config jobs done. Good news for ipac users the keys already there by default. Dont get too bogged down details. if something not working wer cant try fix it up.

@Wilstorm

This comment has been minimized.

Copy link

Wilstorm commented Jan 18, 2019

@grant2258 - I think this is cosmetic like the old "ghost" inputs. When you assign a value with the left joystick up it shows as RP1 AXIS 1 Y- RP1 HAT Up in the TAB menu. When you assign a key with the hat it shows as RP1 HAT Up. They seem to work correctly but using the joystick pulls in the HAT value with the joystick value even though it doesn't work unless you add it again and it then it looks like this RP1 AXIS 1 Y- RP1 HAT Up or RP1 HAT Up I tried the trusty focus mode which doesn't change it either way.

@grant2258

This comment has been minimized.

Copy link
Contributor

grant2258 commented Jan 18, 2019

that because you have set analog to digital in retroarch controls. It sends both signals I explained this above probably not in a good way but i did try.

@Wilstorm

This comment has been minimized.

Copy link

Wilstorm commented Jan 18, 2019

@grant2258 - I apologize let me shut it off and try again.

Also I noticed when I enter RGUI in any game it locks up and I have to reboot (only tested two) but if the game is a vector game it doesn't seem to do that.

@grant2258

This comment has been minimized.

Copy link
Contributor

grant2258 commented Jan 19, 2019

can you guys pastebin

/opt/retropie/configs/mame-libretro/retroarch.cfg
or dependng on which folder you use
/opt/retropie/configs/arcade/retroarch.cfg

and your

less /opt/retropie/configs/all/retroarch.cfg

so i can compare them

The next thing i need you to do is.

close emulation station from the quit menu or press f4

then you need to run a rom we will use out run in this case

so what you need to do is shh in and type the following

/opt/retropie/emulators/retroarch/bin/retroarch -L /opt/retropie/libretrocores/lr-mame2003-plus/mame2003_plus_libretro.so --config /opt/retropie/configs/mame-libretro/retroarch.cfg "/home/pi/RetroPie/roms/mame-libretro/outrun.zip" -v > log.txt 2>&1

or

/opt/retropie/emulators/retroarch/bin/retroarch -L /opt/retropie/libretrocores/lr-mame2003-plus/mame2003_plus_libretro.so --config /opt/retropie/configs/mame-libretro/retroarch.cfg "/home/pi/RetroPie/roms/arcade/outrun.zip" -v > log.txt 2>&1

press you select + x or whatever you have for your rgui hotkey

when it crashes go to your screen when you closed emulation station and type killall retroarch and pastebin the log.txt as well fro there we can get a picture of whats going on

@grant2258

This comment has been minimized.

Copy link
Contributor

grant2258 commented Jan 19, 2019

@Wilstorm you just need to do it for the console unless you have installed x

@grant2258

This comment has been minimized.

Copy link
Contributor

grant2258 commented Jan 19, 2019

can you also pastebin

/opt/retropie/configs/mame-libretro/emulators.cfg

i believe this is where the video settings are stored

scrap the above edit this file remove any mention of mame2003-plus

/opt/retropie/configs/all/videomodes.cfg

and set your resolution to monitor preferred resolution resolution ( if you change this youll probably have to reboot)

if this doesnt fix it paste the above files it works fine in a clean install and this is settings we all messed with.

@grant2258

This comment has been minimized.

Copy link
Contributor

grant2258 commented Jan 19, 2019

and one last thing to test youll have to update your mame2003 bin after you do this.

cd /opt/retropie/libretrocores
sudo cp lr-mame2003-plus/mame2003_plus_libretro.so  lr-mame2003/mame2003_libretro.so

then launch mame2003 (it will launch plus now if it works here your setting are messed up somewhere)

thats plenty for you guys to test pending feedback nothing else can be done

@Wilstorm

This comment has been minimized.

Copy link

Wilstorm commented Jan 20, 2019

@grant2258 @markwkidd - I pretty much trashed my setup but I have a backup image. I ripped out the artwork, samples, backdrops, overlays, remap files, core option files, RA ROM overrides, RA core overrides, RA system overrides and core config file but left the global RA cfg intact.

I narrowed it down to the core config options file but that still took me another hour of ripping everything out one option at a time, let it lock up, reboot, rinse and repeat.

After I had narrowed/deleted all the options down to match the new default core file I created from deleting and starting a game. I thought I was incredibly unlucky and what the hell the difference is with the file that crashes. I noticed some of defaults were different so I started changing them back to the defaults to match, one at a time freezing and rebooting.

So the whole process took to many hours and was incredibly inelegant compared the other methods but here is what is causing Retroarch to lock up in non-vector games for me.

mame2003-plus_machine_timing = "enabled"

I had to change it to "disabled". At some point it sneaked into my core as enabled, the same as @UDb23. Hopefully he can confirm if his is the same issue. Anyway I think this is the culprit hopefully.

Grant thanks for the idea of going through all the options and files, that's what put me on the right track. I am so much more comfortable editing files at the command prompt I know where they all reside so that really helped.

@grant2258

This comment has been minimized.

Copy link
Contributor

grant2258 commented Jan 20, 2019

That was never an issue before it been enabled since day one(when thebally games where fixed) it just an option to disable it was added.

Ill check the code I know marks been busy with changes to make 2003 and 2003 plus compatible. Some code might have been changed a little. We have to be very careful with this code. It helps me narrow down where to look. Thanks for the feedback what very strange kmdfmanic got back to me and there is no issues on the classic that the same cpu as the classic

@Wilstorm

This comment has been minimized.

Copy link

Wilstorm commented Jan 20, 2019

@grant2258 - Ok, even in the current build it hangs RGUI so that should help troubleshooting. If you delete the core file and let it create it new on game launch it adds it as "disabled". Like UDb23 after an update it was there for me and crashing RGUI. I have an image from two or three weeks ago that doesn't have that option. I'm not even sure where in RGUI to turn it on and off so I manually edit the file.

@grant2258

This comment has been minimized.

Copy link
Contributor

grant2258 commented Jan 20, 2019

that option has been in since let me check

#510

4th of december and before that i was just enabled by default and enabled has been the default since we done the bally games something must have happened in the last few days it does help me narrow it down is appreciated!

its not hanging for me but when i enable it the setting isint sticking something is going on with the options or just this setting itself

@UDb23

This comment has been minimized.

Copy link
Contributor

UDb23 commented Jan 20, 2019

@Wilstorm @grant2258 Just checkd on my Pi and the setting was enabled, exactly as @Wilstorm.
Quit ES, edited the options manually to "disable", reboot and now I can enter RGUI again.
@Wilstorm thanks for the huge (and crazy) work you've done to find out where the issue lies.
@grant2258: no clue what that option does, but we need your help to fix this, thanks !

@grant2258

This comment has been minimized.

Copy link
Contributor

grant2258 commented Jan 20, 2019

ive put a pull request in should fix it :)

@grant2258

This comment has been minimized.

Copy link
Contributor

grant2258 commented Jan 20, 2019

I found I had to physically edit /opt/retropie/configs/all/retroarch-core-options.cfg for the the core option to change the setting for testing overides done seem to be working for me on retropie.

@grant2258

This comment has been minimized.

Copy link
Contributor

grant2258 commented Jan 20, 2019

Ok guys the analog is off by default it has to be for people on snes pads or digital arcade sticks. The analog has improved a lot too you notice when playing outrun. You need to enable analog in the options for it to work though. Just wait for the pull request this will probably fix the space invaders sound as well.

@UDb23

This comment has been minimized.

Copy link
Contributor

UDb23 commented Jan 20, 2019

Just wait for the pull request this will probably fix the space invaders sound as well.
wow! looking forward for it.

Concerning the RGUI issue; what is that machine timing supposed to do anyway?

@grant2258

This comment has been minimized.

Copy link
Contributor

grant2258 commented Jan 20, 2019

games like robocop will run will run too fast retroarch has a feature called audo skew. This feature does work if you set the advanced option right. This option is here too fix the that issues o no user intervention is needed. As soon as the retroarch default work out of the box we can disable it. Its enabled for now so users sone need to get into technical details. I made a little mistake when i added the on/off toggle worked fine everywhere else accept the pi tat was just luck though

@Wilstorm

This comment has been minimized.

Copy link

Wilstorm commented Jan 20, 2019

@grant2258 - Thanks for the fix. One quick question I see the new analog toggle button in the options. I was testing it and when I set it to "disabled" and my game input was setup with analog axis input it still worked. Should it still work when only analog input is setup in a game and the analog input option is disabled?

@grant2258

This comment has been minimized.

Copy link
Contributor

grant2258 commented Jan 20, 2019

yes this is intentional i redirected the dpad to the axis map so your dont mess up your controls if switching when you map. its just cosmetic ill add code at some point to rename it in the structure to rename it to dhat when you in analog disabled. just think of it up down left right.

code is here

if (!options.analog)
{
retroJsState[ 18 + offset] = retroJsState[RETRO_DEVICE_ID_JOYPAD_LEFT + offset];
retroJsState[ 19 + offset] = retroJsState[RETRO_DEVICE_ID_JOYPAD_RIGHT + offset];
retroJsState[ 20 + offset] = retroJsState[RETRO_DEVICE_ID_JOYPAD_UP + offset];
retroJsState[ 21 + offset] = retroJsState[RETRO_DEVICE_ID_JOYPAD_DOWN + offset];
//now set dpad to zero so we dont get double mapping
retroJsState[RETRO_DEVICE_ID_JOYPAD_LEFT + offset] = 0;
retroJsState[RETRO_DEVICE_ID_JOYPAD_RIGHT + offset] = 0;
retroJsState[RETRO_DEVICE_ID_JOYPAD_UP + offset] = 0;
retroJsState[RETRO_DEVICE_ID_JOYPAD_DOWN + offset] = 0;
}

@Wilstorm

This comment has been minimized.

Copy link

Wilstorm commented Jan 24, 2019

@grant2258 - I was testing and things are working nicely. I don't know if it was those last tweaks you did but it feels really good on a controller now.

With After Burner I can finally do barrel rolls and Outrun is actually very playable on a controller now. I almost made it to the 3rd check point on the first run.

Road Blasters is a bit weird with controls but it might just be the game. Like in Out Run when you release the wheel it "snaps" back to center but with Road Blasters it's much harder to control. Basically when you steer left with the joystick it seems to stay left or drift like a real car until you steer right, so on sharp turns you pretty much go across the road both ways trying to steer, there's no snap back to center on release. I don't know how to explain it but it works differently than the other driving games. I don't think it's the analog controls at all but just how the game is originally, I think.

One thing is I couldn't get into Out Run F2 service menu but no problem in After Burner and After Burner II.

I really appreciate this update, it's brilliant good sir. :)

@grant2258

This comment has been minimized.

Copy link
Contributor

grant2258 commented Jan 24, 2019

@Wilstorm i made an update 11 hours ago i dont know how up to date you are.

You need to enable analog and legacy mapping until mark does his fixes for ra it disables some code when legacy mapping is off. I had a look at road blaster it uses a dial. Analog joysticks dont work well with dials like super off road as well your better using a mouse or a spinner for dial controls.

@grant2258

This comment has been minimized.

Copy link
Contributor

grant2258 commented Jan 24, 2019

I noticed it not snapping back to center at saying that ill look into it might me mame078 related bug or the code might have been hack somewhere ill look into it not a great default way to be. Mame078 is doing it as well migt be teh driver needs fixed or a general bug.

@Wilstorm

This comment has been minimized.

Copy link

Wilstorm commented Jan 24, 2019

Thanks for the heads up. I did update a few hours ago and had to reanable analog like you said. You really did a great job as it just works, great. I had the Out Run port loaded but honestly I don't see a need for it now. Should MAME Out Run have F2 available?

@grant2258

This comment has been minimized.

Copy link
Contributor

grant2258 commented Jan 24, 2019

yes does work you need to press f2. If its not working try putting game focus mode on and try again

@grant2258

This comment has been minimized.

Copy link
Contributor

grant2258 commented Jan 24, 2019

See the problem with dials and spinners they are rotary encoders. How fast you spin them decides how quick the button press is for the movement. (key press speed in analog setting applies to joystick as well)

If want to use the mouse it will only move as long as there is motion. you cant do this with analog joystick because once you have moved all the way to the right the movement will stop and your motion would end. Ill look into the road blaster driver ether it should have analog controls or the inputs need some work.

@grant2258

This comment has been minimized.

Copy link
Contributor

grant2258 commented Jan 24, 2019

@Wilstorm the game is fine you its actually set to a trackball in the driver. You will need a spinner or a mouse to play it properly.

To try play it with a keyboard or joystick you would need to just tap the key then tap it again to do a turn steps like a dial or trackball would.

@grant2258

This comment has been minimized.

Copy link
Contributor

grant2258 commented Jan 24, 2019

just close the topic it might be best changing legacy mapping to be enabled by default for new users since all its doing is disabling functionality atm. If there are any particular issues just open an issue as usual.

@Wilstorm

This comment has been minimized.

Copy link

Wilstorm commented Jan 24, 2019

@grant2258 - Thanks for the explanation that really helps quite a bit knowing that "DIAL" games are better suited to spinners and how to utilize the keyboard for them.

I am actually always configured to "simultaneous" and "enable" legacy remapping so I can configure single stick tank mappings and also hotkey "NOT" mappings in game. I count on those options or several of my games wouldn't work.

I am able to get into several games service modes via F2 except for Out Run. I have no idea if it's the Pi or some combination of RetroPie and Pi for that game specifically. I am able to get into TAB to access all the inputs, dip switches, game information, history, cheats and also the game runs perfectly.

So several games I tested F2 works fine and Out Run does nothing when I press F2. I did wipe out my core config just to verify I have legacy remapping enabled too. I am pretty comfortable I have everything configured correctly or the other games wouldn't be working with F2.

Anyway it doesn't matter really I just wanted to see analog demonstration you mentioned but I am pretty sure it's working well on the Pi.

@grant2258

This comment has been minimized.

Copy link
Contributor

grant2258 commented Jan 25, 2019

Well afterburner does it as well.. If you've cleared your mame generated cfg files

roms/mame2003-plus/cfg/default.cfg 
roms/mame2003-plus/cfg/outrun.cfg 

and its not helping the only thing i can think of is to clear your outrun nvram file as well in the roms/mame2003-plus/nvram because we applied arcadez big Sega update to this core. It is working fine here. If the above doesn't help let me know. When i say cfg files i mean the mame ones not the ra ones gets a big confusing at times.

@Wilstorm

This comment has been minimized.

Copy link

Wilstorm commented Jan 25, 2019

@grant2258 - Thanks for the tip. Your tips usually get me thinking about the issue at hand in different ways. I think I see what's happening now. The game has a Service Mode option in the TAB menu that was set to NONE so I set it back to F2 and it works now.

It stays highlighted usually for two reasons. One either one it's an override or two there's no field (Service Mode option) in the default.cfg to inherit down. In this case there's no Service Mode option in the default.cfg to pull the value down to the game options.

Anyway I appreciate your help as always another mystery under the belt. :)

@Wilstorm

This comment has been minimized.

Copy link

Wilstorm commented Jan 25, 2019

@grant2258 - A quick FYI...Out Run doesn't create an .nvram file, only .cfg and .hi.

@grant2258

This comment has been minimized.

Copy link
Contributor

grant2258 commented Jan 25, 2019

no problems its just generic instructions when things go wrong ive actaully been looking at the input system and have found a few bugs. Will update when im done .

@Wilstorm

This comment has been minimized.

Copy link

Wilstorm commented Jan 25, 2019

@grant2258 - I also tried a few of the more demanding titles on the Pi 3 but it just doesn't have enough oomph to run them. Maybe a more powerful platform would have better luck. Hard Drivin', Cruis'n USA/World and Rave Racer. Hard Drivin' was just to slow period. Cruis'n USA runs and I finished a race but the audio stutters and it's a bit sluggish. I don't know if frame skipping or something might help. Rave Racer just crashed back to the menu selection screen.

I've gotten used to just wiping out the files when I know an input or a core option is being updated. Resetting core options only takes about 30 seconds through the menu and you're up and running, so it's not to bad. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.