Page 1 of 1

Pokemon Pinball Ruby & Sapphire Rumble Patched Game Doesn't Rumble on MiSTer

Posted: Wed Dec 07, 2022 3:18 am
by dcubed

First of all, thank you FPGAzumSpass for the wonderful GBA core; I've had an absolute blast with it!

I've recently been trying out the brilliant cartridge rumble hacks made by djedditt for Super Mario Advance 4 and Mario & Luigi Superstar Saga and they work great with the GBA core, but for whatever reason, his Pokemon Pinball Ruby & Sapphire rumble patch just doesn't work on the GBA MiSTer core. The game itself works fine, but the controller just refuses to rumble...

Apparantly the Pokemon Pinball RS patch works just fine on GBA hardware with the appropriate rumble motor flash cart, but it just does nothing on MiSTer... considering that all of his other patches work just fine on the GBA MiSTer core and on real hardware, I was wondering if it might be an issue with how rumble is implemented on the GBA core that is preventing the Pokemon Pinball RS patch from working specifically?

Has anyone managed to get the patch working on the GBA core by any chance? (All other rumble games, including Drill Dozer, Wario Ware Twisted; and the other two rumble patched games work just fine, it's just Pokemon Pinball RS that I just can't get working)


Re: Pokemon Pinball Ruby & Sapphire Rumble Patched Game Doesn't Rumble on MiSTer

Posted: Wed Dec 07, 2022 5:02 am
by FPGAzumSpass

I can only tell you that i cannot make it work, too.

Not sure what the issue is. I suspect he is using the same method to trigger the rumble than with the other games, so i cannot say why it doesn't happen here.

Did you try it with any emulator/rumble cart yet if it really works?


Re: Pokemon Pinball Ruby & Sapphire Rumble Patched Game Doesn't Rumble on MiSTer

Posted: Wed Dec 07, 2022 7:25 am
by djedditt

I don't do anything special in Pokémon Pinball: Ruby & Sapphire regarding rumble signals. Having looked at the MiSTer GBA core source briefly it looks like there are hardcoded exceptions for some games with features such as rumble hardware.

Can you try this patch (edit: file deleted) on top of your rumble patched Pokémon Pinball: Ruby & Sapphire (USA) rom and see if that works? It changes the game ID to Drill Dozer's. Do note that it's for testing purposes only, I don't recommend distributing this particular patch further.

I went ahead and created a fork with additional exceptions added, but was a bit too quick on the trigger to open a pull request. If you can verify the above patch and/or change works, I will re-open the request for just Pokémon Pinball: Ruby & Sapphire.


Re: Pokemon Pinball Ruby & Sapphire Rumble Patched Game Doesn't Rumble on MiSTer

Posted: Wed Dec 07, 2022 2:59 pm
by FPGAzumSpass

You can just activate the GPIO in the Misc submenu in OSD, the game does not have to be on the exception list.
SMA4 rumble works with that.

For pokemon Pinball, I only tried the EU patch and it doesn't work.


Re: Pokemon Pinball Ruby & Sapphire Rumble Patched Game Doesn't Rumble on MiSTer

Posted: Wed Dec 07, 2022 3:16 pm
by dcubed
djedditt wrote: Wed Dec 07, 2022 7:25 am

I don't do anything special in Pokémon Pinball: Ruby & Sapphire regarding rumble signals. Having looked at the MiSTer GBA core source briefly it looks like there are hardcoded exceptions for some games with features such as rumble hardware.

Can you try this patch on top of your rumble patched Pokémon Pinball: Ruby & Sapphire (USA) rom and see if that works? It changes the game ID to Drill Dozer's. Do note that it's for testing purposes only, I don't recommend distributing this particular patch further.

I went ahead and created a fork with additional exceptions added, but was a bit too quick on the trigger to open a pull request. If you can verify the above patch and/or change works, I will re-open the request for just Pokémon Pinball: Ruby & Sapphire.

I just tried this new version of the patch on a USA Pokemon Pinball RS ROM, on my MiSTer, using a Wii U Pro Controller (which does work with your other SMA4/M&L patches). It didn't work with Pokemon Pinball RS.

FPGAzumSpass wrote: Wed Dec 07, 2022 5:02 am

Did you try it with any emulator/rumble cart yet if it really works?

I tried the EU patch on an EU ROM in mGBA and it did work... but only when Gameboy Player features were enabled...


Re: Pokemon Pinball Ruby & Sapphire Rumble Patched Game Doesn't Rumble on MiSTer

Posted: Wed Dec 07, 2022 3:20 pm
by djedditt

Can you confirm you applied this patch on top of the rom that was already patched with the rumble patch? Rumble also needs to be enabled in the options menu in-game. Changing the game ID in the header "fixes" rumble when running the GBA core for openFPGA on Analogue Pocket for example, in the sense that it forces some overrides in the core. Because of that I still assume it's more of an implementation issue rather than the rumble patches itself for now. I'd be happy to help debug though!

If you can share the crc32 of the pre- and post-patched rom (the original one, not the one from my earlier post) I'll check it again on original GBA hardware.


Re: Pokemon Pinball Ruby & Sapphire Rumble Patched Game Doesn't Rumble on MiSTer

Posted: Wed Dec 07, 2022 3:33 pm
by dcubed
djedditt wrote: Wed Dec 07, 2022 3:20 pm

Can you confirm you applied this patch on top of the rom that was already patched with the rumble patch? Rumble also needs to be enabled in the options menu in-game. Changing the game ID in the header does fix rumble when running the GBA core for openFPGA on Analogue Pocket for example. Because of that I still assume it's more of an implementation issue rather than the rumble patches itself for now. I'd be happy to help debug though!

If you can share the crc32 of the pre- and post-patched rom (the original one, not the one from my earlier post) I'll check it again on original GBA hardware.

Yes, I tried double patching (as you suggested here) and I have enabled rumble in the options menu. No rumble is coming from the controller.

Here are the crc32s you requested...

Original unpatched USA ROM: b992a3c0
AGB-BPPE-USA_CartRumble: 70acc97b
AGB-BPPE-USA_CartRumble_to_V49E_FixedHeader: 7fdf6e5e

Thank you very much! Would love to have this patch working on the MiSTer!


Re: Pokemon Pinball Ruby & Sapphire Rumble Patched Game Doesn't Rumble on MiSTer

Posted: Wed Dec 07, 2022 3:58 pm
by FPGAzumSpass
dcubed wrote: Wed Dec 07, 2022 3:16 pm

I tried the EU patch on an EU ROM in mGBA and it did work... but only when Gameboy Player features were enabled...

Rumble always works with gameboy player features. The goal of the patch is to make it work without.

I tried the patched pinball game in my emulator and couldn't find it ever even writes the rumble registers...no idea what's going on.
Maybe the game depends on something else to even touch this register.


Re: Pokemon Pinball Ruby & Sapphire Rumble Patched Game Doesn't Rumble on MiSTer

Posted: Wed Dec 07, 2022 6:57 pm
by djedditt
FPGAzumSpass wrote: Wed Dec 07, 2022 5:02 am

Did you try it with any emulator/rumble cart yet if it really works?

Of course, here's a quick video of the rumble patch on original hardware*. Rumble might not be very audible, but because the batteries are on the edge of low you can see the power led turn red when the rumble motor kicks in: https://www.youtube.com/watch?v=QbJRnH4ko2A

FPGAzumSpass wrote: Wed Dec 07, 2022 3:58 pm

I tried the patched pinball game in my emulator and couldn't find it ever even writes the rumble registers...no idea what's going on.
Maybe the game depends on something else to even touch this register.

It seems like the rumble subroutine isn't called on MiSTer and some emulators, pretty confident I can work around that. I'll have something ready soon.

*arguably flash carts are not original hardware, but the rumble signals over the cart bus are correct when checked with a logic analyzer


Re: Pokemon Pinball Ruby & Sapphire Rumble Patched Game Doesn't Rumble on MiSTer

Posted: Wed Dec 07, 2022 9:26 pm
by dcubed
djedditt wrote: Wed Dec 07, 2022 6:57 pm

It seems like the rumble subroutine isn't called on MiSTer and some emulators, pretty confident I can work around that. I'll have something ready soon.

*arguably flash carts are not original hardware, but the rumble signals over the cart bus are correct when checked with a logic analyzer

Nice work! Looking forward to trying out the new patch :D


Re: Pokemon Pinball Ruby & Sapphire Rumble Patched Game Doesn't Rumble on MiSTer

Posted: Thu Dec 08, 2022 5:36 am
by FPGAzumSpass
djedditt wrote: Wed Dec 07, 2022 6:57 pm

It seems like the rumble subroutine isn't called on MiSTer and some emulators, pretty confident I can work around that. I'll have something ready soon.

*arguably flash carts are not original hardware, but the rumble signals over the cart bus are correct when checked with a logic analyzer

Sorry, i didn't notice you are the author of the patch, i mixed up your names :oops:

Would be great if you find out the reason, maybe even the core can be fixed then.


Re: Pokemon Pinball Ruby & Sapphire Rumble Patched Game Doesn't Rumble on MiSTer

Posted: Sat Dec 10, 2022 9:26 am
by djedditt

Made a few tweaks and now it should work on MiSTer as well. The updated patches (v1.1) can be found here: https://www.romhacking.net/hacks/6256/

It's not the cartridge rumble code that was the issue, just the way I'm forcing the underlying rumble logic to execute on non-GBP systems. Had to take a different approach than in the other games, and apparently it's prone to emulation inaccuracies (it's a hack in the end). Unfortunately I don't know why, I only figured out what to change to make it work for MiSTer as well :|


Re: Pokemon Pinball Ruby & Sapphire Rumble Patched Game Doesn't Rumble on MiSTer

Posted: Sun Dec 11, 2022 10:52 am
by dcubed

Just tried out your new version of the patch on an EU ROM and... IT WORKS! It works perfectly on my MiSTer now! :D

Thank you so much! Pokemon Pinball RS just isn't the same without rumble! The patch is brill! :mrgreen: