|
DevelopmentSega Master System / Mark III / Game Gear |
Home - Forums - Games - Scans - Maps - Cheats - Credits |
Slot 2 Mapping Flat Code in $00000 - $0bfff [1]
Lemmings uses a single palette for all gameplay. The only places where different palettes are used are the logo screens, the title screen and the ending scene. All of the palettes contain 16 colours which are written to both halves of CRAM.
The 16 bytes of data defining the main palette begin at offset $1be5e. The colours in the main palette are:
Index | $00 | $01 | $02 | $03 | $04 | $05 | $06 | $07 | $08 | $09 | $0a | $0b | $0c | $0d | $0e | $0f |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Value | $00 | $3f | $08 | $24 | $15 | $2a | $38 | $20 | $03 | $0b | $07 | $04 | $01 | $07 | $02 | $00 |
These are the other palettes used by Lemmings:
Index | $00 | $01 | $02 | $03 | $04 | $05 | $06 | $07 | $08 | $09 | $0a | $0b | $0c | $0d | $0e | $0f |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Value | $00 | $2b | $08 | $34 | $15 | $2a | $38 | $20 | $03 | $0b | $06 | $04 | $01 | $07 | $02 | $00 |
Index | $00 | $01 | $02 | $03 | $04 | $05 | $06 | $07 | $08 | $09 | $0a | $0b | $0c | $0d | $0e | $0f |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Value | $00 | $3e | $3a | $35 | $07 | $02 | $01 | $00 | $1c | $08 | $04 | $25 | $30 | $0e | $10 | $2b |
Index | $00 | $01 | $02 | $03 | $04 | $05 | $06 | $07 | $08 | $09 | $0a | $0b | $0c | $0d | $0e | $0f |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Value | $00 | $3e | $2a | $15 | $16 | $02 | $01 | $00 | $1c | $18 | $04 | $24 | $20 | $0b | $10 | $2b |
Index | $00 | $01 | $02 | $03 | $04 | $05 | $06 | $07 | $08 | $09 | $0a | $0b | $0c | $0d | $0e | $0f |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Value | $00 | $33 | $3e | $2a | $15 | $16 | $02 | $00 | $1c | $18 | $04 | $34 | $20 | $0e | $10 | $27 |
The data for these palettes are at offsets $1be7e, $1be9e, $1be6e and $1be8e respectively.
At $3f7a9 - $3ffa0 there is a 17-byte descriptor for each of the 120 levels (in order). Each descriptor contains the following information:
Offset | Length | Contents |
---|---|---|
0 | 1 byte | Number of lemmings |
1 | 1 byte | % to be saved |
2 | 1 byte | Release rate |
3 | 1 byte | Time (Minutes) |
4 | 1 byte | Number of climbers |
5 | 1 byte | Number of floaters |
6 | 1 byte | Number of bombers |
7 | 1 byte | Number of blockers |
8 | 1 byte | Number of builders |
9 | 1 byte | Number of bashers |
10 | 1 byte | Number of miners |
11 | 1 byte | Number of diggers |
12 | 1 byte | % saved per lemming [2] |
13 | 2 bytes | Address of map descriptor |
15 | 2 bytes | Slot 2 address of level name (Bank 15) |
Within $0713d - $072c2 there is a 5-byte descriptor for each of the 77 maps [3]. Each descriptor contains the following information:
Offset | Length | Contents |
---|---|---|
0 | 1 byte | Tileset index (0, 1, 2, 3, 4, 6 or 7) |
1 | 1 byte | Bank number containing map layout data |
2 | 2 bytes | Slot 2 address of map layout data |
4 | 1 byte | Maximum safe fall distance |
Each of the 77 maps is 112 x 19 tiles in size. Each tile is described by an 8-bit tile index.
In the ROM the indices are compressed using a simple RLE scheme: runs of consecutive zero bytes are stored as a single zero byte followed by a 1-byte length [4]. Any runs of more than 255 zero bytes are split into multiple runs.
During play the indices are decompressed to RAM at $ce00 - $d64f.
This table summarises the contents of the Lemmings ROM (Size: 256KB; CRC32: f369b2d8):
Address Range | Contents |
---|---|
$00000 - $0bfff | Unknown |
$0c000 - $0ffff | 4bpp Tiles: Lemmings |
$10000 - $10005 | "PAGE04 " |
$10006 - $13f1a | Map Layouts [5] |
$131fb - $13fff | Unused |
$14000 - $14005 | "PAGE05 " |
$14006 - $179b0 | Map Layouts [5] |
$179b1 - $17cb0 | Tile Indices: Sega Logo Screen |
$17cb1 - $17df0 | 4bpp Tiles: Release Rate Box |
$17df1 - $17fff | Unused |
$18000 - $18005 | "PAGE06 " |
$18006 - $19a05 | 4bpp Tiles: Dirt Tileset (208 Tiles) |
$19a06 - $1b985 | 4bpp Tiles: Fire Tileset (252 Tiles) |
$1b986 - $1bb5d | Unknown Data |
$1bb5e - $1be5d | Tile Indices: Green Textured Background |
$1be5e - $1be6d | Palette: Main |
$1be6e - $1be7d | Palette: Title Screen |
$1be7e - $1be8d | Palette: Sega Logo Screen |
$1be8e - $1be9d | Palette: Ending Scene |
$1be9e - $1bead | Palette: Lemmings Logo Screen |
$1beae - $1bfff | Unused |
$1c000 - $1c005 | "PAGE07 " |
$1c006 - $1f136 | Map Layouts [5] |
$1f137 - $1f8b6 | 4bpp Tiles: Hatch Opening |
$1f8b7 - $1ffd3 | Compressed 4bpp Tiles: Lemmings Logo Screen Lemming |
$1ffd4 - $1ffff | Unused |
$20000 - $20005 | "PAGE08 " |
$20006 - $21c85 | 4bpp Tiles: Crystal Tileset (228 Tiles) |
$21c86 - $23bc5 | 4bpp Tiles: Pillar Tileset 1 (250 Tiles) |
$23bc6 - $23f96 | Unknown Data |
$23f97 - $23fff | Unused |
$24000 - $24005 | "PAGE09 " |
$24006 - $25c05 | 4bpp Tiles: Pillar Tileset 2 (224 Tiles) |
$25c06 - $278e5 | 4bpp Tiles: Marble Tileset (231 Tiles) |
$278e6 - $27d6c | Map Layout [5] |
$27d6d - $27f5d | Unknown Data |
$27f5e - $27fff | Unused |
$28000 - $28005 | "PAGE10 " |
$28006 - $2b9cb | Map Layouts [5] |
$2b9cc - $2be4b | 4bpp Tiles: "TIMENOU%0123456789" |
$2be4c - $2bfff | Unused |
$2c000 - $2c005 | "PAGE11 " |
$2c006 - $2d7e5 | 4bpp Tiles: Sega Tileset (191 Tiles) |
$2d7e6 - $2defb | Map Layouts [5] |
$2defc - $2f6b0 | Compressed 4bpp Tiles: Lemmings Logo Screen [6] |
$2f6b1 - $2f730 | 4bpp Tiles: Lemmings Logo Screen I Dot |
$2f731 - $2fd30 | Name Table Entries: Lemmings Logo Screen |
$2fd31 - $2ffff | Unused |
$30000 - $30005 | "PAGE12 " |
$30006 - $322da | Map Layouts [5] |
$322db - $3275a | 4bpp Tiles: Sega Logo Screen Wheel |
$3275b - $3365a | 4bpp Tiles: Sega Logo Screen Lemming |
$3365b - $33fba | Unknown Data |
$33fbb - $33fff | Unused |
$34000 - $34005 | "PAGE13 " |
$34006 - $343c5 | Level Codes |
$343c6 - $35ee5 | 4bpp Tiles |
$35ee6 - $37851 | Unknown Data |
$37852 - $37efb | Compressed 4bpp Tiles: Sega Logo Screen |
$37efc - $37fff | Unused |
$38000 - $38005 | "PAGE14 " |
$38006 - $38605 | Name Table Entries: Title Screen |
$38606 - $39fb8 | Compressed 4bpp Tiles: Title Screen |
$39fb9 - $3a545 | Unknown Data |
$3a546 - $3aa70 | Compressed 4bpp Tiles: "Fun", "Tricky", "Taxing", "Mayhem" |
$3aa71 - $3ae5d | Compressed 4bpp Tiles: "1 Player", "2 Player" |
$3ae5e - $3bfff | Unknown Data |
$3c000 - $3d901 | Audio Sample: "Let's Go!" |
$3d902 - $3ee23 | Audio Sample: "Oh No!" |
$3ee24 - $3f7a8 | Level Names |
$3f7a9 - $3ffa0 | Level Descriptors |
$3ffa1 - $3ffff | Unused |
$00 $01
.