Skip to content

Configuration

Cameron Rye edited this page Nov 19, 2025 · 1 revision

Configuration

Learn how to configure DosKit for your specific needs.

DOSBox Configuration

DosKit uses DOSBox configuration files to customize the DOS environment. The default configuration is located in src/config/dosbox.conf.ts.

Using the Default Configuration

import { defaultDosboxConfig } from './config/dosbox.conf';

<DosPlayer dosboxConf={defaultDosboxConfig} />

Custom Configuration Example

const customConfig = `
[cpu]
core=auto
cycles=max

[autoexec]
@echo off
echo Welcome to My DOS App!
mount c .
c:
myapp.exe
`;

<DosPlayer dosboxConf={customConfig} />

DOSBox Configuration Sections

[cpu]

[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]

[autoexec]
@echo off
mount c .
c:
cd MYAPP
myapp.exe

js-dos Options

Customize 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,
  }}
/>

Available Options

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.

Mobile Configuration

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

Customizing Mobile Settings

const mobileConfig = {
  softKeyboardLayout: 'custom',
  touchControls: true,
  virtualKeyboard: true,
};

Environment Variables

Create a .env file in the project root:

# Development
VITE_APP_TITLE=DosKit
VITE_APP_DESCRIPTION=DOS Emulator

# Production
VITE_BASE_URL=/

Build Configuration

Vite Configuration

Edit vite.config.ts to customize the build process:

export default defineConfig({
  base: '/',
  build: {
    outDir: 'dist',
    sourcemap: true,
  },
  server: {
    port: 5173,
  },
});

Service Worker Configuration

Configure PWA behavior in public/sw.js:

  • Cache strategy
  • Offline resources
  • Update behavior

Next Steps


Made with ❤️ by Cameron Rye

Clone this wiki locally