News: 11 March 2016 - Forum Rules
Current Moderators - DarkSol, KingMike, MathOnNapkins, Azkadellia, Danke

Author Topic: [HELP] Can't find a particular palette in Yoshi's Island GBA  (Read 3653 times)

ShadowOne333

  • Hero Member
  • *****
  • Posts: 1155
    • View Profile
[HELP] Can't find a particular palette in Yoshi's Island GBA
« on: October 03, 2015, 03:45:25 pm »
Good day.

I am currently working on a palette restoration hack for Super Mario Advance 3: Yoshi's Island, and I have stumbled upon something rather... Odd.

So far, I've converted the first four stages palettes faithfully to that of the SNES counterpart.
Although, at Level 1-4, where you encounter the falling doors, they still seem to retain the original colour palette.

You can see it clearly here:


At the palette viewer, I have you can see three shades of brown between the blue and black colours at the top row, that's the palette for the moving door which I assume is something similar to pseudo-mode 7 from SNES.

The three shades of brown are:
0x3236, 0x214D and 0x29D2.
When the door begins to fall it starts changing the three colours quickly until it they all reach black.

I am currently using APE (Advanced Palette Editor) to change the palettes, but I can't seem to find any of those three palettes at ALL.

3632, 4D21, D229 together throw nothing at all, combining any of the two has the same result.
Trying them out one by one gives a lot of results, but for what I've seen only addresses near 2DXXXX have palette data stored in there.

Can anyone help me out on finding these palettes?
Fixing this might help out on fixing similar issues down the road with other Pseudo-Mode 7 stuff.

Bregalad

  • Hero Member
  • *****
  • Posts: 2608
    • View Profile
Re: [HELP] Can't find a particular palette in Yoshi's Island GBA
« Reply #1 on: October 03, 2015, 03:57:44 pm »
Is is possible by any chance that the palette is changed mid-frame to make the falling door effect ?

ShadowOne333

  • Hero Member
  • *****
  • Posts: 1155
    • View Profile
Re: [HELP] Can\'t find a particular palette in Yoshi\'s Island GBA
« Reply #2 on: October 03, 2015, 06:24:48 pm »
Is is possible by any chance that the palette is changed mid-frame to make the falling door effect ?
The palette does change when it starts to fall.
However, the colours that you can see in the image are static, when the door is waiting for Yoshi to pass in front to fall down.

I still can't find anythin related to that palette. :/

October 03, 2015, 11:08:15 pm - (Auto Merged - Double Posts are not allowed before 7 days.)
Besides all of the rotating/falling platforms that use the special mode I also can't seem to find the palette of the far background.
Which is the sky and other stuff.

Apparently, that is not a Background per-se, but the gradient.

So right now I am having issues with those two.
The special platforms and the gradient's palettes.
« Last Edit: October 03, 2015, 11:08:15 pm by ShadowOne333 »

mangaman3000

  • Jr. Member
  • **
  • Posts: 9
    • View Profile
Re: [HELP] Can't find a particular palette in Yoshi's Island GBA
« Reply #3 on: October 13, 2015, 09:53:27 pm »
Hello,
I recently started to remove sound effects from some gba roms (including yoshis island) and saw your color patch. I know absolutely nothing about hacking but I'm not too bad with a hex editor and my hacks actually worked so I thought I'd have a go at this. Anyway if you haven't found this already, I managed to find the 3D object palette its around about here 001A7D88.
Now get ready for some completely uneducated assumptions. They seem to be split into BGR order. Awkwardly 00 appears to be a palette value of 5 so any value under 5 cant seem to be done like the lines on the falling wall which has a value of 3 for blue. In my hex you can see I went over 31 (to 0x1E) which works great until the wall moves. Trying to go below with 0xFF and less in an effort to get a negative number just makes matters worse  :-\. I've set the blue on the wall lines to 5 (0x00) as well and you can hardly tell the difference when played on my ds. I hope some of that made sense.
My changes are in red:


So here's my result with your patch and my hex above:


Also if you havent seen it yet, my patch goes great along side of yours.
http://www.romhacking.net/hacks/2590/
« Last Edit: January 01, 2017, 03:10:19 pm by mangaman3000 »

ShadowOne333

  • Hero Member
  • *****
  • Posts: 1155
    • View Profile
Re: [HELP] Can't find a particular palette in Yoshi's Island GBA
« Reply #4 on: October 14, 2015, 10:29:41 am »
@mangaman3000

Wow!
That was indeed amazing!
Thank you so much for your help on finding that out!

If you don't mind, may I ask exactly how did you find that offset and how it was responsible for the 3D objects palette?
It might help out to restore the rotating platform in 1-8 and perhaps some of the pending gradients.

Good thing your patch goes well alongside the Colour Restoration patch!
It's as close as we'll get from the SNES counterpart. :P
Only the music, but by using mGBA, you can overcome some of the crispy effects since that emulator uses antialiasing for the sound emulation. :D

mangaman3000

  • Jr. Member
  • **
  • Posts: 9
    • View Profile
Re: [HELP] Can't find a particular palette in Yoshi's Island GBA
« Reply #5 on: October 14, 2015, 04:29:18 pm »
I tried every variation of color code I could think of, I even split the colors into each of its components but never thought to subtract 5 from those values, if on the off chance I had, I would have found it. I would love to tell you I was really clever about my method of figuring this out and that I used some sort of logic but that would be a lie. To find it I simply selected huge portions of the file in a hex editor, filled them with zeros and ran the game to see what had changed. Sometimes this broke the game completely, most times it glitched the game with some hilarious outcomes. Eventually on one of these attempts, nothing had changed except all of the 3D objects disappeared, this made me think that I must have found the section which draws these 3D objects. Then I just whittled it down less and less till all that changed were the colors of the objects. That's all I know.

The palette for the 1-8 rollers is just before the falling wall palette.

I have nothing to do so I wrote them all down for you. For some reason the top of the falling wall has three colors on it but you can only see two because two of the colors are the same.

1-8 rollers:
001a7d40 - 001a7d6f
4 different sides as only 4 can be seen at once
Side 1:
001a7d40 = main color 1
001a7d44 = lines 1
001a7d48 = lines on each side 1
Side 2:
001a7d4c = main color 2
001a7d50 = lines 2
001a7d54 = lines on each side 2
Side 3:
001a7d58 = main color 3
001a7d5c = lines 3
001a7d60 = lines on each side 3
Side 4:
001a7d64 = main color 4
001a7d68 = lines 4
001a7d6c = lines on each side 4
1-4 falling walls:
001a7d88 = main color
001a7d8c = lines
001a7d90 = shadow
001a7d70 = top of wall left 3/4
001a7d74 = top of wall right 1/4
001a7d78 = top of wall sides


The colors are pretty simple to work out just separate the BGR components and subtract 5 from each. If it is less than 0 set it to 0. so 0x1D91 = 0x02070c
 
Are there any other 3D objects? I thought the spinning platforms before the boss in 2-4 were 3D but they don't seem to darken like the others.

Some pics from when I was figuring this out:


I'll check out the emu, It might give my ears a little rest.
« Last Edit: January 01, 2017, 03:11:30 pm by mangaman3000 »

GHANMI

  • Hero Member
  • *****
  • Posts: 706
    • View Profile
Re: [HELP] Can't find a particular palette in Yoshi's Island GBA
« Reply #6 on: October 14, 2015, 05:29:16 pm »
I would love to tell you I was really clever about my method of figuring this out and that I used some sort of logic but that would be a lie. To find it I simply selected huge portions of the file in a hex editor, filled them with zeros and ran the game to see what had changed.

This was actually very smart :D (and very inspiring, might I add)
You just used corruption on the RAM, it's very useful for finding stuff otherwise unobtainable in a practical fashion.

ShadowOne333

  • Hero Member
  • *****
  • Posts: 1155
    • View Profile
Re: [HELP] Can't find a particular palette in Yoshi's Island GBA
« Reply #7 on: October 14, 2015, 05:40:07 pm »
I never would've thought about splitting the RGB values, much less switching them and even less likely to substract 5 from them. xD

The 1-8 rollers won't be touched right now, since it seems that the ones from the GBA port have the exact same palette as the ones from the SNES game, so that's one more down.
As for the spinning platforms in 2-4, they are handled differently in the GBA port it seems.
They had some sort of texture-like colours in the SNES one, but they seem to be a plain colour in the GBA version.
They also seem to be fine though.

I think those were pretty much all the 3D objects in the game.

Right now, I am focusing on trying to figure out the remaining gradients/colours for the stages 2-6, 3-1 and 6-1.
Here's an example for 3-1:


As you can see the colours are not exactly right, and you can see a line that divides what seems to be the blue colour of the background clouds with another shade of blue.
Also the sky seems to be lighter than the original SNES counterpart.

The colours seem to change on the fly between 0x937F and 0x997F (this includes 93, 94, 95, 96, 97, 98 and 99), with the colour 0xD172 I set sometimes getting in there.
(You can watch this in the Memory Viewer -> Palette)

The values in RGB are 192831 for 0x937F and up to 252831 for 0x997F.
I converted them to HEX, subtracted 0x05 for each colour and got 13171A for 0x937F and 19171A for 0x997F.
Switched they should be 1A 17 13 and 1A 17 19. Search for those and changed them to 1C 16 11 (which should be 0xD172) but no luck so far.

mangaman3000

  • Jr. Member
  • **
  • Posts: 9
    • View Profile
Re: [HELP] Can't find a particular palette in Yoshi's Island GBA
« Reply #8 on: October 14, 2015, 06:43:16 pm »
This was actually very smart :D (and very inspiring, might I add)
Thank you very much, I really didn't feel so smart at the time when I started to think about how big the file really was.

@ShadowOne333
The color codes (like 0x937F) are actually BGR555 format so I already assumed I would be looking for values in BGR order. Oh I didn't realize the rollers were already the same color. Anyway its nice to have this stuff documented for anyone who comes along perhaps wanting to make a technicolor Yoshi's Island hack.

That's a shame this didn't lead to anything helpful for the gradients as well. I guess that would have been too convenient.

I'll have a look at the gradients too, I expect my method to involve a lot of zeros.


ShadowOne333

  • Hero Member
  • *****
  • Posts: 1155
    • View Profile
Re: [HELP] Can't find a particular palette in Yoshi's Island GBA
« Reply #9 on: October 15, 2015, 01:07:55 pm »
@ShadowOne333
The color codes (like 0x937F) are actually BGR555 format so I already assumed I would be looking for values in BGR order. Oh I didn't realize the rollers were already the same color. Anyway its nice to have this stuff documented for anyone who comes along perhaps wanting to make a technicolor Yoshi's Island hack.

That's a shame this didn't lead to anything helpful for the gradients as well. I guess that would have been too convenient.

I'll have a look at the gradients too, I expect my method to involve a lot of zeros.
Indeed, it is really good to know this stuff.
Will surely come in handy, specially for the SMW Central community I bet. :P

The gradients might be hidden in some other place in the ROM, but I bet they're in the usual GBA/SNES format and not BGR555 format. I'll see what I can find from going through the SNES palette along with the GBA one.

It's only those three levels (2-6, 3-1 and 6-1) so far that need some kind of fix, I think the rest of the game is mostly done by now!

mangaman3000

  • Jr. Member
  • **
  • Posts: 9
    • View Profile
Re: [HELP] Can't find a particular palette in Yoshi's Island GBA
« Reply #10 on: October 18, 2015, 09:50:11 pm »
Hi again,
I haven't had much time lately so hadn't been able to look at this. Anyway, again if you haven't found this yet, it's around about here: 00167a20. The changes (in red) fix the difference between the cloudy things. You can see the gradient values you were looking for such as 0x997f, 0x937f, 0x7e22, 0xbe14 are in there. I'll leave the gradient values to you as I'm sure you already have them waiting to be entered. Hope this helps. :)




Fixed clouds:



While testing:


Also just to clarify from my last post, I meant "the usual GBA/SNES format" is called BGR555.
« Last Edit: January 01, 2017, 03:13:15 pm by mangaman3000 »

ShadowOne333

  • Hero Member
  • *****
  • Posts: 1155
    • View Profile
Re: [HELP] Can't find a particular palette in Yoshi's Island GBA
« Reply #11 on: October 19, 2015, 04:37:14 pm »
Wow due you're awesome!

Thank you so much for that info. :D

That pretty much fixed the odd layer beneath the clouds.
And also, with the other info you gave me, I was able to locate and fix the gradients for 2-6, 3-1 and 6-1!

Also, two other things:

1) The little part beneath the clouds had the wrong palette, which I found in some other place and now they both have the correct palette.
2) I don't know why, but the palette for the brown Yoshi is always lighter in-game than what we see of him in artwork and in the introduction scene. So I took the liberty to fix that one too. It is now a full brown Yoshi and not beige-y. :P

I think this is as complete as it goes. I will now post the hack's page once again. :)

mangaman3000

  • Jr. Member
  • **
  • Posts: 9
    • View Profile
Re: [HELP] Can't find a particular palette in Yoshi's Island GBA
« Reply #12 on: October 19, 2015, 05:08:01 pm »
No problem. I had heard that the hack had been taken down for being incomplete which is a real shame so I really wanted to lend a hand to get it back up on here.

Apparently the beige Yoshi was an oversight that was fixed in the gba version but i guess because you were restoring it to snes palettes you had reverted their fix.

glad I could help get this back up.  :)

ShadowOne333

  • Hero Member
  • *****
  • Posts: 1155
    • View Profile
Re: [HELP] Can't find a particular palette in Yoshi's Island GBA
« Reply #13 on: October 20, 2015, 11:12:39 pm »
@mangaman3000:

Just dropping by to tell you that the hack is now up and running, and I just sent a Credits submission crediting you for the help on the palettes for the 3D objects and the gradients. :)

mangaman3000

  • Jr. Member
  • **
  • Posts: 9
    • View Profile
Re: [HELP] Can't find a particular palette in Yoshi's Island GBA
« Reply #14 on: October 21, 2015, 06:59:50 am »
Yeah I just had a quick play of it. Thank you very much for the credit, I really appreciate it. Makes me want to lend a hand elsewhere when needed.
You did a great job,  its amazing what a fresh lick of paint can do for a game.