Differences
This shows you the differences between two versions of the page.
ff3:ff3us:tutorial:compressed [2017/09/14 01:10] madsiur [Conclusion] |
ff3:ff3us:tutorial:compressed [2019/02/12 12:03] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ===== Compressed Graphics Tutorial ===== | ||
- | In this tutorial, we will edit a compressed graphic with the help of four utilities. We will first decompress from the ROM the graphic, modify its palette in the ROM, edit the graphic and finally compress the new graphic in the ROM. | ||
- | |||
- | ---- | ||
- | |||
- | ==== The Tools ==== | ||
- | |||
- | The first utility you will need is {{ff3: | ||
- | |||
- | Finally you will need an all purpose image editor. My favorite one is Gimp for many things, including icon making, spriting and other graphics editing. Visit [[https:// | ||
- | |||
- | ---- | ||
- | |||
- | ==== Decompressing the Graphic ==== | ||
- | |||
- | The first thing to do is to locate what you need to decompress. We have a [[ff3: | ||
- | |||
- | The battle graphics we are looking for are at $D2E000 (unheadered ROM). This is $12E000 in absolute addressing. If you open a hex editor and go at this address, you'll see the following: | ||
- | |||
- | {{ff3: | ||
- | |||
- | The first two bytes are always an inverted word of the compressed data size. This mean our graphics are $0B44 bytes in size (including the first two bytes), meaning they are from $D2E000 to $D2EB43. The wiki list the graphic ending at $D2EBFF, which is not totally false since $D2EB44-$D2EBFF is unused space. However, while the starting offset will always likely be good, I suggest you check the data size to decompress the exact amount of data. | ||
- | |||
- | Open your ROM in Peer Sprite Viewer (PSV). You'll see the main interface: | ||
- | |||
- | |||
- | {{ff3: | ||
- | |||
- | **Start** is your starting offset, **End** is your ending offset, **Width** and **Height** are the wanted dimensions of your decompressed graphic, **BitPlane** is the type of graphic once decompressed and **Decomp** is the compression type. I have always kept the **BitPlanes** value as //4 (16 colors)// for FF3us and obviously **Decomp** value should be set as //Final Fantasy VI//. This {{ff3: | ||
- | |||
- | You should see the graphics in another window. Note that you can modify the sheet size and re-click on **Copy to Buffer** to get the right size. Here are the same graphics, first screenshot is default 256x256 and second one is 128x128. This does not change much, only it will be easier to edit if you got the correct size.\\ | ||
- | |||
- | {{ff3: | ||
- | |||
- | The next step is saving this graphic into a file. Click **Compress** and you will see this window: | ||
- | |||
- | {{ff3: | ||
- | |||
- | Enter the same starting offset ($12E000) and click **...** to enter a filename with the extension of your choice (a lot of people use .bin to hint at a binary file). Finally click **Decompress**, | ||
- | |||
- | ---- | ||
- | |||
- | ==== Finding and Editing the Palette ==== | ||
- | |||
- | Now we need to use **YY-CHR**. If you want the compressed files and correct savestate to load the palette, you can download them {{ff3: | ||
- | |||
- | {{ff3: | ||
- | |||
- | When you right click on a palette color you will see its RGB value as shown {{ff3: | ||
- | |||
- | {{ff3: | ||
- | |||
- | You can right away edit your new palettes. It can be unclear how many exclusive colors your GFX has but try reusing the available white and black on the palette and only edit what seems to be exclusive. You minimize this way the potential conflicts. Gimp Colormap for indexed images is useful to get the right RGB values to edit in SNESpal, however you need to do an hexadecimal to 1-31 scale conversion by dividing by 8. | ||
- | |||
- | {{ff3: | ||
- | {{ff3: | ||
- | |||
- | ---- | ||
- | |||
- | ==== Editing the Graphic ==== | ||
- | |||
- | This is the fun part! (to me..) | ||
- | |||
- | First you can edit your YY-CHR palette to what was in Gimp and SNESpal, as shown {{ff3: | ||
- | |||
- | {{ff3: | ||
- | |||
- | ---- | ||
- | |||
- | ==== Recompressing the Graphic ==== | ||
- | |||
- | You can now reload your ROM in PSV and enter the Right info as if you were decompressing. You should in this case enter $D2EBFF as ending offset to have some room if your GFX take more space (I have not validated if this really has an impact or not). Click once again **Compress** and enter your starting offset in the compression window. Click finally **Recompress** and save your ROM. | ||
- | |||
- | {{ff3: | ||
- | |||
- | The result in-game should be this one: | ||
- | |||
- | {{ff3: | ||
- | |||
- | ---- | ||
- | |||
- | ==== Conclusion ==== | ||
- | |||
- | I hope I made this tutorial clear enough to give you good indication on how to proceed about editing compressed graphics. If you ever got a compression error due to lack of space, there is no simple trick: you either relocate the GFX which require code modifications or make your graphic take less space once compressed. If you want more info on the compression algorithm, it is available in FF6LE source or in this [[http:// | ||
- | |||
- | I also covered a while back the same example in a video tutorial pretty much in the same way. It is a good complementary video to this written tutorial. | ||
- | |||
- | {{youtube> |