new csb

Discuss Chaos Strikes Back for Windows and Linux, an unofficial port of Chaos Strikes Back to PC by Paul Stevens, as well as CSBuild, an associated dungeon editor.

Moderator: Zyx

Forum rules
Please read the Forum rules and policies before posting. You may Image to help finance the hosting costs of this forum.
Post Reply
zel
Novice
Posts: 19
Joined: Fri Apr 25, 2025 10:09 am

new csb

Post by zel »

This started by some bug fixes for the linux version, but since Paul doesn't want to maintain the sources anymore for now, I added mingw compatibility to have only 1 source tree for windows and linux thanks to sdl which is multi platform.

You have the major changes listed at the bottom of the readme at this address: https://github.com/zelurker/csb
And I am hosting a mingw version if you want to test it in windows here, it includes the dungeon.dat & graphics.dat for dungeon master and 2 mp3 to show how the custom sounds work for war cry and the horn of fear.
One of the most obvious changes is that the window is resizable and you can toggle fullscreen using alt-return.
The mingw version : http://raine.1emulation.com/archive/csb ... 250430.zip

I'd like to eventually add some panning to the sounds to locate them in space but for now everything is mono, like on a good old st ! (but the mixer is opened at with the parameters your hardware prefers, which are usually something like 44 KHz stereo 16 bits).
zel
Novice
Posts: 19
Joined: Fri Apr 25, 2025 10:09 am

Re: new csb

Post by zel »

And here is already 20250503 (removed the old archive) : mainly added lots of sounds for walking monsters, with panning and attenuation with the distance. Walls are ignored for the sounds, so you'll hear what there is behind the walls as if there was no wall at all, which can be fun sometimes !
Notice though that the sound attenuation is proportional to 1/square of the distance, which means you don't hear very far at all. I don't bother with sounds where attenuation becomes < 1/10, so it's barely more than 3 squares away.
A few monsters are still missing because they are are harder to pinpoint in the code. Thanks to Christophe for the sounds in the encyclopedia, the mp3 are taken directly from there without modification except for the filenames. They were moved in a sounds directory because there's quite a lot of sounds inside now.
Except that some bug fixes, but nothing major.
http://raine.1emulation.com/archive/csb ... 250503.zip
pjs
Novice
Posts: 16
Joined: Thu Dec 30, 2021 8:37 pm

Re: new csb

Post by pjs »

Sounds exciting and thank you for tackling this.

Just wondering if you have already considered moving on from SDL2 to SDL3 (or adding direct SDL3 support). I wonder because distributions have already started to move on from SDL2 to SDL3, and if one uses a distribution that has SDL3, it may be difficult to build the source.
zel
Novice
Posts: 19
Joined: Fri Apr 25, 2025 10:09 am

Re: new csb

Post by zel »

Well for now I admit I am too lazy to just learn the new tricks in sdl3, maybe later but not now. Anyway the situation is not as bad as for the switch from sdl1.2 to sdl2, they have made a sdl2-compat package which is supposed to give full compatibility with sdl2 programs when using sdl3. I didn't test it here because I prefered to have a full sdl2 installation instead (using arch we can still compile sdl2 from aur), but normally it should work.
zel
Novice
Posts: 19
Joined: Fri Apr 25, 2025 10:09 am

Re: new csb

Post by zel »

Since there is no way to edit a post, here is a new post for the 32 bit version for those who are interested, I just received an email from a japanese guy stuck with vista 32 bits on a laptop and he would need a 32 bit version. Not sure sdl2 will be fully compatible with vista though, but it's worth a try.
So here is the 32 bit version, it would be 20250504 too since I managed to put a few more fixes inside last night :
http://raine.1emulation.com/archive/csb/csb32.7z
zel
Novice
Posts: 19
Joined: Fri Apr 25, 2025 10:09 am

Re: new csb

Post by zel »

Ok, I won't post a new binary everyday, but I met Shu online today and from our exchanges a few more bugs were fixed, so...
- limit sounds of moving monsters to 1 level above or below, previously there was no limit at all! Found by Shu 1st, but I was starting to suspect something too... !
- Sounds for levitating monsters Couatl and wasp. And for non levitating Trolin
- fix color conversion for RGB565, this one was found by Shu, white was not white enough for him and he was right! Colors are brighter now.
- a better underflow test for the sound, still experimenting...
http://raine.1emulation.com/archive/csb/csb32.7z for the 32 bit version
and http://raine.1emulation.com/archive/csb/csb-20250504.7z for the 64 bit one, as always, previous archive was removed.
zel
Novice
Posts: 19
Joined: Fri Apr 25, 2025 10:09 am

Re: new csb

Post by zel »

And the daily binary, it should be the last for a while because the sound part seems finished for now :
- added the last missing sounds for moving monsters : pain rat and ruster. And fixed vexirks which are actually levitating so it makes their sound called from another place.
- fixed the sound for the prison gates opened at the very beginning of the game ! These are handled differently from the other sounds, see the info from Christophe there : http://dmweb.free.fr/community/document ... es/#data-6 precisely normal samples are at 5486 Hz, but the prison doors are at 4237 Hz ! I confirm it sounds much like what dungeon master on an emulated atari st sounds like !
- Punctuation fixes, some people seem attached to some "!" and some "." at the end of some sentences, there was a topic on the forum about that, and Shu is among these... oh well, if it can make them happy... (and apparently it does !).
- Walking sounds limited to current level only, apparently that's what ftl did for the amiga version, so... !

And so that should be the end of this part about sounds for now. Ah I have reverted the default sample rate to 5200 instead of 5486 but you shouldn't hear a difference anyway.
Binaries :
http://raine.1emulation.com/archive/csb/csb-20250505.7z for the 64 bits
http://raine.1emulation.com/archive/csb/csb32.7z for the 32 bits
User avatar
ChristopheF
Encyclopedist
Posts: 1596
Joined: Sun Oct 24, 1999 2:36 pm
Location: France
Contact:

Re: new csb

Post by ChristopheF »

The 64 bits link is broken
zel
Novice
Posts: 19
Joined: Fri Apr 25, 2025 10:09 am

Re: new csb

Post by zel »

Back to a super slow forum already... Yeah it's http://raine.1emulation.com/archive/csb ... 250505.zip and not 7z, sorry.
zel
Novice
Posts: 19
Joined: Fri Apr 25, 2025 10:09 am

Re: new csb

Post by zel »

And a bonus for today because of the report from Christophe :
- resizing the window is now immediate, and it works even in the 1st screen with the 4 buttons before the dungeon
- restoring an iconified window works in linux
- build date inserted in windows's title so you can check quickly I didn't make any mistake when updating the binary on the site
Still the same urls, about 3 posts above I think.

There is a serious freeze bug reported by Shu and Christophe, I can't reproduce it in my windows 11 setup. Apparently the game freezes for them if the mouse doesn't move inside the window, just stop the mouse and everything stops. Since I can't reproduce it, it's a hard one, but if some have or haven't got it, you can post with what windows configuration you have (unlikely it would happen in linux !).

edit : and finally the freeze bug on some machines which was related to a thread problem is fixed in today's build. That will be the only fix for today, it required 5 test builds I'd say it's enough for today!
http://raine.1emulation.com/archive/csb ... 250506.zip
http://raine.1emulation.com/archive/csb/csb32.7z
zel
Novice
Posts: 19
Joined: Fri Apr 25, 2025 10:09 am

Re: new csb

Post by zel »

Since this forum is sadly half dead, got only 1 reply except the one from Christophe in all that time, I won't keep on posting every day, not more than once/week now, except in case of an astounding bug!

So here is the update for this week in chronological order since the fix for the freeze bug :
- Added a new application icon from Shu, might be a little dark when it's too reduced...
- Fixed taking an object on the floor : you had to click on the lower part of an object on the floor to be able to take it which could be very irritating at times because it's counter intuitive. It's now fixed, this bug has been in CSBwin for a very long time!
- Add 3 custom sounds for the 3 missing attack sounds which were added in the amiga version. These are the sounds for the couatl, the rock pile, and the water elemental. As usual they are from the encyclopedia, in mp3 without any modification and thanks again to Christophe for these.
- fix ending sequence for dungeon master ! You got only the 2 1st sentences, and very slowly, the 2 last ones were lost. Now it's fixed, the timing is slightly faster, and the text is translatable, so I updated the french translation file with a translation for it.

The 64 bits version becomes csb64.7z, which allows me to only update the exe inside when uploading a new binary.
http://raine.1emulation.com/archive/csb/csb32.7z for the 32 bits one.
http://raine.1emulation.com/archive/csb/csb64.7z for the 64 bits version.
See you next week-end!
User avatar
Kenshiro
Apprentice
Posts: 42
Joined: Thu Apr 30, 2009 4:57 pm
Location: Tokyo, Japan

Re: new csb

Post by Kenshiro »

This is awesome, so I hope you don't think your work is going unappreciated. Niche by today's standards, but not unappreciated.

I've been on these forums since 2005 or so, on and off (mostly disappearing for years at a time lol)

Thanks for this, these are great contributions to the community.

To be honest I think most dungeon crawler fans exist at dungeoncrawlers.org these days, and most updates and communication seem to be in the official Discord. This kind of contribution would be absolutely appreciated there, but please keep posting it here too.
zel
Novice
Posts: 19
Joined: Fri Apr 25, 2025 10:09 am

Re: new csb

Post by zel »

No problem thanks!
Most of the ideas are exchanged by mail between mainly Shu (from Japan, but in english) and me at the moment. There are still good things to come!
I might take a look later at dungeoncrawlers.org but for now I am a little busy with this... !
Also too bad for me that I didn't discover this site earlier, missed 20 years of this, but can't do anything about it. At least I try to do my part now!
I found it because I updated my old emulated files for atari and I had the idea to use a search engine to check if someone had the idea to try to make some improvements to dungeon master... Very good idea even if it comes a little late!
zel
Novice
Posts: 19
Joined: Fri Apr 25, 2025 10:09 am

Re: new csb

Post by zel »

The big news of this week is the return of the menu with a gui, but in a new form, it's imgui from there : https://github.com/ocornut/imgui
The special thing here is that the gui is rendered in the screen real resolution when the game remains in its scaled 320x200 picture, so you'll see the mouse pointer change to a small size when activating a menu or interacting with a dialog.

The options are :
- menu file : reset, was useful while adding stuff, it just resets to the entrance of the dungeon, as if you just launched the program.
- load saved game: allows to load anything including the .bak generated automatically by the game, and from any directory.
- Save game : same thing, allows to save to any filename, it's advised to keep the csb prefix so that it appears by default in the file manager when loading a saved game. Particularly useful when testing a new dungeon.
- playback : to replay a playfile.log file, for now doesn't allow to select the file, it's always this one, and the command only works at the dungeon door.

Speed menu: like the old one from CSBwin, asked by Shu who missed it. Added a special speed only for Shu: Shu's speed, about 15 times as fast as the normal speed, it's not for normal people... ! ;-)

Misc menu:
- show party coordinates: it replaces the old level info which appeared at the bottom of the screen. The info is displayed directly on the menu bar, on the right.
- Non-CSB items : it's also from CSBwin, it displays a dialog with the list of everything in the dungeon. 2 differences compared to CSBwin : the window is not modal, meaning the game is not stopped when you display it, you can resize it, put it in the corner of the screen and go in search of this evasive item...! Also added a button to save the report to report.txt so that you can compare 2 dungeons.
- DM rules : also from CSBwin. Actually these dm rules impact a huge penalty when reincarnating if you disable them. Previously they were enabled only if you used a dungeon created specifically for CSB(win) with this field activated in it. Now the game autodetects a dungeon based on dungeon master and enables this automatically, tested with st version 1.3, pc version, and fm-tools version !

Except that I added the display of the defense of the current character in the inventory display. It's always been a discussed topic, are the armors really worth it in dm, now you can see by yourself. A few explanations though: it's a borned value between 0 and 100 based on the defense of the items carried by the character. The shield always has an effect on it, but then the other slots have an effect only if the hit is received on this slot. I had to choose a slot to display the value, so for now it's displayed for the chest slot. And then the formula : once you have this defense value, the final damage applied to a character when attacked by a monster is:
damage = damage * (130 - defense) / 64
which means that damage actually goes up if wearing no armor or not enough armor. It's actually very hard in dm to reach a point where 130 - defense = 64, so in most cases damage increases, that's why the importance of armors has been so much discussed, and maybe that's also why this value was not displayed so far.

Except that big progress on the translation : actually there was no wall text nor any scroll translated in the Translation.txt file until now. Now there is for the french version, you can find it in my github page, the link is https://github.com/zelurker/csb grab the file, put it in the csb directory, and a lot of texts much more than before will be in french. Notice that everything is not translated yet, it's a slow process to add everything which was in the texts contained in dungeon.dat. Also the french translation for the st version 1.3 was actually very poor, lots of mistakes inside, typing mistakes, writing mistakes, and sometimes even bad meaning! I copied a part of it though, but edited most of it.
If some people are motivated enough, it's possible to translate the game to any language by using this same file. There was a german translation too, but I won't do anything about it, I know nothing about german, but it can be updated based on this file now, or another language created. It's just a text file to edit in a text editor, english words with the translation on the same line.

That should be all for this time if I didn't forget anything.
http://raine.1emulation.com/archive/csb/csb32.7z for the 32 bits one.
http://raine.1emulation.com/archive/csb/csb64.7z for the 64 bits version.
zel
Novice
Posts: 19
Joined: Fri Apr 25, 2025 10:09 am

Re: new csb

Post by zel »

Ok, here is the last update for quite a while, I'll need a break to think over where to go from here, plus Roland Garros is starting this week-end and it's a big source of distraction!

This time the update is mainly centered on getting more info from the game...

Anyway some quite big changes again:
- Shu returns to a more normal human being and "shu's speed" becomes "Faster Than Light" (!), it's 3x as fast as normal, but 5 times slower than what shu's speed was!
- Display projectile damage and spell damage where there is some. It's displayed at the bottom of the screen, notice even the spells have 1st an impact damage then a spell damage. The impact is in white, the spell in yellow. On levels like the arena you see that some monsters take damage from automatic fireballs sometimes! Anyway except this particular level it's mainly useful to know if a spell is effective or not.
- extended armor/clothing/shield/weapons and potions description when dragging the object to the eye in the inventory screen. Some info is not very precise like the shoot damage and distance for projectiles : the final damage takes into account both + the skill of the thrower + some random numbers. But it still allows to compare some objects you can throw/shoot.
- Finally allow csb to start without any dungeon.dat or graphics.dat in its directory. It's mainly useful for linux when installing it as a normal program it will go to /usr/bin or /usr/local/bin and so it won't have its data files in its directory. In this case the window is mostly black, you'll have to choose "Select dungeon.dat" in the file menu.
- Add character extended info in the misc menu, and move the defense display which was shown in the inventory screen before there. The window is updated in real time, lot of info inside. You can drag it anywhere by dragging it from any point, not just the title bar. Defense is show for all the equipment slots now, + luck, + all the experience in all attributes, and the hidden ones can be shown.
- disabled dm2 "fix" for poison bolt. It was added to make the dragon vulnerable to this spell, but it makes rock piles vulnerable too, and they become easy targets with this when they are supposed to resist a lot when the player meets them 1st. So we can play with a dragon resistant to poison, it's better this way.
- updated the graphics.dat shipped with csb to dm version 1.2 (english). It was 1.0 before! There were quite a few bug fixes inside including the experice for shoot which goes from 9 to 20, the bitmap for the switch in a black hole in a wall stops moving when you press it, and a few other adjustments to skills detailed in this page in the encyclopedia (look for (c) in the page) : http://dmweb.free.fr/community/document ... nd-combos/
- fix a white flash when the party dies in chaos strikes back : it doesn't happen in the original atari st version, checked with an emulator (hatari), so it doesn't happen in csb neither now.
- loading and saving from menu is faster now, less confirmations.
- when choosing a dungeon.dat from the file menu the program actually changes its current directory to the file you select, so all the files it will require are searched there. If it doesn't find any graphics.dat it will open a new file manager so that you can select one. You can choose any .dat as the dungeon.dat file, useful for some custom dungeons which name it differently like the prison of Dragoth or the port of Theron's quest to csb. It also means that if you use the default save system, the 4 saves will go to this directory, which is convenient to separate the saves.

That's all for this time, there should be no new update before quite a while.
http://raine.1emulation.com/archive/csb/csb32.7z for the 32 bits one.
http://raine.1emulation.com/archive/csb/csb64.7z for the 64 bits version.
Thanks to Shu for the help in finding the bugs!
zel
Novice
Posts: 19
Joined: Fri Apr 25, 2025 10:09 am

Re: new csb

Post by zel »

Is it worth posting updates to this thread again ? Yeah that's the question considering the very few replies it got, almost nothing. Anyway whatever idea we have for csb after that it will probably take more time so I will probably not post here for quite while more.

A last post to tell you about these last 2 weeks : we (with Shu) mainly tested some experimental stuff which can be disabled in the misc menu :
1) projectile damage : clearly the game was programmed to make sure projectile damage would remain low to be sure players would be in close contact with monsters. For example the damage is divided by 16 at the start of the computation without any obvious reason, so I just added the ability to change this divider from 16 (the default) to 8, 4, 2 or 1. The function is not ideal, to make this perfect it should alter only projectiles thrown by thrower, for example a crossbow shot is deadly in reality, but sadly the game doesn't have any flag to tell that a projectile was sent by a thrower, it just increases the projectile "remaining distance", that's all, but since this is also affected by strength when throwing something manually, you can't make a clear difference. It's still here for testing anyway. Setting this to 1 has some quite fun results sometimes !

2) monsters becoming more vulnerable when attacking : that's something which makes sense since the player becomes more vulnerable when making most attacks. Plus a monster like the rockpile emerges from its rock protection when it attacks, so it should be more vulnerable at this precise moment. As it is done for now, the defense of the monster is divided by 2 if you land an attack at the precise moment when he is attacking. There is a new sound to confirm the critical hit, a different swing sound, you'll recognize it when you hear it. It can be runed off from the menu too.

3) recharging weapons on the vi altars : there were some quite heated discussions on the subject, because it's something which can upset the balance of the game a lot. Well you can always not use it if you don't like it, plus there are not a ton of vi altars everywhere anyway, and it makes them useful again this way. But we made sure it wouldn't be too powerful, the items are generally recharged with the charges they have in dungeon master - 1. So the item with the less charges is currently the storm ring which has only 4 charges in dungeon master, so it's recharged to 3 charges if it has less than that. Also if an item has 0 charges it can now be recharged and "revived" by this system. There is no menu option to disable this, because you can simply not use it, but I finally added a "nostalgia mode" which disables all this kind of stuff, including this particular feature.

A few more fixes were made on quite a few subjects, go and see the git log if you are interested by the details.
Anyway here is the link, and if you have ideas about all this, it would be a good idea to post them !
http://raine.1emulation.com/archive/csb/csb64.7z for the 64 bits version
and http://raine.1emulation.com/archive/csb/csb32.7z for the 32 bits version.
The linux version can be compiled very easily from sources, just grab the latest version from github there, only sdl2 required (or sdl3 + sdl2-compat).
The github repository is still here : https://github.com/zelurker/csb
pjs
Novice
Posts: 16
Joined: Thu Dec 30, 2021 8:37 pm

Re: new csb

Post by pjs »

I suspect most are mainly interested in the original experience that works in modern computers (at least I do, and Linux in particular); this has been the goal of the original port. Adding new features is likely secondary and could be distracting. Or maybe your goal is to add lots of features that allow 'modding' i.e. completely new kind of dungeons and features in those dungeons. Or to play the original dungeons with those features, which will likely result in balance issues, and I doubt very many are interested in those. But once you go down that path, the work that road is going to be endless. So you maybe some kind of "mission statement" to make it clearer both to you and the community on what to expect.
User avatar
Gambit37
Should eat more pies
Posts: 13769
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Re: new csb

Post by Gambit37 »

In my experience, these kinds of projects are for the creator to scratch their own itch, so to speak. If others benefit from it, great, but that's not the main purpose. The fun is in the journey of exploration, not necessarily the end result. So continue to do what you like to do but don't seek validation from the crowd: do it for yourself, the reward of the personal journey is enough.
zel
Novice
Posts: 19
Joined: Fri Apr 25, 2025 10:09 am

Re: new csb

Post by zel »

Yeah I'd say it's a way to learn how the source works, which is not easy since it's converted from a 68000 disassembly listing originally, with some edits, but not a lot finally, even the ST video ram with its planes, its 16 colors and its 3 palette changes is emulated !
Plus it's fun, I have been wondering if it would be possible to extend dungeon master (mainly), and I stumble upon this site... !
But despite all the ideas we make sure to keep the compatibility with the original version, because we didn't spend so much time on the original for nothing, there was a special alchemy in it.
So the idea is to extend, but not to break. And for now, it's very interesting ! :)

Anyway for now just tick the nostalgia mode option if you don't want any addition, but some of them are worth testing !
There is no linux binary, but it's super easy to compile, you might need to edit the makefile to set the target at the top, for linux it's SDL20, eventually choose the release compile flags and not the debug flags (there are comments about that), and that's all, if sdl2 is installed on your system everything will work like a charm.
User avatar
Sphenx
On Master
Posts: 594
Joined: Sun Sep 09, 2001 11:23 am
Contact:

Re: new csb

Post by Sphenx »

Thanks for your work zel. I gave it a try and would like some more information about the build environment. I tried to compile directly without any specific modification.
For Linux (debian) I got an issue with "SDL_GetDefaultAudioInfo" not declared in scope;
For Win I am using MSVS 2022 + VS 2015 build tools but encounter issue with "endian.h" and "windows.h" and even some WindowsSDKDir variable ...
And from your builds, I understand the native Win 64b is now compiling properly ? I remember there were some trouble before to make the 64b version. I think it was not solved from that older repo : https://github.com/BeipDev/CSBWin
Anyway I am looking forward to be able to build these properly.
zel
Novice
Posts: 19
Joined: Fri Apr 25, 2025 10:09 am

Re: new csb

Post by zel »

For SDL_GetDefaultAudioInfo, it was added to SDL-2.24.0, which was released on august 19, 2022 ! If you are using debian, you should use testing which is a rolling distribution, everything is always updated all the time, much better than having a package outdated for 3 years now. Or Arch is a rolling distribution which goes even faster than that (what I am using now, I used debian before that). Well you can always install SDL2 manually from the official site instead of your outdated one, just download the latest version (for sdl2, not sdl3), compile it, and replace the one in your distribution by this one.

For windows, I thought it was clear : I program mainly in linux, so I use mingw32 to compile windows programs which gives a much better compatibility. It's free you can install it without paying anything, just follow the instructions there https://www.msys2.org/wiki/MSYS2-installation/ notice that msys uses pacman as a package manager, which is the package manager from arch linux actually !
if someone wants to send patches so that it can be compiled again using msvc, he is welcome ! But without some external patches I don't plan to do anything about that, sorry I don't like using msvc, too many things to click.
The compilation in windows if using mingw32 is even easier than in linux because the default makefile in git is currently for windows (the 32 bits version), so you don't need to edit anything in it. For info I cross compile the windows binary from linux, the target names in the makefile are readily available as cross compilers to build windows binaries. I don't remember which version of SDL2 msys installs by default, but it's more recent than 2.24.0 for sure !
Post Reply

Return to “Chaos Strikes Back for Windows & Linux (CSBWin) / CSBuild”