Commented routines for Mega Man X's dash/dash-end states?

Discussion of hardware and software development for Super NES and Super Famicom. See the SNESdev wiki for more information.

Moderator: Moderators

Forum rules
  • For making cartridges of your Super NES games, see Reproduction.
Post Reply
ittyBittyByte
Posts: 24
Joined: Sun Dec 18, 2016 1:11 pm

Commented routines for Mega Man X's dash/dash-end states?

Post by ittyBittyByte »

I was very excited when I found this page: http://datacrystal.romhacking.net/wiki/ ... _X:ROM_map
Unfortunately the links are broken, does anyone know where I can find what was at the broken links? Or is it completely lost forever?

EDIT: The page provides addresses, I'm not sure what I should do with those if I want to see the routines as I'm still very new to this. If I should be able to view it in an emulator, I want to know how I can do that if I'm using BizHawk.
User avatar
koitsu
Posts: 4201
Joined: Sun Sep 19, 2004 9:28 pm
Location: A world gone mad

Re: Commented routines for Mega Man X's dash/dash-end states

Post by koitsu »

This site isn't responsible for stuff hosted on romhacking.net. I suggest you pose the question over there.
ittyBittyByte
Posts: 24
Joined: Sun Dec 18, 2016 1:11 pm

Re: Commented routines for Mega Man X's dash/dash-end states

Post by ittyBittyByte »

Okay, but what about my other question?

What should I do with the address given if I want to view the actual disassembled routine at the address?
User avatar
rainwarrior
Posts: 8734
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: Commented routines for Mega Man X's dash/dash-end states

Post by rainwarrior »

1. You can run a disassembler on the ROM at the equivalent address in the ROM.

2. You can use a debugger that has a disassembly view, and simply navigate to that location (perhaps put a breakpoint on it too, so you can follow it while it's executing).
Shonumi
Posts: 342
Joined: Sun Jan 26, 2014 9:31 am

Re: Commented routines for Mega Man X's dash/dash-end states

Post by Shonumi »

Archive.org to the rescue!

https://web-beta.archive.org/web/201212 ... _X:RAM_map

In case the site's too busy for you:

Code: Select all

7E:0500 - 7E:052F?   Table of 5-byte entries for DMA transfer of X's graphics from ROM to VRAM.
7E:0BAA              X's current state (6 = rising, 8 = falling, 14 = dashing, etc...)
7E:0BAA              X's current sub-state
7E:0BAC - 7E:0BAE    X's X-position (24-bit)
7E:0BAF - 7E:0BB1    X's Y-position (24-bit)
7E:0BBB - 7E:0BBC    General purpose animation timer for X?
7E:0BBF              X's current pose
7E:0BC2 - 7E:0BC3    X's horizontal velocity
7E:0BC4 - 7E:0BC5    X's vertical velocity
7E:0BC6              X's acceleration (gravity)
7E:0BCF              X's health
7E:0BE0 - 7E:0BE2    Mirror of controller input (bits for unused buttons seem to be ANDed out)
7E:0BDD              Number of shots currently on screen
7E:0BFA              Dash timer
7E:0BFF              Charge timer
7E:0C03              Charge level (01 = fully charged /w/ arm part, 02 = normal full charge,
                     03 = partial charge | Not sure what it's used for)

7E:0C06              Bitflags: Standing = 04, hanging on left wall = 02, right wall = 01
7E:0C30 - 7E:0C8F    Stuff for armor parts (position, type, and so forth)


7E:0E18              Ride armor exist flag (00 = delete ride armor, all else = ride armor exists)
7E:0E1A              Ride armor's current state
7E:0E1C - 7E:0E1E    Ride armor's X-position (24-bit)
7E:0E1F - 7E:0E22    Ride armor's Y-position (24-bit)
7E:0E32 - 7E:0E33    Ride armor's horizontal velocity
7E:0E34 - 7E:0E35    Ride armor's vertical velocity
7E:0E36              Ride armor's acceleration (gravity)
7E:0E4D              Ride armor's heading 40 = facing right, 00 = facing left


7E:1F99              Bitflag array of armor pieces collected
7E:1F9A              X's maximum health
7E:1F9C              Bitflag array of heart tanks collected
7E:1FB4              Current number of lives remaining
User avatar
koitsu
Posts: 4201
Joined: Sun Sep 19, 2004 9:28 pm
Location: A world gone mad

Re: Commented routines for Mega Man X's dash/dash-end states

Post by koitsu »

These are all memory locations in the SNES's WRAM area. So, the reads/writes in question not necessarily exclusive to bank $7E, but may be to other banks ($00-3F and $80-BF) since memory is mirrored/shadowed there (i.e. $7E0000-7E1FFF is the same as $0000-1FFF in banks $00-3F and $80-BF; this applies to both mode 20 and 21). I mention this as it may pertain to how/where to set up breakpoints for reads/writes.
Shonumi
Posts: 342
Joined: Sun Jan 26, 2014 9:31 am

Re: Commented routines for Mega Man X's dash/dash-end states

Post by Shonumi »

Whoops! My bad. That's the page for the RAM not the ROM map. Heh heh... :lol: Honest mistake right there, I tell ya. Boy, do I know how to be useless in a discussion outside my domain...

Anyway, some sleuthing reveals this: https://www.smwcentral.net/?p=viewthread&t=14229 It's mostly graphics stuff, but it's better than nothing. At least it shows you where not to look for the routines.

Now, I have redeemed myself, ever so slightly :wink:

EDIT - Further redemption -> https://www.smwcentral.net/?p=viewthread&t=82064

I don't know nesdev's policy on disassembly projects. Let me know if it's inappropriate to link directly to SMW Central. At any rate, a fellow named xe (aka Mellonpizza) has done some research into MMX.
User avatar
koitsu
Posts: 4201
Joined: Sun Sep 19, 2004 9:28 pm
Location: A world gone mad

Re: Commented routines for Mega Man X's dash/dash-end states

Post by koitsu »

Posting a link to a full disassembly of a game might be a problem (especially if it's code that can be reassembled easily), but what you provided links to in your above post are completely reasonable.
Post Reply