Slot 2 Mapping Flat Code in $00000 - $0bfff [1]

Palettes

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.

Main Palette

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

Other Palettes

These are the other palettes used by Lemmings:

Sega Logo Screen

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

Lemmings Logo Screen

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

Title Screen

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

Ending Scene

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.

Level Descriptors

At $3f7a9 - $3ffa0 there is a 17-byte descriptor for each of the 120 levels (in order). Each descriptor contains the following information:

OffsetLengthContents
01 byteNumber of lemmings
11 byte% to be saved
21 byteRelease rate
31 byteTime (Minutes)
41 byteNumber of climbers
51 byteNumber of floaters
61 byteNumber of bombers
71 byteNumber of blockers
81 byteNumber of builders
91 byteNumber of bashers
101 byteNumber of miners
111 byteNumber of diggers
121 byte% saved per lemming [2]
132 bytesAddress of map descriptor
152 bytesSlot 2 address of level name (Bank 15)

Map Descriptors

Within $0713d - $072c2 there is a 5-byte descriptor for each of the 77 maps [3]. Each descriptor contains the following information:

OffsetLengthContents
01 byteTileset index (0, 1, 2, 3, 4, 6 or 7)
11 byteBank number containing map layout data
22 bytesSlot 2 address of map layout data
41 byteMaximum safe fall distance

Map Layouts

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.

ROM Map

This table summarises the contents of the Lemmings ROM (Size: 256KB; CRC32: f369b2d8):

Address RangeContents
$00000 - $0bfffUnknown
  
$0c000 - $0ffff4bpp Tiles: Lemmings
  
$10000 - $10005"PAGE04"
$10006 - $13f1aMap Layouts [5]
$131fb - $13fffUnused
  
$14000 - $14005"PAGE05"
$14006 - $179b0Map Layouts [5]
$179b1 - $17cb0Tile Indices: Sega Logo Screen
$17cb1 - $17df04bpp Tiles: Release Rate Box
$17df1 - $17fffUnused
  
$18000 - $18005"PAGE06"
$18006 - $19a054bpp Tiles: Dirt Tileset (208 Tiles)
$19a06 - $1b9854bpp Tiles: Fire Tileset (252 Tiles)
$1b986 - $1bb5dUnknown Data
$1bb5e - $1be5dTile Indices: Green Textured Background
$1be5e - $1be6dPalette: Main
$1be6e - $1be7dPalette: Title Screen
$1be7e - $1be8dPalette: Sega Logo Screen
$1be8e - $1be9dPalette: Ending Scene
$1be9e - $1beadPalette: Lemmings Logo Screen
$1beae - $1bfffUnused
  
$1c000 - $1c005"PAGE07"
$1c006 - $1f136Map Layouts [5]
$1f137 - $1f8b64bpp Tiles: Hatch Opening
$1f8b7 - $1ffd3Compressed 4bpp Tiles: Lemmings Logo Screen Lemming
$1ffd4 - $1ffffUnused
  
$20000 - $20005"PAGE08"
$20006 - $21c854bpp Tiles: Crystal Tileset (228 Tiles)
$21c86 - $23bc54bpp Tiles: Pillar Tileset 1 (250 Tiles)
$23bc6 - $23f96Unknown Data
$23f97 - $23fffUnused
  
$24000 - $24005"PAGE09"
$24006 - $25c054bpp Tiles: Pillar Tileset 2 (224 Tiles)
$25c06 - $278e54bpp Tiles: Marble Tileset (231 Tiles)
$278e6 - $27d6cMap Layout [5]
$27d6d - $27f5dUnknown Data
$27f5e - $27fffUnused
  
$28000 - $28005"PAGE10"
$28006 - $2b9cbMap Layouts [5]
$2b9cc - $2be4b4bpp Tiles: "TIMENOU%0123456789"
$2be4c - $2bfffUnused
  
$2c000 - $2c005"PAGE11"
$2c006 - $2d7e54bpp Tiles: Sega Tileset (191 Tiles)
$2d7e6 - $2defbMap Layouts [5]
$2defc - $2f6b0Compressed 4bpp Tiles: Lemmings Logo Screen [6]
$2f6b1 - $2f7304bpp Tiles: Lemmings Logo Screen I Dot
$2f731 - $2fd30Name Table Entries: Lemmings Logo Screen
$2fd31 - $2ffffUnused
  
$30000 - $30005"PAGE12"
$30006 - $322daMap Layouts [5]
$322db - $3275a4bpp Tiles: Sega Logo Screen Wheel
$3275b - $3365a4bpp Tiles: Sega Logo Screen Lemming
$3365b - $33fbaUnknown Data
$33fbb - $33fffUnused
  
$34000 - $34005"PAGE13"
$34006 - $343c5Level Codes
$343c6 - $35ee54bpp Tiles
$35ee6 - $37851Unknown Data
$37852 - $37efbCompressed 4bpp Tiles: Sega Logo Screen
$37efc - $37fffUnused
  
$38000 - $38005"PAGE14"
$38006 - $38605Name Table Entries: Title Screen
$38606 - $39fb8Compressed 4bpp Tiles: Title Screen
$39fb9 - $3a545Unknown Data
$3a546 - $3aa70Compressed 4bpp Tiles: "Fun", "Tricky", "Taxing", "Mayhem"
$3aa71 - $3ae5dCompressed 4bpp Tiles: "1 Player", "2 Player"
$3ae5e - $3bfffUnknown Data
  
$3c000 - $3d901Audio Sample: "Let's Go!"
$3d902 - $3ee23Audio Sample: "Oh No!"
$3ee24 - $3f7a8Level Names
$3f7a9 - $3ffa0Level Descriptors
$3ffa1 - $3ffffUnused

Level Editor

See Lemmings Mappy Convertor


  1. ^ All address ranges on this page are inclusive.
  2. ^ For each lemming saved, this value is added to the percentage saved. It should therefore be equal to 100 divided by the number of lemmings. Since it must be an integer, the number of lemmings must be 1, 2, 4, 5, 10 or 20.
  3. ^ $0716f - $07173 is unused.
  4. ^ In particular, a single zero byte is stored as $00 $01.
  5. ^ a b c d e f g There are 1 or 2 garbage bytes at the end of each map layout.
  6. ^ There is 1 garbage byte at the end of the tile data.



Return to top
0.367s