VOGONS


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

Topic actions

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

User metadata
Rank Newbie
Rank
Newbie

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

Reply 64 of 74, 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 74, 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 74, 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 74, 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 74, 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 74, 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 74, 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 74, 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 74, 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 74, 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 74, 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.