øAslickproductions.org/forum/index.php?PHPSESSID=5f0fck550j2m4m2fpbtkj2vkm1&topic=2062.msg23301e:/My Web Sites/Slick Productions - FFIV Message Board/slickproductions.org/forum/index5903.htmlslickproductions.org/forum/index.php?PHPSESSID=5f0fck550j2m4m2fpbtkj2vkm1&topic=2062.0e:/My Web Sites/Slick Productions - FFIV Message Board/slickproductions.org/forum/index5903.html.zxÇ$g^ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÈЦaOKtext/htmlISO-8859-1gzip@øÕ¦aÿÿÿÿÿÿÿÿTue, 10 Mar 2020 05:41:49 GMT0ó°° ®0®P®€§²ð®Æ$g^ÿÿÿÿÿÿÿÿ9¦a Question Regarding Map Palettes

Author Topic: Question Regarding Map Palettes  (Read 2642 times)

Bahamut ZERO

  • Cagnazzo
  • *
  • Posts: 347
  • Gender: Male
  • If ye're takin a beatin, hop in de back row!
    • View Profile
Question Regarding Map Palettes
« on: June 05, 2015, 03:26:03 PM »
Awhile back I ported the JP version of FF4's save graphics over to the project I'm working on. For the most part this quick copy/paste job was a succees, minus the save graphic used in the Caves Tileset.

The save graphic for the caves tileset is a campsite-esque looking thing which is also used as a bloodstain-esque looking thing in the Sealed Cave tileset (they're both seperate graphics, though).  In the JP version's Caves Tileset, the Save Graphic is the same color as the cicle of stones that surround it, yet when ported to the US version, it has the same bright red colors as it would with the Sealed Cave's normal palette.

At the time it didn't really bother me much, but now I'm quite curious to find out what's going on here.

Taking a look at the tileset in YYCHR using a savestate, I noticed that all the 8-color palettes used for the normal maps are loaded into YYCHR's palette selecter, making me wonder: Are the numbered palettes I see in FF4kster's Tileset editor (1-32) just combinations of these 8-color palettes?

Or to better clarify - Is there a way I could change a tiles 8-color palette in one of the numbered map palletes?

Basically I want to change the palette that the save graphic uses in Map Palette 14 (based on the hex numbers that YYCHR are showing me) from:

78 79 7A 7B 7C 7D 7E 7F

To:

60 61 62 63 64 65 66 67


It would then look exaclty like what I see when messing around in the JP version of the Watery Cave.
I update my graphics thread on almost a daily basis, so keep an eye out for new stuff!

chillyfeez

  • FF4 Hacker
  • *
  • Posts: 1,285
  • Gender: Male
  • Go ahead, ask me about Angel Feathers!
    • View Profile
Re: Question Regarding Map Palettes
« Reply #1 on: June 05, 2015, 03:57:47 PM »
Grimoire and I have dabbled in this topic before. I don't know if we have a full concrete answer at this very moment, but...
Quote
Are the numbered palettes I see in FF4kster's Tileset editor (1-32) just combinations of these 8-color palettes?
The short answer is yes.
I'm not home, and won't have the ability to elaborate on this til probably tomorrow, but if you look through Grimoire's Combat Boost thread over on RHDN
http://www.romhacking.net/forum/index.php/topic,17723.0.html
and find the part where he's talking about creating the Everwhite Woods dungeon, that's where we talked about it.
More information is probably available than what we discussed there, but that's the best I can do right now.

Bahamut ZERO

  • Cagnazzo
  • *
  • Posts: 347
  • Gender: Male
  • If ye're takin a beatin, hop in de back row!
    • View Profile
Re: Question Regarding Map Palettes
« Reply #2 on: June 06, 2015, 03:42:28 PM »
Hmm... I may have missed something (or something went over my head). Perhaps I need to read through it again (or maybe a few more times) and I might grasp it better. Hopefully then I'll have some idea of how to get the Watery Pass save graphic to use the same palette as the stone circle.

Though the conversation about battleback grounds and thier alt palettes was certainly extremely useful to me. I had no idea the Msytery Flag in Map Info could do that!
I update my graphics thread on almost a daily basis, so keep an eye out for new stuff!

chillyfeez

  • FF4 Hacker
  • *
  • Posts: 1,285
  • Gender: Male
  • Go ahead, ask me about Angel Feathers!
    • View Profile
Re: Question Regarding Map Palettes
« Reply #3 on: June 06, 2015, 05:47:34 PM »
Sorry, I know we talked about it there, but I was pretty sure we hadn't discussed everything of import in that discussion.
At any rate, that's the only place I remember any of it being documented.
With a small amount of testing, I was able to determine this: the palette for the Save point when the cave tileset is set to palette 14 is at A6570 (ROM w/o header). I can tell you for almost certain that nothing else in the cave tileset uses that particular palette, so you're good there...
The problem with just changing that palette, though, is that I don't know if/how it might be used in other tilesets with other palette settings. After figuring out where the palette is in ROM, I flew around to some other locations to see if the palette is called in any of them. Towns, castles, other-palette caves - no, so all set. It is called when the game loads Mt. Hobbs/Mt. Ordeals... However it doesn't look like the mountain tileset actually uses that particular palette.
So anyway, long story short (too late, I know), you can edit the palette for that save point by editing the palette at A6570, but you may discover down the road that some other tile was inadvertantly affected as well.
There is a way to edit which palette a particular tile within a particular tileset uses, but I haven't fully researched the exact steps you would have to follow in order to do so. (I've done it with Underworld map tiles only, and while the process is surely the same, the data for world maps are all in completely different locations than the data for location maps).

Gedankenschild

  • Vargas
  • *
  • Posts: 101
  • Gender: Male
    • View Profile
Re: Question Regarding Map Palettes
« Reply #4 on: June 07, 2015, 06:28:10 AM »
chillyfeez to the rescue! You're willingnes to do some extra work to help others is commendable!  :cycle:

If all you want is to change the palette a tile uses, that's pretty easy. I researched that stuff for my own hack. I've been meaning to bring some order to my notes anyway, so I can post it for you in a bit, if you still need it.
You've got to be kidding me with that Dynasty Warriors registration question??!!
I barely know such a series exists...

chillyfeez

  • FF4 Hacker
  • *
  • Posts: 1,285
  • Gender: Male
  • Go ahead, ask me about Angel Feathers!
    • View Profile
Re: Question Regarding Map Palettes
« Reply #5 on: June 07, 2015, 09:12:33 AM »
chillyfeez to the rescue! You're willingnes to do some extra work to help others is commendable!  :cycle:

Aw, shucks
 :blush:

But seriously, I've said it before and I'll say it again, where FFIV is concerned, I'll always help a ROM hacker in need if I can. Partly to pay it forward - I only got into this less than three years ago and I learned a lot pretty quickly thanks to some very helpful folks. But also it usually ends up leading to mining information I can use for my own purposes - like when I spent some time a few months ago helping Rodimus Primal port (a modified version of) the JP title screen into the US game, I learned some great stuff that allowed me to make what I think is a really cool title screen for my own hack, plus in general was able to broaden my knowledge of how SNES graphics are processed. So, win-win.

Anyway,
Quote
If all you want is to change the palette a tile uses, that's pretty easy. I researched that stuff for my own hack. I've been meaning to bring some order to my notes anyway, so I can post it for you in a bit, if you still need it.
Yes, please - I'll definitely have need for that down the road (and it would be the much cleaner solution to ZERO's issue, too).

Bahamut ZERO

  • Cagnazzo
  • *
  • Posts: 347
  • Gender: Male
  • If ye're takin a beatin, hop in de back row!
    • View Profile
Re: Question Regarding Map Palettes
« Reply #6 on: June 08, 2015, 12:35:03 PM »
Sorry, I know we talked about it there, but I was pretty sure we hadn't discussed everything of import in that discussion.
At any rate, that's the only place I remember any of it being documented.
With a small amount of testing, I was able to determine this: the palette for the Save point when the cave tileset is set to palette 14 is at A6570 (ROM w/o header). I can tell you for almost certain that nothing else in the cave tileset uses that particular palette, so you're good there...
The problem with just changing that palette, though, is that I don't know if/how it might be used in other tilesets with other palette settings. After figuring out where the palette is in ROM, I flew around to some other locations to see if the palette is called in any of them. Towns, castles, other-palette caves - no, so all set. It is called when the game loads Mt. Hobbs/Mt. Ordeals... However it doesn't look like the mountain tileset actually uses that particular palette.
So anyway, long story short (too late, I know), you can edit the palette for that save point by editing the palette at A6570, but you may discover down the road that some other tile was inadvertantly affected as well.
There is a way to edit which palette a particular tile within a particular tileset uses, but I haven't fully researched the exact steps you would have to follow in order to do so. (I've done it with Underworld map tiles only, and while the process is surely the same, the data for world maps are all in completely different locations than the data for location maps).

Changing the palette color via Snespal was one of my intiial thoughts, but since the save graphic in question is using the same palette it uses for the Sealed Cave/Magnes tilesets, it wouldn't work out too well. Plus I'd also have to edit the palettes it uses for Antlion's Cave and Eblan Cave.  :whoa:

chillyfeez to the rescue! You're willingnes to do some extra work to help others is commendable!  :cycle:

If all you want is to change the palette a tile uses, that's pretty easy. I researched that stuff for my own hack. I've been meaning to bring some order to my notes anyway, so I can post it for you in a bit, if you still need it.



Yes, that's exactly what I'm looking to do! Any thing you have on the subject would be of immense use to me. It would certainly give me the ability to do a number of things I've been wanting to do with some of the tilesets!


Quote
But seriously, I've said it before and I'll say it again, where FFIV is concerned, I'll always help a ROM hacker in need if I can. Partly to pay it forward - I only got into this less than three years ago and I learned a lot pretty quickly thanks to some very helpful folks. But also it usually ends up leading to mining information I can use for my own purposes - like when I spent some time a few months ago helping Rodimus Primal port (a modified version of) the JP title screen into the US game, I learned some great stuff that allowed me to make what I think is a really cool title screen for my own hack, plus in general was able to broaden my knowledge of how SNES graphics are processed. So, win-win.

I feel the same way, granted there aren't a lot of areas I'm very knowledgable of yet, outside of spriting, doing things with FF4kster, and bouncing ideas back and forth.  But when it comes to those areas I'm happier to help, and share what I've created.   :yabin:

It's ironic that you mention Rodimus, as a large reason I'm trying to learn this is so I can finish porting the JP save graphica into the US game! Not to mention epic stuff I'd be able to do with my hack.  :cycle:
I update my graphics thread on almost a daily basis, so keep an eye out for new stuff!

Gedankenschild

  • Vargas
  • *
  • Posts: 101
  • Gender: Male
    • View Profile
Re: Question Regarding Map Palettes
« Reply #7 on: June 08, 2015, 04:46:50 PM »
I remember seeing the title screen discussion and thinking it will be very uselful to a lot of people (including me). Great work!
I will just finish a few things and post my stuff tomorrow, probably.

Regards!
You've got to be kidding me with that Dynasty Warriors registration question??!!
I barely know such a series exists...

Bahamut ZERO

  • Cagnazzo
  • *
  • Posts: 347
  • Gender: Male
  • If ye're takin a beatin, hop in de back row!
    • View Profile
Re: Question Regarding Map Palettes
« Reply #8 on: June 09, 2015, 12:58:16 PM »
Hell yeah! I'll be patiently on the lookout for them.

In the meantime, I'll be experimenting with weapon graphics since I finally stumbled across them. :D I've been planning on doing away with the boomberang/chakram/ninja star graphics for awhile now, as well as move some stuff around so that wepons I don't plan on using the boomerang/chakram weapon swing (Axe, for example) won't be wasting space. Square apparently thought it would be a great idea to swap sprites halfway through the swing, when it was already rotating just fine to begin with. :wtf:
I update my graphics thread on almost a daily basis, so keep an eye out for new stuff!

Gedankenschild

  • Vargas
  • *
  • Posts: 101
  • Gender: Male
    • View Profile
Re: Question Regarding Map Palettes
« Reply #9 on: June 09, 2015, 04:37:54 PM »
OK, so the plan is to change the cave's 'S' save point back to the original campfire one. Since I would have to gather the data myself at some point anyway, I'll just do that conversion and document the process.

First, let's see what changes Square made. I saved the game at the campfire save point in the Watery Pass and then loaded that save with both versions of the game. I use the bsnes debugger because of its neat Palette Viewer:



As you can see, there is no difference between the versions, so they didn't alter the palettes but simply associated the tiles with another one.

Next we go where we always go first when we need to locate something in the ROM: To Yousei's FFIV hacking document! :happy: Here we find this:

Code: [Select]
A2000-A5FFF (149E00-14DDFF) Town Map Tile Formation Data (*4)


*4 -- Town Map Tile Formation Data, 2 bytes

0x0000 8x8 tile (0x00-0xFF)
0x0001:0...1 ?
0x0001:2-4 Palette Index
0x0001:5 Tile Priority (0 = behind character, 1 = in front of character)
0x0001:6 Flip tile horizontally
0x0001:7 Flip tile vertically

What Yousei identified as "Town Map Tile Formation Data" actually contains formation data for all locations! I always work with unheadered ROMs, so I converted his data and broke it down to this:

Code: [Select]
A1E00-A5DFF (149E00-14DDFF) Location Map Tile Formation Data

A1E00-A21FF (149E00-14A1FF) Airship
A2200-A25FF (14A200-14A5FF) Lunar Core
A2600-A29FF (14A600-14A9FF) Cave Magnes/Sealed Cave
A2A00-A2DFF (14AA00-14ADFF) Castle Exterior
A2E00-A31FF (14AE00-14B1FF) Town Exterior
A3200-A35FF (14B200-14B5FF) Town Interior
A3600-A39FF (14B600-14B9FF) Castle Interior
A3A00-A3DFF (14BA00-14BDFF) Crystal Room
A3E00-A41FF (14BE00-14C1FF) Tower (Save Room)/Big Whale
A4200-A45FF (14C200-14C5FF) Sylvan Cave/Land of Monsters
A4600-A49FF (14C600-14C9FF) Tower
A4A00-A4DFF (14CA00-14CDFF) Giant
A4E00-A51FF (14CE00-14D1FF) Lunar Subterrane
A5200-A55FF (14D200-14D5FF) Mountain
A5600-A59FF (14D600-14D9FF) Cave
A5A00-A5DFF (14DA00-14DDFF) Ship

What this "Tile Formation Data" does is take the individual tilesets in the ROM...


(left:US, right:Japanese)

and arrange them into 16x16 pixel "building blocks" that the game will then construct the maps from:



Now the fun part! Let's take a look at the Tile Formation Data for the Cave.

Japanese version:
Code: [Select]
43 0C 8A 04 1F 04 86 04 81 04 81 04 92 04 1C 04 20 04 22 04 22 04 83 04 0E 04 01 04 93 44 24 11
40 04 42 04 42 04 83 04 01 04 01 04 01 04 4E 04 90 04 A4 04 91 44 D0 04 D2 04 D4 04 00 04 6A 04
B0 04 8A 04 8A 04 23 0D 20 0D 00 04 00 04 4A 04 B6 04 B8 04 BA 04 97 44 96 44 9B 04 8A 04 01 04
D6 04 D8 04 DA 04 76 04 25 04 14 04 8A 04 8A 04 06 04 02 04 04 04 8A 04 8A 04 99 44 98 44 5E 44
84 04 37 08 82 08 57 48 58 08 59 48 39 08 60 04 01 04 60 04 01 04 01 04 72 04 74 44 8A 04 8A 04
9C 24 83 24 01 24 01 24 92 04 94 04 93 44 94 04 2E 04 90 04 91 44 9C 24 9C 24 21 0D 99 44 98 44
BE 04 B8 04 BA 04 B0 04 9E 04 BA 04 8A 04 EC 18 01 24 A4 04 DC 04 BA 04 23 34 00 04 01 04 7C 04
78 04 78 04 3C 04 2A 04 DE 04 D8 04 DA 04 F0 1C F2 1C 23 0D 3C 04 2A 04 9B 04 8A 04 3E 04 F6 18
44 0C 8B 04 49 04 81 04 81 04 86 44 93 04 1D 04 21 04 6B 04 20 44 01 04 8B 04 83 44 92 44 6B 04
41 04 6D 04 40 44 01 04 01 04 83 44 5E 04 4F 04 91 04 A5 04 90 44 D1 04 D3 04 D5 04 00 04 6D 04
8B 04 8B 04 B5 04 23 0D 20 0D 96 04 97 04 4B 04 B7 04 B9 04 BB 04 00 04 00 04 8B 04 9B 44 01 04
D7 04 D9 04 DB 04 77 04 26 04 15 04 8B 04 8B 04 06 04 03 04 05 04 98 04 99 04 8B 04 8B 04 01 04
85 04 38 08 57 08 82 48 59 08 58 48 0F 08 61 04 01 04 61 04 01 04 74 04 73 04 01 04 98 04 99 04
9C 24 01 24 01 24 83 64 93 04 95 04 92 44 95 04 2F 04 91 04 90 44 9C 24 9C 24 21 0D 8B 04 8B 04
B7 04 B9 04 BF 04 8B 04 B7 04 9F 04 B5 04 ED 18 83 64 A5 04 B7 04 DD 04 24 34 00 04 01 04 7D 04
79 04 79 04 3D 04 2B 04 D7 04 D9 04 DF 04 F1 1C F3 1C 23 0D 3D 04 2B 04 8B 04 9B 44 3F 04 F7 18
45 0C 8C 04 1F 04 83 04 01 04 01 04 A2 04 2C 04 30 04 32 04 32 04 83 04 0C 04 01 04 8C 04 25 11
50 04 52 04 52 04 10 04 12 04 12 04 01 04 8C 04 A0 04 8C 04 8C 04 00 04 B2 04 B4 04 00 04 52 04
9D 04 C2 04 C4 04 23 0D 22 09 00 04 00 04 5A 04 C6 04 C8 04 CA 04 A7 44 A6 44 AB 04 8C 04 88 04
E6 04 E8 04 EA 04 8E 04 29 04 16 04 8C 04 8C 04 0B 04 07 04 09 04 8C 04 8C 04 A9 44 A8 44 01 04
18 04 47 08 66 08 67 48 68 08 69 48 35 08 70 04 01 04 62 04 1A 44 01 04 64 04 75 44 8C 04 8C 04
01 24 83 24 01 24 01 24 A2 04 8C 04 8C 04 8C 04 A1 04 A0 04 8C 04 01 24 01 24 00 04 A9 44 A8 44
CE 04 BD 04 CD 04 9D 04 AE 04 CA 04 C4 04 EE 18 01 24 8C 04 6F 04 CA 04 33 34 00 04 01 04 7E 04
7A 04 7A 04 4C 04 3A 04 E0 04 E2 04 E4 04 F4 1C F4 1C 23 0D 4C 04 3A 04 AB 04 8C 04 5C 04 F8 18
46 0C 8D 04 49 04 01 04 01 04 83 44 8D 04 2D 04 31 04 6C 04 30 44 01 04 8D 04 83 44 A2 44 6C 04
51 04 6E 04 50 44 11 04 11 04 10 44 01 04 8D 04 8D 04 8D 04 A0 44 B1 04 B3 04 00 04 00 04 6E 04
C1 04 C3 04 AD 04 23 0D 22 09 A6 04 A7 04 5B 04 C7 04 C9 04 CB 04 00 04 00 04 8D 04 AB 44 89 04
E7 04 E9 04 EB 04 8F 04 13 04 17 04 8D 04 8D 04 0B 04 08 04 0A 04 A8 04 A9 04 8D 04 8D 04 01 04
19 04 48 08 67 08 66 48 69 08 68 48 36 08 71 04 1A 04 63 04 01 04 75 04 65 04 01 04 A8 04 A9 04
01 24 01 24 01 24 83 64 8D 04 8D 04 A2 44 8D 04 A3 04 8D 04 A0 44 01 24 01 24 00 04 8D 04 8D 04
BC 04 CC 04 CF 04 C1 04 C7 04 AF 04 AD 04 EF 18 83 64 8D 04 C7 04 7F 04 34 34 00 04 01 04 80 04
7B 04 7B 04 4D 04 3B 04 E1 04 E3 04 E5 04 F5 1C F5 1C 23 0D 4D 04 3B 04 8D 04 AB 44 5D 04 F9 18

US version:
Code: [Select]
43 0C 8A 04 1F 04 86 04 81 04 81 04 92 04 1C 04 20 04 22 04 22 04 83 04 0E 04 01 04 93 44 24 11
40 04 42 04 42 04 83 04 01 04 01 04 01 04 4E 04 90 04 A4 04 91 44 D0 04 D2 04 D4 04 00 04 6A 04
B0 04 8A 04 8A 04 23 0D 20 0D 00 04 00 04 4A 04 B6 04 B8 04 BA 04 97 44 96 44 9B 04 8A 04 01 04
D6 04 D8 04 DA 04 76 04 25 04 14 04 8A 04 8A 04 06 04 02 04 04 04 8A 04 8A 04 99 44 98 44 5E 44
84 04 37 08 82 08 57 48 58 08 59 48 39 08 60 04 01 04 60 04 01 04 01 04 72 04 74 44 8A 04 8A 04
9C 24 83 28 01 28 01 28 92 04 94 04 93 44 94 04 2E 04 90 04 91 44 9C 28 9C 24 21 0D 99 44 98 44
BE 04 B8 04 BA 04 B0 04 9E 04 BA 04 8A 04 EC 18 01 24 A4 04 DC 04 BA 04 23 34 00 04 01 04 7C 04
78 04 78 04 3C 04 2A 04 DE 04 D8 04 DA 04 F0 1C F2 1C 23 0D 3C 04 2A 04 9B 04 8A 04 3E 04 F6 1C
44 0C 8B 04 49 04 81 04 81 04 86 44 93 04 1D 04 21 04 6B 04 20 44 01 04 8B 04 83 44 92 44 6B 04
41 04 6D 04 40 44 01 04 01 04 83 44 5E 04 4F 04 91 04 A5 04 90 44 D1 04 D3 04 D5 04 00 04 6D 04
8B 04 8B 04 B5 04 23 0D 20 0D 96 04 97 04 4B 04 B7 04 B9 04 BB 04 00 04 00 04 8B 04 9B 44 01 04
D7 04 D9 04 DB 04 77 04 26 04 15 04 8B 04 8B 04 06 04 03 04 05 04 98 04 99 04 8B 04 8B 04 01 04
85 04 38 08 57 08 82 48 59 08 58 48 0F 08 61 04 01 04 61 04 01 04 74 04 73 04 01 04 98 04 99 04
9C 24 01 28 01 28 83 68 93 04 95 04 92 44 95 04 2F 04 91 04 90 44 9C 28 9C 24 21 0D 8B 04 8B 04
B7 04 B9 04 BF 04 8B 04 B7 04 9F 04 B5 04 ED 18 83 64 A5 04 B7 04 DD 04 24 34 00 04 01 04 7D 04
79 04 79 04 3D 04 2B 04 D7 04 D9 04 DF 04 F1 1C F3 1C 23 0D 3D 04 2B 04 8B 04 9B 44 3F 04 F7 1C
45 0C 8C 04 1F 04 83 04 01 04 01 04 A2 04 2C 04 30 04 32 04 32 04 83 04 0C 04 01 04 8C 04 25 11
50 04 52 04 52 04 10 04 12 04 12 04 01 04 8C 04 A0 04 8C 04 8C 04 00 04 B2 04 B4 04 00 04 52 04
9D 04 C2 04 C4 04 23 0D 22 09 00 04 00 04 5A 04 C6 04 C8 04 CA 04 A7 44 A6 44 AB 04 8C 04 88 04
E6 04 E8 04 EA 04 8E 04 29 04 16 04 8C 04 8C 04 0B 04 07 04 09 04 8C 04 8C 04 A9 44 A8 44 01 04
18 04 47 08 66 08 67 48 68 08 69 48 35 08 70 04 01 04 62 04 1A 44 01 04 64 04 75 44 8C 04 8C 04
01 24 83 28 01 28 01 28 A2 04 8C 04 8C 04 8C 04 A1 04 A0 04 8C 04 01 28 01 24 00 04 A9 44 A8 44
CE 04 BD 04 CD 04 9D 04 AE 04 CA 04 C4 04 EE 18 01 24 8C 04 6F 04 CA 04 33 34 00 04 01 04 7E 04
7A 04 7A 04 4C 04 3A 04 E0 04 E2 04 E4 04 F4 1C F4 1C 23 0D 4C 04 3A 04 AB 04 8C 04 5C 04 F8 1C
46 0C 8D 04 49 04 01 04 01 04 83 44 8D 04 2D 04 31 04 6C 04 30 44 01 04 8D 04 83 44 A2 44 6C 04
51 04 6E 04 50 44 11 04 11 04 10 44 01 04 8D 04 8D 04 8D 04 A0 44 B1 04 B3 04 00 04 00 04 6E 04
C1 04 C3 04 AD 04 23 0D 22 09 A6 04 A7 04 5B 04 C7 04 C9 04 CB 04 00 04 00 04 8D 04 AB 44 89 04
E7 04 E9 04 EB 04 8F 04 13 04 17 04 8D 04 8D 04 0B 04 08 04 0A 04 A8 04 A9 04 8D 04 8D 04 01 04
19 04 48 08 67 08 66 48 69 08 68 48 36 08 71 04 1A 04 63 04 01 04 75 04 65 04 01 04 A8 04 A9 04
01 24 01 28 01 28 83 68 8D 04 8D 04 A2 44 8D 04 A3 04 8D 04 A0 44 01 28 01 24 00 04 8D 04 8D 04
BC 04 CC 04 CF 04 C1 04 C7 04 AF 04 AD 04 EF 18 83 64 8D 04 C7 04 7F 04 34 34 00 04 01 04 80 04
7B 04 7B 04 4D 04 3B 04 E1 04 E3 04 E5 04 F5 1C F5 1C 23 0D 4D 04 3B 04 8D 04 AB 44 5D 04 F9 1C

These are basically hex representations of the "building blocks" pic above. Each 8x8 tile is represented by 2 bytes. The first byte is the value of the tile itself (in the original tileset), the second one holds three properties at once: palette association, tile priority and horizontal/vertical flipping (see the bit from Yousei's document above).

I get confused very easily when working on the binary level as described by Yousei, therefore I went ahead and wrote down all the possible combinations one might encounter in the second byte:

Code: [Select]
04,08,0C,10,14,18,1C Palette 1-7 behind character
24,28,2C,30,34,38,3C Palette 1-7 in front of character
44,48,4C,50,54,58,5C Palette 1-7 behind character, horizontally flipped
64,68,6C,70,74,78,7C Palette 1-7 in front of character, horizontally flipped
84,88,8C,90,94,98,9C Palette 1-7 behind character, vertically flipped
A4,A8,AC,B0,B4,B8,BC Palette 1-7 in front of character, vertically flipped
C4,C8,CC,D0,D4,D8,DC Palette 1-7 behind character, h&v flipped
E4,E8,EC,F0,F4,F8,FC Palette 1-7 in front of character, h&v flipped

If all you want is to change a tile's palette, locate its 2nd byte number in the table above and change it to one in the same line.

There is one additional twist to the hex data above: It is arranged in the following way: All upper left tiles first, then upper right, lower left, and finally all lower right tiles. (Anything else would have been too easy!)

Let's just do the campfire and see if we know what we did afterwards...

The tiles (in both versions) are F6, F7, F8, F9. If you look at the "building block" pic you'll see that the save point graphic is the very last in the lower right corner, which is great! We should therefore find it right at the very end of our hex data. And there it is. "F9 18" (Palette 6, behind character) in the Japanese version and "F9 1C" (Palette 7, behind character) in the US version.
So where are F6, F7, F8? Right at the end of their own segments! I think a picture can't hurt here for clarity:



All that's necessary now is to restore these four values and copy over the original graphics (you could also just copy and paste the entire thing, but that would also undo the palette changes they made to make secret passages more obvious).

It's kinda late here and I hope I'm making sense... If anyone has suggestions to make things clearer or more precise, please tell me! And feel free to ask anything.

Regards!
You've got to be kidding me with that Dynasty Warriors registration question??!!
I barely know such a series exists...

Bahamut ZERO

  • Cagnazzo
  • *
  • Posts: 347
  • Gender: Male
  • If ye're takin a beatin, hop in de back row!
    • View Profile
Re: Question Regarding Map Palettes
« Reply #10 on: June 09, 2015, 06:17:46 PM »
Thank you very much! By following your intructions I've got the palette set correctly, and it looks wonderful!  I may have some questions for you here and there as I port the rest of the save graphics and restore some other graphics, but I think I'm getting the hang of this.  :happy:


You deserve a  :cookie: for your awesome breakdown!
I update my graphics thread on almost a daily basis, so keep an eye out for new stuff!

Gedankenschild

  • Vargas
  • *
  • Posts: 101
  • Gender: Male
    • View Profile
Re: Question Regarding Map Palettes
« Reply #11 on: June 10, 2015, 09:27:48 AM »
No problem! Glad it helped. When questions come up, just ask.
You've got to be kidding me with that Dynasty Warriors registration question??!!
I barely know such a series exists...

Bahamut ZERO

  • Cagnazzo
  • *
  • Posts: 347
  • Gender: Male
  • If ye're takin a beatin, hop in de back row!
    • View Profile
Re: Question Regarding Map Palettes
« Reply #12 on: June 10, 2015, 01:23:58 PM »
Will do! Those will most likely come once I'm making these changes (and more) in my own hack.  Which will be a little bit after I finish up my sidework for Chillyfeez and Rodimus, which should be any day now. :D

I think I might have misread your talk about copying/pasting the tile graphics, thinking you were talking about the tile formation data. Since part of one of the sidejobs is this restoring of palettes of multiple things, I took an unheadered JP version  and copy/pasted that entire table to an unheadered version of Rodimus' project (after double cecking multiple times before doing so to make damn sure I was copypasting the correct code) and it came out flawlessy. So my possible misunderstanding  made what I thought would take a couple days.... take 2 minutes. It's wonderful!  :cycle:

I also noticed your picture of the tileset matches what I see in FF4kster to a tee, meaning I could (in theory) use the Tileset viewer as a sort of reference guide as I look at the bytes if the other tilesets line up like that as well. find the tile I want to mess with there, then go to the hex, find the corresponding hex for the lower-right corner tile, then count up 16 rows, then next corner of said tile, so on and so on.
I update my graphics thread on almost a daily basis, so keep an eye out for new stuff!

Gedankenschild

  • Vargas
  • *
  • Posts: 101
  • Gender: Male
    • View Profile
Re: Question Regarding Map Palettes
« Reply #13 on: June 10, 2015, 02:02:40 PM »
Absolutely, I would recommend using a visual help like that when dealing with this stuff. Copy the hex data into a text editor and adjust the window size to reflect the layout in the picture - it helps a lot. The pic I included above is a screengrab from FF4Tools by Phoenix, who made a lot of contributions to this board.

You can find it here:
http://www.romhacking.net/utilities/634/
You've got to be kidding me with that Dynasty Warriors registration question??!!
I barely know such a series exists...

Rodimus Primal

  • Siren
  • *
  • Posts: 80
  • Gender: Male
    • View Profile
Re: Question Regarding Map Palettes
« Reply #14 on: June 15, 2015, 01:07:27 PM »
You guys rock. Thanks to all of your efforts I think the level at which we know about Final Fantasy IV has grown close to Final Fantasy VI proportions.