Back to the source: ReDMCSB

Use this forum to discuss dungeon editors and other tools, like DMute (by George Gilbert, also working for RTC dungeons), DM Builder (by Sphenx), and ADGE by `rain. Includes DM editing tips and tricks.
Forum rules
Please read the Forum rules and policies before posting. You may Image to help finance the hosting costs of this forum.
User avatar
ChristopheF
Encyclopedist
Posts: 1691
Joined: Sun Oct 24, 1999 2:36 pm
Location: France
Contact:

Re: Back to the source: ReDMCSB

Post by ChristopheF »

Also I noticed that I have to use Chaos strikes back for Amiga toolchain in order to get CSB for Amiga. When I build using CSB for Amiga toolchain, I get only Dungeon master binaries.
I don't understand this sentence.

Although I have placed NOCOPYPROTECTION compilation directives in lots of places in the source code, I've only tested it successfully for DM/CSB Atari ST and DM Amiga versions 2.x. Actually I have never tried to build CSB Amiga (or any other version) without the copy protection. So it is quite possible that I missed places where NOCOPYPROTECTION should be added.

Did you build and use all executable files, not only the main program? Did you get any error message on screen or in the log file located in \Output\Build\MKMA.LOG ?

Where did you download ReDMCSB ? Did you get the latest public version available (2021-02-06) from here http://dmweb.free.fr/community/redmcsb/#downloads

I'll have to dig into the code and see if I can help you further
jm256
Novice
Posts: 10
Joined: Sun Sep 07, 2025 10:02 am

Re: Back to the source: ReDMCSB

Post by jm256 »

I don't understand this sentence.
My fault. I meant that I noticed that I have to use Chaos strikes back for Apple Macintosh toolchain in order to get CSB for Amiga. When I build using CSB for Amiga toolchain, I get only Dungeon master binaries.

NOCOPYPROTECTION is used as a parameter for compliler only for Dungeon master toolchain (+ several others as well) but not for Apple Macintosh toolchain. In order to strip copyprotection code, I decided to put #define NOCOPYPROTECTION directly in Toolchains\Common\Source\COMPILE.H. I hoped that this could work.

If I build without NOCOPYPROTECTION defined in COMPILE.H, I get no errors. However, in other case, I get errors

Also for this case, with NOCOPYPROTECTION, no APPB.FTL is missing in the output.
Here is partial output of toolchain Apple Macintosh

Code: Select all

+=================================================================================================+
+ ReDMCSB                                                                                         +
+=================================================================================================+

---------------------------------------------------------------------------------------------------
- Toolchain      : Apple Macintosh
- Folder         : D:\Jan\ReDMCSB\Output\Apple Macintosh
- Executable IDs : 18,19,20,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,39,40,41,42,43,44,45,
                   46,47,48,49,50,51,52,53,54,55,56,65,66,67,68,69,70,123,125,126,127,130,131,132,
                   133,134,135,137,138,139,140,141,142,143,144
---------------------------------------------------------------------------------------------------
----- Use common source code
----- Delete existing toolchain folder
----- Create toolchain folders
----- Create toolchain control files
----- Copy toolchain base files
----- Copy toolchain source files
----- Copy common source files
----- Perform toolchain custom import actions
----- Run toolchain and wait for completion
WARNING: Using the keyboard or mouse in the Macintosh emulator may break ReDMCSB build automation
----- Perform toolchain custom export actions
Convert executable to FTL D:\Jan\ReDMCSB\Output\Apple Macintosh\HARDDISK\BUILD\A31E\ANIM.FTL
Convert executable to FTL D:\Jan\ReDMCSB\Output\Apple Macintosh\HARDDISK\BUILD\A31E\APPA.FTL
Convert executable to FTL D:\Jan\ReDMCSB\Output\Apple Macintosh\HARDDISK\BUILD\A31E\CNFG.FTL
Convert executable to FTL D:\Jan\ReDMCSB\Output\Apple Macintosh\HARDDISK\BUILD\A31E\GRF1.FTL
Convert executable to FTL D:\Jan\ReDMCSB\Output\Apple Macintosh\HARDDISK\BUILD\A31E\MEM1.FTL
Convert executable to FTL D:\Jan\ReDMCSB\Output\Apple Macintosh\HARDDISK\BUILD\A31E\SWSH.FTL
Convert executable to FTL D:\Jan\ReDMCSB\Output\Apple Macintosh\HARDDISK\BUILD\A31E\USIO.FTL
Convert executable to FTL D:\Jan\ReDMCSB\Output\Apple Macintosh\HARDDISK\BUILD\A31E\VDEO.FTL
Convert executable to FTL D:\Jan\ReDMCSB\Output\Apple Macintosh\HARDDISK\BUILD\A31M\APPA.FTL
Convert executable to FTL D:\Jan\ReDMCSB\Output\Apple Macintosh\HARDDISK\BUILD\A31M\APPB.FTL
Convert executable to FTL D:\Jan\ReDMCSB\Output\Apple Macintosh\HARDDISK\BUILD\A31M\GRF1.FTL
Convert executable to FTL D:\Jan\ReDMCSB\Output\Apple Macintosh\HARDDISK\BUILD\A31M\USIO.FTL
Convert executable to FTL D:\Jan\ReDMCSB\Output\Apple Macintosh\HARDDISK\BUILD\A31M\VDEO.FTL
Convert executable to FTL D:\Jan\ReDMCSB\Output\Apple Macintosh\HARDDISK\BUILD\A35E\VDEO.FTL
Convert executable to FTL D:\Jan\ReDMCSB\Output\Apple Macintosh\HARDDISK\BUILD\A35M\ANIM.FTL
Convert executable to FTL D:\Jan\ReDMCSB\Output\Apple Macintosh\HARDDISK\BUILD\A35M\APPB.FTL
Convert executable to FTL D:\Jan\ReDMCSB\Output\Apple Macintosh\HARDDISK\BUILD\A36M\CNFG.FTL
Convert executable to FTL D:\Jan\ReDMCSB\Output\Apple Macintosh\HARDDISK\BUILD\A36M\KAOS.FTL
Convert executable to FTL D:\Jan\ReDMCSB\Output\Apple Macintosh\HARDDISK\BUILD\AU1E\ANIM.FTL
Convert executable to FTL D:\Jan\ReDMCSB\Output\Apple Macintosh\HARDDISK\BUILD\AU1E\APPB.FTL
Convert executable to FTL D:\Jan\ReDMCSB\Output\Apple Macintosh\HARDDISK\BUILD\AU1E\CEDT.FTL
Convert executable to FTL D:\Jan\ReDMCSB\Output\Apple Macintosh\HARDDISK\BUILD\AU1E\HINT.FTL
Convert executable to FTL D:\Jan\ReDMCSB\Output\Apple Macintosh\HARDDISK\BUILD\AU2F\ANIM.FTL
Convert executable to FTL D:\Jan\ReDMCSB\Output\Apple Macintosh\HARDDISK\BUILD\AU2F\APPB.FTL
Convert executable to FTL D:\Jan\ReDMCSB\Output\Apple Macintosh\HARDDISK\BUILD\AU2G\APPB.FTL
Convert executable to FTL D:\Jan\ReDMCSB\Output\Apple Macintosh\HARDDISK\BUILD\AU2E\APPA.FTL
Convert executable to FTL D:\Jan\ReDMCSB\Output\Apple Macintosh\HARDDISK\BUILD\AU2E\CEDT.FTL
Convert executable to FTL D:\Jan\ReDMCSB\Output\Apple Macintosh\HARDDISK\BUILD\AU2E\FIO1.FTL
Convert executable to FTL D:\Jan\ReDMCSB\Output\Apple Macintosh\HARDDISK\BUILD\AU2E\HINT.FTL
Convert executable to FTL D:\Jan\ReDMCSB\Output\Apple Macintosh\HARDDISK\BUILD\AU3E\CEDT.FTL
Convert executable to FTL D:\Jan\ReDMCSB\Output\Apple Macintosh\HARDDISK\BUILD\SU1E\ANIMATE.FTL
Convert executable to FTL D:\Jan\ReDMCSB\Output\Apple Macintosh\HARDDISK\BUILD\SU1E\CHAOS.FTL
Convert executable to FTL D:\Jan\ReDMCSB\Output\Apple Macintosh\HARDDISK\BUILD\SU1E\FTLCODE
Convert executable to FTL D:\Jan\ReDMCSB\Output\Apple Macintosh\HARDDISK\BUILD\X30J\FTLCODE
Convert executable to FTL D:\Jan\ReDMCSB\Output\Apple Macintosh\HARDDISK\BUILD\X30J\SWOOSH
Convert executable to FTL D:\Jan\ReDMCSB\Output\Apple Macintosh\HARDDISK\BUILD\X31J\ANIM.FTL
Convert executable to FTL D:\Jan\ReDMCSB\Output\Apple Macintosh\HARDDISK\BUILD\X31J\APPA.FTL
Convert executable to FTL D:\Jan\ReDMCSB\Output\Apple Macintosh\HARDDISK\BUILD\X31J\APPB.FTL
Convert executable to FTL D:\Jan\ReDMCSB\Output\Apple Macintosh\HARDDISK\BUILD\X31J\GRF1.FTL
Convert executable to FTL D:\Jan\ReDMCSB\Output\Apple Macintosh\HARDDISK\BUILD\X31J\INT1.FTL
Convert executable to FTL D:\Jan\ReDMCSB\Output\Apple Macintosh\HARDDISK\BUILD\X31J\MEM1.FTL
Convert executable to FTL D:\Jan\ReDMCSB\Output\Apple Macintosh\HARDDISK\BUILD\X31J\MUSC.FTL
Convert executable to FTL D:\Jan\ReDMCSB\Output\Apple Macintosh\HARDDISK\BUILD\X31J\SWSH.FTL
Convert executable to FTL D:\Jan\ReDMCSB\Output\Apple Macintosh\HARDDISK\BUILD\X31J\USIO.FTL
Convert executable to FTL D:\Jan\ReDMCSB\Output\Apple Macintosh\HARDDISK\BUILD\X31J\VDEO.FTL
----- Export Build and Object files
----- Compare executable files
Different [D:\Jan\ReDMCSB\Reference\ReDMCSB\A31E\ANIM.FTL]
          [D:\Jan\ReDMCSB\Output\Apple Macintosh\HARDDISK\BUILD\A31E\ANIM.FTL]
Identical [D:\Jan\ReDMCSB\Reference\ReDMCSB\A31E\APPA.FTL]
          [D:\Jan\ReDMCSB\Output\Apple Macintosh\HARDDISK\BUILD\A31E\APPA.FTL]
Not found [D:\Jan\ReDMCSB\Output\Apple Macintosh\HARDDISK\BUILD\A31E\APPB.FTL]
If I build original Apple Macintosh Amiga CSB, the binaries are identical to those of official CSB Amiga version and APPB.FTL is produced. For testing binaries I use this bundle http://dmweb.free.fr/games/chaos-strike ... oftware.7z
and in it Floppy Disks ADF\Chaos Strikes Back for Amiga Game Disk v3.5 (English) Original (Not working).adf
I am able to use only .ADF Amiga archive file formats as I rely on ADFreader tool to move files.
Perhaps I could kindly ask you to make CSB Amiga without copyprotection for me? As this is the true reason I get that ReDMCSB. Because I only want Amiga version of CSB, but that copyprotection sucks.
User avatar
ChristopheF
Encyclopedist
Posts: 1691
Joined: Sun Oct 24, 1999 2:36 pm
Location: France
Contact:

Re: Back to the source: ReDMCSB

Post by ChristopheF »

The toolchain defines the platform where executables are generated, not the target platform where you execute them.
After developing DM Atari ST on Atari ST and DM Amiga on Amiga, FTL Games decided to move development for all computers that use the 68000 CPU to Macintosh, using the THINK C compiler and then convert the generated Macintosh executables to their own custom executable file format (files with .FTL extension).
This is why you need to use the Macintosh toolchain to build the CSB Amiga executables.
The only exception is the "launcher" (named BJELoad_R) which is the small program (built on Amiga, using the Amiga toolchain of ReDMCSB) that knows how to load and run the other .FTL files.

As you noticed, NOCOPYPROTECTION is not yet tested for CSB Amiga and this fails to build APPB.FTL. I have work to do to make it work...

You may find the original executable files directly in ReDMCSB in folder \Reference\Original, no need to extract them yourself from ADF disk images.
jm256
Novice
Posts: 10
Joined: Sun Sep 07, 2025 10:02 am

Re: Back to the source: ReDMCSB

Post by jm256 »

It would be great if you could build CSB Amiga without copyprotection. Imagine that there are only protected originals and cracked versions out there. This new one could be revolutionary :D . Personally, I love the Amiga CSB version thanks to its magic map feature as well as stereo sounds. If wasn't there be that protection :cry: .
And I also would like to transfer my PC DM characters to CSB Amiga. For that matter I am working on tool capable of transfering characters from PC to Amiga platform, as there is no one. I have successfully decrypted several sections out of DM PC savegame according to the Saved game decoder referenced in http://dmweb.free.fr/community/tools/sa ... e-decoder/
User avatar
ChristopheF
Encyclopedist
Posts: 1691
Joined: Sun Oct 24, 1999 2:36 pm
Location: France
Contact:

Re: Back to the source: ReDMCSB

Post by ChristopheF »

Updated version: http://dmweb.free.fr/Stuff/ReDMCSB_WIP20250909.7z

I fixed a bunch of issues and now all executables compile and link successfully, with NOCOPYPROTECTION defined or undefined.
I have not tested any of the executables that you are interested in, so no guarantee that they will work as expected.
I'll let you make your own tests and come back to me if needed.
Note that you need to uncomment the "#define NOCOPYPROTECTION" line at the beginning of COMPILE.H to force building executables without the copy protection.
jm256
Novice
Posts: 10
Joined: Sun Sep 07, 2025 10:02 am

Re: Back to the source: ReDMCSB

Post by jm256 »

Perfect, thanks Christophe. Now I compiled using NOCOPYPROTECTION and I can confirm, that the old ADF image "Chaos Strikes Back for Amiga Game Disk v3.5 (English) Original (Not working).adf' works, if old files are replaced by those generated by NOCOPYPROTECTION. In original, files in that ADF match those supplied by ReDMCSB. In ReDMCSB the files and their folders are

Code: Select all

ANIM.FTL   A31E
APPA.FTL   A31M
APPB.FTL   A35E
BJELoad_R  A35E
CNFG.FTL   A31E
GRF1.FTL   A31M
MEM1.FTL   A31E
SWSH.FTL   A31E
USIO.FTL   A31M
VDEO.FTL   A35E
Based on that information, I replaced files in original ADF image with those build with NOCOPYPROTECTION. Now I am able to get past splash screen "Chaos strikes back". Previously program hang there indefinitely. I will let you know If there are problems typical for protected CSB during gameplay. Good work, thanks!
User avatar
ChristopheF
Encyclopedist
Posts: 1691
Joined: Sun Oct 24, 1999 2:36 pm
Location: France
Contact:

Re: Back to the source: ReDMCSB

Post by ChristopheF »

Your replacement file list is correct for CSB Amiga 3.5 English.

It's good to know that it works! A few hours of gameplay without any issue is still required before we can trust this.
jm256
Novice
Posts: 10
Joined: Sun Sep 07, 2025 10:02 am

Re: Back to the source: ReDMCSB

Post by jm256 »

I will test the gameplay for a while for any issues.
jm256
Novice
Posts: 10
Joined: Sun Sep 07, 2025 10:02 am

Re: Back to the source: ReDMCSB

Post by jm256 »

I have played this new version of CSB Amiga for several hours and there were absolutely no issues during gameplay. I think I can continue safely. I have also developed a program allowing me to transfer my party from DM PC to CSB Amiga. To my best knowledge, this is first such a program. I can publish it somewhere.
User avatar
ChristopheF
Encyclopedist
Posts: 1691
Joined: Sun Oct 24, 1999 2:36 pm
Location: France
Contact:

Re: Back to the source: ReDMCSB

Post by ChristopheF »

Great !
Please share this program of yours it might interest other people, and I'll add it on the Encyclopaedia
jm256
Novice
Posts: 10
Joined: Sun Sep 07, 2025 10:02 am

Re: Back to the source: ReDMCSB

Post by jm256 »

Yes! I will do that. I will throw it on github or the like and will let you know
jm256
Novice
Posts: 10
Joined: Sun Sep 07, 2025 10:02 am

Re: Back to the source: ReDMCSB

Post by jm256 »

Well I have published my tool on Github https://github.com/gensuda/DMTools/tree/main, the decryption and also encryption with checksum calculations and basically a whole savegame workflow is based on your VB script SavedGameDecoder.vbs.
yeager
Neophyte
Posts: 6
Joined: Sat Apr 18, 2026 1:02 pm

Re: Back to the source: ReDMCSB

Post by yeager »

Hi Christophe,

Your ReDMCSB project is extraordinary. The care you've put into
reverse engineering 36 versions of Dungeon Master and Chaos Strikes
Back, and the depth of your BUGX_YY / CHANGEX_YY documentation,
represents decades of work that would otherwise be lost. Thank you.

I'm working on an open-source port of DM/CSB called Firestaff (named
after the game's central artefact). My aim is preservation: a
deterministic, modular engine that reads original player-owned
DUNGEON.DAT files and makes the games playable on modern systems
(Linux, macOS, Windows). No commercial distribution, no assets
redistributed — just the engine.

The architecture is purely original code: I study ReDMCSB as reference
documentation, write my own implementation in a different style (pure
data-layer modules with invariant-based probes), and never copy code
verbatim. Current status: 19 of 20 milestones passing with full
bit-identical round-trip serialisation, driven by your insights into
Fontanel's MEDIA240/PC 3.4 structures.

Two requests, if you have the time:

1. Permission confirmation. I'd like to confirm that using ReDMCSB as
a reference for reverse engineering — without redistributing your
source — is acceptable to you. Your work is credited prominently in
Firestaff's documentation ("Based on reverse engineering research by
Christophe Fontanel"), and the final product will link back to
dmweb.free.fr.

2. Explicit licence. ReDMCSB currently ships without an explicit
licence. If you'd consider adding one — even a permissive one like
CC-BY or MIT — it would dramatically clarify what downstream projects
can do with it. Clones like Return to Chaos, DMNet, Dungeon Master
Java, and my own Firestaff would all benefit.

A separate technical question: I've scraped your BugsAndChanges.htm
into a structured JSON database (201 entries) for use in a per-bug
toggle system in Firestaff's startup menu — letting players choose
which historical version of DM/CSB they want to play, down to
individual bugs. Would you be open to that JSON being published as a
community resource (CC-BY, fully credited to you) so other clones can
consume it too?

I'm happy to answer any questions about Firestaff's architecture or
scope. The code is at (will share link when repo goes public), and I
can share early access if you're curious.

Thanks for everything you've already given this community.

Best regards,
Daniel Nylander
Stockholm, Sweden
daniel@danielnylander.se
User avatar
ChristopheF
Encyclopedist
Posts: 1691
Joined: Sun Oct 24, 1999 2:36 pm
Location: France
Contact:

Re: Back to the source: ReDMCSB

Post by ChristopheF »

Thank you for your support.

The ReDMCSB code is public and anyone can do whatever they want with it. Credits are basic politeness I think. So feel free to use it for your own project in any way you need.

I don't plan to licence ReDMCSB. I'm not comfortable to claim any rights over that reverse-engineered source code which in my mind is still FTL Games property.

BugsAndChanges.htm: again, do whatever you want with it.

Notes:
- If you rewrite everything, have you considered integrating with the ScummVM project ? https://www.scummvm.org/ Many years ago someone tried to add a DM engine based on ReDMCSB source code (https://wiki.scummvm.org/index.php?title=DM) but that was never completed.

- BugsAndChanges.htm only contains the Atari ST history of bugs and changes. Other versions contain other changes and bugs. I think a few of them are described in the source code here and there, but not assigned proper BUGX_YY identifiers.

Good luck with your project !
yeager
Neophyte
Posts: 6
Joined: Sat Apr 18, 2026 1:02 pm

Re: Back to the source: ReDMCSB

Post by yeager »

Merci, Christophe. You are awesome!

I have opened a new topic for Firestaff at viewtopic.php?t=31742
jm256
Novice
Posts: 10
Joined: Sun Sep 07, 2025 10:02 am

Re: Back to the source: ReDMCSB

Post by jm256 »

Hi yeager,
That would be great if you could also port Chaos Strikes Back for Amiga and keep the in-game map support, as the Amiga version of the CSB is the only reason, I bother with UAE and all the complications with game protection and so. The in-game map support, which is missing in modern CSB for Win, as it is ported from CSB for Atari. Despite the claims of many, that this in-game feature of CSB ruins the gameplay, I would say the opposite. As the CSB is the only game from DM family, where complicated maps, hidden passages and mazes, really need such in-game functionality. Without it, the game is much more harder, but also much more frustrating.
yeager
Neophyte
Posts: 6
Joined: Sat Apr 18, 2026 1:02 pm

Re: Back to the source: ReDMCSB

Post by yeager »

That makes sense.

I agree that CSB benefits a lot more from in-game map support than
DM1, especially with the more maze-heavy layouts and hidden passages.
So when I get to CSB, I should treat keeping that functionality as a
real product requirement, not as an optional extra.

Daniel
Post Reply

Return to “Editors and Tools (DMute, DM Builder, ADGE, etc.)”