The PokéCommunity Forums Fan Games ROM Hacking Research & Development
Research Fire Red Overworld Unknown Byte

Research & Development Got a well-founded knack with ROM hacking? Love reverse-engineering the Pokémon games? Or perhaps you love your assembly language. This is the spot for polling and gathering your ideas, and then implementing them! Share your hypothesis, get ideas from others, and collaborate to create!

Reply
 
Thread Tools
  #1    
Old April 28th, 2013 (2:13 PM). Edited May 2nd, 2013 by Akiba.
Akiba's Avatar
Akiba Akiba is offline
  • Crystal Tier
 
Join Date: Mar 2011
Location: in a gap
Age: 17
Gender: Female
Nature: Brave
Posts: 4,268
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:


We get this:


That Axew seems a bit black, does it not?


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


And we get this:


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.


Palette 0x3 is called with byte 0x12.


Palette 0x4 is called with byte 0x13.



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

Palette 0x21 is called with byte 0x22.


Palette 0x23 is called with byte 0x30.



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.
__________________
Reply With Quote

Relevant Advertising!

  #2    
Old April 29th, 2013 (4:00 PM).
GoGoJJTech's Avatar
GoGoJJTech GoGoJJTech is offline
(☞゚ヮ゚)☞ http://GoGoJJTech.com ☜(゚ヮ゚☜)
  • Gold Tier
 
Join Date: Nov 2012
Location: Earth
Age: 18
Gender: Female
Nature: Jolly
Posts: 2,477
At first I added a new pallet but it came up like so:


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


But when I exited a battle it became the hero's pallet so at least that's a start!
__________________
I believe in Jesus Christ my Savior. If you do too, and aren't scared to admit it, then copy and paste this into your signature.
The HGSS Music Patch - The BW/2 Music Patch - ASM: Switch Music Based on Seasons
Romhack.me Profile - Pokecommunity Profile - Youtube Channel

Support me at my site!
Pokémon Platinum Red and Blue
Reply With Quote
  #3    
Old May 1st, 2013 (3:36 AM).
Aryan143's Avatar
Aryan143 Aryan143 is offline
The Fennekin Fan!
     
    Join Date: Jul 2012
    Location: Delhi, India
    Age: 16
    Gender: Male
    Nature: Modest
    Posts: 756
    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.
    __________________
    Check out my gaming company:

    Reply With Quote
      #4    
    Old May 1st, 2013 (3:42 AM).
    Akiba's Avatar
    Akiba Akiba is offline
    • Crystal Tier
     
    Join Date: Mar 2011
    Location: in a gap
    Age: 17
    Gender: Female
    Nature: Brave
    Posts: 4,268
    Quote:
    Originally Posted by Aryan143 View Post
    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.
    __________________
    Reply With Quote
      #5    
    Old May 5th, 2013 (7:35 AM).
    Spherical Ice's Avatar
    Spherical Ice Spherical Ice is offline
    • Moderator
    • Silver Tier
     
    Join Date: Nov 2007
    Location: Bristol, UK
    Age: 19
    Posts: 5,094
    Quote:
    Originally Posted by DeltaSalamence View Post
    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.
    Don't leave us hanging mang! I need this too, so if you have a pattern it would help to post it, even if it's not right.
    __________________

    A Pokemon that is discriminated!
    Support squirtle and make it everyone's favourite.
    Reply With Quote
      #6    
    Old June 24th, 2013 (8:05 AM). Edited July 1st, 2013 by karatekid552.
    karatekid552's Avatar
    karatekid552 karatekid552 is offline
    What happens if I push it?....
       
      Join Date: Nov 2012
      Location: Do you really want to know? Really?
      Gender: Male
      Nature: Bold
      Posts: 1,766
      Send a message via AIM to karatekid552 Send a message via Windows Live Messenger to karatekid552
      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.
      __________________

      Paired with Simba
      Reply With Quote
        #7    
      Old July 1st, 2013 (3:07 PM).
      GoGoJJTech's Avatar
      GoGoJJTech GoGoJJTech is offline
      (☞゚ヮ゚)☞ http://GoGoJJTech.com ☜(゚ヮ゚☜)
      • Gold Tier
       
      Join Date: Nov 2012
      Location: Earth
      Age: 18
      Gender: Female
      Nature: Jolly
      Posts: 2,477
      As soon as I step into the grass an OW pal changes color to this.


      Just an FYI, pal 2D is the pal for grass, so changing an OW pal to it makes that happen when interacting with grass.
      __________________
      I believe in Jesus Christ my Savior. If you do too, and aren't scared to admit it, then copy and paste this into your signature.
      The HGSS Music Patch - The BW/2 Music Patch - ASM: Switch Music Based on Seasons
      Romhack.me Profile - Pokecommunity Profile - Youtube Channel

      Support me at my site!
      Pokémon Platinum Red and Blue
      Reply With Quote
        #8    
      Old August 28th, 2013 (9:53 AM).
      GoGoJJTech's Avatar
      GoGoJJTech GoGoJJTech is offline
      (☞゚ヮ゚)☞ http://GoGoJJTech.com ☜(゚ヮ゚☜)
      • Gold Tier
       
      Join Date: Nov 2012
      Location: Earth
      Age: 18
      Gender: Female
      Nature: Jolly
      Posts: 2,477
      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.
      __________________
      I believe in Jesus Christ my Savior. If you do too, and aren't scared to admit it, then copy and paste this into your signature.
      The HGSS Music Patch - The BW/2 Music Patch - ASM: Switch Music Based on Seasons
      Romhack.me Profile - Pokecommunity Profile - Youtube Channel

      Support me at my site!
      Pokémon Platinum Red and Blue
      Reply With Quote
        #9    
      Old August 28th, 2013 (1:43 PM).
      karatekid552's Avatar
      karatekid552 karatekid552 is offline
      What happens if I push it?....
         
        Join Date: Nov 2012
        Location: Do you really want to know? Really?
        Gender: Male
        Nature: Bold
        Posts: 1,766
        Send a message via AIM to karatekid552 Send a message via Windows Live Messenger to karatekid552
        Quote:
        Originally Posted by gogojjtech View Post
        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.
        Gogojjtech: This will solve that issue: http://www.romhackersonline.com/showthread.php?t=14286-REAL-Runtime-Player-Customization-PKMN-GBA
        __________________

        Paired with Simba
        Reply With Quote
          #10    
        Old September 23rd, 2013 (6:46 AM).
        knizz's Avatar
        knizz knizz is offline
           
          Join Date: Aug 2007
          Posts: 192
          Some OW:
          Code:
          083A3BB0  FF FF 00 11 02 11 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  88 E9 35 08 02 11 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
          __________________
          Firered IDA 6.6 DB: https://www.dropbox.com/s/d856o3pyndyr5sr/firered.idb
          VBA-M with lua scripting support
          Reply With Quote
            #11    
          Old September 23rd, 2013 (10:07 AM).
          karatekid552's Avatar
          karatekid552 karatekid552 is offline
          What happens if I push it?....
             
            Join Date: Nov 2012
            Location: Do you really want to know? Really?
            Gender: Male
            Nature: Bold
            Posts: 1,766
            Send a message via AIM to karatekid552 Send a message via Windows Live Messenger to karatekid552
            Quote:
            Originally Posted by knizz View Post
            Some OW:
            Code:
            083A3BB0  FF FF 00 11 02 11 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  88 E9 35 08 02 11 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.
            __________________

            Paired with Simba
            Reply With Quote
              #12    
            Old January 8th, 2014 (8:07 PM).
            Cheve_X's Avatar
            Cheve_X Cheve_X is offline
               
              Join Date: Dec 2010
              Location: Argentina
              Gender: Male
              Posts: 18
              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!
              __________________
              Free Your Spirit!






              Reply With Quote
                #13    
              Old April 10th, 2014 (11:31 AM).
              pengoy's Avatar
              pengoy pengoy is offline
                 
                Join Date: Sep 2013
                Location: no
                Gender: Other
                Nature: Lonely
                Posts: 32
                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.
                Reply With Quote
                Reply
                Quick Reply

                Sponsored Links
                Thread Tools

                Posting Rules
                You may not post new threads
                You may not post replies
                You may not post attachments
                You may not edit your posts

                BB code is On
                Smilies are On
                [IMG] code is On
                HTML code is Off

                Forum Jump


                All times are GMT -8. The time now is 9:44 PM.