rchoudhary wrote:
This compression format is not tied to the SNES right? Like the code to decompress the graphics is in the Mario game itself?
Correct.
Every game can do it however they wish. There is no "standard". There may be algorithms used that are commonplace, but there's zero guarantee of it; companies certainly used their own compression algorithms based on whatever there needs were.
As for the decompression: it's done on-the-fly (into RAM) natively in 65816 assembly code. You get to reverse-engineer the game and its code to figure out how its done, then apply that knowledge to write a tool/program to decompress it (from the ROM directly, or say, if you were to extract the compressed data using a hex editor into a file, then decompress that file).
Likewise, if you planned on re-inserting it, you'd need to write a compressor tool. On top of that, you'd need to know "how" to reinsert it; if it's larger than the previous data, this is going to cause major problems for the game because you can't just "extend the size" of something and have it work -- if you shift everything up/over/whatever (in the ROM) by even 1 byte, everything breaks. And depending on how the game code references the data, it might even crash/break if you inserted recompressed data that was smaller (in length) than the original -- it all depends on all sorts of variables/nuances that are defined by the code itsef. Thus, you have to reverse-engineer the game in pieces (eventually as a whole) to get the full picture. That leads me to this statement:
Welcome to romhacking. There is a site dedicated to exactly that:
http://www.romhacking.net/ . The forums here are more "development-focused", but asking technical questions is always encouraged too. If you're new to the whole romhacking thing, asking there might be a better start, as there may be tutorials people can refer you to that can help with the general understanding.
rchoudhary wrote:
Are there any SNES games with uncompressed graphics?
Plenty. You should spend some time going through all sorts of games for this purpose, for your own education.
Also remember: not every game has to "use compression everywhere" (i.e. there are many games that use a combination of both compressed and uncompressed data). Again:
every game is different.