This thread is cross-posted from acmlm board2. The original thread hasn't seen much activity. So to raise community awareness, I decided to post here as well. Basically, the latest points of discussion on MM7 hacking have slightly converged with MMX3 hacking, since both games share a similar engine. I was last looking at the game's object data format, and I would like to get some of the format documented before continuing work on the editor.
In any case, the following is the original post content:
I have been working on a Mega Man 7 editor for quite some time. Rather that regurgitate the history of the project, you can read about it here: http://www.kodewerx.org/wiki/index.php/Syndrome
Some interesting points about this editor:
* It's open source (the most recent source code snapshots are available right now: http://hg.kodewerx.org/syndrome)
* It's written for XULRunner (the same technologies powering Firefox)
* Its application logic is written entirely in JavaScript (for now; eventually it will be necessary to rewrite some of the CPU-intensive parts in C++)
* It's fully cross-platform; tested and running on Mac OS X, Windows XP, and Linux (Ubuntu).
* It can read the Mega Man 7 US ROM with or without an SMC header. The SNES ROM lib I've been writing handles LoROM and HiROM mapping modes.
* It supports opening zipped ROMs directly (PKZIP only! not 7zip or any other archive formats)
Planned features include:
* Non-destructive editing (NDE) - all changes will be possible to undo. Even after saving and closing the project. This will be done with a well-balanced mix of XML files (to keep track of what's been worked on) and UPS format patches (the actual "hack" itself). The idea is to never write directly to the ROM file, but to handle cases where a hacked ROM can be loaded into the editor.
* "Saving" your project will save changes as a UPS format patch file, which will be loadable with emulators supporting the format, and directly distributable on the internet.
* Intuitive editor UI that keeps information overload to a minimum; no more pop-up windows! (or at least keep them to an absolute minimum) Pop-ups are bad for the internet, and they are bad for desktop applications, as well. Support for multiple user paradigms; keyboard-driven, point-n-click-driven, drag-n-drop-driven ...
* Internationalized! It is very simple to translate the UI into any language! Coding experience not required.
Syndrome looks like this:
Mac OS X 10.5
Ubuntu 8.10
Windows XP SP2
Syndrome currently has no UI, and no editing capability. Something I really need to work on before this becomes usable. It does show some promise, however. Considering I've only been working on it for a few hours each night, I think it is progressing along quite quickly.
Objects are currently read and parsed, but the data is not 100% deciphered. The editor can draw a cross-hair and index number on the map in the correct location, but the only way to tell what it's supposed to be is by looking at the remaining "unknown" data for each object.
The objects are capable of changing background palettes and tile sets when Mega Man "touches" them. For these kinds of objects, Mega Man may not have to exactly touch them, but just pass over the X- or Y-coordinate where they live (not verified). The first palette-changing object in the intro stage is object #9.
Objects also describe enemies. The first "Bunby Tank" enemy in the intro stage is object #12. Most enemies are sprites (OAM), some are SNES background layers (e.g Intro stage object #19; Mad Grinder).
Objects also transform the stage itself. A few good examples of this kind of object are objects #1, #2, and #3 in the intro stage; these create the first "unstable road" blocks that stop Auto.
Syndrome can export rendered stages to PNG. Note that the rendering engine is incomplete. Palettes and tiles are incorrect in some locations. Here's a list of exported stages:
http://parasyte.kodewerx.org/projects/syndrome/stages/2009-03-07/ - First exports
http://parasyte.kodewerx.org/projects/syndrome/stages/2009-03-10/ - Exports with object notations
Object tile sets are not resolved or loaded, yet. I've found a good portion of the assembler routines which handle it, but not everything. The first sprite tile set loaded for the intro level is at ROM file (without SMC header) address 0x1BBBE. The five bytes here describe the tile set:
byte-0: tile data length (shift this byte left by 4 to get actual length; if zero, stop processing)
byte-1, byte-2, byte-3: ROM pointer to actual tile data
byte-4: destination offset and end-flag (high bit set indicates processing end, mask lower 7 bits and shift left by 8 to get actual destination offset)
Taking this specific data for example:
3C 40 49 DA 80
Data Length: $03C0
Data Source: $DA4940 (translates to file address 0x1A4940)
Data Destination Offset: $0000 (equates to VRAM location $6000)
End of sprite tile data.
When the end-flag is not set, the game engine processes the next five bytes to load more tile data.
The "battle plan" goes something like this: the editor needs a UI. Some ideas of mine are available on the Kodewerx Wiki (aka "Kwiki"), linked at the top of this post.
It then needs to support fully non-destructive editing. (NDE is popular in photo editors like Photoshop and in many video and audio editors as well. This is usually done by abstracting the editing process with "imaginary" layers.)
To be a complete editor, it needs to handle all objects properly, especially in regard to objects which modify stage design/layout and general game play. These may be the most difficult to deal with since Syndrome wants to display the full stage for editing, rather than working on one screen at a time (like most Mega Man editors do).
If anyone is interested in helping (with data or coding -- come on, it's JavaScript! It's dead simple to work on!) just post here and we'll see if we can get you setup to work on it.
As an aside, please keep in mind that I'm not familiar with the Mega Man series, much less Mega Man 7. The enemy names listed here came from Wikia Gaming. Compare the Syndrome-rendered stages to the rips available at the The Video Game Atlas
Edit: Made some minor adjustments for clarification.