+  RHDN Forum Archive
|-+  Romhacking
| |-+  ROM Hacking Discussion
| | |-+  Editing mode 7 data - yes, there's a way!
Pages: [1]
Author Topic: Editing mode 7 data - yes, there's a way!  (Read 2 times)
Kitsune Sniper
Guest
« on: January 09, 2008, 05:11:08 pm »

Shazam.

http://vice.parodius.com/tutorials/tutorial-how-i-conquered-mode-7-and-lived-to-tell-about-it/

It's not as complicated as some people thought it would be but that's how I did a title screen for Gideon recently. So yeah. Until someone creates a REAL Mode 7 editor, this will do. :p

(Edited, I changed the location of the tutorial.)
« Last Edit: January 20, 2008, 12:21:23 am by Kitsune Sniper »
creaothceann
Guest
« Reply #1 on: January 09, 2008, 05:57:28 pm »

Quote
I have no bloody idea how to change or rearrange tilemapped Mode 7 data. All that stuff is interleaved in the data itself; neither of the programs I used in this tutorial can change it.

The SNES has 64 KB of video RAM in two RAM chips. One stores the even-numbered bytes (0, 2, 4, ...) and the other stores the odd-numbered bytes. Normally they act as one continuous block of memory.

In Mode7 though the data from one chip is used for the tiles and the other one for the tilemap. So to separate the two you'd use only the even bytes for the tilemap and the odd bytes for the tile graphics.

Once it's untangled, the tilemap is simply an array of 128x128 bytes, each indicating one of the tiles. The tile data is an array of 256 bitmaps of 8x8 pixels each (not one single bitmap of 128x128 pixels as one might think).

Btw. games can store the data either separate or interleaved, and select accordingly how the VRAM address is incremented, so you might encounter both types.
Nightcrawler
Guest
« Reply #2 on: January 09, 2008, 06:48:37 pm »

Nice read. Smiley I didn't know you could use that combination of programs to make it work. Still an overcomplicated pain in the ass however you slice the turkey though.

creaothceann beat me to the tilemap. Long story short, in your Zelda 3 example, because you can view the mode7 data like that, the tilemap is stored separately in this case and combined/interleaved later in VRAM on load. If you hit a game that actually stored the data interleaved like it is in VRAM, you won't be able to view it with anything. I guess you could still technically view it with VSNES is extracted the data and copied it to a savestate, but that's about it I think.

We could still need a utility to handle Mode7 data that's fore sure.
Kitsune Sniper
Guest
« Reply #3 on: January 09, 2008, 07:23:16 pm »

Quote from: Nightcrawler on January 09, 2008, 06:48:37 pm
Nice read. Smiley I didn't know you could use that combination of programs to make it work. Still an overcomplicated pain in the ass however you slice the turkey though.

I based this on what Gid told me to do, which was at least three times as annoying. This is simple, I do stuff that's much worse than this all the time. Tongue
Nightcrawler
Guest
« Reply #4 on: January 10, 2008, 08:49:44 am »

Quote from: Kitsune Sniper on January 09, 2008, 07:23:16 pm
Quote from: Nightcrawler on January 09, 2008, 06:48:37 pm
Nice read. Smiley I didn't know you could use that combination of programs to make it work. Still an overcomplicated pain in the ass however you slice the turkey though.

I based this on what Gid told me to do, which was at least three times as annoying. This is simple, I do stuff that's much worse than this all the time. Tongue

Things like this are what drove me into learning programming languages. Wink I have a short fuse and get frustrated when something is a long cumbersome process, then the engineer inside me says: "What can I do to change this and make this go faster?". But of course, I'll be the first to admit, sometimes, it's still more efficient time wise to do the long process than create a new tool, especially if it's something you won't be doing often. Wink
Kitsune Sniper
Guest
« Reply #5 on: January 10, 2008, 02:31:58 pm »

On the other hand, I'm the kinda guy that prefers to find workarounds instead of making new programs.

Gid's solution involved extracting the data, copying and pasting it around using a hex editor. It drove me nuts. Tongue
Pages: [1]  


Powered by SMF 1.1.4 | SMF © 2006-2007, Simple Machines LLC