Submission #5136: The8bitbeast's SMS Alex Kidd in Miracle World in 09:51.29

Console Sega MasterSystem Emulator Bizhawk 1.11.6
Game Version USA v1.0 Frame Count 35432
ROM Filename Alex Kidd in Miracle World (U) (V1.0).sms Frame Rate 59.9227510135505
Branch Rerecord Count 10556
Unknown Authors The8bitbeast
Game Alex Kidd in Miracle World
Submitted by The8bitbeast on 6/9/2016 2:24:21 PM

Submission Comments
Alex Kidd in Miracle World is one of the most iconic games on the Sega Master System and easily the most well-known game in the Alex Kidd series. The game was built into some consoles with the Onigiri (Rice Ball) replaced with a hamburger, and the jump and punch buttons swapped for a more natural control scheme.
Miracle World is a platformer, with items to buy and puzzles to solve. Most of the bosses are fought in the form of a rock paper scissors match (known as Janken pon in Japan). Alex Kidd is often considered Sega’s equivalent to Mario.
This run is an improvement of 2:40.3 to the previously published run by Keirden. My main motivation was to make a TAS which uses the pause glitch to skip text, but in the process I found other glitches and optimizations resulting in a much larger improvement than initially predicted.

Tricks and Glitches

Punch to Stop

Punching causes Alex to stop instantly, much quicker than using the directional pad alone. This technique is used when entering shops and turning around. It is best to start the punch in the air when possible, landing on the last frame of the punch animation as Alex's speed will still be set to zero, but he can start moving right away. This technique was also used in Keirden's run.

Text Skip

This glitch was not used in Keirden's run and it was my main reason for starting work on this TAS. Pausing shortly before text appears causes the text to be skipped. This can be done on most of the text in the game, but sometimes it is quicker to read the text rather than pause and unpause. Since there wasn’t much text in the run it was easy to determine which language was quickest. Surprisingly English text is slightly shorter than Japanese so the English ROM was used. This difference was very small and the Japanese version would probably be better in unassisted runs due to the risk of missing a pause glitch. The Japanese version seemingly has one set width of text boxes, even for very short phrases, losing time over the English version.

Pause Scrolling

This glitch was used in Keirden's run but is more extensively used in this run. In the castle levels, when the screen is transitioning between rooms pausing will cause the game to scroll an extra screen. Alex will become invisible and not be able to interact with some objects. To make Alex visible again the “reverse” of the scrolling glitch must be done, for example one scrolling glitch left cancels out one scrolling glitch right.

RAM Addresses

Money0x0030 (2 bytes, binary coded decimal)
Inventory: Cane0x0049
Inventory: Ring0x004D
Invincibility state0x0054
Invincibility timer0x005A (2 bytes, little endian)
Horizontal Screen Scroll0x00B0
Level X Position0x00B6 (2 bytes, big endian)
Vertical Screen Scroll0x00BE
Level Y Position0x00C4 (2 bytes, big endian)
X Position (On Screen)0x030C
Y Position (On Screen)0x030E
X Velocity0x0310 (signed)
Fine X Velocity0x030F
Y Velocity0x0312 (signed)
Fine Y Velocity0x0311
Punch Timer0x0319
Thanks to Isotarge for finding these addresses and making an object viewer which made finding enemy health very easy. His work can be found at

Individual Level Comments

Level 1

This was probably the hardest level to optimize. I used the same money route as Keirden's run to get enough money for the bike. His run generally has very well optimized movement, but this was one level where I was able to save some frames by not landing on the ledge above the power ring box. It was very difficult to compare my progress to his run since Dega files are difficult to play back. By carefully analyzing the encoded run, I made sure I didn’t lose any time on every level.

Level 2

The improvement here comes from the use of the Text Skip glitch. This is useful in every Janken match.

Level 5

I was able to save a frame here by inputting the first input (jumping) before the level starts. This is an interesting quirk that happens on every level which can actually be used to desynchronize the demos!

Level 6

If the boss is killed too quickly, the Onigiri won’t spawn.

Level 9

I was able to save some time here by hitting the fish from further to the right.

Level 11

This level contains the first of two major skips in the run. The general idea of the skip is to go out of bounds in the castle, where the game loads objects from unintended parts of memory. An Onigiri is loaded which I can grab to finish the level, skipping the Stone Head fight. The method to get out of bounds is very similar to the pause scrolling glitch. It has the same effect, but with quicker execution. I climb up the ladder, but as the screen is about to scroll up, I fall off the ladder causing Alex to descend. The screen scrolls in the direction that Alex is moving, so instead of scrolling up, it scrolls down.
Once out of bounds, I need to move down and right to reach the Onigiri. Unfortunately, the Onigiri is inside of a block, so Alex cannot normally reach it. But by entering the room from underneath the block Alex can grab it. I use large jumps to navigate to the correct x-coordinate, then a frame perfect jump to make Alex go back in bounds inside the block and collect the Onigiri. If Alex is still invisible, he cannot interact with the Onigiri. If the jump is not high enough and Alex gets stuck inside the block below the Onigiri, the game will continuously kill Alex.

Level 12

During the Text Skip for the Scissors Head fight I activate a power ring, speeding up the fight by an extra 3 frames on top of the time saved by the Text Skip. Without Text Skip, Keirden's run had no opportunity to activate a power ring without losing significant time. Surprisingly, you can press the unpause input before pressing the equip ring input. Equipping the ring costs no time over a regular pause and unpause.

Level 15

I use another power ring during the Paper Head fight, this time saving much more than 3 frames.

Level 16

This level contains the second major skip of the run. This level has an interesting quirk where the left side of the first screen is not properly sealed. There is a one block gap which Alex can duck and slide under to go one screen left of the first screen. Doing this causes the object layout to shift one screen to the left each time bringing Janken and the princess towards the start of the level.
I fight Janken on the second physical screen into the level. I also use the pause scrolling glitch to speed up the process slightly. Since I use the pause scrolling glitch, I have to slide under the block without seeing Alex. This was made easier with RAM watches for Alex's velocity and position.
After the fight with Janken you are supposed to go to the screen above him to save the princess. But if you fight Janken in the rooms towards the start of the level, the top of the rooms are sealed. This was the reason that this skip wasn’t found until now.
If Janken's text is skipped, the game allows some movement before the fight starts. By selecting the cane Alex floats upwards during the fight, completely ignoring collision detection. This allows him to reach the room above Janken even though it is sealed. By using another pause glitch before the second round begins, Alex’s movement is stopped in the room above Janken. From here I just have to win the match and talk to the princess. I don’t have to physically fight Janken as intended.
It is possible to pause at any time during the first fight to cancel the match. Unfortunately if this is done the princess wont spawn the Onigiri, so winning the fights is necessary.
This is the fastest known method to complete Janken castle as of this submission, but I hope to one day find an Onigiri out of bounds. The out of bounds is unfortunately a lot less stable in Janken Castle and only a few rooms can be explored before the game crashes.
Ideally finding the crown out of bounds in level 11 would be a “game end glitch” and cut several minutes off the run. After many hours of searching, I couldn’t find one. For a crown to work, several bytes need specific values, so it is unlikely that one would spawn from reading random data as objects.

Level 17

Originally I had TASed this level normally and then I went back and made some changes to inputs for play-around during earlier Janken matches. When I came back, the second to last room didn’t render! I have no explanation for this glitch, but it doesn’t lose any time and is a very interesting way to finish off the TAS.
Played on Bizhawk 1.11.6 using TAStudio.
Suggested Screenshots: 21361, 32193

Samsara: Judging.
Samsara: Fantastic improvement in every way. Accepting to Moons as an improvement to the published run.
Spikestuff: Publishing.

Last Edited by on 1/1/2022 6:13:43 PM
Page History Latest diff List Referrers