[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
28
XP
47
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: 30
Last edited by Phrankles,

cearp

瓜老外
Developer
Joined
May 26, 2008
Messages
8,514
Trophies
1
XP
7,336
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
28
XP
47
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
28
XP
47
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,514
Trophies
1
XP
7,336
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
28
XP
47
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
279
Trophies
0
Age
41
XP
237
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
28
XP
47
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
279
Trophies
0
Age
41
XP
237
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
33
XP
19
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
28
XP
47
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
28
XP
47
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
33
XP
19
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
3
Trophies
0
Age
30
XP
30
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
General chit-chat
Help Users
  • No one is chatting at the moment.
  • The Real Jdbye @ The Real Jdbye:
    really have to buy the top end model to get a tv that doesnt have any of those compromises and that would've had more dimming zones too but i am not made o money
    Gift
  • The Real Jdbye @ The Real Jdbye:
    @Julie_Pilgrim "very bright" is essentially pure white
    Gift
  • The Real Jdbye @ The Real Jdbye:
    pure white doesn't show up all that much it's mainly when looking at a bright sky
    Gift
  • The Real Jdbye @ The Real Jdbye:
    and if the clouds in the sky have slightly less definition to them because i turned on the contrast enhancer who cares
    Gift
  • The Real Jdbye @ The Real Jdbye:
    that's not important
    Gift
  • The Real Jdbye @ The Real Jdbye:
    i can't tell the difference
    Gift
  • The Real Jdbye @ The Real Jdbye:
    but i can certainly tell the difference with black crush if i'm watching a scifi movie and i can't see wtf is going on
    Gift
  • SG854 @ SG854:
    Human vision is logarithmic, it's not linear. And nits doesn't tell the whole story of perceived brightness. OLED'S look brighter then LCD's even when both are set to the same nit values because of the higher contrast ratio on OLED's
    Gift
  • SG854 @ SG854:
    OLED's have a 3D look
    Gift
  • kenenthk @ kenenthk:
    Charging port is more likely to fry up or battery fail before the display tbh lol
    Gift
  • The Real Jdbye @ The Real Jdbye:
    "And nits doesn't tell the whole story of perceived brightness" it's not about perceived brightness it's about all HDR content in TV and movies being mastered for 1000 nits so it doesn't look right with anything lower, it's also about dynamic range
    Gift
  • The Real Jdbye @ The Real Jdbye:
    "OLED's have a 3D look" no they don't lol
    Gift
  • SG854 @ SG854:
    As an owner of a OLED and you saying that you never seen an OLED I think I know what I'm talking about lol. I'm not talking about 3D as in 3D glasses. I'm talking about depth and pop in the picture
    Gift
  • kenenthk @ kenenthk:
    I mean to be fair og vitas are still kicking and not many have suffered from pixel bleed and they're going on nearly 10 years
    Gift
  • SG854 @ SG854:
    OLED's can get away with a lower peak brightness and still provide punchy HDR because of their contrast ratio. Like I said human vision is logarithmic. The higher the peak brightness the diminishing returns in perceived brightness.
    Gift
  • kenenthk @ kenenthk:
    Just get 5 years enjoyment out of it until Nintendy releases something and everyone forgets about switch games lol
    Gift
  • SG854 @ SG854:
    @The Real Jdbye Oleds hit around 750 nits nowadays. The difference between a 1000 nit and a 750 nit isn't huge. It's only about a 4% increase in perceived brightness. Not huge at all. You'll need at least 2000 nit displays to notice a bigger difference.
    Gift
  • SG854 @ SG854:
    Read this thread it explains it. 1000 nits is not a huge jump from 750 the LG OLEDs can hit. As I said human vision is non linear.
    +2
    Gift
  • Gift
  • mr_switch @ mr_switch:
    Not exactly 3D but the colors does pops out more
    Gift
  • mr_switch @ mr_switch:
    I just want a true dark mode theme
    for OLED Switch
    Gift
  • Julie_Pilgrim @ Julie_Pilgrim:
    yeah honestly i hate how the only two switch theme options are blinding holy light of god or grey
    Gift
  • El_Doot @ El_Doot:
    Kill eyes OR bore eyes to death
    +1
    Gift
  • Julie_Pilgrim @ Julie_Pilgrim:
    switch dark mode is ok i just wish it was a bit darker
    Gift
  • F @ Forseenink3938:
    Can anyone here please help me on how to use TickCrypt 2.0?
    Gift
    F @ Forseenink3938: Can anyone here please help me on how to use TickCrypt 2.0?