• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Forum moderator applications are now open! Click here for details.
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

Development: The 4th gen class split in 3rd gen

1,323
Posts
16
Years
  • Seen Dec 9, 2023
I've spotted what could potentially be a huge bug in the FR version of the hack. I'm not 100% certain exactly what it actually breaks, but it breaks something.
I can confirm that it completely breaks the functionality of Blaze, Torrent, Overgrow and probably (although I have yet to see the check itself) Swarm. It also breaks some sort of check which would normally halve the amount of damage dealt for certain types of attack under certain circumstances.

To see evidence for yourself, go to 0x3F102. You will see there are a bunch of type based checks, which read the category byte kept in R9. Under normal circumstances, the game will check the type, and if it matches, will branch link to 0x19F18, passing 0xE in R0, 0x0 in R1, 0x0 in R2 and a changeable byte (seems to depend on the type) in R3. What this checks and returns, I do not know.

However, due to the split changes implemented, none of these checks ever pass, and as such, whatever this piece of functionality is, as well as the abilities named above, simply do not work.
I can confirm that this bug is present in the Ruby version of the hack as well, so it most likely is also present in the Emerald one too, since the Emerald one was by Darthatron, and the Ruby hack I did is based off of Darthatron's.
 

Agastya

Grinding failed. Item Grind level dropped by 3.
73
Posts
14
Years
  • Age 33
  • Seen Mar 19, 2023
I guess while we're talking about it, Weather Ball's damage is minimal just like Hidden Power's. Probably a side effect of it being so small compared to the JP ones, none of the type-related checks are in it, just damage and type effectiveness.

Also, what does Sandstorm not increasing SDef until 4th gen have to do with anything? Isn't this a a thread for research into a hack emulating 4th gen mechanics in 3rd gen ROMs? The JP hacks posted by pokemon1412 (on this page, post #134) have those implemented along with offsets in JP ROMs about what does what. People with actual technical knowledge about what's going on in the ROMs could probably just look at those and reverse-engineer them.


big talk for somebody who doesnt know whats actually going on in a rom, huh
 

Jambo51

Glory To Arstotzka
736
Posts
14
Years
  • Seen Jan 28, 2018
I guess while we're talking about it, Weather Ball's damage is minimal just like Hidden Power's. Probably a side effect of it being so small compared to the JP ones, none of the type-related checks are in it, just damage and type effectiveness.

Cheers, I'll investigate it and see if this is still the case after I've applied my fix.

Also, what does Sandstorm not increasing SDef until 4th gen have to do with anything? Isn't this a a thread for research into a hack emulating 4th gen mechanics in 3rd gen ROMs? The JP hacks posted by pokemon1412 (on this page, post #134) have those implemented along with offsets in JP ROMs about what does what. People with actual technical knowledge about what's going on in the ROMs could probably just look at those and reverse-engineer them.

All I was saying is rather than being a bug, it was an oversight. We should still apply it, but it's not a bug. That was all I was getting at.
 
11
Posts
11
Years
  • Seen Jul 10, 2012
Sorry to ask, but with the various links to different patches, what patch(es) and script do I need to implement this is Fire red? New to this, and want to do a good job with my rom.

-----------

Reread the board with a clear head (stupid that I read this last night while tired). Got the code, just need to implement it. Aware of the glitches involving torrent,blaze etc, and sunny day/rain dance.
Many thanks to you all, your persistence is incredible.

These definitely do not work under Darthatron's system, but there is a fix available. It's not ideal, but it works.

Could you possibly please point me in the direction of the fix?



Also one last question. Does the version of the rom matter? I backed up my own ruby and fire red, they're EU rather than US.
 
Last edited:

Jambo51

Glory To Arstotzka
736
Posts
14
Years
  • Seen Jan 28, 2018
Could you possibly please point me in the direction of the fix?

I haven't released it yet, hence why you can't find it. I'll dig it up and tag it onto the end of this post when I find it.

Also one last question. Does the version of the rom matter? I backed up my own ruby and fire red, they're EU rather than US.

Yes, it matters. Everything we have researched will explicitly only work on the US version of the ROM. The thing is, you MAY have a US version. The english european ROM was actually the american one!

Boot up your FR ROM. If it is in english and it does NOT say Game Freak Presents, then you should be good to go.
 

Agastya

Grinding failed. Item Grind level dropped by 3.
73
Posts
14
Years
  • Age 33
  • Seen Mar 19, 2023
Not to sound rude or anything, but it sure is taking you a while to dig up and post a fix that you supposedly had a few months ago..

Actually, why didn't you just post the actual fix then, anyway? It would have saved everybody a lot of time, and it probably would have already been ported to the other third gen games by now, too.
 

Jambo51

Glory To Arstotzka
736
Posts
14
Years
  • Seen Jan 28, 2018
Not to sound rude or anything, but it sure is taking you a while to dig up and post a fix that you supposedly had a few months ago..

Actually, why didn't you just post the actual fix then, anyway? It would have saved everybody a lot of time, and it probably would have already been ported to the other third gen games by now, too.

I haven't posted it since then because I was:
1) Testing the damned thing to make sure it worked
2) Being busy with exams and coursework
3) Having a life beyond hacking

Code:
.text
.align 2
.thumb
.thumb_func
.global LCDPSSGlitchFix
main:
 ldr r0, [sp, #0x8]
 lsl r1, r0, #0x1
 add r1, r1, r0
 lsl r1, r1, #0x2
 ldr r0, attackdata
 add r0, r0, r1
 ldrb r0, [r0, #0x2]
 mov r11, r0
 mov r2, r11
 cmp r2, #0xD
 bne continue
 mov r0, #0x0
 str r0, [sp, #0x0]
 ldr r0, return
 bx r0
continue: ldr r3, returntwo
 bx r3
.align
return: .word 0x0803F10D
returntwo: .word 0x0803F127
attackdata: .word 0x08250C04

At 0x3F102, change the code to 01 4A 10 47 00 00 XX XX XX 08.

That isn't all though, you also need to change:

0803F126: 5B 46
0803F14A: 58 46
0803F17A: 5A 46
0803F1AA: 58 46
0803F1DA: 5A 46

You should be good to go after that.
 

DoesntKnowHowToPlay

Tiny Umbrella with Lots and Lots of Good
265
Posts
12
Years
  • Seen Feb 24, 2024
I see a number of problems with this fix- it doesn't appear to resolve hold items or weather, which will still check against register 9. Weather Ball and Hidden Power will also probably break, as they operate by changing register 9. Thick Fat is also untouched, and will thus never work as it checks register 9 for type (and even if that was fixed it'd only weaken special attacks).

Implementation-wise I'm not too fond of this either- if we used register 11 for the physical/special byte, and register 9 for the type, things like Mud Sport and pinch abilities would solve themselves. It'd also be nice if we could do this without method hijacking, so that non-ASM savvy people can implement this with little difficulty.

Anyway, I've spent the last week working on this, and have a working fix here: s7.zetaboards.com/Nuzlocke_Forum/topic/8679031/1/#new
 

Jambo51

Glory To Arstotzka
736
Posts
14
Years
  • Seen Jan 28, 2018
My exact words were that it wouldn't be perfect, nor was it ideal. What someone needs to do (as boring as it is) is sit and go through the entire damage calculation part of the routine, and see if we can catch any such bugs. It is entirely possible that there are others which we have missed at some stage in this routine.

Anyway, I've spent the last week working on this, and have a working fix here: s7.zetaboards.com/Nuzlocke_Forum/topic/8679031/1/#new

What possible use is this for people such as myself who cannot access the page because we're not members? Would you kindly post it here, and we can go from there?
 
Last edited:

Jambo51

Glory To Arstotzka
736
Posts
14
Years
  • Seen Jan 28, 2018
Well it doesn't really matter now that we have a perfect split!

We don't, sadly. All we have achieved so far is to put out fires, as it were. We're not actually solving the original problem.

I still propose that someone fully dissassembles the relevant part of the ROM and ensures that all the checks and such are correct, and if not, we can then fix then and be sure of said things working. However, until someone does this, we could have missed any small check.
 
5
Posts
15
Years
  • Age 27
  • Seen Jul 4, 2020
My exact words were that it wouldn't be perfect, nor was it ideal. What someone needs to do (as boring as it is) is sit and go through the entire damage calculation part of the routine, and see if we can catch any such bugs. It is entirely possible that there are others which we have missed at some stage in this routine.



What possible use is this for people such as myself who cannot access the page because we're not members? Would you kindly post it here, and we can go from there?
this is what people who dont have pc accounts have to deal with all the time

We don't, sadly. All we have achieved so far is to put out fires, as it were. We're not actually solving the original problem.

I still propose that someone fully dissassembles the relevant part of the ROM and ensures that all the checks and such are correct, and if not, we can then fix then and be sure of said things working. However, until someone does this, we could have missed any small check.

Maybe all you have done is put out fires, but the split Doesn't created actually implements the split without skipping vital checks, like type items or pinch abilities. The only thing it doesnt do is add the SDef boost for rock types during sandstorm.
 

Jambo51

Glory To Arstotzka
736
Posts
14
Years
  • Seen Jan 28, 2018
this is what people who dont have pc accounts have to deal with all the time

Really? Even before I signed up for an account, I could READ PC, if nothing else. Admittedly, that was some time ago, and could have changed since then...

Maybe all you have done is put out fires, but the split Doesn't created actually implements the split without skipping vital checks, like type items or pinch abilities. The only thing it doesnt do is add the SDef boost for rock types during sandstorm.

Forgive me for being cynical, but until I see it, I won't believe it. However, don't get me wrong, I've been looking at this code on and off for ages, and I got sick of it, because it's just so boring. So props to you (or whomever made it) if there is a 100% working one.
 
42
Posts
13
Years
  • Seen Aug 13, 2021
As a mod over at the forum that Doesnt linked to, I can assure you it works as he described. Basically, he just sat down and analyzed the JP split that was posted in this and applied the same logic to an English ROM. Its not a straight hex copy either, which was the problem with the first patch from over a year ago.

He would have just posted it here, but post count limits don't let him link to other sites or to attach files so he really couldn't. I'll ask him if he wants me to post it for him.
 
15
Posts
12
Years
  • Seen Jun 2, 2017
How do you put in that Emerald Phy./Spe. split?

The numbers on the left are the hex locations, the numbers on the right are the hex values you need to put in. If you don't have a hex editor, you'll need one- I use XVI32 myself.
 
9
Posts
14
Years
  • Seen Aug 11, 2014
I know barely anything about the actual steps of ROM-hacking, but I do understand what this could/would do for the actual community and the hacks themselves , and I am very excited to see if this pans out the way i hope!
 

thechurchofcage

a.k.a. The Cancer Fairy
124
Posts
15
Years
  • Age 54
  • Seen Jul 24, 2023
Sorry if this seems a stupid question, but I'm a bit confused. With what sort of hex editor are you supposed to find these eight digit pointers (in Emerald)? I'm sorry, but I'm having trouble finding them and I've looked up some hex editing tutorials which haven't given me any answers. Thanks!
 
Back
Top