2009-05-02 23:03:37 +02:00
|
|
|
/*
|
2009-05-02 23:53:27 +02:00
|
|
|
* Copyright (C) 2002-2004 The DOSBox Team
|
2009-05-02 23:03:37 +02:00
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
2009-05-03 00:02:15 +02:00
|
|
|
* GNU General Public License for more details.
|
2009-05-02 23:03:37 +02:00
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
|
|
*/
|
|
|
|
|
2009-05-03 00:02:15 +02:00
|
|
|
/* $Id: dosbox.cpp,v 1.80 2004/09/21 19:32:15 qbix79 Exp $ */
|
2009-05-02 23:53:27 +02:00
|
|
|
|
2009-05-02 23:03:37 +02:00
|
|
|
#include <stdlib.h>
|
|
|
|
#include <stdarg.h>
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <string.h>
|
2009-05-02 23:12:18 +02:00
|
|
|
#include <unistd.h>
|
2009-05-02 23:03:37 +02:00
|
|
|
#include "dosbox.h"
|
|
|
|
#include "debug.h"
|
|
|
|
#include "cpu.h"
|
|
|
|
#include "video.h"
|
|
|
|
#include "pic.h"
|
|
|
|
#include "cpu.h"
|
|
|
|
#include "callback.h"
|
|
|
|
#include "inout.h"
|
|
|
|
#include "mixer.h"
|
|
|
|
#include "timer.h"
|
|
|
|
#include "dos_inc.h"
|
|
|
|
#include "setup.h"
|
|
|
|
#include "cross.h"
|
|
|
|
#include "programs.h"
|
2009-05-02 23:20:05 +02:00
|
|
|
#include "support.h"
|
2009-05-02 23:03:37 +02:00
|
|
|
|
2009-05-02 23:20:05 +02:00
|
|
|
Config * control;
|
2009-05-02 23:53:27 +02:00
|
|
|
MachineType machine;
|
2009-05-02 23:03:37 +02:00
|
|
|
|
2009-05-02 23:20:05 +02:00
|
|
|
/* The whole load of startups for all the subfunctions */
|
|
|
|
void MSG_Init(Section_prop *);
|
2009-05-02 23:35:44 +02:00
|
|
|
void LOG_StartUp(void);
|
2009-05-02 23:20:05 +02:00
|
|
|
void MEM_Init(Section *);
|
2009-05-02 23:43:00 +02:00
|
|
|
void PAGING_Init(Section *);
|
2009-05-02 23:20:05 +02:00
|
|
|
void IO_Init(Section * );
|
|
|
|
void CALLBACK_Init(Section*);
|
|
|
|
void PROGRAMS_Init(Section*);
|
2009-05-03 00:02:15 +02:00
|
|
|
void CREDITS_Init(Section*);
|
2009-05-02 23:20:05 +02:00
|
|
|
void RENDER_Init(Section*);
|
|
|
|
void VGA_Init(Section*);
|
2009-05-02 23:03:37 +02:00
|
|
|
|
2009-05-02 23:20:05 +02:00
|
|
|
void DOS_Init(Section*);
|
2009-05-02 23:03:37 +02:00
|
|
|
|
|
|
|
|
2009-05-02 23:20:05 +02:00
|
|
|
void CPU_Init(Section*);
|
2009-05-03 00:02:15 +02:00
|
|
|
|
2009-05-02 23:43:00 +02:00
|
|
|
#if C_FPU
|
|
|
|
void FPU_Init(Section*);
|
|
|
|
#endif
|
2009-05-03 00:02:15 +02:00
|
|
|
|
2009-05-02 23:20:05 +02:00
|
|
|
void DMA_Init(Section*);
|
|
|
|
void MIXER_Init(Section*);
|
2009-05-02 23:35:44 +02:00
|
|
|
void MIDI_Init(Section*);
|
2009-05-02 23:20:05 +02:00
|
|
|
void HARDWARE_Init(Section*);
|
2009-05-02 23:03:37 +02:00
|
|
|
|
|
|
|
|
2009-05-02 23:20:05 +02:00
|
|
|
void KEYBOARD_Init(Section*); //TODO This should setup INT 16 too but ok ;)
|
|
|
|
void JOYSTICK_Init(Section*);
|
|
|
|
void MOUSE_Init(Section*);
|
|
|
|
void SBLASTER_Init(Section*);
|
2009-05-02 23:27:47 +02:00
|
|
|
void GUS_Init(Section*);
|
2009-05-02 23:35:44 +02:00
|
|
|
void MPU401_Init(Section*);
|
2009-05-02 23:20:05 +02:00
|
|
|
void PCSPEAKER_Init(Section*);
|
|
|
|
void TANDYSOUND_Init(Section*);
|
2009-05-02 23:27:47 +02:00
|
|
|
void DISNEY_Init(Section*);
|
2009-05-02 23:43:00 +02:00
|
|
|
void SERIAL_Init(Section*);
|
2009-05-03 00:02:15 +02:00
|
|
|
|
|
|
|
#if C_MODEM
|
2009-05-02 23:43:00 +02:00
|
|
|
void MODEM_Init(Section*);
|
2009-05-03 00:02:15 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#if C_IPX
|
|
|
|
void IPX_Init(Section*);
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if C_DIRECTSERIAL
|
|
|
|
void DIRECTSERIAL_Init(Section* sec);
|
|
|
|
#endif
|
|
|
|
void SID_Init(Section* sec);
|
2009-05-02 23:27:47 +02:00
|
|
|
|
2009-05-02 23:20:05 +02:00
|
|
|
void PIC_Init(Section*);
|
|
|
|
void TIMER_Init(Section*);
|
|
|
|
void BIOS_Init(Section*);
|
|
|
|
void DEBUG_Init(Section*);
|
2009-05-02 23:27:47 +02:00
|
|
|
void CMOS_Init(Section*);
|
2009-05-02 23:03:37 +02:00
|
|
|
|
2009-05-02 23:35:44 +02:00
|
|
|
void MSCDEX_Init(Section*);
|
|
|
|
|
2009-05-02 23:03:37 +02:00
|
|
|
/* Dos Internal mostly */
|
2009-05-02 23:20:05 +02:00
|
|
|
void EMS_Init(Section*);
|
|
|
|
void XMS_Init(Section*);
|
2009-05-02 23:43:00 +02:00
|
|
|
|
2009-05-02 23:20:05 +02:00
|
|
|
void AUTOEXEC_Init(Section*);
|
2009-05-02 23:03:37 +02:00
|
|
|
void SHELL_Init(void);
|
|
|
|
|
2009-05-02 23:20:05 +02:00
|
|
|
void INT10_Init(Section*);
|
2009-05-02 23:03:37 +02:00
|
|
|
|
|
|
|
static LoopHandler * loop;
|
|
|
|
|
2009-05-03 00:02:15 +02:00
|
|
|
bool SDLNetInited;
|
|
|
|
|
|
|
|
Bits RemainTicks;
|
2009-05-02 23:43:00 +02:00
|
|
|
Bits LastTicks;
|
2009-05-02 23:27:47 +02:00
|
|
|
|
2009-05-02 23:03:37 +02:00
|
|
|
static Bitu Normal_Loop(void) {
|
2009-05-02 23:43:00 +02:00
|
|
|
Bits ret,NewTicks;
|
|
|
|
while (1) {
|
|
|
|
if (PIC_RunQueue()) {
|
|
|
|
ret=(*cpudecoder)();
|
|
|
|
if (ret<0) return 1;
|
|
|
|
if (ret>0) {
|
|
|
|
Bitu blah=(*CallBack_Handlers[ret])();
|
|
|
|
if (blah) return blah;
|
2009-05-02 23:53:27 +02:00
|
|
|
}
|
2009-05-02 23:43:00 +02:00
|
|
|
#if C_DEBUG
|
2009-05-02 23:53:27 +02:00
|
|
|
if (DEBUG_ExitLoop()) return 0;
|
2009-05-02 23:43:00 +02:00
|
|
|
#endif
|
|
|
|
} else {
|
|
|
|
if (RemainTicks>0) {
|
|
|
|
TIMER_AddTick();
|
|
|
|
RemainTicks--;
|
|
|
|
GFX_Events();
|
|
|
|
} else goto increaseticks;
|
|
|
|
}
|
2009-05-02 23:03:37 +02:00
|
|
|
}
|
2009-05-02 23:43:00 +02:00
|
|
|
increaseticks:
|
2009-05-02 23:27:47 +02:00
|
|
|
NewTicks=GetTicks();
|
|
|
|
if (NewTicks>LastTicks) {
|
2009-05-02 23:43:00 +02:00
|
|
|
RemainTicks=NewTicks-LastTicks;
|
2009-05-02 23:27:47 +02:00
|
|
|
if (RemainTicks>20) {
|
2009-05-02 23:53:27 +02:00
|
|
|
// LOG_MSG("Ticks to handle overflow %d",RemainTicks);
|
2009-05-02 23:27:47 +02:00
|
|
|
RemainTicks=20;
|
|
|
|
}
|
|
|
|
LastTicks=NewTicks;
|
|
|
|
}
|
|
|
|
//TODO Make this selectable in the config file, since it gives some lag */
|
2009-05-02 23:43:00 +02:00
|
|
|
if (RemainTicks<=0) {
|
2009-05-02 23:27:47 +02:00
|
|
|
SDL_Delay(1);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
return 0;
|
2009-05-02 23:03:37 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void DOSBOX_SetLoop(LoopHandler * handler) {
|
|
|
|
loop=handler;
|
|
|
|
}
|
|
|
|
|
2009-05-02 23:12:18 +02:00
|
|
|
void DOSBOX_SetNormalLoop() {
|
|
|
|
loop=Normal_Loop;
|
|
|
|
}
|
2009-05-02 23:03:37 +02:00
|
|
|
|
|
|
|
void DOSBOX_RunMachine(void){
|
|
|
|
Bitu ret;
|
|
|
|
do {
|
|
|
|
ret=(*loop)();
|
|
|
|
} while (!ret);
|
|
|
|
}
|
|
|
|
|
2009-05-02 23:20:05 +02:00
|
|
|
static void DOSBOX_RealInit(Section * sec) {
|
|
|
|
Section_prop * section=static_cast<Section_prop *>(sec);
|
|
|
|
/* Initialize some dosbox internals */
|
2009-05-02 23:43:00 +02:00
|
|
|
|
2009-05-02 23:27:47 +02:00
|
|
|
RemainTicks=0;LastTicks=GetTicks();
|
2009-05-02 23:03:37 +02:00
|
|
|
DOSBOX_SetLoop(&Normal_Loop);
|
2009-05-02 23:20:05 +02:00
|
|
|
MSG_Init(section);
|
2009-05-02 23:53:27 +02:00
|
|
|
|
2009-05-03 00:02:15 +02:00
|
|
|
machine=MCH_VGA;std::string cmd_machine;
|
2009-05-02 23:53:27 +02:00
|
|
|
const char * mtype;
|
|
|
|
if (control->cmdline->FindString("-machine",cmd_machine,true)) mtype=cmd_machine.c_str();
|
|
|
|
else mtype=section->Get_string("machine");
|
|
|
|
if (strcasecmp(mtype,"cga")==0) machine=MCH_CGA;
|
|
|
|
else if (strcasecmp(mtype,"tandy")==0) machine=MCH_TANDY;
|
|
|
|
else if (strcasecmp(mtype,"hercules")==0) machine=MCH_HERC;
|
|
|
|
else if (strcasecmp(mtype,"vga")==0) machine=MCH_VGA;
|
|
|
|
else LOG_MSG("DOSBOX:Unknown machine type %s",mtype);
|
2009-05-02 23:03:37 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2009-05-02 23:20:05 +02:00
|
|
|
void DOSBOX_Init(void) {
|
|
|
|
Section_prop * secprop;
|
|
|
|
Section_line * secline;
|
|
|
|
|
2009-05-03 00:02:15 +02:00
|
|
|
SDLNetInited = false;
|
|
|
|
|
2009-05-02 23:20:05 +02:00
|
|
|
/* Setup all the different modules making up DOSBox */
|
|
|
|
|
|
|
|
secprop=control->AddSection_prop("dosbox",&DOSBOX_RealInit);
|
2009-05-02 23:53:27 +02:00
|
|
|
secprop->Add_string("language","");
|
2009-05-03 00:02:15 +02:00
|
|
|
secprop->Add_string("machine","vga");
|
|
|
|
secprop->Add_string("captures","capture");
|
2009-05-02 23:53:27 +02:00
|
|
|
|
2009-05-02 23:20:05 +02:00
|
|
|
#if C_DEBUG
|
2009-05-02 23:35:44 +02:00
|
|
|
LOG_StartUp();
|
2009-05-02 23:20:05 +02:00
|
|
|
#endif
|
2009-05-02 23:53:27 +02:00
|
|
|
|
2009-05-02 23:20:05 +02:00
|
|
|
secprop->AddInitFunction(&IO_Init);
|
2009-05-02 23:43:00 +02:00
|
|
|
secprop->AddInitFunction(&PAGING_Init);
|
|
|
|
secprop->AddInitFunction(&MEM_Init);
|
2009-05-03 00:02:15 +02:00
|
|
|
secprop->AddInitFunction(&HARDWARE_Init);
|
2009-05-02 23:43:00 +02:00
|
|
|
secprop->Add_int("memsize",16);
|
2009-05-02 23:20:05 +02:00
|
|
|
secprop->AddInitFunction(&CALLBACK_Init);
|
|
|
|
secprop->AddInitFunction(&PIC_Init);
|
|
|
|
secprop->AddInitFunction(&PROGRAMS_Init);
|
|
|
|
secprop->AddInitFunction(&TIMER_Init);
|
2009-05-02 23:27:47 +02:00
|
|
|
secprop->AddInitFunction(&CMOS_Init);
|
2009-05-02 23:43:00 +02:00
|
|
|
secprop->AddInitFunction(&SERIAL_Init);
|
|
|
|
|
|
|
|
MSG_Add("DOSBOX_CONFIGFILE_HELP",
|
|
|
|
"language -- Select another language file.\n"
|
|
|
|
"memsize -- Amount of memory dosbox has in megabytes.\n"
|
2009-05-03 00:02:15 +02:00
|
|
|
"machine -- The type of machine tries to emulate:hercules,cga,tandy,vga.\n"
|
|
|
|
"captures -- Directory where things like wave,midi,screenshot get captured.\n"
|
2009-05-02 23:43:00 +02:00
|
|
|
);
|
|
|
|
|
2009-05-02 23:27:47 +02:00
|
|
|
secprop=control->AddSection_prop("render",&RENDER_Init);
|
|
|
|
secprop->Add_int("frameskip",0);
|
2009-05-02 23:53:27 +02:00
|
|
|
secprop->Add_bool("aspect",false);
|
2009-05-02 23:43:00 +02:00
|
|
|
secprop->Add_string("scaler","normal2x");
|
|
|
|
MSG_Add("RENDER_CONFIGFILE_HELP",
|
|
|
|
"frameskip -- How many frames dosbox skips before drawing one.\n"
|
2009-05-02 23:53:27 +02:00
|
|
|
"aspect -- Do aspect correction.\n"
|
2009-05-02 23:43:00 +02:00
|
|
|
"scaler -- Scaler used to enlarge/enhance low resolution modes.\n"
|
2009-05-03 00:02:15 +02:00
|
|
|
" Supported are none,normal2x,advmame2x,advmame3x,advinterp2x,interp2x,tv2x.\n"
|
2009-05-02 23:43:00 +02:00
|
|
|
);
|
2009-05-02 23:35:44 +02:00
|
|
|
|
2009-05-02 23:20:05 +02:00
|
|
|
secprop=control->AddSection_prop("cpu",&CPU_Init);
|
2009-05-02 23:53:27 +02:00
|
|
|
secprop->Add_string("core","normal");
|
2009-05-03 00:02:15 +02:00
|
|
|
secprop->Add_int("cycles",3000);
|
2009-05-02 23:53:27 +02:00
|
|
|
secprop->Add_int("cycleup",500);
|
|
|
|
secprop->Add_int("cycledown",20);
|
2009-05-02 23:43:00 +02:00
|
|
|
MSG_Add("CPU_CONFIGFILE_HELP",
|
2009-05-03 00:02:15 +02:00
|
|
|
"core -- CPU Core used in emulation: simple,normal,full"
|
2009-05-02 23:53:27 +02:00
|
|
|
#if (C_DYNAMIC_X86)
|
|
|
|
",dynamic"
|
|
|
|
#endif
|
|
|
|
".\n"
|
|
|
|
"cycles -- Amount of instructions dosbox tries to emulate each millisecond.\n"
|
2009-05-02 23:43:00 +02:00
|
|
|
" Setting this higher than your machine can handle is bad!\n"
|
2009-05-02 23:53:27 +02:00
|
|
|
"cycleup -- Amount of cycles to increase/decrease with keycombo.\n"
|
|
|
|
"cycledown Setting it lower than 100 will be a percentage.\n"
|
2009-05-02 23:43:00 +02:00
|
|
|
);
|
|
|
|
#if C_FPU
|
|
|
|
secprop->AddInitFunction(&FPU_Init);
|
|
|
|
#endif
|
2009-05-02 23:20:05 +02:00
|
|
|
secprop->AddInitFunction(&DMA_Init);
|
|
|
|
secprop->AddInitFunction(&VGA_Init);
|
|
|
|
secprop->AddInitFunction(&KEYBOARD_Init);
|
|
|
|
secprop->AddInitFunction(&MOUSE_Init);
|
|
|
|
secprop->AddInitFunction(&JOYSTICK_Init);
|
2009-05-02 23:03:37 +02:00
|
|
|
|
2009-05-02 23:20:05 +02:00
|
|
|
secprop=control->AddSection_prop("mixer",&MIXER_Init);
|
2009-05-02 23:35:44 +02:00
|
|
|
secprop->Add_bool("nosound",false);
|
2009-05-02 23:43:00 +02:00
|
|
|
secprop->Add_int("rate",22050);
|
2009-05-02 23:35:44 +02:00
|
|
|
secprop->Add_int("blocksize",2048);
|
2009-05-03 00:02:15 +02:00
|
|
|
secprop->Add_int("prebuffer",10);
|
2009-05-02 23:53:27 +02:00
|
|
|
|
2009-05-02 23:43:00 +02:00
|
|
|
MSG_Add("MIXER_CONFIGFILE_HELP",
|
|
|
|
"nosound -- Enable silent mode, sound is still emulated though.\n"
|
|
|
|
"rate -- Mixer sample rate, setting any devices higher than this will\n"
|
|
|
|
" probably lower their sound quality.\n"
|
|
|
|
"blocksize -- Mixer block size, larger blocks might help sound stuttering\n"
|
|
|
|
" but sound will also be more lagged.\n"
|
2009-05-03 00:02:15 +02:00
|
|
|
"prebuffer -- How many milliseconds of data to keep on top of the blocksize.\n"
|
2009-05-02 23:43:00 +02:00
|
|
|
);
|
|
|
|
|
2009-05-02 23:35:44 +02:00
|
|
|
secprop=control->AddSection_prop("midi",&MIDI_Init);
|
|
|
|
secprop->AddInitFunction(&MPU401_Init);
|
|
|
|
secprop->Add_bool("mpu401",true);
|
2009-05-03 00:02:15 +02:00
|
|
|
secprop->Add_bool("intelligent",true);
|
2009-05-02 23:35:44 +02:00
|
|
|
secprop->Add_string("device","default");
|
|
|
|
secprop->Add_string("config","");
|
2009-05-02 23:53:27 +02:00
|
|
|
|
2009-05-02 23:43:00 +02:00
|
|
|
MSG_Add("MIDI_CONFIGFILE_HELP",
|
2009-05-03 00:02:15 +02:00
|
|
|
"mpu401 -- Enable MPU-401 Emulation.\n"
|
|
|
|
"intelligent -- Operate in Intelligent mode.\n"
|
|
|
|
"device -- Device that will receive the MIDI data from MPU-401.\n"
|
|
|
|
" This can be default,alsa,oss,win32,coreaudio,none.\n"
|
|
|
|
"config -- Special configuration options for the device.\n"
|
2009-05-02 23:43:00 +02:00
|
|
|
);
|
|
|
|
|
2009-05-02 23:20:05 +02:00
|
|
|
#if C_DEBUG
|
|
|
|
secprop=control->AddSection_prop("debug",&DEBUG_Init);
|
|
|
|
#endif
|
|
|
|
secprop=control->AddSection_prop("sblaster",&SBLASTER_Init);
|
2009-05-03 00:02:15 +02:00
|
|
|
secprop->Add_string("type","sb16");
|
|
|
|
secprop->Add_hex("base",0x220);
|
2009-05-02 23:20:05 +02:00
|
|
|
secprop->Add_int("irq",7);
|
|
|
|
secprop->Add_int("dma",1);
|
2009-05-03 00:02:15 +02:00
|
|
|
secprop->Add_int("hdma",5);
|
|
|
|
secprop->Add_bool("mixer",true);
|
|
|
|
secprop->Add_string("oplmode","auto");
|
|
|
|
secprop->Add_int("oplrate",22050);
|
2009-05-02 23:27:47 +02:00
|
|
|
|
2009-05-02 23:43:00 +02:00
|
|
|
MSG_Add("SBLASTER_CONFIGFILE_HELP",
|
2009-05-03 00:02:15 +02:00
|
|
|
"type -- Type of sblaster to emulate:none,sb1,sb2,sbpro1,sbpro2,sb16.\n"
|
|
|
|
"base,irq,dma,hdma -- The IO/IRQ/DMA/High DMA address of the soundblaster.\n"
|
|
|
|
"mixer -- Allow the soundblaster mixer to modify the dosbox mixer.\n"
|
|
|
|
"oplmode -- Type of OPL emulation: auto,cms,opl2,dualopl2,opl3.\n"
|
|
|
|
" On auto the mode is determined by sblaster type.\n"
|
|
|
|
"oplrate -- Sample rate of OPL music emulation.\n"
|
|
|
|
);
|
2009-05-02 23:27:47 +02:00
|
|
|
|
2009-05-02 23:53:27 +02:00
|
|
|
secprop=control->AddSection_prop("gus",&GUS_Init);
|
|
|
|
secprop->Add_bool("gus",true);
|
|
|
|
secprop->Add_int("rate",22050);
|
|
|
|
secprop->Add_hex("base",0x240);
|
|
|
|
secprop->Add_int("irq1",5);
|
|
|
|
secprop->Add_int("irq2",5);
|
|
|
|
secprop->Add_int("dma1",3);
|
|
|
|
secprop->Add_int("dma2",3);
|
|
|
|
secprop->Add_string("ultradir","C:\\ULTRASND");
|
|
|
|
|
|
|
|
MSG_Add("GUS_CONFIGFILE_HELP",
|
|
|
|
"gus -- Enable the Gravis Ultrasound emulation.\n"
|
|
|
|
"base,irq1,irq2,dma1,dma2 -- The IO/IRQ/DMA addresses of the \n"
|
|
|
|
" Gravis Ultrasound. (Same IRQ's and DMA's are OK.)\n"
|
|
|
|
"rate -- Sample rate of Ultrasound emulation.\n"
|
|
|
|
"ultradir -- Path to Ultrasound directory. In this directory\n"
|
|
|
|
" there should be a MIDI directory that contains\n"
|
|
|
|
" the patch files for GUS playback. Patch sets used\n"
|
|
|
|
" with Timidity should work fine.\n"
|
|
|
|
);
|
|
|
|
|
2009-05-02 23:20:05 +02:00
|
|
|
secprop=control->AddSection_prop("speaker",&PCSPEAKER_Init);
|
2009-05-02 23:43:00 +02:00
|
|
|
secprop->Add_bool("pcspeaker",true);
|
2009-05-02 23:35:44 +02:00
|
|
|
secprop->Add_int("pcrate",22050);
|
2009-05-02 23:20:05 +02:00
|
|
|
secprop->AddInitFunction(&TANDYSOUND_Init);
|
2009-05-02 23:43:00 +02:00
|
|
|
secprop->Add_int("tandyrate",22050);
|
|
|
|
secprop->AddInitFunction(&DISNEY_Init);
|
|
|
|
secprop->Add_bool("disney",true);
|
|
|
|
|
2009-05-02 23:53:27 +02:00
|
|
|
MSG_Add("SPEAKER_CONFIGFILE_HELP",
|
2009-05-02 23:43:00 +02:00
|
|
|
"pcspeaker -- Enable PC-Speaker emulation.\n"
|
|
|
|
"pcrate -- Sample rate of the PC-Speaker sound generation.\n"
|
|
|
|
"tandyrate -- Sample rate of the Tandy 3-Voice generation.\n"
|
2009-05-03 00:02:15 +02:00
|
|
|
" Tandysound emulation is present if machine is set to tandy.\n"
|
2009-05-02 23:43:00 +02:00
|
|
|
"disney -- Enable Disney Sound Source emulation.\n"
|
|
|
|
);
|
2009-05-02 23:20:05 +02:00
|
|
|
secprop=control->AddSection_prop("bios",&BIOS_Init);
|
|
|
|
secprop->AddInitFunction(&INT10_Init);
|
|
|
|
|
|
|
|
/* All the DOS Related stuff, which will eventually start up in the shell */
|
|
|
|
//TODO Maybe combine most of the dos stuff in one section like ems,xms
|
|
|
|
secprop=control->AddSection_prop("dos",&DOS_Init);
|
|
|
|
secprop->AddInitFunction(&XMS_Init);
|
2009-05-02 23:43:00 +02:00
|
|
|
secprop->Add_bool("xms",true);
|
|
|
|
secprop->AddInitFunction(&EMS_Init);
|
|
|
|
secprop->Add_bool("ems",true);
|
2009-05-03 00:02:15 +02:00
|
|
|
MSG_Add("DOS_CONFIGFILE_HELP",
|
2009-05-02 23:43:00 +02:00
|
|
|
"xms -- Enable XMS support.\n"
|
|
|
|
"ems -- Enable EMS support.\n"
|
|
|
|
);
|
2009-05-02 23:35:44 +02:00
|
|
|
// Mscdex
|
|
|
|
secprop->AddInitFunction(&MSCDEX_Init);
|
2009-05-02 23:43:00 +02:00
|
|
|
#if C_MODEM
|
|
|
|
secprop=control->AddSection_prop("modem",&MODEM_Init);
|
2009-05-03 00:02:15 +02:00
|
|
|
secprop->Add_bool("modem",false);
|
2009-05-02 23:43:00 +02:00
|
|
|
secprop->Add_hex("comport",2);
|
|
|
|
secprop->Add_int("listenport",23);
|
|
|
|
|
|
|
|
MSG_Add("MODEM_CONFIGFILE_HELP",
|
|
|
|
"modem -- Enable virtual modem emulation.\n"
|
|
|
|
"comport -- COM Port modem is connected to.\n"
|
2009-05-03 00:02:15 +02:00
|
|
|
"listenport -- TCP Port the modem listens on for incoming connections.\n"
|
|
|
|
);
|
|
|
|
#endif
|
|
|
|
#if C_DIRECTSERIAL
|
|
|
|
secprop=control->AddSection_prop("directserial",&DIRECTSERIAL_Init);
|
|
|
|
secprop->Add_bool("directserial", false);
|
|
|
|
secprop->Add_hex("comport",1);
|
|
|
|
secprop->Add_string("realport", "COM1");
|
|
|
|
secprop->Add_int("defaultbps", 1200);
|
|
|
|
secprop->Add_string("parity", "N"); // Could be N, E, O
|
|
|
|
secprop->Add_int("bytesize", 8); // Could be 5 to 8
|
|
|
|
secprop->Add_int("stopbit", 1); // Could be 1 or 2
|
|
|
|
MSG_Add("DIRECTSERIAL_CONFIGFILE_HELP",
|
|
|
|
"directserial -- Enable serial passthrough support.\n"
|
|
|
|
"comport -- COM Port inside DOSBox.\n"
|
|
|
|
"realport -- COM Port on the Host.\n"
|
|
|
|
"defaultbps -- Default BPS.\n"
|
|
|
|
"parity -- Parity of the packets. This can be N, E or O.\n"
|
|
|
|
"bytesize -- Size of each packet. This can be 5 or 8.\n"
|
|
|
|
"stopbit -- The number of stopbits. This can be 1 or 2.\n"
|
|
|
|
);
|
|
|
|
#endif
|
|
|
|
#if C_IPX
|
|
|
|
secprop=control->AddSection_prop("ipx",&IPX_Init);
|
|
|
|
secprop->Add_bool("ipx", false);
|
|
|
|
MSG_Add("IPX_CONFIGFILE_HELP",
|
|
|
|
"ipx -- Enable ipx over UDP/IP emulation.\n"
|
2009-05-02 23:43:00 +02:00
|
|
|
);
|
|
|
|
#endif
|
2009-05-02 23:20:05 +02:00
|
|
|
secline=control->AddSection_line("autoexec",&AUTOEXEC_Init);
|
2009-05-02 23:43:00 +02:00
|
|
|
MSG_Add("AUTOEXEC_CONFIGFILE_HELP",
|
|
|
|
"Lines in this section will be run at startup.\n"
|
|
|
|
);
|
|
|
|
control->SetStartUp(&SHELL_Init);
|
2009-05-02 23:03:37 +02:00
|
|
|
}
|
|
|
|
|