• Welcome to SCdev.org. Please log in.

Welcome to the new SCdev forums!

How does Trim ROM actually work?

Started by xiii, October 20, 2006, 10:00:34 PM

Previous topic - Next topic

xiii

I've seen cases where it takes off around 3 megs, and sometimes takes off at least 50% of the file if you dont trim ROM, what is this magical option, and are there any bad side effects?

PharaohsVizier

Usually they like to pack roms with some extra space to make it into a nice round number, and sometimes they just like to add crap for no reason, basically its just useless space.  When you trim, you just get rid of the useless space, usually there shouldn't be any bad sideeffects, except if the Supercard Patcher removes something that should stay.

M3LV1N

So it only trims useless stuff? So I guess it doesnt remove any multiplayer related things either?

PharaohsVizier

If it would damage the game in any way, no one would use it.  But most people have it set automatically.  And I remember in the old GBA days, every game was packed so it would be exactly 16, 32, 64, 128 or 256mb.  But now games aren't packed like that, they just have random amounts of useless space.

Devil_Spawn

Quote from: "PharaohsVizier"But most people have it set automatically.

how do you set it to automatic? i have to change it every time

Xenomorph

Quote from: "xiii"I've seen cases where it takes off around 3 megs, and sometimes takes off at least 50% of the file if you dont trim ROM, what is this magical option, and are there any bad side effects?

like others have explained, it just removes the parts of the rom that arent  used.

lets say some company makes a game. that game ends up taking up 18 MegaBytes of space.

they can order a 16 Meg chip, or a 32 Meg chip. it wont fit on the 16 meg chip, so they get the 32 meg chip as it is the next highest up.

when the game is copied/dumped, you end up with a 32 meg file, as it is for the most part a 1:1 copy of what is on the game cart. "trimming" it removes the extra "padding", leaving you with just an 18 meg file.

i dont know of any side effects, as no part of the game should be altered - just the extra "zeros" removed (or however the game is padded).

now, trimming only works with games that have something to be trimmed.

if a game comes out, and it is around 31 megabytes, then it will fit nicely on a 32 meg chip, and you may only trim 1 meg back off.

with Cooking Mama, i think that was an ~8 megabyte game, but the DS rom for it was 32 megs i think. so 24 megs, or around 75% of the game was padding.