[This 'level' can be solved!]
[Supaplex Homepage] [Frequently Asked Questions]
[Solutions to levels] [Download and Install]
[New levels] [Complete site map]
[EP]
[Image: Supaplex!]

Supaplex File Formats

This page will discuss the following:

  1. Why should you read this?
  2. Format of LEVELS.DAT
  3. Format of LEVEL.LST
  4. Format of DEMOx.BIN
  5. Format of *.SP


Chapter 1 - Why should you read this?

You probably don't need to read this. Only if you are really interested in some of the technical details of Supaplex, or you are a programmer interested in making a Supaplex Level editor (there's never enough!)

This page will discuss what is in some of the Supaplex files. You can use this information to edit the files, or make your own utilities for Supaplex. If you have an old level editor which doesn't support all the options, you might find some information here to make the changes by hand.


Chapter 2 - Format of LEVELS.DAT

Originally, Supaplex used this file to retrieve it's levels from. Every level is 1536 bytes in size, and because there are 111 levels, the size of the entire file is 111*1536=170496 bytes. Every level contains the following information in the order listed below:
Bytes Description
1440 The level itself (width*height=60*24=1440)
4 ? [unused]
1 Gravitation start value (0=off, 1=on)
1 20h + SpeedFix_version_hex: v5.4 => 74h; v6.0 => 80h. In the original Supaplex, this value is just 20h.
23 Level title
1 Freeze zonks start value (0=off, 2=on) (yes 2=on, no mistake!)
1 Number of infotrons needed. 0 means Supaplex will count the total number of infotrons in the level at the start and use that.
1 Number of gravity switch ports (maximum 10!)
10*6 Coordinates of 10 special ports (entries for unused ports are ignored. 6 bytes per port: [hi][lo][grav][fr.zonks][fr.enemy][unused]
[hi] (2*(x+y*60)) div 256 (integer division) where (x,y) are the coordinates of the special port (0,0=left top)
[lo] (2*(x+y*60)) mod 256 (remainder of division) where (x,y) are the coordinates of the special port (0,0=left top)
[grav] 1 (turn on or 0 (turn off gravity)
[fr.zonks] 2 (turn on) or 0 (turn off freeze zonks)
[fr.enemy] 1 (turn on) or 0 (turn off freeze enemies)
[unused] This value doesn't matter (might be used in future versions of the SpeedFix!)
4 Used by the SpeedFix to store some vital demo information. Unused in the original SUPAPLEX.EXE.
Note that since the SpeedFix has been introduced, there have been a few changes:
The last 4 bytes are used now, and the '20h' byte is used for the version number. Also note that it may be possible to use 3 of the last 4 bytes for a gravity port, but that you shouldn't use it (you can't with SPEDIT) since these bytes are already used in the SpeedFix, which would make it impossible to record a (good) demo of your level.
For the SpeedFix, this file can be named LEVELS.D?? where ?? is a number from 00 to 99.


Chapter 3 - Format of LEVEL.LST

This file contains the names of all levels. It would not really be necessary for the game, because the level names are also contained in the LEVELS.DAT file. However, for the level list on the Supaplex Menu screen it comes in handy because there is no longer any need to go through the entire LEVELS.DAT file to get all the names.

There are 111 entries in this file, all of this format:
Bytes Description
3 Level number (if less than 100 preceded by one or two zeroes)
1 A space
23 Level title
1 The character 0Ah (A Unix-style enter)
For the SpeedFix, this file can be names LEVEL.L?? where ?? is a number from 00 to 99.


Chapter 4 - Format of DEMOx.BIN

There is a difference between the original DEMOx.BIN and the DEMOx.BIN used in the SpeedFix versions 5.x and above.

The original demo's were all less than 1000 bytes in size. They contain a level number followed by the data needed to be able to replay the game. To play the demo, Supaplex would load the appropriate level from the file LEVELS.DAT, and then play the demo. The end of the demo was signalled by a 0FFh byte at the end of the file.

In the SpeedFix version 5.x and above, the demo format has been changed for a number of reasons (compatibility with SpEdit, better handling of demo's from other levelsets, etc.)
This means that all files DEMOx.BIN are now larger than 1536 bytes, and the original demo's won't work with the new SpeedFix and the new demo's won't work with the original Supaplex.
The contents are unchanged, except that a 1536 byte level file is PREpended now. More information about this level file can be found in the
LEVELS.DAT format.
For the SpeedFix, this file can be named DEMOx.B?? where ?? is a number from 00 to 99.


Chapter 5 - Format of *.SP

This file format is used by The Supaplex Level Editor, and for the SpeedFix v5 and higher. It contains the 1536 byte level file, as specified for the file LEVELS.DAT.

In the new SP-format (for SpEdit v3.2 and higher, or SpeedFix v5.x and higher) There can be an old-style DEMOx.BIN file appended. This makes the (new) SP-format exactly equal to the (new) DEMOx.BIN format.

There has been an "official" extension to the .SP format in October 1996: If a demo is present in the .SP file, you can add a signature to the back of the file, usually to give contact information for the author of the demo.


Copyright (c) Elmer Productions (contact us)

Some messages that may be worth a bit of your time: