# DOS_Sim **Repository Path**: eran/dos_sim ## Basic Information - **Project Name**: DOS_Sim - **Description**: DOS - **Primary Language**: Unknown - **License**: GPL-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-10-07 - **Last Updated**: 2026-10-07 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # DOS Simulator A DOS emulator for iOS and iPadOS, built on the DOSBox 0.74-3 core with a SwiftUI front end. This repository contains the complete corresponding source code, as required by the GPLv2 license the core is derived from. ## Requirements - macOS with Xcode (Apple Silicon or Intel) - iOS 26.5 or later for the app target (`NativeDosCore` itself targets 15.0) ## Build ```bash cd XCode/DOS_Simulator open DOS_Simulator.xcodeproj ``` Select the `DOS_Simulator` scheme and run. The `NativeDosCore` target builds the emulator core as a static library and is built automatically as a dependency of the app. To build from the command line: ```bash # Core only xcodebuild -project DOS_Simulator.xcodeproj -scheme NativeDosCore \ -configuration Debug -sdk iphoneos build # Full app xcodebuild -project DOS_Simulator.xcodeproj -scheme DOS_Simulator \ -configuration Debug -sdk iphoneos \ -destination 'generic/platform=iOS' build ``` The app bundles the core, which is a fat static library carrying both `arm64` (device) and `x86_64` (simulator) slices, so a simulator build must keep `ONLY_ACTIVE_ARCH=NO`. ### Regenerating the core target `XCode/DOS_Simulator/Tools/generate_core_target.rb` recreates the `NativeDosCore` target and re-adds the third-party sources to the build. It is idempotent, so it can be re-run safely. It needs the `xcodeproj` gem: ```bash cd XCode/DOS_Simulator ruby Tools/generate_core_target.rb ``` ## Running DOS games The app's `Documents` directory is mounted as drive C:. Put the game files directly in `Documents` (not in a subfolder), then either type the program name at the DOS prompt or add it to the `[autoexec]` section of `Documents/config/dospad.cfg`: ```ini [autoexec] PLAY.BAT ``` Configuration is read from `Documents/config/dospad.cfg`. The app writes a default one on first launch if it is missing. Note that the DOSBox shell does not accept relative paths with a drive letter (`C:\PLAY.BAT` reports `Illegal command`); either `cd` first or use the bare file name. No game content is included in this repository. ## Known limitations - **Pause is a spin poll.** The main loop checks the pause flag every 0.25s, so resuming from the background can lag by up to that much. - **The core cannot be stopped.** SDL 1.2 offers no way to terminate the DOSBox main loop from outside, so "stop" degrades to a `reboot` back to the prompt. A full restart requires restarting the app process. - **Command injection is a hack.** Queued commands are pushed by sending a Return to interrupt the shell's readline. It is timing sensitive. - **The DOS `OPEN` command is not implemented.** - **SDL 1.2 is end of life.** Xcode updates may require patches. - **On-screen controls are not wired up yet.** The current UI only starts the core and reports its state. ## License GPLv2. See [LICENSE](LICENSE). The core is derived from [iDOS](https://github.com/litchie/dospad) by litchie, which is GPLv2, so the whole application is distributed under GPLv2. ### Third-party components | Component | Version | License | Location | |---|---|---|---| | DOSBox | 0.74-3 | GPLv2 | `NativeDosCore/dosbox` | | iDOS (dospad) | as vendored | GPLv2 | `NativeDosCore/dosbox` (iOS-specific changes) | | SDL | 1.3.0 (hg-4429) | LGPLv2.1 | `NativeDosCore/SDL`, `NativeDosCore/include` | | SDL_sound | as vendored | LGPLv2.1 | `NativeDosCore/SDL_sound` | | SDL_net | as vendored | LGPLv2.1 | `NativeDosCore/SDL_net` | | mt32emu | as vendored | LGPLv2.1 | `NativeDosCore/mt32emu` | | libFLAC | prebuilt | LGPLv2.1 | `NativeDosCore/deps/lib` | | libogg | prebuilt | BSD | `NativeDosCore/deps/lib` | | libvorbis / libvorbisenc / libvorbisfile | prebuilt | BSD | `NativeDosCore/deps/lib` | | libmpg123 / libout123 / libsyn123 | prebuilt | LGPLv2.1 | `NativeDosCore/deps/lib` | `NativeDosCore/deps/lib` contains prebuilt static libraries inherited from iDOS. Their sources are available from the upstream projects listed above. This project also uses zlib and the iOS system frameworks.