Advertiser Content

ASM & Hex Editing loaded palettes on runtime

Started by hjk321 September 12th, 2018 1:47 PM
  • 281 views
  • 2 replies
Seen September 13th, 2019
Posted March 19th, 2019
202 posts
2.2 Years
So I'm sure a lot of you who were curious enough to use VBA's palette viewer that the game manages to make flashing colored text, fade to black, etc by actually editing the loaded palettes at runtime. For example when you leave a room every loaded palette, background and sprite, turns to black. Pretty clever, eh?

I was wondering if anyone knew of some way we could utilize this. We could have a custom "fadescreen" routine that fades to white instead of black, as an example. We could pull a FireRed Flashback and turn everything into grey-scale with no sprite or tileset modification whatsoever (this is what I'm mostly interested in doing.) Does anyone have a clue about how to either A) tap into the flashblack routine that turns everything greyscale, or even better, B) know how to directly edit loaded palettes?

I'm interested to hear other's experiences with this.
I'm still quite active, just not on Pokecommunity.

While Pokecommunity is still a great resource and discussion board for binary hacking, binary hacking is slowly but surely becoming irrelevant. If you are ready to jump ship and switch to pokeemerald some great places to try would be Silph Co. and the pret Discord. Happy hacking!

You can always reach out to me directly at hjk321#1337

DrFuji

Heiki Hecchara‌‌

Age 26
Male
Aussie
Seen 17 Hours Ago
Posted 1 Day Ago
1,620 posts
10.2 Years
Luckily, both of the examples you've given are already done.

Fadescreening to white can already be done with basic scripting. Instead of writing 'fadescreen 0x0 / 01' you can write 'fadescreen 0x2 / 0x3'. Greyscale (as well as sepia) can be activated by a simple writebytetooffset as seen here.

I'm like 90% sure there was some good development about changing pallets on the fly that's right up your alley, but I can't seem to find it. Maybe it was just a really good fever dream ¯\_(ツ)_/¯
Seen September 13th, 2019
Posted March 19th, 2019
202 posts
2.2 Years
I'm like 90% sure there was some good development about changing pallets on the fly that's right up your alley, but I can't seem to find it. Maybe it was just a really good fever dream ¯\_(ツ)_/¯
Let me know if you ever find it!

Also, fair warning to anyone else who tries the solution above, the color change only takes effect on a warp. Map connections only work halfway and everything looks weird. So make sure you set the byte only directly before a warp command or something similar.

EDIT: Also, is there any way to put that RAM into the save block because if you save and quit the sepia doesn't stay. :(
Or at the very least, would this work in a map script?
See below

EDIT 2: Turns out if you set your map script as the first option (setmaptile) and write the offset then it will work and if you want interactive flashbacks then you just put the map script on whatever maps are the flashbacks and its all clean and contained. :)
I'm still quite active, just not on Pokecommunity.

While Pokecommunity is still a great resource and discussion board for binary hacking, binary hacking is slowly but surely becoming irrelevant. If you are ready to jump ship and switch to pokeemerald some great places to try would be Silph Co. and the pret Discord. Happy hacking!

You can always reach out to me directly at hjk321#1337
Advertiser Content