[Release] Pokemon Pinball Ruby & Sapphire EZ Flash Omega DE Rumble Patch

Phrankles

Active Member
OP
Newcomer
Joined
Sep 22, 2021
Messages
26
Trophies
0
Age
31
XP
94
Country
United States
After learning more about the GBA than I ever wanted, I have finally successfully patched the rumble function of the EZFlash Omega DE into Pokemon Pinball Ruby & Sapphire, replacing the Gameboy Player rumble function. Simply apply the attached IPS patch in Lunar Patcher and rumble will be automatically enabled, no settings required. The hack and patch were developed with the No-Intro ROM, unsure if this is different from a standard rip but here are the hashes:

Rom: Pokemon Pinball - Ruby & Sapphire (USA) Database: No-Intro: Game Boy Advance (v. 20210227-023848)
File/ROM SHA-1: 9FEC81CE2C5DF589E0371A0BF2F92A5FE8DB730B
File/ROM CRC32: B992A3C0

compare these to your rom via: http://www.romhacking.net/hash/ to ensure compatibility

Edit: @djedditt has produced a much better rumble patch that works on all rumble flashcarts and does not cause the graphical issues and kyogre whirlpool problem that my patch introduces. Please use their far superior implementation.
 

Attachments

  • Pokemon Pinball - Ruby & Sapphire (USA) OmegaDE Rumble.zip
    320 bytes · Views: 272
Last edited by Phrankles,

cearp

瓜老外
Developer
Joined
May 26, 2008
Messages
8,721
Trophies
2
XP
8,471
Country
Tuvalu
Nice work! If there's any advice or stuff you learned, please share so other people can benefit :)
(For example, for doing this to the other regions/languages of this game)
 

Phrankles

Active Member
OP
Newcomer
Joined
Sep 22, 2021
Messages
26
Trophies
0
Age
31
XP
94
Country
United States
Nice work! If there's any advice or stuff you learned, please share so other people can benefit :)
(For example, for doing this to the other regions/languages of this game)
I figured there would be some sort of variable/register that stored information about the rumble signal to be sent, so I sat down in mGBA with the memory inspector open and start hunting down anything that changed when a rumble happens. mGBA supports Game Boy Player features so I can enable the original function to see what it does. Sure enough I found two bytes of memory with the value 0xFFFF that is set to a different value only when a rumble happens. This are is likely used as a register to be read by the GBP software in order to produce actual rumble signal. This gave me a memory address to set a breakpoint on (specifically a modification break, it halts the execution when a specific memory address is altered). Unfortunately, I don't believe mGBA supports breakpoints like this so we now move over to no$gba debug version and enter the breakpoint. Now the game will break on rumble, bam we have now have the address of the rumble function in the return register. From there it is just a matter of hooking the rumble function to call the EZFlash provided function (stick their function somewhere in memory and replace the opcode at the address of the rumble function with a bl with the correct offset to the EZFlash function) and bam, rumble in GBP game.
 
Last edited by Phrankles,

Phrankles

Active Member
OP
Newcomer
Joined
Sep 22, 2021
Messages
26
Trophies
0
Age
31
XP
94
Country
United States
I figured there would be some sort of variable/register that stored information about the rumble signal to be sent, so I sat down in mGBA with the memory inspector open and start hunting down anything that changed when a rumble happens. mGBA supports Game Boy Player features so I can enable the original function to see what it does. Sure enough I found two bytes of memory with the value 0xFFFF that is set to a different value only when a rumble happens. This are is likely used as a register to be read by the GBP software in order to produce actual rumble signal. This gave me a memory address to set a breakpoint on (specifically a modification break, it halts the execution when a specific memory address is altered). Unfortunately, I don't believe mGBA supports breakpoints like this so we now move over to no$gba debug version and enter the breakpoint. Now the game will break on rumble, bam we have now have the address of the rumble function in the return register. From there it is just a matter of hooking the rumble function to call the EZFlash provided function (stick their function somewhere in memory and replace the opcode at the address of the rumble function with a bl with the correct offset to the EZFlash function) and bam, rumble in GBP game.
this reply was a mistake plz ignore/delete
 

cearp

瓜老外
Developer
Joined
May 26, 2008
Messages
8,721
Trophies
2
XP
8,471
Country
Tuvalu
I figured there would be some sort of variable/register that stored information about the rumble signal to be sent, so I sat down in mGBA with the memory inspector open and start hunting down anything that changed when a rumble happens. mGBA supports Game Boy Player features so I can enable the original function to see what it does. Sure enough I found two bytes of memory with the value 0xFFFF that is set to a different value only when a rumble happens. This are is likely used as a register to be read by the GBP software in order to produce actual rumble signal. This gave me a memory address to set a breakpoint on (specifically a modification break, it halts the execution when a specific memory address is altered). Unfortunately, I don't believe mGBA supports breakpoints like this so we now move over to no$gba debug version and enter the breakpoint. Now the game will break on rumble, bam we have now have the address of the rumble function in the return register. From there it is just a matter of hooking the rumble function to call the EZFlash provided function (stick their function somewhere in memory and replace the opcode at the address of the rumble function with a bl with the correct offset to the EZFlash function) and bam, rumble in GBP game.
thanks for the info, it doesn't seem too complex!
one thing I have a question about I guess: "stick their function somewhere in memory"
how did you get their function into memory?
after you placed it in some blank space in the rom, did you write an additional function to load their function into memory -- what did you hook into to do that? is that copy into memory happening every frame/loop, or only under some circumstances?

and I had the same experience doing a little reverse engineering gba games, mgba for searching memory, and then doing the rest in no$gba. It would be cool if no$gba could do it all!
bgb is great for gb games, no need for two separate tools.
 

Phrankles

Active Member
OP
Newcomer
Joined
Sep 22, 2021
Messages
26
Trophies
0
Age
31
XP
94
Country
United States
thanks for the info, it doesn't seem too complex!
one thing I have a question about I guess: "stick their function somewhere in memory"
how did you get their function into memory?
after you placed it in some blank space in the rom, did you write an additional function to load their function into memory -- what did you hook into to do that? is that copy into memory happening every frame/loop, or only under some circumstances?

and I had the same experience doing a little reverse engineering gba games, mgba for searching memory, and then doing the rest in no$gba. It would be cool if no$gba could do it all!
bgb is great for gb games, no need for two separate tools.
They have a (very hard to read) tutorial available that has a little snippet of assembly and instruction on how to use devkitpro to assemble it. This was pretty much the only part of the tutorial that was useful but alas, it assembles to the rumble function you need in a bin file. This is just a bunch of hex. Then open the rom in a hex editor, find an empty space in the ROM large enough for the function and literally overwrite that address in ROM, keeping track of the address because this is now where we need to jump to call the function.
 
  • Like
Reactions: cearp

Baggins

Well-Known Member
Member
Joined
Jan 27, 2017
Messages
280
Trophies
0
Age
44
XP
314
Country
United States
After learning more about the GBA than I ever wanted, I have finally successfully patched the rumble function of the EZFlash Omega DE into Pokemon Pinball Ruby & Sapphire, replacing the Gameboy Player rumble function. Simply apply the attached IPS patch in Lunar Patcher and rumble will be automatically enabled, no settings required. The hack and patch were developed with the No-Intro ROM, unsure if this is different from a standard rip but here are the hashes:

Rom: Pokemon Pinball - Ruby & Sapphire (USA) Database: No-Intro: Game Boy Advance (v. 20210227-023848)
File/ROM SHA-1: 9FEC81CE2C5DF589E0371A0BF2F92A5FE8DB730B
File/ROM CRC32: B992A3C0

compare these to your rom via: http://www.romhacking.net/hash/ to ensure compatibility
This is great!!! Can you make one more improvement to it?

Can you fix the options menu in the hack to add a working 'off-on' option to make work correctly? Someone did that for the Mario & Luigi hack and it really makes things feel more 'complete'.
 
Last edited by Baggins,

Phrankles

Active Member
OP
Newcomer
Joined
Sep 22, 2021
Messages
26
Trophies
0
Age
31
XP
94
Country
United States
This is great!!! Can you make one more improvement to it?

Can you fix the options menu in the hack to add a working 'off-on' option to make work correctly? Someone did that for the Mario & Luigi hack and it really makes things feel more 'complete'.
I may implement this eventually, but I definitely wouldn't hold my breath. I'm a bit of a pinball freak and I LOVE haptic feedback, so I was highly motivated to get it on, not so much in enabling the menu to turn it back off. One option is to have two copies of the rom, a clean one in the root folder and the patched version in a seperate "RUMBLE" folder. I know its not as ideal as having the settings within the ROM itself, but it works to save battery if that's the concern.

edit: typo
 
Last edited by Phrankles,

Baggins

Well-Known Member
Member
Joined
Jan 27, 2017
Messages
280
Trophies
0
Age
44
XP
314
Country
United States
It's not so much because I want to 'turn it off'... But because completionist/archival stuff it looks better when all things function.

At least someone else is working on a a version that will address that issue, and also try to be closer to how the original gamecube functionality worked as far as 'timings of rumble' and stuff. Yours is a fun work around until then.
 
  • Like
Reactions: djedditt

shenhan

New Member
Newbie
Joined
Sep 30, 2021
Messages
4
Trophies
0
Age
36
XP
80
Country
United States
I don't know what I'm doing wrong but it isn't working.
SHA-1 is A16BECB36240DBE7E74F6CAAE7FF6DEF8EF40554 after patching. I'm not sure if I messed it up.
 

Phrankles

Active Member
OP
Newcomer
Joined
Sep 22, 2021
Messages
26
Trophies
0
Age
31
XP
94
Country
United States
I don't know what I'm doing wrong but it isn't working.
SHA-1 is A16BECB36240DBE7E74F6CAAE7FF6DEF8EF40554 after patching. I'm not sure if I messed it up.
The SHA-1 I provided needs to match the source ROM, not the patched ROM.
 

Phrankles

Active Member
OP
Newcomer
Joined
Sep 22, 2021
Messages
26
Trophies
0
Age
31
XP
94
Country
United States
Yeah. The source rom SHA-1 matches before patching. I also tried using the online patcher on romhacking.net, still no rumble.
Have you played a game? The rumble options in the menu will still be greyed out but it should just work in game.
 

shenhan

New Member
Newbie
Joined
Sep 30, 2021
Messages
4
Trophies
0
Age
36
XP
80
Country
United States
Have you played a game? The rumble options in the menu will still be greyed out but it should just work in game.

Yes. I played a few rounds just to make sure I'm not missing anything since I just got this cart. It's really strange. I've also test Drill Dozer, Mario & Luigi and Mario Advanced 4. Those are all working fine.
 

ThatBassoonist

New Member
Newbie
Joined
Aug 5, 2021
Messages
4
Trophies
0
Age
33
XP
81
Country
United States
Thanks for making this! I've always wanted to try Pokemon Pinball R/S with rumble. I noticed some issues while playing and wanted to see if anyone can confirm them on their patched ROM.

1. There are minor graphical glitches on the bumpers when the ball makes contact and on the flippers in bonus games when hitting the ball.

2. In Kyogre's bonus game on the Sapphire table the ball does not interact with whirlpools. Instead of being trapped when entering a whirlpool the ball continues through it.
 
  • Like
Reactions: cearp

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    LeoTCK @ LeoTCK: yes for nearly a month i was officially a wanted fugitive, until yesterday when it ended