• 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 places on the 'net to talk Pokémon and more! Community members will not see the bottom screen advertisements.
  • Want to share your adventures playing Pokémon?
    Check out our new Travel Journals forum for sharing playthroughs of ROM Hacks, Fan Games, and other Pokémon content!
  • IMPORTANT: Following a takedown request, the following hacks have been delisted from PokéCommunity:

    • Pokémon Glazed
    • Pokémon: Giratina Strikes Back
    • Pokémon Flora Sky
    • Pokémon Stranded
    The downloads and discussion threads for these hacks will no longer be accessible, and staff will be unable to return questions regarding accessing this content.

Research: Fire Red Overworld Unknown Byte

Akiba

[img]http://i.imgur.com/o3RYT4v.png[/img]
4,262
Posts
12
Years
I have been doing some research on the Unknown Values for Overworld Strings in Fire Red.

This thread may also serve as a somewhat sketchy Advanced Tutorial for OW Palette modification.

For reference on adding new OWs: [Other] Adding New Overworlds into FireRed for Dummies
For reference on adding new OW Palettes: [Other] New palettes in Fire Red for OW's!

In the game, the first byte after the two FF bytes coincides with the ID of the Palette used by the overworld. However, editing this byte by itself does not seem to affect the game. I have tested and confirmed this. Instead, the first byte of the four OAM data bytes appear to dictate which palette is used by the OW.

The byte conversion originally appears to be [Palette ID]+[0xF].
(Refer to the latter section of the post)

Following this pattern, Palette 0x20 should be called with byte 0x2F.

However, when that is put into practice:
OWR6_zpsc9960bde.png


We get this:
OWR7_zpseac846b8.png


That Axew seems a bit black, does it not?


After experimentation, I found that Palette 0x20 is called with byte 0x2A:
OWR8_zps2979d8f1.png


And we get this:
OWR9_zps6835daa7.png


Much better.


But now, we must play a game of Psychiatrist, and deduce how this unknown byte actually points to the Palette of our desire.

Consider the following strings from the original Fire Red:

Palette 0x0 is called with byte 0x10.
OWR1_zps7ce82e81.png


Palette 0x3 is called with byte 0x12.
OWR2_zpsc8b18dec.png


Palette 0x4 is called with byte 0x13.
OWR3_zpsaa4f85c9.png



However, as I insert my own palettes and new tables, the pattern becomes increasingly elusive.

Palette 0x21 is called with byte 0x22.
OWR4_zps66bf6c59.png


Palette 0x23 is called with byte 0x30.
OWR5_zps84abaa74.png



Furthermore, as I add more sprites and palettes, I must constantly change the bytes, as they seem to point to different palettes each time.

If anyone has a revelation about this, please contribute to this research.
 
Last edited:

GoGoJJTech

(☞゚ヮ゚)☞ http://GoGoJJTech.com ☜(゚ヮ゚☜)
2,475
Posts
11
Years
At first I added a new pallet but it came up like so:
4vizdh.png


I used pallet 0x20 or 32 in dec. so I changed the unknown to 23 and it worked.
2iuz4lz.png


But when I exited a battle it became the hero's pallet so at least that's a start!
 

Aryan143

The Fennekin Fan!
757
Posts
11
Years
Oh god. If you have posted it a few days back, my old project wouldn't have been cancelled. Anyways, thanks for sharing this information.
 

Akiba

[img]http://i.imgur.com/o3RYT4v.png[/img]
4,262
Posts
12
Years
Oh god. If you have posted it a few days back, my old project wouldn't have been cancelled. Anyways, thanks for sharing this information.

You're welcome, I guess. Sorry about your hack...

Also, I seem to have found a pattern in the bytes, most likely pointing to an encryption.
 

karatekid552

What happens if I push it?....
1,771
Posts
11
Years
The second byte's lower half, that you have highlighted in Blue, was found by JPAN to control which palette slot the palette was put into. This allowed for fixing the problems that come into play when two different OWs are using the same slot but different palettes. The most often example is the player's palette being changed to match the palette of another on screen OW because of this.

However, the upper half of the byte is a still a mystery.

So, if you made it XY, then X is the mystery and Y is the palette slot.

Have you learned anything more about this encryption you were researching?


Edit: Knizz has found a routine that uses the first byte in Y. He doesn't know what it does yet, but he has found something that uses it.
 
Last edited:

GoGoJJTech

(☞゚ヮ゚)☞ http://GoGoJJTech.com ☜(゚ヮ゚☜)
2,475
Posts
11
Years
As soon as I step into the grass an OW pal changes color to this.
stuff_zpsa203b4f6.png


Just an FYI, pal 2D is the pal for grass, so changing an OW pal to it makes that happen when interacting with grass.
 

GoGoJJTech

(☞゚ヮ゚)☞ http://GoGoJJTech.com ☜(゚ヮ゚☜)
2,475
Posts
11
Years
Sorry for double posting, but when using the Bag, Trainer card, Option, Pokemon, or Pokedex selections, all the new palettes get reverted to the original ones from the game until you encounter other OWs. I think it's a bug with the actual hacked engine, but either way, it's a glitch.
 

karatekid552

What happens if I push it?....
1,771
Posts
11
Years

knizz

192
Posts
16
Years
  • Seen Oct 28, 2020
Some OW:
Code:
083A3BB0  FF FF 00 11 [B]02 11[/B] 00 02  10 00 20 00 10 01 00 00
083A3BC0  10 37 3A 08 9C 37 3A 08  70 34 3A 08 A0 00 3A 08
083A3BD0  FC 1C 23 08

Afaik the highlighed value is looked up in this table to get the pointer to the palette:

Code:
083A5158  28 D8 36 08 03 11 00 00  48 D8 36 08 04 11 00 00
083A5168  68 D8 36 08 05 11 00 00  88 D8 36 08 06 11 00 00
083A5178  A8 D8 36 08 07 11 00 00  C8 D8 36 08 08 11 00 00
083A5188  E8 D8 36 08 09 11 00 00  08 D9 36 08 0A 11 00 00
083A5198  68 B9 35 08 00 11 00 00  68 E9 35 08 01 11 00 00
083A51A8  [U]88 E9 35 08[/U] [B]02 11[/B] 00 00  08 80 39 08 0B 11 00 00
083A51B8  28 80 39 08 0C 11 00 00  68 B9 35 08 10 11 00 00
083A51C8  68 E9 35 08 11 11 00 00  A8 4E 39 08 13 11 00 00
083A51D8  E8 5A 39 08 15 11 00 00  C8 52 39 08 14 11 00 00
083A51E8  00 00 00 00 00 00 00 00  01 11 01 11 01 11 01 11

I didn't test it. I hope that helps
 

karatekid552

What happens if I push it?....
1,771
Posts
11
Years
Some OW:
Code:
083A3BB0  FF FF 00 11 [B]02 11[/B] 00 02  10 00 20 00 10 01 00 00
083A3BC0  10 37 3A 08 9C 37 3A 08  70 34 3A 08 A0 00 3A 08
083A3BD0  FC 1C 23 08

Afaik the highlighed value is looked up in this table to get the pointer to the palette:

Code:
083A5158  28 D8 36 08 03 11 00 00  48 D8 36 08 04 11 00 00
083A5168  68 D8 36 08 05 11 00 00  88 D8 36 08 06 11 00 00
083A5178  A8 D8 36 08 07 11 00 00  C8 D8 36 08 08 11 00 00
083A5188  E8 D8 36 08 09 11 00 00  08 D9 36 08 0A 11 00 00
083A5198  68 B9 35 08 00 11 00 00  68 E9 35 08 01 11 00 00
083A51A8  [U]88 E9 35 08[/U] [B]02 11[/B] 00 00  08 80 39 08 0B 11 00 00
083A51B8  28 80 39 08 0C 11 00 00  68 B9 35 08 10 11 00 00
083A51C8  68 E9 35 08 11 11 00 00  A8 4E 39 08 13 11 00 00
083A51D8  E8 5A 39 08 15 11 00 00  C8 52 39 08 14 11 00 00
083A51E8  00 00 00 00 00 00 00 00  01 11 01 11 01 11 01 11

I didn't test it. I hope that helps

That was already known. It is a different byte being discussed here.



Edit: since I last visited this thread, I have learned that the game does this on the palette slot byte:

Byte AND 0xF -> Palette Slot

The upper half is completely disregarded.
 
18
Posts
13
Years
Well, idk if this its relevant, but I make some little investigation and the OW inserted by me only overwrite the palette 0xA or 0x0 just in some cases, with the anothers, just uses whathever it was load before (Even if there its nothing, just black)

So I star to look how can I make than my OW overwrite the palete there... I don't know how, but if we can do this we can use all the pals...


(MEABE, relevant) I was chequing out some things, and I figured out than when using the 0 pal slot (Hero's one) sometimes It get replaced, sometimes not... So I try to see why... I try with two diferents Ows (Than I Insert) one replace it, and the another not, when I go to the data, the only differece was the pal number and the sprites pointer... So I try changing the pal number and it works, now both replace the pal (using the 20, btw) but when I try with both using the 23, nothing happens, the new ows use the heros pal, what makes me think that game dosn't load them...

Hope This Help!
 
29
Posts
10
Years
  • Age 31
  • no
  • Seen Apr 20, 2020
sooo... anybody figured out how those UNKNOWNs are calculated? im having problems with this glitch.

i followed this tutorial and manage to create 4 new palettes. successfully put it in OWE and it worked fine. but ingame, whenever i placed i place a sprite w/ new palette... it gets bugged.

i have been trying to do the [pal # + 0xf] and it wont work.
 
Back
Top