Points of Required Attention™
Please chime in on a proposed restructuring of the ROM hacking sections.
Views: 88,480,633
Main | FAQ | Uploader | IRC chat | Radio | Memberlist | Active users | Latest posts | Calendar | Stats | Online users | Search 04-25-24 06:57 AM
Guest: Register | Login

0 users currently in ROM Hacking | 4 guests | 2 bots

Main - ROM Hacking - Mega Man 7 editor and general hacking New thread | New reply

Pages: 1 2

Parasyte
Posted on 03-14-09 11:49 PM (rev. 2 of 03-15-09 12:26 AM) Link | Quote | ID: 102959


Red Goomba
Level: 18

Posts: 13/48
EXP: 24784
Next: 5113

Since: 02-09-09
From: Flagstaff, AZ

Last post: 5209 days
Last view: 5187 days
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.

Kawa
Posted on 03-14-09 11:51 PM Link | Quote | ID: 102964


CHIKKN NI A BAAZZKIT!!!
80's Cheerilee is best pony
Level: 138

Posts: 1630/5344
EXP: 30941996
Next: 720985

Since: 02-20-07
From: The Netherlands

Last post: 4497 days
Last view: 2632 days
This almost made me wet my pants.

____________________
Wife make lunch - Shampoo
Opera - give it a spin
Spare some of your free time?
<GreyMaria> I walked around the Lake so many goddamn times that my sex drive was brutally murdered
Kawa rocks — byuu

Parasyte
Posted on 03-15-09 03:42 AM Link | Quote | ID: 103034


Red Goomba
Level: 18

Posts: 14/48
EXP: 24784
Next: 5113

Since: 02-09-09
From: Flagstaff, AZ

Last post: 5209 days
Last view: 5187 days
Another thing I forgot to mention about objects: they also control the scroll stops and scroll direction changes. These work similar to the tile set/palette handling objects; the game engine compares one or both of Mega Man's coordinates to the object.

It's fairly easy to guess which ones do these things just by playing through the game (or watching a video) while looking at the Syndrome renders for comparison.

Kawa
Posted on 03-15-09 11:07 AM Link | Quote | ID: 103059


CHIKKN NI A BAAZZKIT!!!
80's Cheerilee is best pony
Level: 138

Posts: 1645/5344
EXP: 30941996
Next: 720985

Since: 02-20-07
From: The Netherlands

Last post: 4497 days
Last view: 2632 days
I just took the time to actually read your post in detail, and I can see why it has the Firefox icon now. Still, doesn't mean the editor can't be as bad as that would imply to me and my friends. It's still very impressive. The non-destructive editing sounds somewhat revolutionary in the romhacking scene, correct me if I'm wrong.

____________________
Wife make lunch - Shampoo
Opera - give it a spin
Spare some of your free time?
<GreyMaria> I walked around the Lake so many goddamn times that my sex drive was brutally murdered
Kawa rocks — byuu

Parasyte
Posted on 03-15-09 08:21 PM Link | Quote | ID: 103148


Red Goomba
Level: 18

Posts: 15/48
EXP: 24784
Next: 5113

Since: 02-09-09
From: Flagstaff, AZ

Last post: 5209 days
Last view: 5187 days
I don't know about revolutionary. Just my opinion on how an editor should work.

So do you dislike Firefox? The editor does not run in Firefox or anything like that. It just runs on the same runtime platform that Firefox does. And the same one that Thunderbird runs on, and Open Komodo, and Pidgin...

Since it's open source and written in standard web languages, I think it would be a pretty nice tool to get other developers started with their own editors. (Without resorting to .NET, which has almost zero cross-platform specialization.)

But then again, this thread is about Mega Man 7, and as I was saying in the original post, the tile set data for sprites is still not completely known. I've found the length/source/destination data, but haven't yet found where it gets indexed from (though I have a lead). There also seems to be another "destination offset" that gets used before the DMA is started. That needs some more investigation.

The editor strictly uses pointer tables to load stages. For example, here's the list of pointer tables it uses, from yesterday's snapshot.

You might notice those are SNES HiROM pointers. The editor uses SNES memory mapping internally to make it nice and easy to navigate pointer tables directly. All of those pointers points to a pointer table. (Confusion sets in?) The pointer tables are nice because they can be indexed with some known value, like the stage number. Something similar is needed to map the object data (mm7Editor.PTR_OBJECTS) to a tile set.

I have an idea that object #0 is typically Mega Man. (I say typically, because the objects seem to be ordered first horizontally, then vertically. That means, any object that has a lower X-coordinate (or equal X- but lower Y-coordinate) than Mega Man, should also have a lower index.) It's probably a good idea to begin tracing from object #0 reads, which may shed some light on what I'm missing.

Kawa
Posted on 03-16-09 08:48 PM Link | Quote | ID: 103283


CHIKKN NI A BAAZZKIT!!!
80's Cheerilee is best pony
Level: 138

Posts: 1684/5344
EXP: 30941996
Next: 720985

Since: 02-20-07
From: The Netherlands

Last post: 4497 days
Last view: 2632 days
Off topic: I indeed don't like Firefox, but that should say nothing about XULRunner. Just to clear that up.

Somewhat more on topic: am I correct if I say the sprites are assembled from a bunch of loose limbs? They seem kinda recognizable to me, at least...

At any rate, NDE is a very good idea and I share your opinion on it.

____________________
Wife make lunch - Shampoo
Opera - give it a spin
Spare some of your free time?
<GreyMaria> I walked around the Lake so many goddamn times that my sex drive was brutally murdered
Kawa rocks — byuu

Parasyte
Posted on 03-17-09 03:00 AM Link | Quote | ID: 103339


Red Goomba
Level: 18

Posts: 17/48
EXP: 24784
Next: 5113

Since: 02-09-09
From: Flagstaff, AZ

Last post: 5209 days
Last view: 5187 days
I'm not entirely sure how sprites/OAM are assembled. I haven't actually looked at the data, just been screwing with the assembler for a bit. It's a big pain because Geiger's SNES9x debugger (to put it bluntly) sucks the big one.

Jigglysaint
Posted on 03-22-09 04:09 AM Link | Quote | ID: 103709


Red Paragoomba
Level: 20

Posts: 40/62
EXP: 38536
Next: 3903

Since: 04-04-07

Last post: 4616 days
Last view: 2353 days
Need me to find anything? It sounds to me that MM7 might actually share a similarity to Megaman X. Any idea how the level order is loaded yet?

koala_knight
Posted on 03-22-09 06:57 AM (rev. 3 of 03-22-09 07:14 AM) Link | Quote | ID: 103716


Buzzy Beetle
Level: 44

Posts: 286/384
EXP: 591183
Next: 20102

Since: 06-01-07
From: Miami

Last post: 4124 days
Last view: 4112 days
IIRC, MM7 has a sprite viewer built into it that can be accessed via a special password or gamegenie code. At any rate this sprite viewer might be useful for finding object data and OAM stuff.

Posted by "TheMechanicalManiacs.com"

Game Genie: D4D4-8DDF
PAR: C0062002
The thing starts right after the Copyright/Capcom logo. There's a sort of cross-hair cursor which can be dealt with via the second controller. It's to line up sprites and make sure they're in frame.

There are a few lines of text and values in the upper left, which are as follows..

"NUM-OBJ" - What group of animations you're viewing (00 is Megaman, 01 Jetpack Megaman, 02 A metool, etc.) Changed by holding B and pressing up/down.
"NUM-SEQ" - Which animation of the group you're viewing (For Megaman 00 is the default standing animation, 01 blinking, 02 climbing, etc.) Changed by pressing left/right.
"NUM-PAT" - Which sprite of that set of animations you're viewing..
"PAT-INY" - Which frame of the current animation you're viewing. Hold Y for the animations to go through (not all of them loop).
"OBJ-DIR" - If you have the current animation flipped horizontally or vertically, which you do by holding X and pressing a direction.
"CH-TYPE" "AT-CODE" "ST-CODE" and "DM-CODE" - NO idea. The latter three don't even show any values.

You hold A to move the sprite around. There's also values in the lower right, they relate to the cursor thing.

This is probably THE most interesting find in MM7 since it's undoubtedly what the game developers themselves used to test sprites.

Kawa
Posted on 03-22-09 02:29 PM Link | Quote | ID: 103721


CHIKKN NI A BAAZZKIT!!!
80's Cheerilee is best pony
Level: 138

Posts: 1704/5344
EXP: 30941996
Next: 720985

Since: 02-20-07
From: The Netherlands

Last post: 4497 days
Last view: 2632 days
Posted by koala_knight
IIRC, MM7 has a sprite viewer built into it that can be accessed via a special password or gamegenie code. At any rate this sprite viewer might be useful for finding object data and OAM stuff.
I remember trying that thing. I think a small drawing lag tipped me off to the nature of the sprites.

____________________
Wife make lunch - Shampoo
Opera - give it a spin
Spare some of your free time?
<GreyMaria> I walked around the Lake so many goddamn times that my sex drive was brutally murdered
Kawa rocks — byuu

Parasyte
Posted on 03-24-09 01:49 AM (rev. 2 of 03-24-09 01:52 AM) Link | Quote | ID: 103803


Red Goomba
Level: 18

Posts: 18/48
EXP: 24784
Next: 5113

Since: 02-09-09
From: Flagstaff, AZ

Last post: 5209 days
Last view: 5187 days
Posted by Jigglysaint
Need me to find anything?

Yeah, figure out those first three bytes in the object definitions (see mm7.js)
Posted by Jigglysaint
It sounds to me that MM7 might actually share a similarity to Megaman X.

The games bear a passing similarity, at least. Since Mega Man 7 was a much later game than Mega Max X, it's probably likely that MM7 and MMX3 are more closely related.
Posted by Jigglysaint
Any idea how the level order is loaded yet?

You mean the physical stage order? Yes! All stages are ordered based on the pointer tables. The Syndrome source code is the best source of info for that. But here's a quick breakdown of each index in those tables:

0x00: Intro stage
0x01: Freeze Man's stage
0x02: Cloud Man's stage
0x03: Junk Man's stage
0x04: Turbo Man's stage
0x05: Slash Man's stage
0x06: Shade Man's stage
0x07: Burst Man's stage
0x08: Spring Man's stage
0x09: Robot Museum
0x0A: Wily's Fortress 1
0x0B: Wily's Fortress 2
0x0C: Wily's Fortress 3
0x0D: Wily's Fortress 4

Jigglysaint
Posted on 03-25-09 12:55 AM (rev. 2 of 03-25-09 01:03 AM) Link | Quote | ID: 103849


Red Paragoomba
Level: 20

Posts: 41/62
EXP: 38536
Next: 3903

Since: 04-04-07

Last post: 4616 days
Last view: 2353 days
I should have clarified. When I mean level order, I meant how each level's map screens are loaded. For example, in Megaman X3, it can get one screen at a time, or load a chunk of it at once. This is unlike tradditional Megaman games where screens are loaded sequentially. The X games use scroll boundries that are triggered when X reaches certain points. The NES games reads a scroll index that includes the amount of screens before a scroll. Basically I am asking if 7 does the former or the latter.

As for object data, sure I can try. Just give me an offset to work with. We are talking sprites right?

Edit: Just from pictures, I can see that it's exactly like X3. This means that logically, a sprite controls the scrolling, and there is data somewhere that tells what each index does. That also means that more than likely, the sprite data is similar in structure. That means it's coded top to bottom, left to right, and it contrains compressed co-ordinate values. Hell, you might as well just make a Megaman X3 editor while you are at it.

Parasyte
Posted on 03-26-09 02:07 AM Link | Quote | ID: 103956


Red Goomba
Level: 18

Posts: 19/48
EXP: 24784
Next: 5113

Since: 02-09-09
From: Flagstaff, AZ

Last post: 5209 days
Last view: 5187 days
That was pretty much what we discussed last night; the games are similar enough that the editor could handle them both with just some minor changes.

I prefer using the term "object" in this game (or series of games using this game engine) because, as you said, they aren't all sprites. Some objects act as events or control points. Thus, nothing for the SNES to render on screen using OAM. But this is little more than a pet peeve, really.

One thing you mentioned was that X3's maps are compressed. ("Maps" meaning the array of room numbers ... or the 'highest level' of stage data required to render a stage.) MM7 uses no compression on this array.

Were you planning to document all object classes, types, and arguments? If you needed some help with that, I could probably pitch in. Having that info would be at least enough for me to fix some of the rendering bugs in the editor. Namely palette and tile swaps. Some other things to keep in mind are: loading OAM tile sets, tile maps, and palettes for sprite objects; background layer priorities (see: Mad Grinder intro stage mini boss ... He is rendered in the background layer, which is moved to the foreground by a special object and then moved back to the background by another object); etc.

AlexAR
Posted on 04-07-09 04:38 AM Link | Quote | ID: 104680


Koopa
Account taken over, please contact admins to reclaim
Level: 27

Posts: 118/119
EXP: 102801
Next: 13358

Since: 02-22-07
From: El Paso, TX

Last post: 3029 days
Last view: 3029 days
I tried getting your editor set up but I keep getting "Error: couldn't parse application.ini

Setting it up in general seems very complicated, how do you suggest the easiest way to do it is?

Parasyte
Posted on 04-10-09 01:27 AM Link | Quote | ID: 104861


Red Goomba
Level: 18

Posts: 20/48
EXP: 24784
Next: 5113

Since: 02-09-09
From: Flagstaff, AZ

Last post: 5209 days
Last view: 5187 days
* Download the most recent .zip and extract it to a directory that is easily accessible (e.g. C:\syndrome\)
* Install Firefox 3, if you haven't, already
* Start -> Run
* Type the following:

"C:\Program Files\Mozilla Firefox\firefox.exe" -app "C:\syndrome\application.ini"


At some point, I will have to create an installer and proper XULRunner application package. (Right now, it's not even packaged. !) Doing that would make the user experience slightly better, but it would be harder on potential developers.

Kawa
Posted on 04-11-09 11:54 AM Link | Quote | ID: 104875


CHIKKN NI A BAAZZKIT!!!
80's Cheerilee is best pony
Level: 138

Posts: 1756/5344
EXP: 30941996
Next: 720985

Since: 02-20-07
From: The Netherlands

Last post: 4497 days
Last view: 2632 days
It'd be nice if you did. I'd hate to have to install a webbrowser just to use something that doesn't even have a single thing to do with webbrowsing.

It doesn't, does it?

____________________
Wife make lunch - Shampoo
Opera - give it a spin
Spare some of your free time?
<GreyMaria> I walked around the Lake so many goddamn times that my sex drive was brutally murdered
Kawa rocks — byuu

Parasyte
Posted on 04-11-09 09:42 PM Link | Quote | ID: 104918


Red Goomba
Level: 18

Posts: 21/48
EXP: 24784
Next: 5113

Since: 02-09-09
From: Flagstaff, AZ

Last post: 5209 days
Last view: 5187 days
The only thing it has in common with web browsers is that it is capable of displaying images. :x

I know, I've already violated one of the most important rules to new open source software start-ups (proof). One of the problems I face is requiring users to download a 7MB runtime just so they can do something silly like open a ROM so they can see the level renderings which are already uploaded to my website. (See OP.)

For Ubuntu users, it's a piece of cake: XULRunner 1.9.0 is installed by default. Users only need to download the gz/bz2 from hgkw, and run a simple command:
xulrunner /path/to/syndrome/application.ini


For Windows and Mac OS X users, it's not so trivial. Either the user must download XULRunner, or Firefox (which has its own "private" XULRunner included).

The other options for Windows users include: 1) creating a XULRunner package (XPI) that can 'installed' to the XULRunner environment by double clicking the icon, 2) creating a full executable [classic] installer, complete with a XULRunner build, if necessary; this is how XR apps like SongBird currently do it.

Truth is, I'm still not entirely familiar with the platform, so it's hard to say what's the best way to make an installer.

Parasyte
Posted on 10-18-09 08:32 AM Link | Quote | ID: 117448


Red Goomba
Level: 18

Posts: 22/48
EXP: 24784
Next: 5113

Since: 02-09-09
From: Flagstaff, AZ

Last post: 5209 days
Last view: 5187 days
Nothing to report, exactly. I haven't forgotten about this project. Just not seen any new community interest in it...

RT-55J
Posted on 10-18-09 09:22 AM Link | Quote | ID: 117450

Armor Guardian
Level: 81

Posts: 1291/1562
EXP: 4888747
Next: 104102

Since: 02-23-07
From: Wild Side Arcade

Last post: 312 days
Last view: 54 days
I'd attribute the lack of interest to the fact that this game isn't very popular amongst Mega Man fans (for various reasons) and hackers tend to be interested in games they're fans of.

In other words, this topic would be 10 pages by now if the 7 in the title was replaced by an X.

Still, I'm somewhat interested in the prospect of an editor. Replaying the game recently, it was much better than I remembered (though the final boss is as bad as ever).

Oh, and just out of curiosity, have you tried using BSNES's debugger? I've heard that its significantly better than Gieger's SNES9x debugger.

Kiokuffiib11
Posted on 10-18-09 05:29 PM Link | Quote | ID: 117466


Porcupo
Level: 40

Posts: 78/313
EXP: 407013
Next: 34296

Since: 07-10-09
From: Marquette, Michigan

Last post: 3311 days
Last view: 1933 days
I couldn't get it to do much, and ran into all kinds of problems. I finally gave up on it. But, I would love to have an editor for Mega Man VII.

____________________
セシル
Pages: 1 2


Main - ROM Hacking - Mega Man 7 editor and general hacking New thread | New reply

Acmlmboard 2.1+4δ (2023-01-15)
© 2005-2023 Acmlm, blackhole89, Xkeeper et al.

Page rendered in 0.074 seconds. (350KB of memory used)
MySQL - queries: 102, rows: 142/142, time: 0.049 seconds.