VOGONS


SDLPAL DOS port for the RPG game LEGEND OF SWORD AND FAIRY

Topic actions

Reply 60 of 66, 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 66, 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 66, 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 66, by PalMusicFan

User metadata
Rank Newbie
Rank
Newbie

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

Reply 64 of 66, 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 66, 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 66, by PalMusicFan

User metadata
Rank Newbie
Rank
Newbie
MrFlibble wrote on Today, 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.