Points of Required Attention™
Please chime in on a proposed restructuring of the ROM hacking sections.
Views: 88,489,942
Main | FAQ | Uploader | IRC chat | Radio | Memberlist | Active users | Latest posts | Calendar | Stats | Online users | Search 04-26-24 10:24 PM
Guest: Register | Login

0 users currently in ROM Hacking | 4 guests | 1 bot

Main - ROM Hacking - Mega Man 1 GB New thread | New reply


RT-55J
Posted on 09-18-08 11:48 PM (rev. 3 of 09-21-08 02:22 AM) Link | Quote | ID: 90708

Armor Guardian
Level: 81

Posts: 586/1562
EXP: 4889387
Next: 103462

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

Last post: 314 days
Last view: 55 days
I got off my lazy bum and did some actual ROM hacking for the first time in my life. I'm not a programmer, so don't be expecting a level editor for this game, but it should be perfectly possible to make a simple hack with this data unless I'm an idiot.

Notes:
0x14000-17FFF Robot Master Level Data
-0x14000-14007 - Pointer List
-0x14008-1492E - Cut Man
-0x1492F-15259 - Ice Man
-0x1525A-15F71 - Fire Man
-0x15F72-16AAC - Elec Man
-0x16AAD-17FFF - Unused
-0x202E9-20D14? - Wily's Fortress
-0x?-? - Wily's Space Fort (too lazy to look for it now)

Note: Switching the pointers for the levels does not switch the level's graphics or sound, meaning that the
pointers for the level's graphics and sound are stored elsewhere.

The data for each level seems to be organized like this:
-Pointers and stuff - Barely deciphered nonsense
-Room headers and enemy data - Mostly deciphered
-Other data - Undeciphered
-Room data - Deciphered
-TSA data - Deciphered
-Collision data - Undeciphered (haven't bothered)

Room Header Format (Note: it doesn't always seem to follow this pattern):
1 byte - Room #
2 bytes - Unknown. Possibly a pointer to "Other Data"
2 bytes - Pointer to the actual data of the room
3-6 bytes - Unknown. Seems to be 3 different values, which can be 2 non-zero bytes or 1 zero byte
2 bytes - Pointer to the previous room's header
2 bytes - Seems to determine the location of the room's exit
1 byte - Determines direction of exit
2 bytes - Pointer to the next rooms header

Enemy Data Format:
1 byte - Enemy ID
1 byte - X position in blocks
1 byte - Y position in pixels (usually). Some objects ignore the second nybble, or use it to modify behavior
1 byte - Unknown. Possibly a behavior modifier, or just padding.
- The falling stalagtite uses to determine when to fall, and the screws use it as well.

Enemy IDs (in hex):
00 - Terminates enemy data for a room
01 - Spinning Wheel of death
02 - Turret
03 - Sliding Puck of annoyingness
04 - Sniper Joe
05 - Scissors of death
06 - Giant Jumping Thing
07 - Annoying Helicopter
08 - Power up. Second nybble of Y-pos determines the powerup
- x0 - Nothing
- x1 - 1up
- x2 - Large life energy
- x3 - Small life energy
- x4 - Large weapon energy
- x5 - Small weapon energy
- x6 - Nothing
- x7 - "
- x8 - Freeze
- x9 - Freeze
- xA - Nothing
- xB - Flickerfest (maybe offscreen sprites)
- xC - Nothing
- xD - Nothing
- xE - Glitchy sprite in top right
- xF - Freeze
09 - Fan. Second nybble of Y-pos changes direction.
0A - Firebar - Second nybble of Y-pos changes direction
- x0 - Up
- x1 - Left
- x2 - Right
- x3 - Nothing?
- x4 - Up
- x5-xF - Untested. Possibly repeats.
0B - Falling fireball. Y-pos:
- x0 - Repeats
- x1 - Doesn't repeat
0C - Fire-throwing robot
0D - Bouncing platform. (is this even used?!)
0E - Unused?
0F - Zeus on his cloud.
10 - Ice block
11 - Met - Y-pos:
- x0 - Peeking
- x1 - Walking
12 - Screws?
13 - Egg-dropping bird
14 - DISAPPEARING BLOCKS! Y-pos determines pattern. Patterns appear to be hardcoded.
15 - Suzy. Second nybble of Y-pos changes direction
16 - Electric beams. Y-pos determines direction.
17 - Falling stalagtite. Byte after Y-pos determines timing.
18 - Spaghetti generator
19 - Spaghetti
1A - Unused?
1B - Egg. Glitched gfx
1C - Baby bird from egg. Glitched gfx
1D - Metal wall. Use Atomic Fire to break.
1E - Cut Man. (can't seem to find the other bosses...)
1F - Victory. Instant Win.
20 - Freeze...
21 - Victory (again)
22 - Freeze...
23 - Downward going Ice Slasher shot?? (WTF?)
24 - Freeze...
25 - Victory (yet again)
26 - Freeze...
27 - Another unidentifiable projectile.
28 - Freeze...
29 - Victoly!
2A - Freeze...
2B - Victory.
2C - Freeze...
2D - Victory.
2E - Freeze...
2F - Victory
30 - Freeze...
31 - "
32 - "
33 - "
34 - WTF? Possibly another projectile.
35 - Unused?
36 - Time Stopper?
37 - Boss Door
38 - "Dr. WILY TELEPORT SYSTEM" text
39 - Freeze...
3A - Return to title screen
3B - " + plus no status bar
3C - "Go Back to Title Screen"
3D - Boss explosion
3E - Boss explosion
3F - Weird. Level loads, but Mega Man never appears. Possible freeze
40 - "
41 - Boss explosion + sound effect
42 - Boss explosion
43 - "
44 - Freezes as soon a Mega Man appears onscreen
45 - Unknown. Causes lots of flickering.
46 - Boss explosion
47 - "
48 - Unused?
49 - Boss explosion
4A - Plays enemy death sound effect
4B - Freeze...
4C - Boss explosion
4D - "
4E - "
4F - Freezes game during Mega Man's entrance
50-FF - Untested

Note: All of the values from 0x19 onward (and most before), were tested by editing the first enemy in Ice
Man's stage. "Freeze" (in most cases) denotes that the game froze as soon as the boss introduction
finished.

"Other Data": I have no clue how this stuff works. When messing around with Cut Man's level, it changed stuff
like the speed of the conveyers and the color cycling. In one instance, changing 1 (one) byte caused both
the music to double in speed and the left-moving conveyers to zip me right at ludicrous speed.

Room Data:
1 byte - Room Width (always (?) a multiple of 0x0A)
1 byte - Room Height (always 0x08 (?)) (game appears to crash if 0x00)

Level data is stored in "rooms" as opposed to the screens of the NES game. One byte represents one 16 by 16
block, starting from the top left corner of the room and going to the right until it wraps to the next row.
Data for the next room starts where the next room's header says so, which in the case of practically every
single room of the game is immediately after 8 rows of data with no padding of any kind between rooms. Room
data can easily be edited with a hex editor that supports custom widths.

TSA Data:
1 byte - # of blocks. This doesn't seem to change anything in the game, but it would be useful for an editor

Each 16x16 block is 4 bytes, which each byte corresponding to one 8x8 tile. Easy as pie.

Collision Data: 1 byte corresponds to 1 block from the TSA data. I haven't figured out exactly what each value
means, but it should easy to find out. I think 0x00 is air.


Here's a patch that uses this information to modify the first two rooms in Ice Man's stage. Apply to "Mega Man - Dr. Wily's Revenge (U) [!].gb"

kuja killer
Posted on 09-19-08 12:50 AM (rev. 3 of 09-19-08 12:52 AM) Link | Quote | ID: 90714


Level: 55

Posts: 56/628
EXP: 1243923
Next: 70266

Since: 03-20-07
From: Lake Havasu City, Arizona

Last post: 282 days
Last view: 7 days
Wow that's cool stuff there.
I died a few times on your mini test hack. right where that one sniper joe is, and then due with the 2 suzzys on the next room.

Although...how the heck do I get the VBA's hex editor to go past FFFF hex? ..i tried asking in IRC but no one knows.

http://www.a3share.com/members/1119/hex.PNG
hex

The Goto function doesn't let me go further than it either.

RT-55J
Posted on 09-19-08 02:11 AM (rev. 2 of 09-19-08 02:11 AM) Link | Quote | ID: 90715

Armor Guardian
Level: 81

Posts: 587/1562
EXP: 4889387
Next: 103462

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

Last post: 314 days
Last view: 55 days
I'm not a programmer, but I think the GB's processor only has 64kB of addressable space, and that's exactly what the memory viewer is showing. The only parts of the ROM shown there are the two (?) banks that are currently switched in.

You're better off using a separate hex editor to modify the game; preferably one where you can adjust the width of the window.

Trax
Posted on 09-19-08 02:38 AM Link | Quote | ID: 90727


Yellow Stalfos
Level: 71

Posts: 548/1145
EXP: 3035914
Next: 131200

Since: 07-06-07
From: Québec

Last post: 3627 days
Last view: 2879 days
Hmmm, I thought you were talking about a ROM that is 1GB in size...

Insectduel
Posted on 09-19-08 08:42 PM Link | Quote | ID: 90786


Hammer Brother
Level: 68

Posts: 136/1069
EXP: 2687877
Next: 40923

Since: 02-16-08
From: Insectduel's office

Last post: 1257 days
Last view: 1257 days
That was cool. You know I was planning to hack the game eventually soon whenever I need to.

I am expected to make at least 1 level from the GB to my NES MM1 game soon but the sizes may be different.

RT-55J
Posted on 09-21-08 06:57 AM (rev. 2 of 09-21-08 06:58 AM) Link | Quote | ID: 90902

Armor Guardian
Level: 81

Posts: 597/1562
EXP: 4889387
Next: 103462

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

Last post: 314 days
Last view: 55 days
I made a patch that makes the the title screen to say "Mega Man World" like the Japanese version. Except for one tile, all of the graphics were already in the ROM. I have no clue why they didn't bother implementing it. The title screen data is at 0x1814B-18226 with the graphics right after it. It also looks like the graphics and data for "Weapon Get", Wily Castle, and Wily Space Station screens are after it.

In other news, I've come closer to fully deciphering the level format. It looks like a lot of pointers are involved, making it difficult to edit by hand. :/

Main - ROM Hacking - Mega Man 1 GB New thread | New reply

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

Page rendered in 0.020 seconds. (349KB of memory used)
MySQL - queries: 42, rows: 68/68, time: 0.015 seconds.