maskedbyte









Posts: 32

Threads: 5

Joined: Dec 2016

Reputation:

RegularPosts: 32Threads: 5Joined: Dec 2016Reputation: 4

#1 Mega Man X Data Dump (for X fan games, ROM hackers or just curiosity)





Here it is:



[spoiler="Physics and Movement (X1) (researched by me)"] Code: - All movement data stored in Mega Man X is multiplied by 256 and divided & rounded when modifying player’s X/Y values, remainder is added to sub-pixel movement values.



- Sub-pixel movement is tracked separately and added if greater than 255 or less than -255.



- X’s initial jump velocity is 1363 (Y values are stored inverted) and 1363/256 = 5.32421875p/f which might look like a weird rounding error, but it's correct and should not be changed.



- X’s gravity is 64, 33 underwater. Gravity is set to 0 if not in air.



- X’s horizontal speed is 376 for walking (376/256=1.46875p/f) 885 for dashing (885/256=3.45703125p/f) and -138 while in taking damage (-138/256=-0.5390625p/f).



- X snaps onto the ground in an odd way. I'm not sure what the conditions for this are, but I'm working towards analyzing the disassembly to figure out how this is done.



- The first byte (nibble?) of X's position is the screen number he's in, the other byte (nibble?) is his position relative to the first byte (nibble?).



- It is recommended to store X’s movement values multiplied by 256 and to divide by 256 and round towards 0.



[spoiler="X's States (X1 & X2) (researched by me)"]

Code: X's actual state values:

0 = standing

2 = pre-walk stepping

4 = walking

6 = jumping

8 = falling (also used while being lifted by Sky Claw, Sky Claw seems to work by locking and parenting X's y value and acting as walls as you can glitch-wall jump while stuck)

10 = recovering from fall (identical to standing?)

12 = dying

14 = taking damage (X flashes for exactly 60 frames after completion)

16 = wall jumping (state is set to 8 after completion, set to 6 next frame if jump button is being held)

18 = wall sliding

20 = dashing

24 = preserves last state and current animation frame, this state is used when the game is frozen (e.g. receiving health from an item and boss death)

26 = makes X walk to the center of the screen, then ignores all inputs, if already in center then direction is set to face left, switching to any other state after this freezes game

(NEW INFO: 26 is used after defeating boss while victory music plays and X teleports out, sub-state handles animation changes in this state)

28 = preserves last state and current animation frame, used for moving through boss doors

30 = frozen / ignore input, gravity appears to still be applied. (usually for boss intros/boss deaths)

32 = recovering from dash (identical to standing?)

34 = teleporting in

36 = enter ladder (below)

38 = exit ladder (above)

40 = enter ladder (above)

42 = on ladder

44 = in ride armor

54 = lying on ground (flame mammoth)

70 = in ship (storm eagle)

90 = cutscene speed bike

96 = running in bubble (x-hunters cutscene)

98 = intro cutscene speed bike



Other state info:

- X has a sub-state value that I haven't yet looked into. (might be related to ride armor or animations?) (changes after boss defeat)

- For buster-specific animations (usually just a single arm tile-swap) the time is 15 frames since X's last shot.

- A bitflag denotes whether X is sliding on a left wall, sliding on a right wall or standing.

- State changes seem to either snap the camera a few pixels or snap X's position?



[spoiler="Info about X's Shots (X1) (researched by me)"]

Code: -- No idea why I couldn't find this information on Google.



- Every X1 enemy has a damage resistance value(s?). This is removed in X2 and X3.

- X's charge counter only starts if no semi-charged/fully-charged/super-charged shots exist.

- X's uncharged shots start at 4 p/f and every 4 frames increase by 1 p/f until 6 p/f.

- X's semi-charged shots move at 6 p/f.

- X's fully-charged shots move at 8 p/f.

- Haven't tested speed of super-charged shot, but my educated guess is 10 p/f.

- For semi-charged and fully-charged shots, the muzzle-flash is parented to X until the animation is completed, but it is NOT synced to X's direction.



[spoiler="Object IDs and subIDs (X1) (not mine)"] Code: OBJECT IDs & subIDs

----

01: Hoganmer.

00: Default.

02: Chill Penguin.

00: Default.

03: Volt Slime.

00: Default.

04: Flammingle.

00: Default.

05: Boomer Kuwanger.

06: Planty.

00: Default.

07: Launch Octopus.

00: Default.

08: Launch Octopus fish missile.

XX: Missile number.

09: RT-55J.

00: Default.

10: Sting Chameleon.

00: Default.

11: Axe Max.

00: Don't cut the log.

01-16?: Log cutting.

12: Flame Mammoth.

00: Default.

13: Rush Roader.

XX: Tile loader variable?

14: Flame Mammoth's trunk.

XX: ???

15: Crusher.

00: Default.

16: Sine Faller.

00: Sine Faller.

01: ??? (Object falls down slowly back and forth

and drills into the floor. Appears to

have wings.) [UNUSED]

17: Road Attacker.

00: Default.

18: ??? (No idea. Freezes game on occasion.)

19: Dodge Blaster.

00: Default.

20: Armored Armadillo.

00: Default.

21: Spiky.

00: Default.

22: Turn Cannon's floating platform.

00: Don't spawn Turn Cannon.

01: Spawn Turn Cannon.

23: Turn Cannon.

00: Fire upward.

01: Fire downward.

128: Control Turn Cannon's floating platform.

24: Falling rock generator.

00: Rocks can't be destroyed (unused?)

01: Rocks can be destroyed.

25: Bomb Been.

00: Default.

26: Road Attacker deployer.

27: ??? (No properties observed. Dummy object?)

28: Sea Attacker.

00: Lower height.

01: Higher height.

29: Gulpfer.

00: Default.

30: Mad Pecker.

00: Default.

31: Creeper.

00: Default.

32: Amenhopper.

00: Default.

33: Anglerge.

128: First Anglerge (Tan)

129: Second Anglerge (Orange) [UNUSED]

130: Third Anglerge (Purple)

34: Bee Blader.

00: Breaks first bridge.

01: Breaks second bridge.

35: Utuboros head.

00: Burrowing Utuboros.

01: Free-range UTuboros.

36: Utuboros body section.

XX: Body section number.

37: Utuboros tail.

XX: Body section number.

38: Velguarder.

39: Deerball.

00: Rolling left while spawning.

01: Rolling right while spawning.

128: Walking.

40: Cruiziler Object.

00: Default (green)

01: Orange Cruiziler [UNUSED]

02: Purple Cruiziler [UNUSED]

41: Gun Volt.

00: Default.

42: Broken Utuboros head + Scrap Robo.

00: Scrap Robo.

01: Broken Utuboros head (default)

43: Mine cart platform.

00: Default.

44: Mole Borer.

60: Default.

45: Bat Bone + Batton M-501.

00: Bat Bone.

01: Batton M-501.

46: Met C-15.

00: Default.

47: Ride Armor + Armor Soldier.

00: Armor Soldier & Ride Armor.

01: Ride Armor alone.

48: Dig Labour.

00: Default.

49: Spark Mandrill.

00: Default.

50: Vile in Mech (Intro).

128: Default.

51: Zero.

52: Crag Man.

00: Default.

53: Metal Wing.

00: Default.

54: Jamminger.

00: Default.

55: Hotarion.

56: Flamer + Flamer's floating platform.

57: Conveyor belt crusher.

00: Default.

58: Tombot.

59: Ladder Yadder.

00: Default.

60: Dialogue character picture.

XX: ??? (Related to dialogue picture and

positioning)

61: Tower elevator platform.

00: Default.

62: ??? (Acts as a Tombot generator. When destroyed, smoke comes from

the bottom of this object. Not used in final version.)

63: Slide Cannon + sliding platform.

01: Default.

64: Spring.

00: Default.

65: Breakable glass object.

00: Left pane.

01: Right pane.

66: Laser.

00: Horizontal laser (default).

01: Vertical laser.

67: Four-way lasers.

68: Laser trap.

XX: Frame of object to shoot out.

69: Power plant spark generator.

01: Shoots two left, then one right. [UNUSED]

18: Default?

70: Airport destructable wall object.

XX: Object #XX.

71: Flame Pillar.

XX: State variable?

72: Death Rogumer platform.

00: Default.

73: Sky Claw.

00: Default.

128: High flying version.

74: Cruiziler missile explosion.

00: Default.

75: Cruiziler missile.

XX: Missile number.

76: Lava Drip.

00: Default.

77: Light Capsule.

78: Light Capsule lightning strike.

79: Rolling Gabyool.

00: Default.

80: Death Rogumer cannon.

81: Ray Bit.

00: Default.

82: Storm Eagle.

01: Sigma stage boss.

04: Stage boss.

83: Snow Shooter.

00: Default.

84: Snowball.

00: Default.

85: Storm Eagle eaglet egg.

86: Storm Eagle eaglet.

87: Igloo destructable object.

88: ??? (Keeps object data throughout stage. No other properties found.)

89: Long pillar.

00: Default.

90: ??? (Related to long pillar.)

91: Mega Tortoise.

00: Default.

93: Rangda Bangda wall object.

94: Rangda Bangda eye.

95: Rangda Bangda mouth.

96: Rangda Bangda wall sides.

97: D-Rex head.

00: ???

98: D-Rex base.

00: Default.

99: Bospider.

100: Prison capsule destroyer.

00: Default.

101: Sigma + Sigma's head.

00: Default.

102: Zero (Sigma Stage 1 against Vile + dying)

00: Default.

103: Vile in Mech (Sigma Stage 1).

00: Default.

104: Creeper hole.

00: Right hole.

64: Left hole.

105: Vile.

05: Default.

106: Wall Creeper.

00: Default.

107: Final Form Sigma claw.

00: Left claw.

128: Right claw.

108-255: Freezes game.





If you want to add some data you found, or want me to find something, just ask. Please do tell me if anything here is incorrect. I'm going to add more stuff soon, probably related to hitboxes and such. I have found this information by scouring the dark corners of Google, old forum posts, several different RAM maps, and also my own research and testing. This is some "technical data" about Mega Man X which should be useful for anyone wanting who is curious, wants to hack/reverse-engineer the game, or wants to make an accurate fan game. Now everything you could want is all in one place. I'm sure this information will be useful to at least a few people.Here it is:[spoiler="Physics and Movement (X1) (researched by me)"][/spoiler][spoiler="X's States (X1 & X2) (researched by me)"][/spoiler][spoiler="Info about X's Shots (X1) (researched by me)"][/spoiler][spoiler="Object IDs and subIDs (X1) (not mine)"][/spoiler]If you want to add some data you found, or want me to find something, just ask. Please do tell me if anything here is incorrect. I'm going to add more stuff soon, probably related to hitboxes and such. (This post was last modified: 27-12-2016, 02:39 AM by maskedbyte .)