Friday, November 14, 2008

Spiff Hack Update

Being the end of the week, I've had time to continue (resume?) working on my hack of Solar Jetman. I figured I'd announce where I am and where I'm going at this point.

Changing the graphics of the pod is proving to be a slow and difficult process. The pod turns 360 degrees while corkscrewing so that you see the top when it faces up and you see the bottom when it faces down. This makes everything in between hard to draw and smoothly connect, especially since Spiff's ship is a saucer and I have to work with a solid red unless I decide to take extra liberties.

Since graphics work was tiring, I decided to look for a utility for overall level editing; I found none. In order to change the level layouts, types and positions of enemies and items, what makes you go where, and so forth, I need an editor. These kinds of things are rocket science to change via raw coding, and if one knows enough to do so, they might as well create a utility to make it easier. Rather than devote my entire computer life to such a thing, I'm going to wait, and possibly ask, for such a program to be made by a ROM hacking veteran. Unfortunately, this could place restraints on what I do until such ability comes into my hands, as I won't be able to fit planet names with planet environments and such all at once. In fact, if I finish this hack in every other way, it may remain a visual hack only, depending on my interest to come back and rework the level designs once I possess the requirements to do so.

So what can I change right now besides graphics? Text. Text hacking is a category unto itself due to how it is stored in a ROM. There are graphical tiles for each letter and number, and the game uses strings of hex numbers in which one number translates to one tile. This makes the hacking a matter of locating the hex strings that represent text. But how is this done, and how do you know what number corresponds to which letter? I viewed this as a complicated problem in the past; in fact, this is the first time I've done it. I once again (I had tried once before) read a tutorial on the procedure, and since I could not get the recommended DOS hex editor (Hexposure) to work properly on the computer, attempted it with the editor I have, differently though it works.

A table file, containing the key for hex and text, is needed to locate and change the right data. Since none existed for Solar Jetman, I had to make my own (I believe this is where I said "forget it" in the past, since Hexposure wasn't cooperating and I didn't know how to use the Zelda table I found with my favored editor). Opening the ROM in a debug emulator, I called up the tile viewer, found the text tiles, and wrote down their hex values in Notepad. After saving the key as a ".tbl" file, I opened it in my hex editor along with the ROM. All the hex numbers in the ROM were displayed on one side and, thanks to the table, the corresponding numbers and letters (where applicable) on the other.

A given hex number may appear several times in the data, and an editor will show it as a text graphic wherever it crops up, regardless of whether it is text or not. Finding the actual text was the easy part, though. I just had to scroll through the data until I found actual words from the game. Then all that had to be done was change the hex numbers so they made the text I wanted.

However, Solar Jetman had a catch. Each planet's name was missing the last letter in the editor, with one untranslated hex number in its place before the text for the next planet. I had to tinker with this on my own in order to figure out how to deal with it. Experimenting with planet 2, I first tried replacing the untranslated number with the hex for "D;" but when I opened the game I found that "2 MEXOMORF" (the F was missing in the editor) had become "2 MEXOMORD3 OMEBRU." The text had been squished together with planet 3's. I could draw two conclusions from this: the unrecognized hex contained the missing letter, and it also served as a sort of break or finisher, ending the line of text. I made certain of this by replacing the number in between planets 1 and 2 with the one in between planets 2 and 3. Sure enough, this made "1 PRELUDON" say "1 PRELUDOF." At this point I began to jot down the values for these "letters and breaks" in my table file, and suddenly noticed that if I filled in the rest of the letters of the alphabet that the game's planets didn't use, I would have sequential hex for every letter followed by one of those breaks. The last question, then, was whether or not I could use the resulting table to end a planet's name with a letter that the game never did. I tried it, and it worked!

I am very pleased with this accomplishment; maybe I'll be a great ROM hacker yet.

Wednesday, November 12, 2008

My brother: historical encyclopedia and practical joker.

My younger brother sure pulled a fast one on me today. I was in the basement playing Solar Jetman when he walked into the room with an expressionless face and a sullen tone, informing me that it's become awfully easy to assassinate people. I thought he was bringing grave, political news that I had failed to hear because I was downstairs playing video games; immediately pausing the game, I turned to face him and demanded to know what had happened. "BANG!" he yelled, pointing his finger at me.

I've been avoiding direct politics within T.H.I.N.G., but that doesn't mean I haven't been following the issues. With all that's been going on lately, I was somewhere between worried and exasperated at the thought of an assassination. Man! I don't think my brother had any idea what was shooting through my mind as he did that. Well, I'm grateful that it was a false alarm.

Hey, Obama's Tux Cat's are still all I've truly mentioned here about the election. Hooray for me!