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

Speaking of the Power Pad Implementation:) How about fixing up Family Trainer 5 : Meiro Daisakusen? #542

Open
KMFDManic opened this issue Feb 5, 2023 · 17 comments

Comments

@KMFDManic
Copy link

4dfadfd

@arpruss You did a great job getting the Power Pad accounted for, and I had a fun time showcasing this stuff in a video:) I tested several of the games, and specifically found Family Trainer 5 : Merio Daisakusen (kind of like a 3d Goonies game!) didn't properly function on fceumm. But, it ran fine, albeit slow, on Mesen! I went through a few other games, Power Pad wise, and found some of those didn't fully work either. This is at least a start, in case you guys do wanna try to further add compatibility for these fun gems:)

@NRS-NewRisingSun Hopefully, this is something you see as feasible!:) I would personally love to see all of the Family Trainer Mappers make it in, of the ones that do not function. But, this particular issue revolves around the obviously coolest of them! Thanks in advance, both of you:)

My Video

https://www.youtube.com/watch?v=7YlPlp4dAbU

@arpruss
Copy link
Contributor

arpruss commented Feb 6, 2023

Maybe the ones that don't work are Famicom?

I only test on ROMs from carts I own and ripped myself, and my collection is World Class Track Meet, Short Order / Eggsplode, Athletic World, and Super Team Sports. All are US NES carts and all work perfectly with Fceumm and a DIY USB adapter for two overlapping DDR pads. Maybe Famicom compatibility is the problem with the ROMs you're trying?

@KMFDManic
Copy link
Author

@arpruss I greatly appreciate your efforts and what you have done. And, no the issues do not appear to be related to them being famicom games, as any other region I test, be it US, Europe, World, Japan, for games that do work, and are supported within fceumm..have been fine. I will have to take a look at the mappers that were added within Mesen and compare to this Repo, and hopefully that sets me on the right path. Meiro Daisakusen J, as well as Japan dumps both work fine on Mesen, but not on fceumm. Thanks again for your response, thus far:)

@arpruss
Copy link
Contributor

arpruss commented Feb 6, 2023

Thanks for the kind words!

Btw, Are any of these Famicom games fun enough for me to bother buying them and ripping them to play, or is it more about completeness?

@StormedBubbles
Copy link
Contributor

Hello,

Family Trainer 8 (Takeshi's Castle) has an English-translation patch available and would be a good addition.

@arpruss thank you for adding this. I do have a quick question about mapping, though. I have two USB dance pads that are recognized as controllers and not keyboards. Can controller buttons be mapped to the RETROK keys somehow in RetroArch?

@arpruss
Copy link
Contributor

arpruss commented Sep 5, 2023

@StormedBubbles:

You should be able to assign controller buttons. See Step 6 (which I say I haven't actually tried) in my Instructable: https://www.instructables.com/Playing-NES-Power-Pad-Games-in-Emulation/

Is Takeshi's Castle a good enough game to be worth paying the $20 or whatever it is on ebay?

@StormedBubbles
Copy link
Contributor

StormedBubbles commented Sep 7, 2023

Thanks for the link.

I don't think RetroArch mapping works that way, though. The menu you reference is for mapping things to joypad, analog, and lightgun inputs. Each input in that menu can have one physical controller button, controller axis direction, mouse button, and keyboard key mapped to it. The Power Pad implementation here uses the RETRO_DEVICE_KEYBOARD device type, which, if I'm reading the documentation correctly, requests the raw keys pressed on a physical keyboard or keyboard encoder. I only have familiarity with this device type from emulators for systems that used actual keyboards (MSX, Dreamcast, DOSBox).

Someone please correct me if I am wrong, but I believe RETRO_DEVICE_KEYBOARD keys are not remappable on the user end in the GUI or in configuration files. You would have to use a physical device that sends those exact keyboard keys.

On the other hand, the RETRO_DEVICE_JOYPAD device type is remappable by the user via physical controller buttons, physical mouse buttons, and physical keyboard keys. It offers 16 unique digital buttons per device (D-pad, 4 face buttons, 4 shoulder buttons, start, select, L3, R3). Then it wouldn't matter what sort of device or adapter you use as long as it's recognized as a controller, mouse, or keyboard. For example, you could still use the keyboard keys of your adapter as is while I could use the generic USB dance pads I have and someone else could use mouse buttons if desired.

EDIT: I was incorrect about remapping the keyboard keys. See below.

As for Family Trainer 8, it does already "work" in FCEUMM in the sense that I can load the game and go through menus with the P1 controller (even the hacked English translation). It's just that the Power Pad doesn't do anything to control the game in FCEUMM as far as I can tell. The Japanese equivalent of the Power Pad would have plugged in to the Famicom's expansion port, which is "port 5" in FCEUMM, but Mesen allows the game to be controlled with the Power Pad.

@arpruss
Copy link
Contributor

arpruss commented Sep 7, 2023

I am pretty sure that if you put in the kind of settings that I show in the screenshot, then when you press the A button on a controller, it will generate a keyboard x, and so on. And your USB mat should just be a controller, no?

@arpruss
Copy link
Contributor

arpruss commented Sep 7, 2023

I just checked. I plugged two controllers into my rpi3b, and had retroarch set to input 1 being auto or gamepad and input 2 to powerpad b. I could then remap the B key on my second gamepad to generate r (powerpad b4), and it was properly detected by the controller test rom that I was using.
So as long as retroarch can see your mat as a usb controller, it should work.

@StormedBubbles
Copy link
Contributor

Ahhh, thank you for that. I seem to learn something new in RetroArch everyday! I had no idea that the RETROK keys could be remapped like that.

For anyone who comes across this, in the RetroArch GUI, as long as you have one of the Power Pad devices mapped to port 2 or 3, you can go to Quick Menu -> Controls -> Port 2 (or 3), find the button you have already mapped to your gamepad, and scroll through the keyboard keys until you find the one you want. You can then save a game override so that that behavior is maintained between play sessions.

@StormedBubbles
Copy link
Contributor

After refamiliarizing myself with the games I played as a kid, here is a case for Family Trainer 8:

The control scheme is pretty unique among the games I have tried. You have the typical alternate 6 and 7 to run and hit them both simultaneously to jump, but you can alternate 10 and 11 to run backwards to set yourself up for retrying missed jumps and can hold 2 and 3 together with your hands while your feet are on 6 and 7 to crouch. One of the minigames also uses buttons 5–8 only. I think that one might want you to rotate the pad 90 degrees.

The game runs (but without any controls, as far as I can tell) in lr-FCEUMM. It also runs in lr-mesen with some controls but doesn't appear to be functioning properly. The buttons don't do what they are supposed to there (regardless of whether I use the Power Pad or the Family Trainer).

@arpruss
Copy link
Contributor

arpruss commented Sep 8, 2023

The cheapest I can find on eBay is $37 (including shipping from Japan).

@StormedBubbles
Copy link
Contributor

Family Trainer 5 (mentioned in the OP) seems cheaper and much more plentiful on eBay. One site even has a boxed copy that appears to only have been opened to verify the contents. I didn't find anything less expensive than what you mentioned for Family Trainer 8. Family Trainer 9 is a direct sequel to 8, but that one is more expensive than 8!

@StormedBubbles
Copy link
Contributor

Hi again. I added the Family Trainer (sides A and B) as a device in my own build. It is assigned to virtual controller port 5, which is lr-fceumm's interpretation of the Famicom expansion port. You can map the keyboard keys to buttons as mentioned above and also use Libretro's "map to port" functionality to hook up a second device from another port to port 5. The buttons are literally the same as the Power Pad's, so these are minor additions. The only real difference is identifying the device as a Famicom Expansion Port device instead of an NES device. The only thing I'm not sure about is whether it's worth adding the Start button from Side A. This is an input not found on the Power Pad (as far as I know). I'm not even sure what function it serves, and it looks so easy to hit accidentally on the real Family Trainer pad.

@KMFDManic I tested Family Trainer 5 and 8. They both work. Feedback is welcome in #571!

@arpruss
Copy link
Contributor

arpruss commented Sep 16, 2023

Cool! Adding the start button sounds like a good idea. The user can leave it unmapped, of course.

@StormedBubbles
Copy link
Contributor

This is a bit of a trouble spot for me. I see where that condition would go, and I essentially want the condition to be

if (input_cb(4, RETRO_DEVICE_JOYPAD, 0, RETRO_DEVICE_ID_JOYPAD_START))

(which would allow the user to map it easily) and the result to be JOY_START for port/player 0, but I don't get how to isolate that JOY_START result for that one player.

@arpruss
Copy link
Contributor

arpruss commented Sep 16, 2023

I would remap the start button to a key on a keyboard. If you use a Wii Outdoor Adventure mat with my USB adapter ( https://www.instructables.com/Playing-NES-Power-Pad-Games-in-Emulation/ , step 4 ), then in Athletic World mode, the + button on the mat is bound to the space bar. (The adapter makes the mat behave like a keyboard. If you turn on numlock on the computer, that switches to Athletic World mode.) That could be a sensible bind for the start button.

@StormedBubbles
Copy link
Contributor

Ah, that sounds perfect. Thanks for pointing that out. if (input_cb(0, RETRO_DEVICE_KEYBOARD, 0, RETROK_space)) is how I get a check on the RetroArch space-bar input being pressed, but I don't get how to isolate Player 1's Start input from FCEUMM to create the condition "if space bar pressed, then activate the P1 Start input." I see a few different ways that inputs are assigned and am not sure how to just grab the one button.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants