Hi everyone! I am having issues setting the ‘Turbo enable’ input option. No matter what button I set it to it does not enable turbo. Is there a way to set turbo to the A and B input buttons as a secondary function? Example: (configuration on a PS3 controller) X = A, O=B, square=turbo B, triangle=turbo A ?? Thank you to anyone that can help.
I agree. It seems like this should be fairly easy to implement for the NES as well as the TurboGrafx-16 when in two button mode. The current turbo enable system is better than nothing, but its not at all what I think anyone actually wants. I know Mednafen has rapid fire support natively, but RetroArch won’t allow me to map turbo buttons.
Hey guys - I put together a mod using the lr-fceumm module that RetroArch uses. It maps RetroArch controller buttons X and Y to Turbo A and Turbo B respectively. Installation instructions are on the same page. I’ve played a few games with it already and it works pretty good. Happy to hear your thoughts on this as well!
Here’s the link: https://github.com/plastygrove/libretro-fceumm
Cheers, PG
Hey, good stuff man
I copied your turbo changes into our repo, as well. If you have any other improvements, feel free to throw us a pull request! PRs are always very welcome.
While adding it, I noticed that your assignment of X for turbo-A was conflicting with the ‘insert coin’ assignment for VS games. That’s not likely to cause any real issues, but I moved that function to R2, anyway, just to be sure. I also added the turbo buttons to the input descriptors, so you can reassign the turbos to other buttons through the core input remapping.
You can check my changes out here, if you would like to do the same for your fork:
Hey wow, thanks for incorporating that in, I wasn’t sure it was going to be added in which was why I created a fork. Now I feel like I contributed something :). I’ll be sure to send pull requests in the future, no sense maintaining a fork if the changes can be added to the main repo.
Didn’t realise there was a conflict with the insert coin assignment, don’t use it, but thanks for finding that out and fixing it.
One last thing though, my code currently modifies only pad0 which I guess is player 1. It’s an easy fix to make it for pad1 also which I think is player2, but I wasn’t really sure. When testing as one player, it worked fine if I changed either pad0 or pad1. Is that expected? Or am I misunderstanding pad0 and pad1?
Ah, yeah, so it is… By copying it and changing pad0 to pad1 (and a few other things), I was able to get the duplicate A/B buttons working on the second player (Contra is an easy game to test 2-player stuff with, btw) but the turbo cycling wasn’t working on P2.
Awesome, thanks! If you’re pushing that into the main repo, I’d love to download it and give it a shot. Thanks so much for taking this up
I didn’t commit it since I couldn’t get it working properly, but I’ll push it up to my personal fork this evening and you can take a look at it. Maybe we can get it figured out between us
Here’s something that works (the same method you used, just duplicated) but I feel like there should be a less redundant way of doing it: https://github.com/hizzlekizzle/libretro-fceumm/blob/patch-1/src/drivers/libretro/libretro.c Any ideas? If not, I’ll send a PR for this as is and let more capable eyes take a look.
I tested this patch modified to support turbo buttons for player 1 and player 2 on ps3 playing Contra and it works fine, cool! I have the turbo button on square button of the ps3 gamepad, should there be another turbo button on Contra or is there only one turbo button for this game? I mean something like turbo button A and turbo button B. Anyway i’m going to include this patch on the fceumm core in the next beta build for ps3.
@hunterk - Thanks so much for looking into this, really appreciate it! I agree, the code does look quite cluttered and to be honest, my first attempt was really shabby. The prescaler and counter values are just terrible, that’s what happens if you do too much microcontroller programming.
I copied your code into my repo and made a whole bunch of changes in a new branch.
The changes are: [ul] [li]Removed the single variables and replaced them with arrays[/li][li]Added a for-loop for it to look similar to the way the other buttons are handled[/li][li]Added a delay value which can be used to adjust the repeat value as #define TURBO_DELAY 3. I tested with 1,2 and 3 on both Contra and Mario and 3 felt closest to how I remember on my ancient Famicom. Feel free to disagree and play around with different values to your convenience. Setting it to 1 will alternate everytime it hits the function. Setting it to 2 will give a wait period of 2 counts i.e. fire once, wait twice. Similarly a value of 3 will give wait period of 3 counts i.e. fire once, wait thrice.[/li][li]Replicated it for Player 2 as well[/li][li]Added additional comments to make the steps clear[/li][/ul]
Tested it on Contra with 2 players on emulationstation and looks like it’s working great.
Will appreciate if you could test it out as well and let me know and I’ll go ahead and submit a PR. I’ve also included the compiled module in the repo if you’d like to try it out directly.
Also, I realised that setting DEBUG = 1 in Makefile.libretro greatly reduces compile time on a Raspberry Pi2. It messes up the audio, but the controls work fine. Of course, need to remember to set it back to 0 before committing the code :D.
@Ezio_PS - I just tested this for both P1 and P2 and both Turbo A and B seem to be working. I’m using Xbox One controllers. Great to hear that you’re including the patch for the PS3! Thanks for your help
Ah, yeah, much cleaner!
I’ll do some testing with it this evening, but if it’s working on your end, it’s probably PR-able already.
EDIT: went ahead and sent a PR from my repo with your name tagged on the commit message and Twinaphex got it merged in
Awesome, thanks! Sorry, work has been killer last 2 days, difficult to get time out for this :(. Hope everything looks good!
@ plastygrove @ hunterk - Thank you both very much for your work on this! I have little knowledge of coding and have no idea how big of a task it was to incorporate this feature, but for what seems like a relatively small change to my Retropie build it has brought me more joy than any other. I absolutely love this feature! Thank you, thank you, thank you!
Now to my next request… Could either of you, time permitting, please modify mednafen-pce-fast to have the exact same feature? Honestly I would love it if all of the two-button consoles (MasterSystem, Atari 7800, Gameboy, etc…) had these Turbo A, Turbo B settings, but out of all of them it was the TurboGrafx 16 that came with turbo functionality built in from the manufacturer and truly needs this feature added. Bonk’s Adventure games are far more enjoyable when you can turbo spin in the air, and the turbo enable feature that currently exists is a massive letdown.
Thanks again. Your efforts are greatly appreciated.
It looks like both the pce-fast and supergrafx cores have 2-button and 6-button modes, so the X/Y buttons are already occupied by buttons from the 6-button mode. However, an alternative could be to assign the turbo I/II buttons to L3/R3 and then you could use core remapping to move those around as needed.
I think it would be better to improve the frontend than adding a bunch of turbo implementations.
I love the way you think. I suspected the 6 button mode would cause problems, but being able to remap L3/R3 as native turbo keys would be an excellent and highly appreciated optimization to the existing setup. Other than Street Fighter, I don’t know of any TG games that made use of the 6 button controller (I’m sure there are others, they just don’t come to mind at the moment). I grew up playing the TG, and of all the emulators available in RetroPie there are none that I want to work up to my expectations more so than Mednafen-pce-fast. I wish I had the knowledge of how to code this stuff, because I would gladly assist. However, I would be incredibly grateful if this is something that you, or anyone else reading, would be able and willing to implement.
Many thanks for taking the time to read my post, thanks again for the excellent upgrade to fceumm, and thanks in advance for any further consideration you give to adding native turbo to the TG16 and/or any other primarily two-button console emulators!
[QUOTE=plastygrove;30733]Hey guys - I put together a mod using the lr-fceumm module that RetroArch uses. It maps RetroArch controller buttons X and Y to Turbo A and Turbo B respectively. Installation instructions are on the same page. I’ve played a few games with it already and it works pretty good. Happy to hear your thoughts on this as well!
Here’s the link: https://github.com/plastygrove/libretro-fceumm
Cheers, PG[/QUOTE]
Hey guys, sorry to bump the old thread, but plasty’s link is now dead. Anyone else know how to do this? Is there any items we can add into the config file to make this work? I have an NES Max controller for my old NES games and love it, but sure do wish those turbo buttons worked! I made the mistake of enabling turbo while mapping the buttons. Took me over an hour to figure out how to fix it!
Never mind, I just notice, the turbo buttons already work!
Is there any way to remap the Turbo buttons?
I use a SNES controller for almost all two-button emulators and the preference for almost all games is to map B -> Y and A -> B. With Turbo being X and A.
However, the Turbo buttons (X and A) appear to be hardcoded and not configurable in the Retroarch GUI.
Using a turbo controller on PCE (especially with variable turbo speed) was a pretty big necessity, so I’d say this is a fairly important feature.