-
Notifications
You must be signed in to change notification settings - Fork 0
Configuration
Cameron Rye edited this page Nov 19, 2025
·
1 revision
Learn how to configure DosKit for your specific needs.
DosKit uses DOSBox configuration files to customize the DOS environment. The default configuration is located in src/config/dosbox.conf.ts.
import { defaultDosboxConfig } from './config/dosbox.conf';
<DosPlayer dosboxConf={defaultDosboxConfig} />const customConfig = `
[cpu]
core=auto
cycles=max
[autoexec]
@echo off
echo Welcome to My DOS App!
mount c .
c:
myapp.exe
`;
<DosPlayer dosboxConf={customConfig} />[cpu]
core=auto # CPU emulation type: auto, dynamic, normal, simple
cycles=max # CPU speed: max, auto, or specific number (e.g., 10000)
cycleup=10 # Amount to increase/decrease cycles
cycledown=20[autoexec]
@echo off
mount c .
c:
cd MYAPP
myapp.exeCustomize the emulator behavior with js-dos options in src/config/jsdos.config.ts:
import { DosPlayer } from './components/DosPlayer';
<DosPlayer
options={{
theme: 'dark',
volume: 0.7,
fullScreen: false,
autoStart: true,
}}
/>| Option | Type | Default | Description |
|---|---|---|---|
theme |
'dark' | 'light' |
'dark' |
UI theme |
volume |
number |
0.7 |
Audio volume (0.0 to 1.0) |
fullScreen |
boolean |
false |
Enable fullscreen mode |
autoStart |
boolean |
true |
Auto-start emulator on load |
backend |
'dosbox' | 'dosboxX' |
'dosbox' |
Emulator backend |
mouseCapture |
boolean |
false |
Auto-capture mouse input |
See src/types/js-dos.d.ts for complete options.
DosKit automatically detects mobile devices and applies optimized settings:
- Larger touch controls
- On-screen keyboard with common DOS keys
- Optimized aspect ratio for mobile screens
- Touch-friendly UI elements
const mobileConfig = {
softKeyboardLayout: 'custom',
touchControls: true,
virtualKeyboard: true,
};Create a .env file in the project root:
# Development
VITE_APP_TITLE=DosKit
VITE_APP_DESCRIPTION=DOS Emulator
# Production
VITE_BASE_URL=/Edit vite.config.ts to customize the build process:
export default defineConfig({
base: '/',
build: {
outDir: 'dist',
sourcemap: true,
},
server: {
port: 5173,
},
});Configure PWA behavior in public/sw.js:
- Cache strategy
- Offline resources
- Update behavior
- Usage - Learn how to use DosKit
- API Documentation - Explore the API
- Performance Optimizations - Optimize performance
Made with ❤️ by Cameron Rye