![]() |
DevelopmentSega Master System / Mark III / Game Gear |
Home - Forums - Games - Scans - Maps - Cheats |
Each Alex Kidd in Miracle World ROM is 128KB in size and uses mapping in slot 2. That is, the first 32KB of the ROM is always mapped into Z80 address space at $0000 - $7fff [1]. The remainder of the ROM is composed of 6 banks, each 16KB in size. These banks are mapped, one at a time, into Z80 address space at $8000 - $bfff.
The following code is present in the ROM "Alex Kidd in Miracle World [v1]" but not in "Alex Kidd in Miracle World [v0]":
3AC7: 7A LD A,D 3AC8: DD 86 0E ADD (IX+0Eh) 3ACB: FE BF CP BFh 3ACD: D0 RET NC
This code is executed when Alex is falling. If the RET NC at $3acd is not taken, the fall may end: Alex's falling sprite may be replaced by his walking sprite.
When the code runs, the D register contains Alex's height (24 pixels) plus the distance to fall this frame (0-4 pixels). (IX+0Eh) contains the the Y-coordinate of Alex's sprite (recall that this will be 0 for scanline 1, etc). Their sum, calculated at $3ac8, is the Y-coordinate of the bottom of the sprite at the end of this frame. If this is greater than or equal to $bf (191 decimal), the bottom of Alex's sprite will be below the bottom of the screen (Y-coordinate 190, scanline 191).
The code above, therefore, forces Alex to continue falling when he reaches the bottom of the screen. The effect of this can be seen only on those levels where it is possible to fall from one room to another. In v0, Alex will fall to the bottom of the screen and then the fall will end: the transition to the next room will occur with Alex's walking sprite shown. Once the transition is complete, Alex will resume falling correctly. In v1, thanks to the above code, the fall uses the correct animation frames throughout.
![]() | ![]() |
| Room Transition [v0] | Room Transition [v1] |
| (MEKA savestate) | (MEKA savestate) |
This is believed to be the only difference between the v0 and v1 ROMs.
The above bug fix is also present in "Alex Kidd in Miracle World [BIOS]", but not in "Alex Kidd in Miracle World [SMS-GG] (TW)", "Alex Kidd no Miracle World (JP)" nor "Alex Kidd in Miracle World [BIOS] (KR)".
If no buttons are pressed on the title screen, one of four demos will begin. Alex's movements during the demo are driven by simulated input - the data for this is in "TransBot" format and is located at $14d35-$1508d in the v1 ROM. In between the data for each demo is an unreferenced zero byte.
Levels are stored as a sequence of screens, each 256x192 pixels in size. The screens are described by arrays of 16x12 bytes, where each byte is the index of a 16x16 pixel metatile. These arrays are compressed individually, using the "Phantasy Star" RLE format (without deinterleaving), and located in the v1 ROM within $18000 - $1bdb8. At runtime, one array at a time is decompressed to RAM at $d700 - $d7bf.
Each metatile index is used to access a table of pointers. There are two of these tables, one at $14000 - $141ff and a second at $14200 - $143ff (used only for levels 14, 16 and 17). Each address in these tables is a slot 2 pointer into $14450 - $14d34; this region contains the four name table entries (8 bytes) to use for each metatile.
There are 17 pointers, one per level, at $066d6 - $066f7 within the v1 ROM. These point into $066f8 - $067c3, where there is a 12 byte descriptor for each level. Each descriptor contains the following information:
| Offset | Length | Contents |
|---|---|---|
| 0 | 1 byte | Bank number containing the level layout data (Always $86) [2] |
| 1 | 2 bytes | Slot 2 pointer into the level layout data |
| 3 | 2 bytes | A second slot 2 pointer into the level layout data |
| 5 | 5 bytes | Unknown |
| 10 | 2 bytes | Slot 2 address of metatile name table entry pointer table |
This table summarises the contents of the Alex Kidd in Miracle World [v1] ROM (Size: 128KB; CRC32: aed9aac4):
| Address Range | Contents |
|---|---|
$00000 - $0bfff | Unknown |
$0c000 - $0c47f | 4bpp Uncompressed Tiles: Boxes |
$0c480 - $0c4a1 | Level Main Tile Set Pointer Table |
$0c4a2 - $0c582 | 4bpp Compressed Tiles: Bag of Gold Coins, Cloud |
$0c583 - $0c9e0 | 4bpp Compressed Tiles: Additional Set for Levels 1, 3, 5, 9, 16 and 17 |
$0c9e1 - $0ce64 | 4bpp Compressed Tiles: Additional Set for Levels 2, 6, 8, 10, 12, 13 and 15 |
$0ce65 - $0cecd | 4bpp Compressed Tiles: Additional Set for Levels 2, 5, 9 and 13 |
$0cece - $0d157 | 4bpp Compressed Tiles: Main Set for Levels 1, 5 and 9 |
$0d158 - $0d316 | 4bpp Compressed Tiles: Main Set for Levels 2, 10, 13 and 15 (Also used for levels 6 & 12) |
$0d317 - $0d569 | 4bpp Compressed Tiles: Main Set for Level 3 (Also used for level 17) |
$0d56a - $0db81 | 4bpp Compressed Tiles: Main Set for Level 4 |
$0db82 - $0df1c | 4bpp Compressed Tiles: Main Set for Levels 6 and 12 |
$0df1d - $0e24b | 4bpp Compressed Tiles: Main Set for Level 7 |
$0e24c - $0ea04 | 4bpp Compressed Tiles: Main Set for Level 8 |
$0ea05 - $0ee32 | 4bpp Compressed Tiles: Main Set for Level 11 (Also used for level 14) |
$0ee33 - $0f116 | 4bpp Compressed Tiles: Main Set for Level 16 |
$0f117 - $0f49a | 4bpp Compressed Tiles: Main Set for Level 17 |
$0f49b - $0f75b | 4bpp Compressed Tiles: Main Set for Level 14 |
$0f75c - $0f7f5 | 4bpp Compressed Tiles: Additional Set for Level 17 |
$0f7f6 - $0f895 | 4bpp Uncompressed Tiles: Additional Set for Levels 1, 3 and 5 |
$0f896 - $0f969 | 4bpp Compressed Tiles: Additional Set for Levels 3, 5 and 9 |
$0f96a - $0fc67 | Ending Sequence Text Data |
$0fc68 | Unused |
$0fc69 - $0ffdb | 4bpp Compressed Tiles: Alex Kidd Eating Rice Ball |
$0ffdc - $0ffff | Unused |
$10000 - $1005f | Alex Kidd Frame Description Pointers |
$10060 - $10340 | Alex Kidd Frame Descriptions (Including pointers to tiles) [3] |
$10341 - $118e8 | 3bpp Uncompressed Tiles: Alex Kidd |
$118e9 - $11bb4 | 4bpp Compressed Tiles: Janken Match |
$11bb5 - $11e66 | 4bpp Compressed Tiles: Stone Head |
$11e67 - $120a7 | 4bpp Compressed Tiles: Scissors Head |
$120a8 - $12356 | 4bpp Compressed Tiles: Paper Head |
$12357 - $12ac1 | 4bpp Compressed Tiles: Janken the Great |
$12ac2 - $12d9d | Janken the Great Petrifaction Data |
$12d9e - $13331 | Uncompressed Name Table Entries: Title Screen |
$13332 - $13eda | 4bpp Compressed Tiles: Title Screen |
$13edb - $13fba | 1bpp Uncompressed Tiles: Sega Mark III Logo |
$13fbb - $13fff | Unused |
$14000 - $143ff | Metatile Name Table Entry Pointer Tables |
$14400 - $1441f | Uncompressed Name Table Entries: Empty Octopus Pots |
$14420 - $1444f | Uncompressed Name Table Entries: Open Door (Cragg Lake) |
$14450 - $14d34 | Metatile Name Table Entries [4] |
$14d35 - $1508d | Demo Simulated Input Data |
$1508e - $153f2 | Compressed Name Table Entries: Shop Interior |
$153f3 - $157ff | 4bpp Compressed Tiles: Shop Interior |
$15800 - $1583f | Uncompressed Name Table Entries: Shop Exit Door |
$15840 - $15923 | 4bpp Compressed Tiles: Shop Exit Door |
$15924 - $15ad3 | Uncompressed Name Table Entries: Hirotta Stone Close-up |
$15ad4 - $15e44 | 4bpp Compressed Tiles: Hirotta Stone Close-up |
$15e45 - $161d4 | Map Data |
$161d5 - $16f10 | 4bpp Compressed Tiles: Map |
$16f11 - $172b0 | 4bpp Uncompressed Tiles: Shop Items, Currency Symbol |
$172b1 - $17852 | 4bpp Compressed Tiles: ASCII Characters $20 - $5a, ©SEGA |
$17853 - $17ed2 | 4bpp Uncompressed Tiles: Water, Mud, Level 4 Lava, Level 16 Foam, Level 7 Lava |
$17ed3 - $17fff | Unused |
$18000 - $1bdb8 | Level Layout Data |
$1bdb9 - $1be44 | Subscreen Item Data |
$1be45 - $1bfaa | Shop Data |
$1bfab - $1bfff | Unused |
$1c000 - $1c068 | 4bpp Compressed Tiles: "Score" |
$1c069 - $1f108 | 4bpp Uncompressed Tiles |
$1f109 - $1fc9d | Text Box Data |
$1fc9e - $1fe9d | Level Palettes [5] |
$1fe9e - $1ff85 | Uncompressed Name Table Entries |
$1ff86 - $1ffff | Unused |
Researched by Paul Baker