News:

Don't forget to visit the main site! There's lots of helpful docs, patches, and more!

Main Menu

[M1] [GFX] Title Screen Editing

Started by Grimlock, April 24, 2012, 12:45:04 AM

Previous topic - Next topic

Grimlock

I was hoping that we could use this thread to share insights and experiences with editing the Metroid title screen as well as the intro text.

I personally have limited experience with both and could use advice on which program(s) to use. I think a lot of people new to metroid editing could benifit from a thread like this.

Thanks in advance for any contributions to the thread.

DemickXII

#1
Infinitys_End of MDBTroid was searching for the same thing. The Metroid wiz kid snarfblam (dude, you are a wizard) suggested using FCEUX to find the tile info (it's in the name table and use your mouse to hover over tiles to get info at the bottom of the window) and Zhs2 suggested using a tile editor of choice. You might want to check MDBTroid as a reference on this, as this is where I got my reference and the idea to do this myself for 'Roidz.

With the above information and the technique used to find it (getting FCEUX to look at the name tables, finding the same pattern of hex in ROM via hex editor, using a tile editor - all there on the thread) I was able to find the following on my own:

This is from the Expando version of Metroid by our adored snarfblam who is also responsible for Editroid, my editor of choice. Not sure if the data and its location are the same in the original, but it is best that you expand your version of Metroid using Expando (in Editroid 3.0 for convenience via the Expand option under File - you even get to make animated tiles ^___^) first before editing as this gives more room for usable tiles.

Note: if you're wondering why one line is 28 bytes, consider the TM symbol near the top right corner of the Metroid logo, which one could leave blank (ff ff instead of 1d 16). My advice, if you want your screen to remain black DO NOT edit tile ff! It is blank for a reason! In the tile editor it is the last tile on the bottom right corner for each set of tiles, which are a block of 16x16 each.

So, the Metroid logo tile array in hex and locations in ROM that the PPU reads and displays in order separated by PPU address in low byte/high byte, tile-per-row count, and the actual locations of tiles in bank (or tile placement if you will):

0x00443 - 21 03  1c  40 5d 56 5d 43 40 5d 43 40 5d 5d 43 40 5d 5d 63 62 5d 5d 63 40 43 40 5d 5d 63 1d 16
0x00462 - 21 23  1a  44 50 50 50 47 44 57 58 74 75 76 77 44 57 69 47 44 57 69 47 44 47 44 68 69 47
0x0047f - 21 43  1a  44 41 7e 49 47 44 59 5a 78 79 7a 7b 44 59 6d 70 44 73 72 47 44 47 44 73 72 47
0x0049c - 21 63  1a  44 42 7f 4a 47 44 5b 5c ff 44 47 ff 44 5b 6f 71 44 45 46 47 44 47 44 45 46 47
0x004b9 - 21 83  1a  44 47 ff 44 47 44 5f 60 ff 44 47 ff 44 7d 7c 47 44 6a 6b 47 44 47 44 6a 6b 47
0x004d6 - 21 a3  1a  4c 4f ff 4c 4f 4c 5e 4f ff 4c 4f ff 4c 4d 4e 4f 66 5e 5e 64 4c 4f 4c 5e 5e 64
0x004f3 - 21 c3  1a  51 52 ff 51 52 51 61 52 ff 51 52 ff 51 53 54 52 67 61 61 65 51 52 51 61 61 65

The actual data starts off at 0x443. 0x446 is where the pattern (that I have observed via FCEUX's name table) for Metroid's logo starts, as the values for the tiles don't actually start until three bytes/octets later. Those are the ones you want to point to the tiles that you have edited in the order you want to lay out your custom logo, thus the spaces to differentiate so no mix-ups occur.

These are hex values of what you will see on screen for the logo. There are other values in front and in back of this block of hex values that display different things like for the planet surface, the placement of star sprites, the press start text, the copyright text, and even the story text as well. Having the tile editor open and the hex editor will help you decipher which tiles are displayed where and will give you a general idea of the screen's layout for the title screen.

As I said earlier and snarfblam also discovered before me, the data structure is as follows and in the following order: PPU Address lo/hi, tile count, tile placement.

Note that the screen is only 32x28 in 8x8 tiles, so there is a limitation here that one has to be aware of.

Thanks for reading this even though this was a novel of sorts. I hope I didn't insult anyone's intelligence, for that wasn't the purpose of this and was just to be clear. Use this well, and happy hacking.

Scyzer

This is not DeviantArt. There's no need to use colored text, especially a color that is so hard to read against the default Metconst background.

DemickXII

#3
I only did that to differentiate, but apparently it made it harder to read... Hmmm... Time to edit.

Edit: Back to normal.

Grimlock

Thanks for the detailed post Demick., Can you provide a link to the information you mentioned.  Is there an application to edit the title screen with a GUI that a right brained person can make sense out of.?  Something like tile layer pro?

I can't imagine editing graphics by manually entering hex values..... Drawing by Hex, LOL, I hope there 's a better way...

.(Please excuse any errors in this post, the kindle fire is really bad for editing text, I wish it had arrow keys on the keyboard)

DemickXII

As far as actual screen arrangers go (what you may be looking for, not sure), I don't know of anything other than for NES screen arranger, which involves you splitting up a ROM to separate it into a CHR file and all that nonsense. This is why I use hex for tile arranging - that program is more work for hacking games than it is for making homebrew title screens, its intended purpose from what I read.

To find my info, I decided to do some lurking and stumbled upon this thread. As far as the rest of the research (hex values for the planet surface and what have you), it was deduction just by looking around with a hex editor open at the same time FCEUX was open with all of its debugging features, which is the key to get the bigger picture. You can literally hover over with the mouse in name table viewer in FCEUX and on the bottom left-hand corner it will tell you which tile in the PPU went where, which requires knowledge of how Metroid's graphics work. As I mentioned earlier, it is best if you expand the Metroid ROM which won't kill it but put every tileset in neat organised blocks of 16x16 tiles right for you so you know which tileset is in use (I think ease of editing was what snarfblam was going for when he designed Expando).

Unfortunately, that's all to my knowledge about this area. Though, I wonder if snarfblam is up to the job of making something along these lines. If so, snarfblam is going to have a lot to do. I recall in his earlier iterations of his editor he had title screen text editing capabilities written into his program. With this information it should be easier for him to even be able to do this sort of thing, I would think. Heck, I'll see what kind of my own research I can come up with to help out. I love that editor! ^____^ I will post images about it later on today for better visuals, so wait patiently.

DemickXII

#6
I think some visuals are in order here:

[spoiler][/spoiler]

A screenie of YY-CHR. This is the tile program I use. In the top part of the window are hex values. These correspond to hex offsets in ROM for the range of data being viewed, which is usually a PPU pattern table of 16x16 count of tiles for either Background or Sprite graphics. In this case, the data starts at offset 0x40010 and ends 256 (FF) bytes later, or 0x60010. The cursor is currently on hex 00 of that PPU page. Note the space in the bottom portion of the PPU pattern table: all except the last bottom right tile (FF) can be used for new title graphics.

Also - and much harder to do btw, if one replaces the copy of fonts in the middle (they're all caps - be careful you do not delete the punctuation marks or the The End graphic, or at least try to move them somewhere and update accordingly) with the ones at the very top for all text strings, using a hex editor preferably with TBL file usage for convenience like Translation Station, there's even more space to be had. I did the above and used those tiles for terrain anomalies for the title screen (I recently updated the title shots on my 'Roidz thread - check them out), and it was very tedious but very worth every minute of effort to pull off.

The Expando ROM patch dumps all the PPU data from each section of the game in pages straight from the active pattern tables themselves, unlike how it used to be before with just graphics here and there and we had to guess which were solid tiles, which were breakable, whatever. The order dumped is usually the sprites first for levels then the BG for the levels. In the title screen and ending screen, the reverse is true. The above screenshot in YY-CHR is an example of the behavior of the dump in the Expando ROM. The next 256 tiles after what are shown are that of the Sprites for the ending and title - Samus Aran with Armor, with bodysuit, with bikini - that sort of thing. The stars are located there, the weird comet thingy is there. the Energy Tank boxes, and numbers are all there. I think when snarfblam made the Expando patch, he had this in mind for easy editing of the ROM for Metroid hackers everywhere.

Here's my 'Roidz ROM after I made changes, whcih are described in the caption for the screen:

[spoiler]

Editied the 64 original tiles for the title and editied the blank space normally there by default from D0 up to FF. Then I edited the duplicate letters and numbers. rearranging data as I went. After this, I went into the hex editor and used the top most tiles for the letters instead for everything text in the credits, the samus ending, the title screen, and the story text.[/spoiler]

FrHed, my other tool in my arsenal:

[spoiler]

at 0x440, if you go +3 over to the right, you have offset 0x443, which is where the first line for the Metroid logo starts. Note the fact the there are three bytes of data as an intro to that line: the two bytes are the offset for the screen to view in memory and points to an offset there to draw. The next byte is how many bytes to draw per line. Then the meat of the data: your PPU tiles in the active pattern table (ranging anywhere from 00 through FF - one full page) to display where in line. These are the bytes one gets to play with. FF stands for a space between tiles here, like the gap in the M in Metroid, for example, yet another reason to leave that tile black like I said. Anywhere there's an FF, that is that last tile I told you not to edit in tile editor of choice because that's a pure black tile for the BG. There will be whatever pattern you draw there repeated otherwise, and it will look fugly.[/spoiler]

Translation Station using a custom TPL (uses a different format not able to be edited in Notepad):

[spoiler]

This is an example of my custom TPL for Metroid, which denotes normal font usage in ROM...



...And copy font usage in ROM. I had to replace the copy fonts with the normal fonts using the method I described, thus inducing a headache because of a random Translation Station crash. Don't worry - I was still able to do it, though I had to save all my changes like a fiend.[/spoiler]

FCEUX in action with PPU viewer and Name Table viewer:

[spoiler]

The origin of all my research thanks to the thread in the link in the above post. This program, along with my hex editor, was what I had used to edit the title logo and find out all the info I could about the title screen BGs and the ending BGs. The key is to follow the patterns of bytes. When hovering your mouse over the name table viewer, all sorts of information will appear in the fields on the bottom right of that window - useful for looking up text as well as graphics layout. Also, I wasn't kidding when I mentioned about the dumping of PPU's pattern tables whole into the ROM for how Expando works, as you can plainly see to the right - and I left the tile to the bottom right black.[/spoiler]

To design my logo, I literally had to turn on an 8x8 grid, make the picture screen resoltuion for the NES, and lay out the tiles like they were in ROM. I suggest you instead take a screen resolution screencap in emulator of the title screen and edit from there. I then turned the tiles I wanted to edit into null tiles or "X blocks" in my tile program and copied the null tiles to my paint program, laid them all out in an even configuration as the number of null tiles would allow using the top-left corner of the logo as a place reference, make the "X Block" tiles all a solid non-black color, and then draw from there using those constraints. From there you can adjust where you want that block of tiles to be positioned as a visual aid of sorts.

A picture example in Paint Shop Pro 6:

[spoiler]

Here's me with my null tiles as per the tile count



A similar configuration I used for my title screen edit. If you wind up having an odd number of tiles, that's okay. How you lay the tiles out is up to you. Like Bob Ross says, "It's your world, you can do what you want." Just make sure you put them back into the tile editor somehow. Copying them back into the tile editor might require you dropping the color palette down to 4 colors if you have that option or 16 if you don't. Remember - copy the tiles in multiples of 8 using the grid as a selection guide. Unexpected ugliness will result in YY-CHR if you don't follow this principle - haven't tried it in any other tile editor, nor do I wish to try it and don't recommend it either. You get the picture. Also leave your finished layout open for reference where to place the tiles in hex to prevent you from getting lost. So if you are using a pixel art program leave it open while at the same time opening your hex editor and FCEUX and make changes in ROM as you go. You can reload your ROM to see your changes reflected as many times as you want.[/spoiler]

If you plan to do this, MAKE A COPY OF THE ROM. Edit the copy - it will be your guinea pig (sorry for the analogy if you support PETA as it was not meant for offense but for analogy only). Once I get my hack done, feel free to use it for reference.

Grimlock

#7
You have some great posts on this topic Demick, this is going to be a great help!

Thank you!

Odb718

I know this reply is to an older thread. But I thought some of the things I did might help others.
You get 16x4 tiles to work with. So 64 total tiles. I made them all blank and numbered them to be identifiable.
I originally did my logo in Paint/photoshop. I just made what I wanted to see, then put a grid over it.
You can then see which parts are duplicated and can count the unique tiles. Use tile layer pro to make the parts of the logo, then the entire logo. Then hex edit in your values.

Grimlock

Well I finally have title screen hacking mostly figured out thanks to this thread.  I do have a question though with FCEUX, when I hover over a tile in the name table it shows the memory location in PPU but it appears to a novice like me PPU must be the ram location because when I edit and restart the rom the changes are lost.  When I edit the ROM memory the changes stay. So my question is how do I locate the associated ROM address when all it shows me is the PPU?

Also does anyone know how to modify the title screen colors through the HEX editor in FCEUX?

snarfblam

Yes, the name table viewer is giving you PPU RAM addresses. What you want to do is find the name table "strings" and then search the ROM for them. E.g. if you see tiles FF FF 40 5D 56 etc. in a row, search the ROM for the same thing and you should find where the data is stored in the ROM. The process for finding palettes and changing them would be essentially the same, although if you want to experiment to see which colors you like, you can edit them on the fly (in RAM, so temporarily) by going to $3F00 in PPU RAM in the FCEUX hex editor.

Grimlock

Thanks Snarfblam, that's what I needed to know.

For anyone entering title screen hacking here it is put simply:
1. Modify the graphics tiles used for the original "metroid" in a tile editor.
2. Hex edit the ROM to tell the game which tile to load in which position.
3. Read the previous posts by others to get the details.

I thought it was going to be much more difficult than it was, my screen hack took about 6 hours, that's planning, creating the graphics, and hex editing. Any future screen hacks should be faster now that I know how to do it.

Thanks to everyone that contributed to this thread.