(Link to AcmlmWiki) Offline: thank ||bass
Register | Login
Views: 13,040,846
Main | Memberlist | Active users | Calendar | Chat | Online users
Ranks | FAQ | ACS | Stats | Color Chart | Search | Photo album
04-19-24 12:11 PM
0 users currently in ROM Hacking.
Acmlm's Board - I3 Archive - ROM Hacking - Having a problem changing some palettes in all games using snes palette New poll | |
Add to favorites | Next newer thread | Next older thread
User Post
MadMikeXP 3



 





Since: 11-24-05
From: Georgia

Last post: 6281 days
Last view: 6279 days
Posted on 02-05-07 06:18 AM Link | Quote
I have a question:

I've been working with snes palette tool for a couple months and have ran into some major problems.

1.In mega man 7 ,where mega man aquires the rush adaption suit I would like to give mega man armor a Blue and white color style or in Mega Man X I would like X's armor to be black and white just like his gaea armor in mmx5 my main problem is Mega Man uses some palettes that are currently needed by different parts of the game my second problem is if I change any palettes in the rom using snes palette tool I can kiss my current copy of the rom goodbye -which means it gets destroyed-. Is their a better and safer way of changing the palettes without corrupting the rom or another program that can do a better job ?
MadMikeXP 3



 





Since: 11-24-05
From: Georgia

Last post: 6281 days
Last view: 6279 days
Posted on 02-07-07 01:50 AM Link | Quote
I'm not trying to bother or aggrevate anyone so let me ask this ?

what would be the best way to edit,change, and save palettes in a rom without damaging it to be totally useless ?

I'm using virtual snes right now and is good for viewing palettes and saving in a savestate but not inside the rom itself.
MathOnNapkins

1100

In SPC700 HELL


 





Since: 11-18-05

Last post: 6269 days
Last view: 6269 days
Posted on 02-07-07 04:17 AM Link | Quote
Well... let's see. I would look up what the format of the savestate file you are using is. For example, if it's ZSNES, find the file format for .zst or .zs0 files, etc. Look in the documentation for where the "CGRAM" is stored in the savestate. (If you're using Snes9X, you will have to decompress the savestate first. To do this, change the file extension to .zip or .rar, or maybe .gz, I can't remember exactly, and decompress the file.) Open up the savestate and modify the CGRAM bytes in a hex editor.

CGRAM is 512 bytes long, so that means it has 256 separate color entries, each being 16bits long. Using Virtual SNES, see if the palette you have changed is the one you were looking for. This is kind of a process of trial and error, but you're going to want to look in the second half of the CGRAM bytes, b/c the first half is for backgrounds, and the second half of CGRAM is for sprites (i.e. X's armor is a sprite so it will be in that section.) All sprites are 4bpp (16 colors), so the length of the palette is going to be 16 colors * 2 bytes which equals 32 bytes long. Each palette is separate from one another. So bytes $100 through $11F of CGRAM would be the first sprite palette, $120 through $13F would be the second, and so on...

I'm pretty sure VSNES will tell you in the section where you view sprites which palettes X and his various body parts are using. So if it says X's armor is using palette 0, you would edit $100 through $11F and voila, the colors should change when you reload the state after editing it.

Now for how to edit the actual palette in the rom. Once you have located the palette in the savestate and know for a fact what the 32 bytes designating it look like, you begin a search for that same string of 32 bytes in the ROM itself. The problem is, that the first color of any palette is always ignored, b/c it's considered to be transparent anyways. So you may want to search for the last 30 bytes of the palette instead, it might be easier.

If that doesn't work, the palette may be compressed, though I don't think it's all that common for that to happen. Or it might not be compressed, just stored in a weird format that makes the code that loads it a little more reusable. I can't say there's a general surefire method to do anything in ROM hacking, but this method might work for you.


(edited by MathOnNapkins on 02-06-07 10:47 PM)
Add to favorites | Next newer thread | Next older thread
Acmlm's Board - I3 Archive - ROM Hacking - Having a problem changing some palettes in all games using snes palette |


ABII

Acmlmboard 1.92.999, 9/17/2006
©2000-2006 Acmlm, Emuz, Blades, Xkeeper

Page rendered in 0.013 seconds; used 358.76 kB (max 428.48 kB)