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

0 users currently in ROM Hacking | 1 guest | 1 bot

Main - ROM Hacking - Look what I started doing. ;) New thread | New reply


RetroRain
Posted on 06-19-09 08:15 PM (rev. 7 of 06-26-09 03:05 PM) Link | Quote | ID: 108983


Fuzz Ball
Level: 66

Posts: 417/994
EXP: 2436805
Next: 25046

Since: 09-30-07

Last post: 1928 days
Last view: 950 days
THE ULTIMATE MEGA MAN III HACKING DOCUMENT


EMULATION/ROM HACKING
NINTENDO ENTERTAINMENT SYSTEM
MEGA MAN III DATA
INCLUDES RAM ADDRESSES, HEX OFFSETS, CODE, ETC.
DATA BY RETRORAIN

PRG ROM: 16 x 16KiB
CHR ROM: 17 x 8KiB
Mapper: 4 (MMC3)
Mirroring: Horizontal

RAM ADDRESSES:
--------------

$29 Screen Page Number

This is the number of the current screen page Megaman has entered.
The first screen is 00, but when Megaman is starting the level, it is 01.

$A0 $A1 Current Weapon
--------------------------------------------
00 00 Mega Buster - Normal Megaman
01 01 Gemini Laser
02 02 Needle Cannon
03 03 Hard Knuckle
04 04 Magnet Missile
05 05 Top Spin
06 00 Search Snake
07 01 Rush Coil
08 02 Spark Shot
09 03 Rush Marine
0A 04 Shadow Blade
0B 05 Rush Jet
80 Next

Let me explain how this works now. $A1 is the cursor position in the inventory
screen. And $A0 is the actual weapon. Both of these work together. The top-left
weapon, is 0x00, which is the Megabuster. To the right of the Megabuster is the
Gemini Laser, which is 0x01. Below the Megabuster is the Needle Cannon, which is
0x02. When the cursor is on next, the value is 0x80. The cursor value is 0x00 when
the Search Snake is selected, because that is the top-left position. However, the
actual weapon number is 0x06. It is actually very easy to figure out.

Megaman/Weapon Energy

0x9C is full energy, 0x81 is low energy, 0x80 is empty energy

$A2 Megaman's Energy (Health)
$A3 Gemini Laser Energy
$A4 Needle Cannon Energy
$A5 Hard Knuckle Energy
$A6 Magnet Missile Energy
$A7 Top Spin Energy
$A8 Search Snake Energy
$A9 Rush Coil Energy
$AA Spark Shot Energy
$AB Rush Marine Energy
$AC Shadow Blade Energy
$AD Rush Jet Energy

$AE Lives

0x02 is starting lives, 0x00 is empty lives

$AF Energy Tanks

0x00 is starting energy tanks, you start with nothing.

$B5 Weapon Fire Counter

0x00 is the starting amount. This serves as a counter for certain weapons. It is
reset to zero whenever a different weapon is selected. It is the counter for the
following weapons:

Mega Buster
Needle Cannon
Top Spin
Search Snake
Shadow Blade
Rush Marine
Rush Jet

OFFSETS:
--------

Losing an E. Tank 0x04078 - How many E. Tanks you lose when you use one. Default is 0x01.
Retry Lives 0x3192F - Retry lives is 0x02.
Megaman's Palette 0x3C8A9 - The 3 bytes that define Megaman's palette (0F 2C 11).
Starting Lives 0x3C90C - Starting lives is 0x02.
Losing a Life 0x3CB92 - How many lives you lose when Megaman dies. Default is 0x01.

CODE:
-----

INITIALIZE LIVES

This is the code that sets up how many lives you start out with.
It is initialized right before the start of a level.

$C8FB:A9 02 LDA #$02
$C8FD:85 AE STA $AE = #$00

RETRY LIVES

This is the code that is executed when you get Game Over, and you
choose to continue through CONTINUE or STAGE SELECT. Once you get
Game Over, this is the code that will re-initialize your lives.

$991E:A9 02 LDA #$02
$9920:85 AE STA $AE = #$00

LOSE A LIFE

This is the code that is executed when Mega Man dies, which decrements
his lives by 1.

$CB7E:A5 AE LDA $AE = #$02
$CB80:38 SEC
$CB81:E9 01 SBC #$01
$CB83:90 2C BCC $CBB1
$CB85:85 AE STA $AE = #$02

LOSE AN ENERGY TANK

This is the code that is executed when you use an Energy Tank, which
decrements your Energy Tanks by 1. It is important to note that the
game has no code to initialize Energy Tanks, since you always start
the game with 0 Energy Tanks.

$A062:A5 AF LDA $AF = #$04
$A064:F0 37 BEQ $A09D
$A066:38 SEC
$A067:E9 01 SBC #$01
$A069:85 AF STA $AF = #$04


____________________
My YouTube Channel

Insectduel
Posted on 06-19-09 09:03 PM Link | Quote | ID: 108987


Hammer Brother
Level: 68

Posts: 319/1069
EXP: 2686207
Next: 42593

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

Last post: 1250 days
Last view: 1249 days
I'm glad you started doing Mega Man III. If you need to put in the specific spot. Use Datacrystal to add coding into the specific ROM or RAM tables.

Good luck finding all the data.

RetroRain
Posted on 06-20-09 03:53 AM Link | Quote | ID: 108996


Fuzz Ball
Level: 66

Posts: 418/994
EXP: 2436805
Next: 25046

Since: 09-30-07

Last post: 1928 days
Last view: 950 days
I updated my first post with more data. I will update my first post daily when I have new data documented.

____________________
My YouTube Channel

Zidanerfox
Posted on 06-20-09 10:44 AM Link | Quote | ID: 109008


Goomba
Level: 12

Posts: 19/20
EXP: 6697
Next: 1224

Since: 12-11-08
From: Sweden

Last post: 5417 days
Last view: 5391 days
Nice, Good luck with this and I'd be sure to keep an eye out for your updates.

infidelity
Posted on 06-20-09 03:09 PM Link | Quote | ID: 109014


Fuzz Ball
Level: 66

Posts: 118/968
EXP: 2366738
Next: 95113

Since: 05-24-07

Last post: 951 days
Last view: 807 days
Looking good RetroRain!

Looking forward to seeing more from this.

Main - ROM Hacking - Look what I started doing. ;) New thread | New reply

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

Page rendered in 0.018 seconds. (347KB of memory used)
MySQL - queries: 57, rows: 82/82, time: 0.013 seconds.