---
title: "SDLPAL - Angryecho"
description: "SDLPAL is an SDL-based cross-platform reimplementation of the classic Chinese RPG Legend of Sword and Fairy (also known as PAL). Try the online demo!"
canonical_url: "https://www.angryecho.com/c/xian_jian_qi_xia_chuan/p/P2TBBkMIayRGXOuYVeDa3"
meta:
  "og:description": "SDLPAL is an SDL-based cross-platform reimplementation of the classic Chinese RPG Legend of Sword and Fairy (also known as PAL). Try the online demo!"
  "og:image": "https://www.angryecho.com/_og/d/c_Post%2Ctitle_~5ZCQ5qe9572R%2Cdescription_~5ZCQ5qe95LiA5LiL77yM5bCx5LiK5ZCQ5qe9572R44CC%2CpostId_P2TBBkMIayRGXOuYVeDa3%2Crevision_~MjAyNi0xMC0yNVQwMjo1Nzo1MC4xODM3Nzla%2Cp_Ii9jL3hpYW5famlhbl9xaV94aWFfY2h1YW4vcC9QMlRCQmtNSWF5UkdYT3VZVmVEYTMi%2Cs_9V2rxsZokBhgypPV.png"
  "og:image:height": "630"
  "og:image:type": image/png
  "og:image:width": "1200"
  "og:title": SDLPAL
---

> Index of every page on this site: [llms.txt](https://www.angryecho.com/llms.txt)

# **SDLPAL**

**SDLPAL** is an SDL-based cross-platform reimplementation of the classic Chinese RPG *Legend of Sword and Fairy* (also known as *PAL*).

[Try the online demo!](https://sdlpal.github.io/demo/sdlpal.html)

Check the link above for a web-based demo of SDLPAL. It should work on most modern browsers (e.g., Google Chrome, Mozilla Firefox, Safari), though compatibility issues may exist on some platforms. To play, please prepare a ZIP file containing the original game resource data.

## Gitee Mirror (Gitee 镜像)

If you experience difficulties downloading code from GitHub in mainland China, please use our [Gitee mirror](https://gitee.com/sdlpal/sdlpal) (updated hourly).

---

## License

SDLPAL was originally created by [Wei Mingzhi](https://github.com/weimzh/). It is now maintained by the SDLPAL development team. Please see [AUTHORS](https://github.com/sdlpal/sdlpal/blob/master/AUTHORS.md) for the full list of contributors.

```
Copyright (c) 2009-2011, Wei Mingzhi <whistler_wmz@users.sf.net>.
Copyright (c) 2011-2026, SDLPAL development team.
All rights reserved.
```

SDLPAL is distributed under the terms of the **GNU General Public License, version 3**, as published by the [Free Software Foundation](http://www.fsf.org/). See [LICENSE](https://github.com/sdlpal/sdlpal/blob/master/LICENSE) for details.

Many concepts in this program are based on documents from the [PAL Research Project](https://github.com/palxex/palresearch), and portions of the code are based on work by Baldur and [louyihua](https://github.com/louyihua).

This program makes extensive use of the following libraries:

- **SDL** / **SDL\_mixer**
- **libmad**, **libogg** & **libvorbis**, **libopus** & **opusfile**
- **FLTK**, **TinySoundFont**
- OPL player from **Adplug**
- OPL emulation cores from **DOSBOX**, **MAME**, and **Chocolate Doom** projects
- Audio resampler from **foo\_input\_adplug**
- AVI player from **FFmpeg**
- Image decoder from **stb**

This program does **NOT** include any code or data files from the original game, which are proprietary and copyrighted by **SoftStar Inc.**

We recommend purchasing the original game from [Steam](https://store.steampowered.com/app/1546570/Sword_and_Fairy/) to obtain the required data files.

---

## FAQ

Please refer to the [Wiki](https://github.com/sdlpal/sdlpal/wiki).

---

## Building the Game

SDLPAL currently supports the following platforms:

- **Desktop:** Windows (Desktop & UWP), GNU/Linux, and macOS.
- **Mobile:** Android, iOS, and Windows Phone/Mobile.
- **Consoles:** 3DS, Wii, PSP, and others (some may not be actively maintained).

For build environment inspiration, you can review our [CI scripts](https://www.google.com/search?q=.travis.yml).

### General Build Steps

1. **Clone the repository:**

   ```
    $ git clone https://github.com/sdlpal/sdlpal.git
    $ cd sdlpal
   ```

2. **Update submodules:**

   ```
    $ git submodule update --init --recursive
   ```

3. **Follow platform-specific instructions:**

### Windows

- **Visual Studio:** - For **Desktop**, open `win32/sdlpal.sln` in Visual Studio 2017 or later.
  - For **UWP**, open `winrt/SDLPal.UWP.sln`.
- **MinGW:**
  - **Windows CMD:** `cd win32 && make -f Makefile.mingw`
  - **MSYS:** `cd win32 && make`
  - **Linux Cross-compile:** `cd win32 && make HOST=i686-w64-mingw32-` (or `x86_64` for 64-bit).

### GNU/Linux or Unix

Run `cd unix && make`. Ensure SDL 2.0 development files are installed. The executable `sdlpal` will be generated in the current directory. By default, it uses FLTK for the launch GUI; to disable this, define `PAL_NO_LAUNCH_UI` in the `Makefile`.

### macOS

Open `Pal.xcodeproj` with Xcode and build. Ensure the SDL framework is installed in `/Library/Frameworks`.

### iOS

Install dependencies via CocoaPods, then open `ios/SDLPal/SDLPal.xcworkspace` in Xcode.

```
$ cd iOS/SDLPAL
$ pod install
```

### Android

Open the `android` directory in **Android Studio** and select `Make Project`.

- **Note:** `android/app/src/main/java/org/libsdl/app` is a symlink. Ensure your Git client handles symbolic links correctly.
- **Tip:** On Windows, keep the repository path short (e.g., at the drive root) to avoid path length issues.

---

## Running the Game

Resource files are not included. You must copy the original game data files into a directory, place the built SDLPAL executable in that same directory, and then run it.

**Important:** On case-sensitive filesystems (like Linux/macOS), ensure all game data filenames are in **lower-case**.

### MIDI Support

MIDI support varies by platform. It is officially supported on **Windows, Android, iOS, and macOS**. GNU/Linux support is preliminary and requires the `timidity` package. Other platforms do not currently support MIDI.

---

## Configuration

SDLPAL supports various versions of the original game through configuration.

1. **GUI:** On the first launch, a configuration window will appear. You can access it later via the in-game menu or after a crash. (Currently unavailable on macOS).
2. **Manual:** Create a `sdlpal.cfg` file in the game directory. Refer to [sdlpal.cfg.example](https://github.com/sdlpal/sdlpal/blob/master/sdlpal.cfg.example) for the format.

---

## Contributing & Issues

- **Issues:** Report bugs via GitHub Issues in English or Chinese.
- **Contributions:** PRs are welcome! Code must be licensed under the GPL. To maintain code quality, please include **unit tests** for new features. See the [testing guide](https://github.com/sdlpal/sdlpal/tree/master/tests) for details.

> 原文： [GitHub｜SDLPAL](https://github.com/sdlpal/sdlpal)

排序方式 :

### **成为第一条评论！**

Nobody's responded to this post yet. Add your thoughts and get the conversation going.

```json
{"@context":"https://schema.org","@graph":[{"@id":"https://www.angryecho.com/c/xian_jian_qi_xia_chuan/p/P2TBBkMIayRGXOuYVeDa3#post","@type":"DiscussionForumPosting","commentCount":0,"dateModified":"2026-10-25T02:57:50.183Z","datePublished":"2026-10-24T19:32:45.406Z","description":"SDLPAL is an SDL-based cross-platform reimplementation of the classic Chinese RPG Legend of Sword and Fairy (also known as PAL). Try the online demo!","headline":"SDLPAL","isPartOf":"https://www.angryecho.com/c/xian_jian_qi_xia_chuan","mainEntityOfPage":"https://www.angryecho.com/c/xian_jian_qi_xia_chuan/p/P2TBBkMIayRGXOuYVeDa3","text":"SDLPAL is an SDL-based cross-platform reimplementation of the classic Chinese RPG Legend of Sword and Fairy (also known as PAL).\n\nTry the online demo!\n\nCheck the link above for a web-based demo of SDLPAL. It should work on most modern browsers (e.g., Google Chrome, Mozilla Firefox, Safari), though compatibility issues may exist on some platforms. To play, please prepare a ZIP file containing the original game resource data.\n\nGitee Mirror (Gitee 镜像)\n\nIf you experience difficulties downloading code from GitHub in mainland China, please use our Gitee mirror (updated hourly).\n\n\n\nLicense\n\nSDLPAL was originally created by Wei Mingzhi. It is now maintained by the SDLPAL development team. Please see AUTHORS for the full list of contributors.\n\nCopyright (c) 2009-2011, Wei Mingzhi \u003Cwhistler_wmz@users.sf.net>.\nCopyright (c) 2011-2026, SDLPAL development team.\nAll rights reserved.\n\nSDLPAL is distributed under the terms of the GNU General Public License, version 3, as published by the Free Software Foundation. See LICENSE for details.\n\nMany concepts in this program are based on documents from the PAL Research Project, and portions of the code are based on work by Baldur and louyihua.\n\nThis program makes extensive use of the following libraries:\n\n\n\n\n\nSDL / SDL_mixer\n\n\n\nlibmad, libogg & libvorbis, libopus & opusfile\n\n\n\nFLTK, TinySoundFont\n\n\n\nOPL player from Adplug\n\n\n\nOPL emulation cores from DOSBOX, MAME, and Chocolate Doom projects\n\n\n\nAudio resampler from foo_input_adplug\n\n\n\nAVI player from FFmpeg\n\n\n\nImage decoder from stb\n\nThis program does NOT include any code or data files from the original game, which are proprietary and copyrighted by SoftStar Inc.\n\nWe recommend purchasing the original game from Steam to obtain the required data files.\n\n\n\nFAQ\n\nPlease refer to the Wiki.\n\n\n\nBuilding the Game\n\nSDLPAL currently supports the following platforms:\n\n\n\n\n\nDesktop: Windows (Desktop & UWP), GNU/Linux, and macOS.\n\n\n\nMobile: Android, iOS, and Windows Phone/Mobile.\n\n\n\nConsoles: 3DS, Wii, PSP, and others (some may not be actively maintained).\n\nFor build environment inspiration, you can review our CI scripts.\n\nGeneral Build Steps\n\n\n\n\n\nClone the repository:\n\n $ git clone https://github.com/sdlpal/sdlpal.git\n $ cd sdlpal\n\n\n\nUpdate submodules:\n\n $ git submodule update --init --recursive\n\n\n\nFollow platform-specific instructions:\n\nWindows\n\n\n\n\n\nVisual Studio: - For Desktop, open win32/sdlpal.sln in Visual Studio 2017 or later.\n\n\n\n\n\nFor UWP, open winrt/SDLPal.UWP.sln.\n\n\n\nMinGW:\n\n\n\n\n\nWindows CMD: cd win32 && make -f Makefile.mingw\n\n\n\nMSYS: cd win32 && make\n\n\n\nLinux Cross-compile: cd win32 && make HOST=i686-w64-mingw32- (or x86_64 for 64-bit).\n\nGNU/Linux or Unix\n\nRun cd unix && make. Ensure SDL 2.0 development files are installed. The executable sdlpal will be generated in the current directory. By default, it uses FLTK for the launch GUI; to disable this, define PAL_NO_LAUNCH_UI in the Makefile.\n\nmacOS\n\nOpen Pal.xcodeproj with Xcode and build. Ensure the SDL framework is installed in /Library/Frameworks.\n\niOS\n\nInstall dependencies via CocoaPods, then open ios/SDLPal/SDLPal.xcworkspace in Xcode.\n\n$ cd iOS/SDLPAL\n$ pod install\n\nAndroid\n\nOpen the android directory in Android Studio and select Make Project.\n\n\n\n\n\nNote: android/app/src/main/java/org/libsdl/app is a symlink. Ensure your Git client handles symbolic links correctly.\n\n\n\nTip: On Windows, keep the repository path short (e.g., at the drive root) to avoid path length issues.\n\n\n\nRunning the Game\n\nResource files are not included. You must copy the original game data files into a directory, place the built SDLPAL executable in that same directory, and then run it.\n\nImportant: On case-sensitive filesystems (like Linux/macOS), ensure all game data filenames are in lower-case.\n\nMIDI Support\n\nMIDI support varies by platform. It is officially supported on Windows, Android, iOS, and macOS. GNU/Linux support is preliminary and requires the timidity package. Other platforms do not currently support MIDI.\n\n\n\nConfiguration\n\nSDLPAL supports various versions of the original game through configuration.\n\n\n\n\n\nGUI: On the first launch, a configuration window will appear. You can access it later via the in-game menu or after a crash. (Currently unavailable on macOS).\n\n\n\nManual: Create a sdlpal.cfg file in the game directory. Refer to sdlpal.cfg.example for the format.\n\n\n\nContributing & Issues\n\n\n\n\n\nIssues: Report bugs via GitHub Issues in English or Chinese.\n\n\n\nContributions: PRs are welcome! Code must be licensed under the GPL. To maintain code quality, please include unit tests for new features. See the testing guide for details.\n\n\n\n原文：GitHub｜SDLPAL","url":"https://www.angryecho.com/c/xian_jian_qi_xia_chuan/p/P2TBBkMIayRGXOuYVeDa3","author":{"@type":"Person","name":"俊男仔","url":"https://www.angryecho.com/u/TYIM113918"},"interactionStatistic":[{"@type":"InteractionCounter","interactionType":"https://schema.org/LikeAction","userInteractionCount":0},{"@type":"InteractionCounter","interactionType":"https://schema.org/DislikeAction","userInteractionCount":0},{"@type":"InteractionCounter","interactionType":"https://schema.org/ViewAction","userInteractionCount":0},{"@type":"InteractionCounter","interactionType":"https://schema.org/ShareAction","userInteractionCount":0}]}]}
```

## Sitemap

See the full [sitemap](https://www.angryecho.com/sitemap.md) for all pages.
