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

Level0x0023
Lives0x0025
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 https://github.com/Isotarge/ScriptHawk

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.


TASVideoAgent
They/Them
Moderator
Joined: 8/3/2004
Posts: 15582
Location: 127.0.0.1
This topic is for the purpose of discussing #5136: The8bitbeast's SMS Alex Kidd in Miracle World in 09:51.29
mklip2001
He/Him
Editor
Joined: 6/23/2009
Posts: 2227
Location: Georgia, USA
Wow, amazing work. This pause glitch manages to skip the boring parts while still keeping a lot of the interesting action intact, as well as providing some amusing glitched graphics in the Janken matches. It's a bit of a shame the castles are skipped, since they were the most interesting parts for me in the last run, but the craziness in the princess room made it totally worth it.
Used to be a frequent submissions commenter. My new computer has had some issues running emulators, so I've been here more sporadically. Still haven't gotten around to actually TASing yet... I was going to improve Kid Dracula for GB. It seems I was beaten to it, though, with a recent awesome run by Hetfield90 and StarvinStruthers. (http://tasvideos.org/2928M.html.) Thanks to goofydylan8 for running Gargoyle's Quest 2 because I mentioned the game! (http://tasvideos.org/2001M.html) Thanks to feos and MESHUGGAH for taking up runs of Duck Tales 2 because of my old signature! Thanks also to Samsara for finishing a Treasure Master run. From the submission comments:
Shoutouts and thanks to mklip2001 for arguably being the nicest and most supportive person on the forums.
Editor, Expert player (2098)
Joined: 8/25/2013
Posts: 1200
I'll give this a Yes. It's mostly interesting, although those Rock Paper Scissors boss fights are silly.
effort on the first draft means less effort on any draft thereafter - some loser
Editor, Skilled player (1439)
Joined: 3/31/2010
Posts: 2108
I enjoyed this run quite a lot. Voting yes.
Jules
Any
Skilled player (1171)
Joined: 7/13/2015
Posts: 102
Location: California
Wow, great job!
Jungon
He/Him
Player (50)
Joined: 4/2/2009
Posts: 376
Location: Porto Alegre - Brazil
You, you burned all the papers on jankenpo games, how could this be possible?? Yes vote u_u
*Jungon*/*Johnnyz* smilie weirdo =P ^^ o.o @__@ +D
Post subject: Movie published
TASVideoAgent
They/Them
Moderator
Joined: 8/3/2004
Posts: 15582
Location: 127.0.0.1
This movie has been published. The posts before this message apply to the submission, and posts after this message apply to the published movie. ---- [3154] SMS Alex Kidd in Miracle World by The8bitbeast in 09:51.29
Post subject: Broken game
Zucca
He/Him
Joined: 8/22/2008
Posts: 118
Location: KUUSANKOSKI, Finland
Wow! You really broke the game. :D I wish to see "game end glitch" sooner or later...
trazz wrote:
Killing the skeletons sooner or letting the skeletons live (unlive?) won't affect that at all.
Post subject: Improvement
The8bitbeast
He/Him
Expert player (2633)
Joined: 11/26/2015
Posts: 183
Location: Australia
Just before Janken matches, jumping back towards the left side of the screen as in Keirden's TAS saves 8 frames. This would lead to 40 frames saved overall. Thanks to Keirden for spotting this.
Zucca
He/Him
Joined: 8/22/2008
Posts: 118
Location: KUUSANKOSKI, Finland
I have a gut feeling that this pause glitch/hack/trick can be used in even more places, thus breaking the game even more.
trazz wrote:
Killing the skeletons sooner or letting the skeletons live (unlive?) won't affect that at all.