Zophar's Message Domain

Go Back   Zophar's Message Domain > Emulation Talk > Rom Hack

Reply
 
Thread Tools Display Modes
Old 05-21-2006, 11:49 PM   #1
Acheron86
Junior Member
 
Join Date: May 2006
Posts: 11
Default Super Metroid: Creating/Importing Tiles

I've played around with utlities and whatnot trying to figure out how to create and use new tiles for Super Metroid, to go with a hack I'm trying to make using it. I haven't been able to figure out where to begin, however.

It may not be within my abilities, but I want to at least try. Can anyone point me in the right direction for importing new tiles into Super Metroid?
<P ID="signature"></P>
Acheron86 is offline   Reply With Quote
Old 05-22-2006, 04:05 AM   #2
Jathys
Senior Member
 
Join Date: May 2000
Posts: 1,840
Default Re: Super Metroid: Creating/Importing Tiles

>Can anyone point me in the right direction for
> importing new tiles into Super Metroid?

<U>To edit the 8x8 tiles:</U>
1) Open a ROM and room in SMILE.
2) Tools -> Graphic Editor
3) Rip CRE to file
4) Edit this file in a tile editor (such as TileLayerPro)
4.5) Optionally, also do the palette to file button
5) GFX file to ROM button (or however I worded it)

<U>To edit the 16x16's (tile tables)</U>
1) Study and do some trial and error with the controls in the frame with the large preview of your tile.
2) If you can't figure this out after a while, I'll simplify it more for the next release.
<P ID="signature">http://jathys.zophar.net/index.html</a></P>
Jathys is offline   Reply With Quote
Old 05-22-2006, 09:37 PM   #3
Acheron86
Junior Member
 
Join Date: May 2006
Posts: 11
Default Re: Super Metroid: Creating/Importing Tiles

Ah, so that's what that function does! Sounds easy enough now. Thanks a bunch!
<P ID="signature"></P>
Acheron86 is offline   Reply With Quote
Old 05-23-2006, 01:30 PM   #4
Acheron86
Junior Member
 
Join Date: May 2006
Posts: 11
Default Re: Super Metroid: Changing Palette Pointers

I'm doing fine making tiles and using SMILE to import the new ones in, but as I feared I've reached the palette size limit. I need to change the pointers to get around this, so I could use some help there, in figuring out what address each palette is at. If it's more than hex work, perhaps someone could also recommend a reference site where I can read up on this some...? Thanks in advance.
<P ID="signature"></P>
Acheron86 is offline   Reply With Quote
Old 05-23-2006, 02:23 PM   #5
Jathys
Senior Member
 
Join Date: May 2000
Posts: 1,840
Default Re: Super Metroid: Changing Palette Pointers

Two solutions for the palettes:
1) In each row of colors, the very first color is always transparent . . . If those are all the *exact* same color, you will save some space when it's compressed (who in hell ever heard of compressing 256 bytes into 212 anyway??? what's up with that... rant over).

To actually change the pointer though:
2) In SMILE's main window, go over to Tools and turn on "Pointer Pop-Up" . . . Now, when you choose to save your palette, SMILE will pop-up a message like the following:


The top line tells you where the palette itself is currently located . . . This is useful if you plan on decompressing/editing it manually.

The next section (in this example, telling you that the graphic set pointers are at $7E6A2) is the one you want. Note: This offset is for a ROM *without* a header. If your ROM has a header, you'll need to add $200 bytes to it.

At that address are the 3 pointers for this graphic set (each pointer is 3 bytes long, because the bank is included). To find the pointer for palettes, you simply need to add SIX bytes onto whatever location SMILE gives you.

I won't tell you how to make sure your pointer is pointing to where you need it to . . . If you don't know this, look up a document on pointers, or pick up Snes2Hex.

Anyway, SMILE has an error with this . . . Once you've moved the palette, SMILE will warn you that you may not have enough space (assuming this palette is further in the ROM than any of the others)... *If it is*, you will be given an option to take the risk of overwriting (which isn't a risk, if you moved your pointer to a spot with at least $100 bytes of space available . . . *The bug* lies in the fact that if this palette is not the very last one in the ROM, SMILE gets confused and will not allow the save!

I have already fixed this bug, but it still needs to be worked around for now (by editing only the last palette). The fix will be available in the next release of SMILE (version 1.0), but I'm still working on that.
<P ID="signature">http://jathys.zophar.net/index.html</a></P>
Jathys is offline   Reply With Quote
Old 05-23-2006, 06:50 PM   #6
Acheron86
Junior Member
 
Join Date: May 2006
Posts: 11
Default Re: Super Metroid: Changing Palette Pointers

I've been playing around with this for a couple hours without much success. I'm using a headered rom, which puts the pointers for normal Crateria's graphics set at $7E8A2; for now, that's the graphics set I want to modify, as my new tiles don't look quite right in the current palette. : P

Now, I want to change the third pointer, the palette pointer, so that it can "point" to a nice big empty space which I can then use for a bigger palette without fear of overwriting anything. And of course there's plenty of empty space to use... so I just need to get the pointer to "point where I want it to".

I figure I could do this without much trouble just by some math: If graphic sheet palette is at $212F7C in my rom, and the pointer is 7C AD C2, then I'd -think- that subtracting the location of the palette from the pointer's current value would give me the number I need to add into pointers. In this case, that'd be:

C2AD7C
-212F7C
=A17E00
(In the case of an unheadered rom, the equation would be slightly different, giving me A18000 instead.)

With this math done, I went and took a new address I'd like to use the palette at (let's say $2F53E8) then I would add it to the "magic" value (A17E00). So:

2F53E8
+A17E00
=D0D1E8

And that would mean my pointer should be "E8 D1 D0". If it were this simple, I guess we wouldn't need hacking gurus, though... and, go figure, this isn't working.

So, clearly whatever I need to do, isn't something I can just guess at. My hex hacking experience is limited to Xbox games... I had hoped they would work the same but that was a long, long shot.

Regardless, I'm determined to figure this out. I've been wanting to make a good Super Metroid hack, and new tilesets and palettes are to me an essential part of it. Unfortunately, I can't find any guides that help me make sense of this, and a google of "Snes2Hex" gives me no results, so I'm at the mercy of the wise here. Any help would be greatly appreciated!
<P ID="signature"></P>
Acheron86 is offline   Reply With Quote
Old 05-23-2006, 08:38 PM   #7
Jathys
Senior Member
 
Join Date: May 2000
Posts: 1,840
Default Pointers 101

>If the graphic sheet palette is at $212F7C in my rom, and
> the pointer is 7C AD C2, then I'd -think- that subtracting
> the location of the palette from the pointer's current value
> would give me the number I need to add into pointers.

Oh, dear god no. Hahaha.... Good guess though, considering you haven't dealt with this before.

7C AD C2 = $C2AD7C = you got that part right<img src=smilies/cwm27.gif>

I'd recommend studying this anyway, just so you get some experience (which will make things MUCH faster for you in the long run) . . . For the short run though:

1) Open up SMILE and open a room.
2) Edit -> Pointers
3) At the bottom of the Pointer form, you'll see two text boxes (as short one fo the bank, followed by a longer one)
4) Type the bank (C2) into the short box and the pointer (AD7C) into the longer box.
5) Notice how the #'s in the title bar of the program have changed? You'll see "212D7C | 212F7C" . . . This is the offset the pointer points to (the first is without a header... the second is for with a header).
6) While watching the offsets change in the title bar, keep changing the pointer/bank values until you get the offset you are hoping for (you'll start to notice obvious patterns as you do so).

Hope that helps.
<P ID="signature">http://jathys.zophar.net/index.html</a></P>
Jathys is offline   Reply With Quote
Old 05-23-2006, 10:19 PM   #8
Acheron86
Junior Member
 
Join Date: May 2006
Posts: 11
Default Re: Pointers 101

Perfect, that's all I needed. For now I think I'm set--I have more ambitious changes that'll take me a lot longer than a day or two to implement, but I'm holding off on those until after I've done a good chunk of the SMILE editing. For that matter, is there a better place to talk to you or other metroid know-it-alls? Like IRC or something? Not that I don't mind these forums, but they feel kinda dead. : (

Oh well. Back to hacking away! Thanks for your help again.

EDIT: Okay, maybe I don't quite got it yet. : P I've changed the pointers to E8 51 DE, to point at $2F53E8. I've got the palette bytes copied there (500+ bytes copied, I figured that's more than enough), but now I have some strange psuedo-palette that copies the colors of whatever palette was loaded before it. Moreover, the tiles all show up half-transparent within the SMILE editor. I tried the same thing again at a different address within the rom, with the same results.

Is there more involved in copying the palette than just changing the pointers, then? If there is, I'll do it, I'm just again not sure where to go from here. As soon as I get this working I should be set for some time, though.
Acheron86 is offline   Reply With Quote
Old 05-25-2006, 06:29 AM   #9
Jathys
Senior Member
 
Join Date: May 2000
Posts: 1,840
Default Re: Pointers 101

>but now I have some strange psuedo-palette that copies the
>colors of whatever palette was loaded before it. Moreover,
>the tiles all show up half-transparent within the SMILE

You have a screenshot of this I could see? Not quite sure what you mean.

<P ID="signature">http://jathys.zophar.net/index.html</a></P>
Jathys is offline   Reply With Quote
Old 05-25-2006, 05:34 PM   #10
Acheron86
Junior Member
 
Join Date: May 2006
Posts: 11
Default Broken Palette

Well, I thought I had this working, but now the problem's back again. So, with the pointers set up correctly, I get this effect:



Those are my custom tiles, and as you can see they're all semi-transparent, though they don't look that way in-game. The palette will become whatever palette was loaded before it, both in SMILE and when played in an emulator. Within the graphics emulator, the palette shows up normally, but any attempts to save modifications brings up two errors--the first one warning me that it's the last palette in the rom, and the second one telling me that I can only use 212 bytes. So, I can't modify the palette, and in fact I'm losing palette storage space by changing the pointers. Maybe it's something I've done wrong, I don't know, but the palette is showing up normally in the graphics editor so it's reading the palette correctly.

EDIT: While I'm thinking about it... any chance that SABS will be available for download again some day? Its door editor would make life a lot easier. : P

<P ID=&quot;signature&quot;></P><P ID="edit"><FONT class="small">Edited by Acheron86 on 05/25/06 02:58 PM.</FONT></P>
Acheron86 is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 10:30 PM.

Contact Us - Zophar's Domain - Archive - Top

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.