Navigation
Home
Super Mario Quest
ROM Hacking
Art
Links
Admin Login
Stats
Views: 1,925,065
|
|
Tutorial: Ripping Backgrounds
For this example, I will use the w1-4 background from SMB3 on Super Mario All-Stars.

Before beginning, you will need the following:
- Lunar Magic and your hack
- A Super Mario All-Stars ROM
- ZSNES
- YY-CHR
Okay, so now that we have all of these, follow these steps.
- Open ZSNES, and open SMAS. Play through SMB3 to w1-4 - the level with that background. Once you are on that level, go to Game > Save State.

- Open Lunar Magic, and open your hack.
- On the toolbar at the top, click on the blue mushroom - Extract ExGFX from ROM.
- This will extract any ExGFX files that are already in your hack to an ExGraphics folder in the same folder as your hack..
- If you have none, it will just create that folder.
- Open the ExGraphics folder.
- If the folder is empty, put this file in it.
- If the folder is not emtpy and you have other ExGFX files in there,
copy one of them and rename it to ExGFXyy.bin, where yy is a hex value greater than 80,
and not already used.
- As you can see in the following image, we count up from 80. We will be using ExGFX83.bin for this background.

- It's time to copy the graphics from the SMB3 background now. By making the savestate, we have stored the graphics and palette
for that background in a file. Open YY-CHR twice (in 2 windows). In one window open the ExGFX file we are using, which is ExGFX83.bin.
In the other window, open the savestate file from Super Mario All-Stars (It should be either in the same folder as SMAS, or
in the same folder as ZSNES, and will be called romname.zst).

They should both be scrambled. Change this to 4BPP SNES in both windows:

This will enable us to see the graphics more clearly. Now, in the window with the savestate loaded, click on the + button 19 times:

Next, scroll down in the savestate window until you see the graphics for w1-4, however, the colors will not be correct.
To enable us to see the graphics more clearly, we can load the palette of that level to view the tiles in. Click on
Palette > Emulator State Load and find the savestate file that is currently loaded. Click on Open, and the colours should totally change.
Click on the up / down arrows next to the palette on the bottom-right corner to load a different palette row to view the graphics in.

Okay, now scroll down a little further to find the graphics for the background we want to rip, and select the appropriate palette
row to view them in. When you have, they should fit in a 256 x 128 region. Right-click and drag to select that region, then copy them.

Now simply paste the copied tiles into the other YY-CHR window; the one you used to load ExGFX83.bin, and save.

- We're now going to add this ExGFX file to the hack, so in Lunar Magic, open the level you want the new background on. Note, if you haven't done so already, click on the red mushroom, and then the green mushroom. This will install a simple ASM hack in your ROM that is necessary for going further.
Hit the yellow mushroom - Insert ExGFX to ROM. Now click on the red poison mushroom, and the Super GFX Bypass dialog will open.
Put a tick in the Enable box, and change BG1 to the ExGFX file that you just created.

The current background for that level should now get corrupt, because we have inserted an ExGFX file that doesn't have the graphics for the level's original background. The graphics loaded in the background slot for that level now are the ones for our new background.
If you open the 8x8 tile editor, you will see the tiles for the new background in the background slot. We're getting close. :)
Click on Level > Enable Custom Palette if it isn't already enabled.Next, we'll load the new background's palette. We can do this by loading the colors from the savestate, like we did in YY-CHR.
But we don't want to copy the whole level's palette; just the background's row. So go to the next level in Lunar Magic (hit Page Up once), and go to File > Palettes > Import Level Palette from file.
Find the SMAS savestate that we previously used and hit Open.
Open the Palette Editor.
To copy all of the colors, we will have to repeatedly move back and forth between the two levels, picking colors from the level with the loaded palette, and pasting them into the level on which we're making the new background. The colours we want are on palette 1, and we want to paste the colors onto palette 3 (Don't ask why; it just works better with SMW if you use palette 3).
Left-click on a color and hit Return to copy a color, and right click on a color to paste it. Eventually, after copying all 16 colors in the row, we should end up with this:

- Next, we're going to assemble to Map16 tiles. Open the 8x8 Tile Editor. Click on Page Dn. once, and Pal. Up four times to load the appropriate graphics and palette.
Now open the 16x16 tile editor. Keep pressing down to find a free background page. You can use pages 12 to 1F.

Click on a blank Map 16 tile and its properties will be displayed at the bottom of the window. Click on Edit 16x16 Attributes, and a new window will appear.
For the 8x8 tiles, use F8, 101, 110, 111 (These four 8x8 tiles can be seen in the 8x8 Tile Editor window). Change the palette to 3, and click on OK. Now right click anywhere in the 16x16 Tile Editor to paste the tile.
Continue to do this until you have the entire background made up in 16x16 tiles. It helps if you have a picture of the complete background open too so that you know what the tiles are supposed to look like. Also, you only need each 16x16 tile once. Don't make two of the same tile if the tile will be used more than once in the background. Don't forget to save the Map16 tiles by hitting F9 when you are done.
- Finally, once you have all of the tiles you need, you can assemble the background. Leaving the 16x16 Tile Editor window open, open the Background Editor Window. Keep pressing Page Up until the BG is using Map16 page 12. Once it is, select a tile in the 16x16 Tile Editor, and right-click in the Background Editor to paste that tile. Continue to do this, and make more Map16 tiles if necessary, until your background is complete.
So there ya go, you just ripped your first background. As you do this more, you will pick up ideas, like how to add clouds or a gradient to your background.
If you're interested in ripping foreground graphics too, the same technique applies, but you need to use the FG section of the 16x16 Tile editor instead, and you will need to set the ExGFX file to a different slot in the Super GFX Bypass window.
Please forward any comments / questions you have to pac413@gmail.com so that I can continue to improve this tutorial. Thank you.
|