As explained on the Dungeon Files page, some versions of Dungeon Master and Chaos Strikes Back use dungeon files with little endian data while other versions use big endian data. The dungeon file may also be compressed. Here are some tools that can convert between the two formats. For example, these converters will allow you to use a PC dungeon with Chaos Strikes Back for Windows (which is based on the Atari ST version). This works with many of the custom dungeons.
This tool by kentaro.k-21 is a rewrite of my DungeonConverter.vbs script in C++ language (Visual Studio 6 project). If required, checksum is automatically generated. It doesn’t rely on checksum of original dungeon.dat. This archive contains 4 executable files:
Win32/CVTbe.exe: converts dungeon.dat to big endian without checksum.
Win32/CVTbe_c.exe: converts dungeon.dat to big endian with checksum.
Win32/CVTle.exe: converts dungeon.dat to little endian without checksum.
Win32/CVTle_c.exe: converts dungeon.dat to little endian with checksum.
This Visual Basic script can convert Dungeon Master, Chaos Strikes Back and Dungeon Master II dungeon files between little endian (least significant byte first, used in PC, Apple IIGS, PC-9801, FM-Towns, Super NES and IBM PS/V) or big endian (most significant byte first, used in Atari ST, Amiga, X68000, Macintosh and SegaCD) formats. The program automatically detects the input file format (little or big endian) and creates an output file in the other format. Current limitations:
It does not manage compressed dungeons (used for the Chaos Strikes Back Prison on both Atari ST and Amiga, as well as in Dungeon Master for Amiga and Apple IIGS). Use the other Dungeon Decompress script before conversion.
It only works with dungeons, not with saved games. New dungeons that were supplied as dmsave.dat files will not be converted.
This Visual Basic script can decompress compressed dungeons (like the dungeon.dat prison in Chaos Strikes Back). Although feasible, a compression tool is not necessary because the games can handle both compressed and decompressed dungeons.