mirror of
https://github.com/mileswolfallen2/OmniEmu2.0.git
synced 2026-09-08 11:23:17 +00:00
Add DOSBox-Staging emulator support and configuration
This commit is contained in:
@@ -53,6 +53,7 @@ OmniEmu is a cross-platform emulator manager, game launcher, and ROM library for
|
||||
| mGBA | Game Boy, GBA | ✅ | ✅ | ✅ |
|
||||
| Mesen2 | NES, SNES, GB, GBA, PC Engine | ✅ | ✅ | ✅ |
|
||||
| RetroArch | Multi-system (NES, SNES, N64, GB/GBA, PS1, and more) | ✅ | ✅ | ✅ |
|
||||
| DOSBox-Staging | MS-DOS / PC | ✅ | ✅ | ✅ |
|
||||
|
||||
## Quick Start
|
||||
|
||||
|
||||
@@ -207,6 +207,38 @@ sleep 0
|
||||
autosave 0
|
||||
joystick 1
|
||||
keyboard 0
|
||||
`,
|
||||
},
|
||||
},
|
||||
],
|
||||
'dosbox-staging': [
|
||||
{
|
||||
name: 'OmniEmu Recommended',
|
||||
description: 'Optimal DOSBox-Staging config with CRT emulation and performance',
|
||||
files: {
|
||||
'dosbox-staging.conf': `[sdl]
|
||||
fullscreen = off
|
||||
vsync = on
|
||||
|
||||
[render]
|
||||
aspect = true
|
||||
hires_open_gl = true
|
||||
glshader = crt-auto-max
|
||||
|
||||
[cpu]
|
||||
core = auto
|
||||
cputype = 386_prefetch
|
||||
|
||||
[mixer]
|
||||
prebuffer = 30
|
||||
rate = 44100
|
||||
|
||||
[midi]
|
||||
mididevice = none
|
||||
|
||||
[speaker]
|
||||
pcspeaker = on
|
||||
disney = on
|
||||
`,
|
||||
},
|
||||
},
|
||||
@@ -409,6 +441,11 @@ function getConfigDir(emulatorId: string, installPath: string): string {
|
||||
darwin: dirname(installPath),
|
||||
linux: join(require('os').homedir(), '.mame'),
|
||||
},
|
||||
'dosbox-staging': {
|
||||
win32: join(process.env.APPDATA || join(require('os').homedir(), 'AppData', 'Roaming'), 'DOSBox'),
|
||||
darwin: join(require('os').homedir(), 'Library', 'Preferences', 'DOSBox'),
|
||||
linux: join(require('os').homedir(), '.config', 'dosbox'),
|
||||
},
|
||||
duckstation: {
|
||||
win32: join(process.env.APPDATA || '', 'duckstation'),
|
||||
darwin: join(require('os').homedir(), 'Library', 'Application Support', 'DuckStation'),
|
||||
@@ -577,6 +614,7 @@ const esdeEmulatorNames: Record<string, string> = {
|
||||
flycast: 'FLYCAST',
|
||||
eden: 'EDEN',
|
||||
ryujinx: 'RYUJINX',
|
||||
'dosbox-staging': 'DOSBOXSTAGING',
|
||||
mednafen: 'MEDNAFEN',
|
||||
};
|
||||
|
||||
@@ -757,6 +795,7 @@ const pegasusSystemMeta: Record<string, PegasusSystemMeta> = {
|
||||
'sega-md': { name: 'Sega Mega Drive', shortname: 'genesis', extensions: ['bin', 'md', 'smd'] },
|
||||
'sega-saturn': { name: 'Sega Saturn', shortname: 'saturn', extensions: ['bin', 'cue', 'chd'] },
|
||||
pce: { name: 'PC Engine', shortname: 'pce', extensions: ['pce'] },
|
||||
dos: { name: 'DOS / PC', shortname: 'dos', extensions: ['exe', 'bat', 'com'] },
|
||||
};
|
||||
|
||||
function getPegasusLaunchCommand(emulatorPath: string, emulatorId: string): string {
|
||||
|
||||
+56
-1
@@ -249,6 +249,47 @@ export const knownEmulators: EmulatorConfig[] = [
|
||||
linux: 'https://www.mamedev.org/release.html',
|
||||
},
|
||||
},
|
||||
{
|
||||
id: 'dosbox-staging',
|
||||
name: 'DOSBox-Staging',
|
||||
description: 'MS-DOS / PC games emulator',
|
||||
platforms: ['dos'],
|
||||
defaultPath: {
|
||||
win32: 'C:\\Program Files\\DOSBox Staging\\dosbox.exe',
|
||||
darwin: '/Applications/dosbox.app/Contents/MacOS/dosbox',
|
||||
linux: '/usr/bin/dosbox',
|
||||
},
|
||||
downloads: {
|
||||
win32: [
|
||||
{
|
||||
url: 'https://github.com/dosbox-staging/dosbox-staging/releases/download/v0.82.2/dosbox-staging-windows-x64-v0.82.2.zip',
|
||||
format: 'zip',
|
||||
executablePath: 'dosbox.exe',
|
||||
},
|
||||
],
|
||||
darwin: [
|
||||
{
|
||||
url: 'https://github.com/dosbox-staging/dosbox-staging/releases/download/v0.82.2/dosbox-staging-macOS-v0.82.2.dmg',
|
||||
format: 'dmg',
|
||||
executablePath: 'dosbox.app/Contents/MacOS/dosbox',
|
||||
},
|
||||
],
|
||||
linux: [
|
||||
{
|
||||
url: 'https://github.com/dosbox-staging/dosbox-staging/releases/download/v0.82.2/dosbox-staging-linux-x86_64-v0.82.2.tar.xz',
|
||||
format: 'tar.xz',
|
||||
executablePath: 'dosbox',
|
||||
},
|
||||
],
|
||||
},
|
||||
packageNames: { linux: 'dosbox-staging', darwin: 'dosbox-staging' },
|
||||
supported: true,
|
||||
websiteUrl: {
|
||||
win32: 'https://dosbox-staging.org/',
|
||||
darwin: 'https://dosbox-staging.org/',
|
||||
linux: 'https://dosbox-staging.org/',
|
||||
},
|
||||
},
|
||||
{
|
||||
id: 'duckstation',
|
||||
name: 'DuckStation',
|
||||
@@ -1089,6 +1130,13 @@ function alternativePaths(emulatorId: string): string[] {
|
||||
join(omniEmuDir, 'mame'),
|
||||
join(omniEmuDir, 'MAME.AppImage'),
|
||||
],
|
||||
'dosbox-staging': [
|
||||
join(omniEmuDir, 'dosbox.exe'),
|
||||
join(omniEmuDir, 'dosbox'),
|
||||
join(omniEmuDir, 'dosbox.app', 'Contents', 'MacOS', 'dosbox'),
|
||||
'/usr/local/bin/dosbox',
|
||||
'/opt/homebrew/bin/dosbox',
|
||||
],
|
||||
flycast: [
|
||||
join(omniEmuDir, 'flycast-win64.exe'),
|
||||
join(omniEmuDir, 'flycast'),
|
||||
@@ -1358,6 +1406,8 @@ function launchArgs(emulatorId: string, romPath: string): string[] {
|
||||
return [romPath];
|
||||
case 'mame':
|
||||
return [romPath];
|
||||
case 'dosbox-staging':
|
||||
return [romPath];
|
||||
case 'retroarch': {
|
||||
const core = findRetroArchCore(romPath);
|
||||
if (core) return ['-L', core, romPath];
|
||||
@@ -1388,7 +1438,7 @@ const romsSubdirs = [
|
||||
'nes', 'snes', 'n64', 'gb', 'gbc', 'gba', 'nds', '3ds',
|
||||
'ps1', 'ps2', 'ps3', 'psp', 'psvita', 'gc', 'wii', 'wiiu', 'switch',
|
||||
'arcade', 'pce', 'sega-md', 'sega-saturn', 'sega-dc', 'dreamcast',
|
||||
'xbox', 'other',
|
||||
'xbox', 'dos', 'other',
|
||||
];
|
||||
|
||||
export function ensureRomsStructure(romsDir?: string): void {
|
||||
@@ -1430,6 +1480,7 @@ export function scanRoms(directory: string): GameEntry[] {
|
||||
'.gcm', '.gcz', '.rvz', '.m3u', '.ps2', '.cso',
|
||||
'.rom', '.zip', '.7z', '.gdi', '.pbp', '.cdi',
|
||||
'.rpx', '.rpl', '.xbe', '.vpk', '.3ds', '.3dsx', '.cia', '.cxi',
|
||||
'.exe', '.bat', '.com',
|
||||
];
|
||||
|
||||
const entries: GameEntry[] = [];
|
||||
@@ -1505,6 +1556,7 @@ const dirHints: Record<string, string> = {
|
||||
xbox: 'xbox', 'original xbox': 'xbox',
|
||||
psvita: 'psvita', vita: 'psvita', 'ps vita': 'psvita',
|
||||
'3ds': '3ds', 'nintendo 3ds': '3ds',
|
||||
dos: 'dos', dosbox: 'dos', pc: 'dos',
|
||||
};
|
||||
|
||||
function guessPlatform(ext: string, dirPath?: string): string {
|
||||
@@ -1531,6 +1583,7 @@ function guessPlatform(ext: string, dirPath?: string): string {
|
||||
'.xbe': 'xbox',
|
||||
'.vpk': 'psvita',
|
||||
'.3ds': '3ds', '.3dsx': '3ds', '.cia': '3ds', '.cxi': '3ds',
|
||||
'.exe': 'dos', '.bat': 'dos', '.com': 'dos',
|
||||
};
|
||||
return map[ext] || 'other';
|
||||
}
|
||||
@@ -1575,6 +1628,7 @@ function guessEmulator(ext: string, platform?: string): string {
|
||||
ps1: 'duckstation',
|
||||
switch: 'eden',
|
||||
arcade: 'mame',
|
||||
dos: 'dosbox-staging',
|
||||
};
|
||||
const mapped = platformMap[platform];
|
||||
if (mapped) return mapped;
|
||||
@@ -1599,6 +1653,7 @@ function guessEmulator(ext: string, platform?: string): string {
|
||||
'.xbe': 'xemu',
|
||||
'.vpk': 'vita3k',
|
||||
'.3ds': 'azahar', '.3dsx': 'azahar', '.cia': 'azahar', '.cxi': 'azahar',
|
||||
'.exe': 'dosbox-staging', '.bat': 'dosbox-staging', '.com': 'dosbox-staging',
|
||||
};
|
||||
return map[ext] || 'retroarch';
|
||||
}
|
||||
|
||||
@@ -98,7 +98,7 @@ function findAppInDir(dir: string): string | undefined {
|
||||
|
||||
for (const e of files) {
|
||||
const lowerName = e.name.toLowerCase();
|
||||
const knownNames = ['retroarch', 'dolphin-emu', 'dolphin', 'rpcs3', 'ryujinx', 'eden', 'mame', 'mame64', 'pcsx2', 'duckstation', 'esde'];
|
||||
const knownNames = ['retroarch', 'dolphin-emu', 'dolphin', 'rpcs3', 'ryujinx', 'eden', 'mame', 'mame64', 'pcsx2', 'duckstation', 'esde', 'dosbox'];
|
||||
const isExec = e.name.endsWith('.exe') || e.name.endsWith('.AppImage')
|
||||
|| knownNames.includes(lowerName);
|
||||
if (isExec) return join(dir, e.name);
|
||||
|
||||
Reference in New Issue
Block a user