VOGONS


Reply 60 of 84, by digger

User metadata
Rank Oldbie
Rank
Oldbie
PalMusicFan wrote on 2026-04-08, 15:00:

We will carefully discuss and organize some detailed technical points and get back to you with a detailed response as soon as possible.

Sounds good. I hope I can help. 🙂

The questions I can think of right now are mainly two. The first is that we really don't know enough about DOS4GW, so could we trouble you to provide the DJGPP version of the library and demo?

That sounds like a fun challenge. And I'd also like to find out myself if those drivers will work with DJGPP-compiled software. I'll have a go at it.

The second question is that we still don't have experience implementing a thread equivalent for using SDL Audio. Could we get your guidance on this part? Thank you very much!

I have to admit that I don't currently have experience with the SDL APi, but I would be curious to investigate that further. I do use LLMs to assist me when I work on such hobbies and proofs of concept. Do you have any concerns with that? Just being transparent about that.

In the meantime, there are certainly more knowledgeable people than me in this forum who can help you answer your second question.

Ultimately, the functional question is how you can asynchronously play back sound samples during game play without blocking the main game loop, right?

Reply 61 of 84, by PalMusicFan

User metadata
Rank Newbie
Rank
Newbie
digger wrote on 2026-04-08, 18:05:

That sounds like a fun challenge. And I'd also like to find out myself if those drivers will work with DJGPP-compiled software. I'll have a go at it.

Awesome!

digger wrote on 2026-04-08, 18:05:

I have to admit that I don't currently have experience with the SDL APi, but I would be curious to investigate that further. I do use LLMs to assist me when I work on such hobbies and proofs of concept. Do you have any concerns with that? Just being transparent about that.

We're open to using LLMs to help with development, as long as the code is understandable and maintainable, and doesn't include any annoying stuff.

digger wrote on 2026-04-08, 18:05:

In the meantime, there are certainly more knowledgeable people than me in this forum who can help you answer your second question.

Ultimately, the functional question is how you can asynchronously play back sound samples during game play without blocking the main game loop, right?

That's right, but the problem is that we are not just asynchronously playing some existing audio files, but processing the complex audio system in real time.

We implemented a MIXER ourselves, so we only need the system to be able to play a regular stereo PCM audio stream in a PULL method, which is no different from playing a real-time WAV stream.

However, behind this simple interface, SDLPal implements a very large multiplexed audio system: FM synthesis, MP3/Ogg Vorbis/OPUS audio playback, MIDI synthesis, VOC/WAV sound effect playback, all of which are mixed in real-time through resampling into a single audio stream submitted to the system. This makes the audio part very performance-intensive under the default settings of current mainstream platforms, with higher CPU performance requirements than other parts of the game.

The information we found tells us that ISRs are not suitable for running such heavy workloads. May I ask if the actual situation is like this? If so, is there a way to make a workaround?

(Of course, the system we designed is highly scalable both at compile time and runtime. For example, developer can disable OGG support so that the corresponding library will not be compiled. Players can also configure and choose the formats they need at runtime.)

In addition, SDLPal does not always run the main game loop at fixed intervals; it has some rather old fasioned design elements.

Reply 62 of 84, by PalMusicFan

User metadata
Rank Newbie
Rank
Newbie
zyzzle wrote on 2026-04-07, 02:15:

When I play the game without any audio driver (eg, no SBEMU) loaded and exit the game, the system still freezes at the DOS prompt. This is the same behavior as the previous version of SDLPal I tested above, 15-March). I have not changed anything in my sdlpal.ini file for the new 29-March (cf. 4-4-26) version.

Regarding the speed-up you noted, the general speed seems to be about the same at 1.5 Ghz. (Playable but a little slow), and very fast at 3.4 Ghz (no delays at all).

I did not reproduce this bug. Are you sure you are using the latest build with default config?

Reply 63 of 84, by PalMusicFan

User metadata
Rank Newbie
Rank
Newbie

Is there an DOS emulator with working Sound Blaster AWE MIDI?

Reply 64 of 84, by PalMusicFan

User metadata
Rank Newbie
Rank
Newbie

Something about CMI8738...

At least fot rev 37 and rev 55, if you get the Base Address for 8738, you may directly use Base Address+ 0x50 as OPL3 address, no driver is required.

For example:
If your 8738 has the base address 0xA000, then you may use this line in sdlpal.cfg:

RealOplPort=0xA050

Then there should be FM music.

Reply 65 of 84, by MrFlibble

User metadata
Rank Oldbie
Rank
Oldbie

Apologies for crashing the topic, but could someone please provide more info on the freeware release of the game? I found a Wikipedia entry about it, but it does not mention anything about freeware releases at all.

By more info I mean if it was permanent and not a temporary promotion, coming from the developer or publisher and so on. Thanks!

DOS Games Archive | Free open source games | RGB Classic Games

Reply 66 of 84, by PalMusicFan

User metadata
Rank Newbie
Rank
Newbie
MrFlibble wrote on 2026-04-12, 14:14:

Apologies for crashing the topic, but could someone please provide more info on the freeware release of the game? I found a Wikipedia entry about it, but it does not mention anything about freeware releases at all.

By more info I mean if it was permanent and not a temporary promotion, coming from the developer or publisher and so on. Thanks!

Yes, it was released by the publisher named Baiyou. They released this freeware version as a long term promotion of LEGEND OF SWORD AND FAIRY 5 since 2011. http://www.baiyou100.com/pal5/download/index.html

The promotion link was at: http://pal5.baiyou100.com/download/98xjrq.html

According to our observations, this link had been valid for a long time. We also once considered this version as one of the recommended baseline versions because it included the FM bgm pack that was deleted from the original Windows CD release back then.

But in recent years, we have found they have removed the promotion page.

Reply 67 of 84, by PalMusicFan

User metadata
Rank Newbie
Rank
Newbie
MrFlibble wrote on 2026-04-12, 14:14:

Apologies for crashing the topic, but could someone please provide more info on the freeware release of the game? I found a Wikipedia entry about it, but it does not mention anything about freeware releases at all.

By more info I mean if it was permanent and not a temporary promotion, coming from the developer or publisher and so on. Thanks!

Now this game is on the Steam, App Store, etc. So I have no idea whether the current publisher would allow a redistribute.

Reply 68 of 84, by PalMusicFan

User metadata
Rank Newbie
Rank
Newbie

A tip according to the recent test:

Set UseTouchOverlay=0 in sdlpal.cfg unless you are using a touch screen, which is unlikely to be supported under DOS systems. This overlay requires a significant amount of CPU resources.

Reply 69 of 84, by PalMusicFan

User metadata
Rank Newbie
Rank
Newbie

About the speed.

If you are using a CPU not that fast in mid 1990s, just use 320x200 resolution. Software image scaling is a hard work to CPU by that time.

Reply 70 of 84, by zyzzle

User metadata
Rank Member
Rank
Member

However, you said earlier that the game always renders in 320x200. Is that no longer true with the newer DOS builds?

Reply 71 of 84, by PalMusicFan

User metadata
Rank Newbie
Rank
Newbie
zyzzle wrote on 2026-04-16, 01:14:

However, you said earlier that the game always renders in 320x200. Is that no longer true with the newer DOS builds?

Yes, it still renders in 320x200, but after that the texture will be stretched to the resolution in the this setting.

This item works for other platforms with window support. Also, we have found Voodoo cards have weird display bug when using 320x200, in 86box emulation.

Reply 72 of 84, by zyzzle

User metadata
Rank Member
Rank
Member
PalMusicFan wrote on 2026-04-16, 10:50:

Yes, it still renders in 320x200, but after that the texture will be stretched to the resolution in the this setting.

This item works for other platforms with window support.

Thanks for the clarification. I've never tried to run PAL in Windows, so I'm focused on the DOS version.

Reply 73 of 84, by PalMusicFan

User metadata
Rank Newbie
Rank
Newbie
zyzzle wrote on 2026-04-16, 10:57:
PalMusicFan wrote on 2026-04-16, 10:50:

Yes, it still renders in 320x200, but after that the texture will be stretched to the resolution in the this setting.

This item works for other platforms with window support.

Thanks for the clarification. I've never tried to run PAL in Windows, so I'm focused on the DOS version.

Thank you.

As we know, most (if not all) video cards do not support low resolutions for wide screen (like 400x240). So, if you are using a modern 16:9 monitor, you may need to calculate carefully to decide a resolution pair to keep the correct aspect of 4:3.

Reply 74 of 84, by PalMusicFan

User metadata
Rank Newbie
Rank
Newbie
zyzzle wrote on 2026-04-16, 01:14:

However, you said earlier that the game always renders in 320x200. Is that no longer true with the newer DOS builds?

Sorry, it seems I provided a incorrect answer yesterday. The game screen is rendered in 320x200, but after that there is something pretty complex.

I will edit my post and provide a correct answer soon.

Reply 75 of 84, by digger

User metadata
Rank Oldbie
Rank
Oldbie
PalMusicFan wrote on 2026-04-08, 15:00:

The first is that we really don't know enough about DOS4GW, so could we trouble you to provide the DJGPP version of the library and demo?

I believe I have a first working version! 😅 I just published it to GitHub at https://github.com/volkertb/ail32-djgpp

The second question is that we still don't have experience implementing a thread equivalent for using SDL Audio. Could we get your guidance on this part? Thank you very much!

I was trying to figure out how you forked SDL in your project specifically for use with DOS, so I could see how I could possibly integrate the AIL/32 drivers with it. But then I did an on-line search and that turned up this pull request to add DOS support to SDL3 upstream, including Sound Blaster 16 support with DMA support and everything. The pull request is less than a week old. It even includes some kind of threading solution. Have you looked into this for SDLPAL yet?

I found the pull request through this news article on Generationamiga: https://www.generationamiga.com/2026/04/13/sd … classic-ms-dos/

Earlier in this Vogons thread, you mentioned how you were using a fork by jayschwa, but the repo you linked to was a few years old.

The pull request mensions jayschwa among others, though. Considering the features present in it, it seems like a perfect fit for what you need in your DOS port of SDLPAL.

Even though the PR has integrated support for Sound Blaster 16 with DMA sample playback already, they might still be open to adding AIL/32 support, just to have an easy way to extend SDL for DOS to support a wider range of sound cards.

Reply 76 of 84, by PalMusicFan

User metadata
Rank Newbie
Rank
Newbie
digger wrote on 2026-04-18, 22:48:
I believe I have a first working version! :sweat_smile: I just published it to GitHub at https://github.com/volkertb/ail32-djgpp […]
Show full quote
PalMusicFan wrote on 2026-04-08, 15:00:

The first is that we really don't know enough about DOS4GW, so could we trouble you to provide the DJGPP version of the library and demo?

I believe I have a first working version! 😅 I just published it to GitHub at https://github.com/volkertb/ail32-djgpp

The second question is that we still don't have experience implementing a thread equivalent for using SDL Audio. Could we get your guidance on this part? Thank you very much!

I was trying to figure out how you forked SDL in your project specifically for use with DOS, so I could see how I could possibly integrate the AIL/32 drivers with it. But then I did an on-line search and that turned up this pull request to add DOS support to SDL3 upstream, including Sound Blaster 16 support with DMA support and everything. The pull request is less than a week old. It even includes some kind of threading solution. Have you looked into this for SDLPAL yet?

I found the pull request through this news article on Generationamiga: https://www.generationamiga.com/2026/04/13/sd … classic-ms-dos/

Earlier in this Vogons thread, you mentioned how you were using a fork by jayschwa, but the repo you linked to was a few years old.

The pull request mensions jayschwa among others, though. Considering the features present in it, it seems like a perfect fit for what you need in your DOS port of SDLPAL.

Even though the PR has integrated support for Sound Blaster 16 with DMA sample playback already, they might still be open to adding AIL/32 support, just to have an easy way to extend SDL for DOS to support a wider range of sound cards.

Thank you so much! I’ve been waiting for this! We will take a look soon!

We’ve just become aware of the SDL3 port you mentioned recently and are currently looking into how to use it. Have you considered whether ail32-djgpp is compatible with it?

Reply 77 of 84, by PalMusicFan

User metadata
Rank Newbie
Rank
Newbie
digger wrote on 2026-04-18, 22:48:
I believe I have a first working version! :sweat_smile: I just published it to GitHub at https://github.com/volkertb/ail32-djgpp […]
Show full quote
PalMusicFan wrote on 2026-04-08, 15:00:

The first is that we really don't know enough about DOS4GW, so could we trouble you to provide the DJGPP version of the library and demo?

I believe I have a first working version! 😅 I just published it to GitHub at https://github.com/volkertb/ail32-djgpp

The second question is that we still don't have experience implementing a thread equivalent for using SDL Audio. Could we get your guidance on this part? Thank you very much!

I was trying to figure out how you forked SDL in your project specifically for use with DOS, so I could see how I could possibly integrate the AIL/32 drivers with it. But then I did an on-line search and that turned up this pull request to add DOS support to SDL3 upstream, including Sound Blaster 16 support with DMA support and everything. The pull request is less than a week old. It even includes some kind of threading solution. Have you looked into this for SDLPAL yet?

I found the pull request through this news article on Generationamiga: https://www.generationamiga.com/2026/04/13/sd … classic-ms-dos/

Earlier in this Vogons thread, you mentioned how you were using a fork by jayschwa, but the repo you linked to was a few years old.

The pull request mensions jayschwa among others, though. Considering the features present in it, it seems like a perfect fit for what you need in your DOS port of SDLPAL.

Even though the PR has integrated support for Sound Blaster 16 with DMA sample playback already, they might still be open to adding AIL/32 support, just to have an easy way to extend SDL for DOS to support a wider range of sound cards.

We are testing your AIL32! Awesome! The standalone player works!

I will submit our report soon.

Reply 78 of 84, by digger

User metadata
Rank Oldbie
Rank
Oldbie
PalMusicFan wrote on 2026-04-20, 15:57:

We are testing your AIL32! Awesome! The standalone player works!

I will submit our report soon.

Oh wow, this is exciting! It will be so awesome if a DJGPP-compiled DOS game ends up making use of this. ☺️

And honestly, these are still John Miles' AIL/32 drivers, not mine. I just mostly used Claude to make them compatible with DJGPP. I'm grateful that he open-sourced his AIL/32 drivers and SDK! 🙏🏼

If you get this working, it will add to the nostalgia a bit, in the sense that your DOS port of PAL will be using drivers that were actually used in some protected mode DOS games back in the day.

(If you want to know which ones, see this post by bristlehog from 2014, specifically the list under the title "Audio Interface Library 32-bit DPMI - DLL drivers:".)

Also, you will immediately be adding support for a range of sound cards, not just Sound Blaster.

I also replied in the thread of that pull request to have this support directly added to the DOS port of SDL, but nobody has responded to that yet.

Looking forward to reading about your experiences and findings with integrating this! I hope you get it working with the game. 🙂

Reply 79 of 84, by PalMusicFan

User metadata
Rank Newbie
Rank
Newbie
digger wrote on 2026-04-21, 11:55:
Oh wow, this is exciting! It will be so awesome if a DJGPP-compiled DOS game ends up making use of this. :relaxed: […]
Show full quote
PalMusicFan wrote on 2026-04-20, 15:57:

We are testing your AIL32! Awesome! The standalone player works!

I will submit our report soon.

Oh wow, this is exciting! It will be so awesome if a DJGPP-compiled DOS game ends up making use of this. ☺️

And honestly, these are still John Miles' AIL/32 drivers, not mine. I just mostly used Claude to make them compatible with DJGPP. I'm grateful that he open-sourced his AIL/32 drivers and SDK! 🙏🏼

If you get this working, it will add to the nostalgia a bit, in the sense that your DOS port of PAL will be using drivers that were actually used in some protected mode DOS games back in the day.

(If you want to know which ones, see this post by bristlehog from 2014, specifically the list under the title "Audio Interface Library 32-bit DPMI - DLL drivers:".)

Also, you will immediately be adding support for a range of sound cards, not just Sound Blaster.

I also replied in the thread of that pull request to have this support directly added to the DOS port of SDL, but nobody has responded to that yet.

Looking forward to reading about your experiences and findings with integrating this! I hope you get it working with the game. 🙂

Test report:

We have built STP32.EXE for the following tests. We found it requires IRQ7, ignores SET BLASTER.
STP32.EXE sample.raw a32sbdg.dll
STP32.EXE sample.raw a32sbpdg.dll
We also found that there is a short blank with 2 clicking sounds every time playback starts. I assume this is a design issue of the playback program, right?

1. Intel 4th Gen Core i5 CPU, 16.0 GB RAM
This laptop requires CSM enabled + CSMWRAP to boot FreeDOS, and basically STP32 works well when using VSBHDA.
When running with SBEMU, STP32 plays the music in a lower speed. During one test, it emitted a huge noise for less than a second when exiting playback.
With SBEMU, a32sbdg.dll and a32sbpdg.dll give two different incorrect tone.

2. AMD Zen3 CPU, more than 32GB RAM
STP32 + VSBHDA works well. When using SBEMU as STP32 plays the music in a lower speed. During one test, the program stopped after 2 seconds playback, required a hard reset.

3. 86BOX
No problem was found when testing non-PNP Sound Blaster 16 / AWE 32 cards as the IRQ was set to 7. PNP cards were not tested.

4. VirtualBOX on platform 1
When using PIIX3 chipset, the results are similar as those of 1. No such difference for a32sbdg.dll and a32sbpdg.dll's incorrect tones.
When using ICH9 chipset, we saw "Sound hardware not found." for both SBEMU and VSBHDA.

Also, may I ask a question about the compability of protected mode? Are those driver files complied by Watcom C compatible with STP32 built with DJGPP?