Here is some data I've gathered about the MZM physics engine over the last few days.
MZM's position variable accuracy is 1/4 pixel.
The horizontal speed values are 32 = 1 px/fm. (That means 8 speed units = 1 positional unit per frame.)
Most speeds increase by 8/fm and drop by 10/fm.
Normal jumps decelerate horizontally at the rate of 8/fm.
Samus's normal run speed is 96.
It takes 149 frames for Speed Boost to kick in fully, at which point Samus's speed is 160.
12 to get to 96, then 120 frames until it starts increasing by 8s again for 6 frames, then another 14 until it starts increasing by 8s, then another 3 until it hits 160 and Samus starts flashing.
Samus is 57 positional units wide. That means she can move 7 units (1.75 pixels) when in a one-tile-wide space. I feel this is a common mistake in fangames, when the morph ball can't enter a 1-tile-tall hole in a wall because the morph ball is a whole tile tall.
Morph Ball is 61 units tall. Samus is 125 units tall (which is 3 less than two tiles, as the morph ball is 3 less than one tile).
Her vertical position does not change when she morphs/unmorphs, meaning she is positioned by her bottom.
Positional units per frame when Samus is moving up/down slopes:
8x8 going up 45 degree
9x4 or 9x5 going up 26.565 degree
12x0 on flat ground
12x6 going down 26.565 degree
12x12 going down 45 degree
And when speed boosting:
12x12 going up 45 degree
16x8 going up 26.565
20x0 on flat ground
20x10 going down 26.565 degree
20x20 going down 45 degree
Jumping data:
On ground, no high-jump: 192 (initial vertical speed; this value never shows up in the memory viewer because it exists for less time than one frame but it's used to calculate the first frame of a jump.)
In water, no high-jump: 197
On ground, high-jump: 232
In water, high-jump: 237
On ground, spring ball: 212
In water, spring ball: 217
On ground, bomb jump: 174
Bomb jumps do not work at all in liquid without the gravity suit.
Wall-jump and space-jump have the same start values as the most similar jump.
Rate of decrease in air: 10/fm
Rate of decrease in water: 5/fm
On ground: 8 speed units = 1 positional unit/fm
In water: 8 speed units = 1 positional unit/fm, but the distance is capped at 5 positional units/fm.
When the jump button is released, the fall starts immediately with a speed value of 10.
Vertical fall speed must be >= 70 before space jump will work, and the key must be released and pressed again at/after that point.
Morph Ball is the only jump that will work repeatedly without releasing the jump button.
Spin-jump and regular jump both share the horizontal speed of 64.
Morph ball's horizontal speed is only 48, including when the motion is caused by a bomb.
Morph Ball does not stop moving sideways until the peak of its jump is reached.
It also cannot change directions before it stops moving.
Spin-jumps never change speed except for the initial acceleration or when changing direction.
They do not slow down before direction changes.
Shinesparking data:
Teleport 32 units up when you begin a shinespark
26 frames before Samus starts moving, starting with the frame after the one in which it detected that the player pressed the jump button.
Horizontal and vertical shinespark speed: 192
Diagonal shinespark--horizontal speed = 160; vertical speed = 96.
24 units per frame of motion at 192 speed units, so that comes out at 8 speed units per location unit per frame.
44 frames before Samus starts falling after she hits a wall/ceiling.
The charge beam counter goes up by 1 each frame until it hits 64, at which point the beam fired will be charged.
Missiles accelerate 1/fm/fm starting at 8 until they reach 20 units/fm, or 14/fm in each direction if fired diagonally. (This is in actual positional units. The acceleration counter for missiles goes from 0 to C.)
Super missiles accelerate 1/fm/fm starting at 12 until they reach 28 units/fm, or 19/fm in each direction if fired diagonally.
Beams (I am assuming all beams) move 32 positional units/fm, 22/fm in each direction if fired diagonally.
Enemies are frozen for 480 frames. The enemy starts flashing when 86 frames are left. Each flash lasts 2 frames.
Metroids stay frozen for 240 frames.
Takes 5 frames to morph, 6 to unmorph. (not checked with memory viewer)
It takes 2 frames to morph or unmorph in the air.
15 frames to start climbing if you hold up, and another 21 to finish. Samus moves up completely and then to the side.
Those 21 frames consist of this motion: 24 up, 24 up, 24 up, 8 up, 8 up, 8 up, 4 up, 4 up, 21 up, and then 4 left in each of the remaining twelve times.
1 frame to start climbing if you use arrow+jump.
Samus sits still for 6 frames before ascending when wall-jumping.
Horizontal momentum is set to 0 when landing.
It takes 400 frames for a pick-up to disappear.
I'm using this to make my engine more MZM-like, of course. :P
Edit: Whoop, looks like some of my data may be wrong due to the frame buffering method I was using in VBA. Those 2-frame pauses were likely caused by triple-buffering, and so the Speed Booster probably starts flashing two frames earlier than I said, too. I've marked the ones I didn't check via Memory Viewer, which are the ones that may be wrong.
Further edit: Well, since this is my first recent topic here, I should say more. I used this site as a reference:
http://tasvideos.org/PJBoy/Dump.html#Me ... mAddresses
And I made a ton of Codebreaker codes for MZM while I was at it.
I skipped Ridley. Figure that one out. ("You cheated" isn't good enough, although it's true. I *did* collect 0 items and ended the game in 18:37 with no missiles, super missiles, or power bombs.)
Also, I made a bunch of codes! Incidentally, Samus learned how to teleport while I was playing.
830013E9 **** - teleport on Y axis, where **** is the hex for Samus's location in pixels from the top-left corner.
830013E7 **** - teleport on X axis.
I used VisualBoyAdvance's memory viewer to make teleporting easier. ("05 17" in the memory viewer would be 1705 in a code to put Samus at that position.)
Always Shoot Up (enabled that temporarily to try getting into Imago's room without fighting the plant)
33000A3C 0003
Always Shoot Down
33000A3C 0004
This one was just fun to look at. You know how when you fire a missile at something that it can't hurt, it bounces off? Well, your beam weapons and bombs can bounce out of your arm cannon harmlessly!
33000A3D 0003
The "Always Shoot X" codes I've found actually only modify your first weapon fired. But what if you fire another while that's still on the screen? Copy and paste the "Always Shoot X" code and change a small part to modify the second weapon instead.
83000A3A 0D02 - Always Shoot Super Missiles on the first on-screen shot
83000A56 0D02 - Always Shoot Super Missiles on the second on-screen shot
And if you see what's different there, you can also use these for the next several shots (assuming the first two are still on the screen)
A73/A8E/AAA/AC6/AE3/AFE/B1A
Everyone knows moonjumping is fun. Well, here's my moonjump code:
D0000020 0001 (this line technically means "if you're pressing A, do the next line")
330013EC 00FF (this modifies Samus's vertical momentum variable. Change 00FF to, say, 0088 for a slower speed.)
D0000020 0001
330013ED 0000 (this modifies Samus's vertical direction variable.)
How about always being able to shinespark in an area that's just a few tiles wide?
330013DC 0077