![]() |
Expanding # of palettes in JPAN's engine
Can somebody explain the process of creating several new palettes at once using JPAN's hacked engine? I was able to follow this tutorial and add a single palette, but I don't understand the actual process enough to figure out how to insert multiple palettes at once (if that makes sense). I would like to be able to actually make sense of what's going on with the data rather than just follow the tutorial to the tee.
1. Find out how many palettes are needed (20). Multiply number of needed palettes by 32 and type result (640) into FSF. This will find an offset that's large enough to hold 640 bytes. 2. Insert palette into NSE for unmodified game. Write down the palette offset. 3. Navigate to 0x1A2400 in JPAN rom. Insert pointer before end of table (string that designates palette numbers and offset). 4. Open unmodified rom in a hex editor. Navigate to the palette offset and copy 32 bytes. Go back to your hex editor with the JPAN rom and navigate to FSF offset and paste the data. (for additional palettes, add 32 to offset) 5. MUST CHANGE PALETTE NUMBER MANUALLY IN HEX EDITOR. (Say you wanted to edit the male hero from Ruby’s sprite. See what he sprite offset is in NSE and write it down. 0x3A3C64. Go to that address in the JPAN rom. The palette number is the third byte over. So change that to a 20. 6. Now open your Overworld Editor Rebirth sprites.ini file. Go down to the English Fire red and change the SpritePaletteHeader pointer to 1A2400. |
Sorry for the bump, but is there anybody that can explain this? I'd really like to understand the process.
|
Yeah, so you're not going to understand what's going on here from this guide. The writer is just showing how a process is done, and there's no documentation in this guide. I don't think that this is open source or the research is explained. If it is, feel free to link that that instead, maybe I can help you from there.
But basically it's just a table of pointers, where each pointer is a pointer to some palette data. What the guy here is doing is using FSF to find free space for X palettes then using that as a pointer. He states that each pal takes 64 bytes (I think that's a typo of some sort, cause OW pals are 16 colors and that's just 32 bytes). What you can do is Needed space = (32 * number of pals you want). Then you use the resulting number as the amount of bytes to search for. Each pointer would be the pointer to free space FSF gave you + 32 for each successive palette. Hopefully that makes sense. I can't explain the actual process of the routine, or how it works though without seeing the source/further documentation. |
Quote:
Say I want to insert 10 palettes. I would need 320 bytes, so I type that into FSF and the first usable offset it finds is x800000. Do I have to repeat that step for each individual palette, or can I do all 10 at once? |
Quote:
Basically, Pal offset = FSF_offset + ( 32 * (pal_number - 1)) pal_number is supposed to be which pal you're trying to get the pointer of. The second one pal_number is 0x1, third it's 0x2 and so on. Don't forget to convert 32 to hex when adding and subtracting from FSF's hex pointer. |
I got the chance to test this out again. I think I have it understood for the most part, but I have a couple final questions for you if you don't mind answering them.
Spoiler:
This part is a little confusing. The fact that he decided to insert palette with the number 32 is completely coincidental, yes? If I'm understanding this correctly, he could have used 31, 17, 92, etc. if he wanted to. Also, let's say I found free space at x16159C. Would I insert it like so?: 9C 15 16 80 Spoiler:
He's basically inserting a new palette number into the rom at this step, right? For example, If I wanted to insert palette numbers 11 and 12, it would look something like this: 00 00 80 08 0B 11 00 00 (inserting palette number 11 to 800000) / 02 00 80 08 0C 11 00 00 (inserting palette 12 to 800020) / 00 00 00 00 / FF 11 00 00 The offsets 800000 and 800020 are where the data for the individual palettes are actually stored, yes? |
Quote:
Quote:
Quote:
|
Great, it all makes sense now. I really appreciate all the help, FBI.
The tutorial was good, but it didn't really explain much. It's kinda like that saying; catch somebody a fish and you feed them for a day, but teach them how to catch a fish and you feed them for life. |
Quote:
Quote:
9C 15 16 80, the format Sensual posted, would actually lead to address 8016159C. Before it causes a problem for him/her, it would actually be 9C 15 16 08, no? I know that you know this and that the person that apparently wrote the guide that Sensual quoted got it wrong, too, but... |
Quote:
|
| All times are GMT -8. The time now is 2:30 AM. |
![]()
© 2002 - 2018 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 - 2016 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.
Acknowledgements
Use of PokéCommunity Assets
vB Optimise by DragonByte Technologies Ltd © 2023.