The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > ROM Hacking > Research & Development
Sign Up Rules/FAQ Live Battle Blogs Mark Forums Read

Notices

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!
Research & Development programs in this forum are subject to moderator approval before they are displayed.


Advertise here

Reply
 
Thread Tools
  #1    
Old April 28th, 2013, 02:13 PM
Synchronous's Avatar
Synchronous
Lying is my forte, you know?
Community Supporter
 
Join Date: Mar 2011
Location: in a「daze」
Age: 15
Gender: Male
Nature: Quiet
Send a message via Skype™ to Synchronous

Advertise here
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.
__________________

Last edited by Synchronous; May 2nd, 2013 at 06:54 AM.
Reply With Quote
  #2    
Old April 29th, 2013, 04:00 PM
GoGoJJTech's Avatar
GoGoJJTech
GoGo
 
Join Date: Nov 2012
Location: Earth
Age: 15
Gender: Male
Nature: Quiet
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!
__________________
Reply With Quote
  #3    
Old May 1st, 2013, 03:36 AM
Aryan143's Avatar
Aryan143
The Fennekin Fan!
 
Join Date: Jul 2012
Location: Delhi, India
Age: 14
Gender: Male
Nature: Modest
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.
__________________

Please click both of these links once in a day and help us grow:

Reply With Quote
  #4    
Old May 1st, 2013, 03:42 AM
Synchronous's Avatar
Synchronous
Lying is my forte, you know?
Community Supporter
 
Join Date: Mar 2011
Location: in a「daze」
Age: 15
Gender: Male
Nature: Quiet
Send a message via Skype™ to Synchronous
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, 07:35 AM
Spherical Ice's Avatar
Spherical Ice
Community Supporter
 
Join Date: Nov 2007
Location: UK
Send a message via Skype™ to Spherical Ice
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.
__________________
Reply With Quote
  #6    
Old June 24th, 2013, 08:05 AM
karatekid552's Avatar
karatekid552
What happens if I push it?....
 
Join Date: Nov 2012
Location: Do you really want to know? Really?
Gender: Male
Nature: Bold
Send a message via AIM to karatekid552 Send a message via Windows Live Messenger to karatekid552 Send a message via Skype™ 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

Last edited by karatekid552; July 1st, 2013 at 03:49 PM.
Reply With Quote
  #7    
Old July 1st, 2013, 03:07 PM
GoGoJJTech's Avatar
GoGoJJTech
GoGo
 
Join Date: Nov 2012
Location: Earth
Age: 15
Gender: Male
Nature: Quiet
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.
__________________
Reply With Quote
  #8    
Old August 28th, 2013, 09:53 AM
GoGoJJTech's Avatar
GoGoJJTech
GoGo
 
Join Date: Nov 2012
Location: Earth
Age: 15
Gender: Male
Nature: Quiet
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.
__________________
Reply With Quote
  #9    
Old August 28th, 2013, 01:43 PM
karatekid552's Avatar
karatekid552
What happens if I push it?....
 
Join Date: Nov 2012
Location: Do you really want to know? Really?
Gender: Male
Nature: Bold
Send a message via AIM to karatekid552 Send a message via Windows Live Messenger to karatekid552 Send a message via Skype™ 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/show...ation-PKMN-GBA
__________________

Paired with Simba
Reply With Quote
  #10    
Old September 23rd, 2013, 06:46 AM
knizz's Avatar
knizz
 
Join Date: Aug 2007
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.1 DB: https://www.dropbox.com/s/hvvmxxoo1dkmdzc/firered.idb
VBA-M with lua scripting support (no longer in development)
Reply With Quote
  #11    
Old September 23rd, 2013, 10:07 AM
karatekid552's Avatar
karatekid552
What happens if I push it?....
 
Join Date: Nov 2012
Location: Do you really want to know? Really?
Gender: Male
Nature: Bold
Send a message via AIM to karatekid552 Send a message via Windows Live Messenger to karatekid552 Send a message via Skype™ 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, 08:07 PM
Cheve_X's Avatar
Cheve_X
 
Join Date: Dec 2010
Location: Argentina
Gender: Male
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
 
Join Date: Sep 2013
Location: Philippines
Gender: Male
Nature: Lonely
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.
__________________

| Pokemon Dreaded Jewel | Dev: 4 Towns, 2 Gyms | 493 Pokemons, Some Gen4 moves |

Still in development hell.
Reply With Quote
Reply
Quick Reply

Sponsored Links


Advertise here
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
Minimum Characters Per Post: 25



All times are UTC -8. The time now is 10:58 PM.


Style by Nymphadora, artwork by Sa-Dui.
Like our Facebook Page Follow us on Twitter © 2002 - 2014 The PokéCommunity™, pokecommunity.com.
Pokémon characters and images belong to The Pokémon Company International and Nintendo. This website is in no way affiliated with or endorsed by Nintendo, Creatures, GAMEFREAK, The Pokémon Company or The Pokémon Company International. We just love Pokémon.
All forum styles, their images (unless noted otherwise) and site designs are © 2002 - 2014 The PokéCommunity / PokéCommunity.com.
PokéCommunity™ is a trademark of The PokéCommunity. All rights reserved. Sponsor advertisements do not imply our endorsement of that product or service. User generated content remains the property of its creator.