Hacking Understanding and changing Snes VC RPX settings

the_randomizer

The Temp's official fox whisperer
OP
Member
Joined
Apr 29, 2011
Messages
31,284
Trophies
2
Age
38
Location
Dr. Wahwee's castle
XP
18,969
Country
United States
I tried poking at a version but I couldn't glean very much, too much going on, I'll look some more but is disgusting that they just embed the ROM in the RPX, need to fix that

Yeah, they literally just injected a ROM inside the ELF itself and then converted it to RPX. The offset we're thinking the filtering is being handled at is at offset 00F32A80
PgcXhUu.png


As seen here, there are two instances where the bytes show up, and thus changed to

H4Hmx2L.png


These are the findings @QuarkTheAwesome found while poking around. The weird part is that these offsets are shared with NES RPX/elf files, what we're trying to do is correct the gamma
and find out where it's applying the linear filter and why NES games seem to use a bilinear filter, the GX2 function is called GX2InitSamplerXYFilter and GX2InitSamplerZMFilter, but he can
definitely put his input in here and explain what he's found, it's messy yes, but I feel, no, we feel that we're on to something.

Edit: He explained the function here http://gbatemp.net/threads/understa...es-vc-rpx-settings.425474/page-8#post-6371351
 
Joined
Apr 19, 2015
Messages
1,023
Trophies
1
Location
Stuck in the PowerPC
Website
heyquark.com
XP
3,913
Country
Australia
Yeah, they literally just injected a ROM inside the ELF itself and then converted it to RPX. The offset we're thinking the filtering is being handled at is at offset 00F32A80
PgcXhUu.png


As seen here, there are two instances where the bytes show up, and thus changed to

H4Hmx2L.png


These are the findings @QuarkTheAwesome found while poking around. The weird part is that these offsets are shared with NES RPX/elf files, what we're trying to do is correct the gamma
and find out where it's applying the linear filter and why NES games seem to use a bilinear filter, the GX2 function is called GX2InitSamplerXYFilter and GX2InitSamplerZMFilter, but he can
definitely put his input in here and explain what he's found, it's messy yes, but I feel, no, we feel that we're on to something.

Edit: He explained the function here http://gbatemp.net/threads/understa...es-vc-rpx-settings.425474/page-8#post-6371351

Just to clarify, the modification in blue changes the VC's call to GX2InitSamplerXYFilter to have "1" as argument 2 and 3 (though it doesn't seem to make a difference atm). Not sure what happens if you change the bytes highlighted in red.
 

the_randomizer

The Temp's official fox whisperer
OP
Member
Joined
Apr 29, 2011
Messages
31,284
Trophies
2
Age
38
Location
Dr. Wahwee's castle
XP
18,969
Country
United States
Just to clarify, the modification in blue changes the VC's call to GX2InitSamplerXYFilter to have "1" as argument 2 and 3 (though it doesn't seem to make a difference atm). Not sure what happens if you change the bytes highlighted in red.

Tried to alter the bytes in both red and green/blue sections to the other bytes suggested previously, but I didn't notice anything different, I really hope I'm not stressing you guys out, but I started this thread and I don't want to just pack up and go home so to speak, you know?
 
Joined
Apr 19, 2015
Messages
1,023
Trophies
1
Location
Stuck in the PowerPC
Website
heyquark.com
XP
3,913
Country
Australia
Tried to alter the bytes in both red and green/blue sections to the other bytes suggested previously, but I didn't notice anything different, I really hope I'm not stressing you guys out, but I started this thread and I don't want to just pack up and go home so to speak, you know?

Seriously, it's fine ;D

If I was having trouble with this that I couldn't deal with I wouldn't be helping. Since I'm helping, you can be sure that you're not stressing/holding me out/back. Simple as that :3

By the way I've started writing this in my free time so you can look at that if you want. Although I'm fairly sure the bit on syntaxes is just flat-out wrong. WIP.
 

the_randomizer

The Temp's official fox whisperer
OP
Member
Joined
Apr 29, 2011
Messages
31,284
Trophies
2
Age
38
Location
Dr. Wahwee's castle
XP
18,969
Country
United States
Seriously, it's fine ;D

If I was having trouble with this that I couldn't deal with I wouldn't be helping. Since I'm helping, you can be sure that you're not stressing/holding me out/back. Simple as that :3

By the way I've started writing this in my free time so you can look at that if you want. Although I'm fairly sure the bit on syntaxes is just flat-out wrong. WIP.

No worries, and I'm sure that we can find out sooner or later what needs to be changed to alter the filter and gamma levels to help them look better. I mean, after all, NES ELF files share the same offsets, and those use a heavier filter than Snes games for some reason. And I thank you both and everyone else involved, gonna be heading to bed in a bit, so I'll let you guys do your magic, I know we're onto something.

Though as to why changing those bytes didn't increase linear filtering I'll never know lol.
 
Last edited by the_randomizer,
Joined
Apr 19, 2015
Messages
1,023
Trophies
1
Location
Stuck in the PowerPC
Website
heyquark.com
XP
3,913
Country
Australia
No worries, and I'm sure that we can find out sooner or later what needs to be changed to alter the filter and gamma levels to help them look better. I mean, after all, NES ELF files share the same offsets, and those use a heavier filter than Snes games for some reason. And I thank you both and everyone else involved, gonna be heading to bed in a bit, so I'll let you guys do your magic, I know we're onto something.

No worries. I think I've actually found what we need to tweak, so there might be some good news in the morning ;D
 

reprep

Well-Known Member
Member
Joined
Jul 5, 2012
Messages
939
Trophies
1
Website
melankolisavar.blogspot.com
XP
1,037
Country
Seriously, it's fine ;D

If I was having trouble with this that I couldn't deal with I wouldn't be helping. Since I'm helping, you can be sure that you're not stressing/holding me out/back. Simple as that :3

By the way I've started writing this in my free time so you can look at that if you want. Although I'm fairly sure the bit on syntaxes is just flat-out wrong. WIP.
Bookmarked, love to see more. PPC assembly is interesting.


Sent from my iPhone using Tapatalk
 
Joined
Apr 19, 2015
Messages
1,023
Trophies
1
Location
Stuck in the PowerPC
Website
heyquark.com
XP
3,913
Country
Australia
No worries. I think I've actually found what we need to tweak, so there might be some good news in the morning ;D

False alarm, no luck. We can basically rule out all references to GX2InitSamplerZMFilter and GX2InitSamplerXYFilter at this point, I've tried all of them to no avail.

Worth noting that one particular call to GX2InitZMFilter actually has filtering enabled. Tweaking this to the other filter type made no change, but I think I can tell you where this filter is visible - open up the Virtual Console Menu and you'll see the image in the background slightly blurred. My guess is that's where you can see the filtering.

Looks like the VC is not using those two functions for its upscaling. It's likely some sort of shader or something. I've got a bit of a headache rn (IDA does that to me, it also explains the rather low quality of what I'm writing atm), so I'm gonna work on something else for now but my guess is that the VC has a shader or some sort of logic upscaling the image before sending it off to GX2 at the correct resolution.

Someone can look at texture2D_206.gsh (under /content on Loadiine dumps) if they want, that's probably what needs rewriting
 

the_randomizer

The Temp's official fox whisperer
OP
Member
Joined
Apr 29, 2011
Messages
31,284
Trophies
2
Age
38
Location
Dr. Wahwee's castle
XP
18,969
Country
United States
False alarm, no luck. We can basically rule out all references to GX2InitSamplerZMFilter and GX2InitSamplerXYFilter at this point, I've tried all of them to no avail.

Worth noting that one particular call to GX2InitZMFilter actually has filtering enabled. Tweaking this to the other filter type made no change, but I think I can tell you where this filter is visible - open up the Virtual Console Menu and you'll see the image in the background slightly blurred. My guess is that's where you can see the filtering.

Looks like the VC is not using those two functions for its upscaling. It's likely some sort of shader or something. I've got a bit of a headache rn (IDA does that to me, it also explains the rather low quality of what I'm writing atm), so I'm gonna work on something else for now but my guess is that the VC has a shader or some sort of logic upscaling the image before sending it off to GX2 at the correct resolution.

Someone can look at texture2D_206.gsh (under /content on Loadiine dumps) if they want, that's probably what needs rewriting

I noticed that as well, there is a very very basic filter when normally played, it's barely noticeable, but it's there, but when the menu is opened, it gets even more filtered, Nintendo uses really weird methods it seems. I think that's what we need to do, is somehow make it to where the filter during normal play is the filter used when the menu is opened. I'll look at that texture file.
 

Walo

Well-Known Member
Member
Joined
Aug 4, 2008
Messages
171
Trophies
1
XP
478
Country
Chile
fyi there's a very easy to find mario rpg dump that was uploaded on wednesday in case you're interested in checking that game's rpx
 

the_randomizer

The Temp's official fox whisperer
OP
Member
Joined
Apr 29, 2011
Messages
31,284
Trophies
2
Age
38
Location
Dr. Wahwee's castle
XP
18,969
Country
United States
fyi there's a very easy to find mario rpg dump that was uploaded on wednesday in case you're interested in checking that game's rpx

Yeah, I saw that it's been dumped, the problem is twofold, it's PAL and injecting ROMs into PAL RPX files makes them PAL still, unless there's a way to change it to NTSC.
 

pedro702

Well-Known Member
Member
Joined
Mar 3, 2014
Messages
12,724
Trophies
2
Age
33
XP
8,716
Country
Portugal
Yeah, I saw that it's been dumped, the problem is twofold, it's PAL and injecting ROMs into PAL RPX files makes them PAL still, unless there's a way to change it to NTSC.
lets be honest here smrpg is a turn base rpg, 50hz makes literaly no diference lol if you dont play a turn based rpg becuase you got only the 50hz version them your not a big fan of the game lol.
 

the_randomizer

The Temp's official fox whisperer
OP
Member
Joined
Apr 29, 2011
Messages
31,284
Trophies
2
Age
38
Location
Dr. Wahwee's castle
XP
18,969
Country
United States
lets be honest here smrpg is a turn base rpg, 50hz makes literaly no diference lol if you dont play a turn based rpg becuase you got only the 50hz version them your not a big fan of the game lol.

I'm just saying, some 50 Hz games also have slower music, and growing up with the 60 Hz version, the slower tempo will kinda ruin for me, but that's just me lol, sorry :P For gameplay, no, you're right, no big difference, but the music will be 20% slower, and as I'd be able to tell a diff right away if it's a slower tempo. I just wish we can force 60 Hz in RPX games is all.
 

pedro702

Well-Known Member
Member
Joined
Mar 3, 2014
Messages
12,724
Trophies
2
Age
33
XP
8,716
Country
Portugal
I'm just saying, some 50 Hz games also have slower music, and growing up with the 60 Hz version, the slower tempo will kinda ruin for me, but that's just me lol, sorry :P For gameplay, no, you're right, no big difference, but the music will be 20% slower, and as I'd be able to tell a diff right away if it's a slower tempo. I just wish we can force 60 Hz in RPX games is all.
like i said not a big fan then xD.
 

pedro702

Well-Known Member
Member
Joined
Mar 3, 2014
Messages
12,724
Trophies
2
Age
33
XP
8,716
Country
Portugal
I'm not a big fan of crackling audio nor slow audio in ANY game. :P

Btw, @the_randomizer have you had any luck looking into the texture2D_206.gsh file that Quark mentioned?
just confirmed that the pal e shop super mario rpg is the usa version so there is no craking or 50 hz lol.

since it wasnt released on pal region there isnt any 50hz super mario rpg lol and pal eshop description clearly says its the USA version.
 
  • Like
Reactions: the_randomizer

the_randomizer

The Temp's official fox whisperer
OP
Member
Joined
Apr 29, 2011
Messages
31,284
Trophies
2
Age
38
Location
Dr. Wahwee's castle
XP
18,969
Country
United States
I'm not a big fan of crackling audio nor slow audio in ANY game. :P

Btw, @the_randomizer have you had any luck looking into the texture2D_206.gsh file that Quark mentioned?

I've been corrected that the game is in fact, the US version and runs at 60 Hz. No, because NES and Snes games share the same offsets and info, we're gonna need @dimok's help with this one.
 
Last edited by the_randomizer,

Walo

Well-Known Member
Member
Joined
Aug 4, 2008
Messages
171
Trophies
1
XP
478
Country
Chile
Since Super Mario RPG never had a pal Release I don't think they made this version 50Mhz. Pretty sure it's a straight port of the American version, it even has the purple buttons and everything.

Edit: whoops late on the answer haha
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • BigOnYa
  • BakerMan
    I rather enjoy a life of taking it easy. I haven't reached that life yet though.
  • Xdqwerty @ Xdqwerty:
    I havent finished watching it so no spoilers pls
  • Psionic Roshambo @ Psionic Roshambo:
    I have lol
  • Xdqwerty @ Xdqwerty:
    And I havent watched Brotherhood yet
  • Psionic Roshambo @ Psionic Roshambo:
    It was watchable, not sure what my favorite Anime is hmmm
  • Psionic Roshambo @ Psionic Roshambo:
    Castlevania or Baki probably
  • Psionic Roshambo @ Psionic Roshambo:
    Robotech was good
  • Psionic Roshambo @ Psionic Roshambo:
    DBZ I liked up until Cell after that it got too weird
  • K3Nv2 @ K3Nv2:
    My youtube comment got 2k likes achievement unlocked
  • Xdqwerty @ Xdqwerty:
    @Psionic Roshambo, i also watch my hero academia and rewatching dragón ball starting from the og series
  • Psionic Roshambo @ Psionic Roshambo:
    Oh also loved Vanhellsing
  • Psionic Roshambo @ Psionic Roshambo:
    And Vanhellsing abridged lol
  • BakerMan @ BakerMan:
    GOOD LORD WHAT IS HAPPENING IN THERE?!
    +1
  • BakerMan @ BakerMan:
    Aurora Borealis?
    +1
  • BakerMan @ BakerMan:
    I- AURORA BOREALIS? AT THIS TIME OF YEAR, AT THIS TIME OF DAY, IN THIS PART IF THE COUNTRY, LOCALIZED ENTIRELY WITHIN YOUR KITCHEN?
    +1
  • BakerMan @ BakerMan:
    jokes aside, anyone else who saw the northern lights tonight, what did you think, i thought they were beautiful for a while, before it went to a vague pink
    maybe later they'll pick up again
    +1
  • BigOnYa @ BigOnYa:
    I went out and tried to see, but I'm too south, and its too cloudy, bummer
    +1
  • BakerMan @ BakerMan:
    too far south? it goes down to alabama tonight
  • BakerMan @ BakerMan:
    sorry about the clouds btw, the sky is clear here rn
    +1
  • BigOnYa @ BigOnYa:
    Maybe just too cloudy for me then, Idk
  • BigOnYa @ BigOnYa:
    Its neat tho, I seen it years ago when I was visiting Canada.
    +1
  • BakerMan @ BakerMan:
    this is my first aurora tbh
    +1
  • BakerMan @ BakerMan:
    i mean, multiple have happened in my lifetime, but it's always been too cloudy
  • BakerMan @ BakerMan:
    IT'S LIKE THAT ALMOST EVERY FUCKING METEOR SHOWER TOO
  • BigOnYa @ BigOnYa:
    You need to setup a time lapse camera, be neat
    BigOnYa @ BigOnYa: You need to setup a time lapse camera, be neat