DosBoxGUI   |   About   |   Screenshots


#!/boot/home/config/bin/yab

//##### Allgemeines ##### 

Programmname$="DosBox GUI"
Version$="0.91"
Versionsdatum$="04.11.2007"
Entwickler$="Christian Albrecht"
Nickname$="Lelldorin"
Url_Label$="BeSly Software Solutions"
Url_Text$="http://www.besly.de"

//##### Fensternamen #####
Hpt_Fenster$=Programmname$
Lade_Fenster$=""

//##### Bildschirmgröße #####
B_Breite = peek("desktopwidth")
B_Hoehe = peek("desktopheight")

//##### Fenstergröße #####

F_Hoehe1=((B_Hoehe/2)-315)
F_Hoehe2=((B_Hoehe/2)+315)

F_Breite1=((B_Breite/2)-270)
F_Breite2=((B_Breite/2)+270)

F_minBreite=540
F_maxBreite=540
F_minHoehe=630
F_maxHoehe=630

//##### Config Infos #####

machine$="VGA"
config$="/boot/apps/Emulators/DosBox/dosbox.conf"
Screenshot$="noscreen"

//##### check profile folder ######

filename$="/boot/apps/Emulators/DosBox/preview"
if(IfExists(filename$)) then
else
    Output$=system$("mkdir /boot/apps/Emulators/DosBox/preview")
endif

filename$="/boot/apps/Emulators/DosBox/config"
if(IfExists(filename$)) then
	create_default_config()
else
    Output$=system$("mkdir /boot/apps/Emulators/DosBox/config")
	create_default_config()
endif

filename$="/boot/apps/Emulators/DosBox/settings"
if(IfExists(filename$)) then
	create_dosboxgui_settings()
else
    Output$=system$("mkdir /boot/apps/Emulators/DosBox/settings")
	create_dosboxgui_settings()
endif


filename$="/boot/apps/Emulators/DosBox/profiles"
if(IfExists(filename$)) then
	Prg_Fenster()
else
    Output$=system$("mkdir /boot/apps/Emulators/DosBox/profiles")
	Prg_Fenster()
endif


dim part$(1)

inloop = true
while(inloop)

	msg$ = message$
	
	if (split(msg$, part$(), ":|") > 2) then
		PartOne$=part$(1)
		PartTwo$ = part$(2)
		PartThree$ = part$(3)
	fi
	
	if (split(msg$, part$(), ":|") > 3) then
		PartFour$ = part$(4)
	fi

	if (msg$ <> "") //print msg$
	
    switch msg$
	
	// DOSBox GUI
	
	case Programmname$+":_QuitRequested|"
		window close Programmname$
	break
	
	case Programmname$+":Program:Quit|"
		window close Programmname$
	break
	
	case "profiles:_Select:"+PartThree$+"|"
		profile_nr=val(PartThree$)
	break
	
	case "profiles:_Invoke:"+PartThree$+"|"
		Screenshot$="noscreen"
		profile_nr=0
		n=0
		i=0
		n = LISTBOX COUNT "profiles"
		for i=1 to n
			if(i=val(PartThree$))then
				Item$ = LISTBOX GET$ "profiles", i
				auslesen=open("/boot/apps/Emulators/DosBox/profiles/"+Item$, "r")
				x=0
				while (not EOF(auslesen))
   					x=x+1
	 				dim ProfileData$(x)
   				 	line input #auslesen b$
					ProfileData$(x)=b$
				wend
				CHECKBOX SET "ordner", val(ProfileData$(1))
				ordner_status=val(ProfileData$(1))
				TEXTCONTROL CLEAR "source_dir"
				TEXTCONTROL SET "source_dir", ProfileData$(2)
				CHECKBOX SET "datei", val(ProfileData$(3))
				datei_status=val(ProfileData$(3))
				TEXTCONTROL CLEAR "source_file"
				TEXTCONTROL SET "source_file", ProfileData$(4)
				CHECKBOX SET "exit", val(ProfileData$(5))
				CHECKBOX SET "command", val(ProfileData$(6))
				befehl_status=val(ProfileData$(6))
				TEXTCONTROL CLEAR "source_command"
				TEXTCONTROL SET "source_command", ProfileData$(7)
				CHECKBOX SET "fullscreen", val(ProfileData$(8))
				bildschirm_status=val(ProfileData$(8))
				CHECKBOX SET "config", val(ProfileData$(9))				
				TEXTCONTROL CLEAR "source_config"
				TEXTCONTROL SET "source_config", ProfileData$(10)
				CHECKBOX SET "lang", val(ProfileData$(11)) 		
				TEXTCONTROL CLEAR "source_lang"
				TEXTCONTROL SET "source_lang", ProfileData$(12)
				CHECKBOX SET "machine", val(ProfileData$(13))
				DROPBOX SELECT "dropbox_selectmachine", val(ProfileData$(14))
				if(ProfileData$(15)="noscreen")then
					VIEW REMOVE "View_ShowScreenshot"
					VIEW 0,0 TO 275,145, "View_ShowScreenshot", "View_ShowPreview"
					Buchstabe_Breite = DRAW GET "Text-Width", "0", "View_ShowScreenshot"
					Text_Breite = (23*Buchstabe_Breite/2)
					noscreen$="no screenshot available"
					DRAW TEXT 172-Text_Breite,70, "no screenshot available", "View_ShowScreenshot"
				else
					VIEW REMOVE "View_ShowScreenshot"
					VIEW 0,0 TO 275,145, "View_ShowScreenshot", "View_ShowPreview"
					err = DRAW IMAGE 60,5 TO 270,140, ProfileData$(15), "View_ShowScreenshot"
				endif
			endif
		next i
	break
		
	case "fullscreen:ON|"
		fullscreen$="on"
		bildschirm_status=1
	break
	
	case "fullscreen:OFF|"
		fullscreen$="off"
		bildschirm_status=0
	break
	
	case "config:ON|"
		config$="on"
		config_status=1
	break
	
	case "config:OFF|"
		config$="off"
		config_status=0
	break
	
	case "machine:ON|"
		machine_set$="on"
		machine_status=1
	break
	
	case "machine:OFF|"
		machine_set$="off"
		machine_status=0
	break
	
	case "command:ON|"
		command$="on"
		command_status=1
	break
	
	case "command:OFF|"
		command$="off"
		command_status=0
	break
	
	case "ordner:ON|"
		ordner_status=1
		datei_status=0
		from_folder=1
		from_file=0
		CHECKBOX SET "datei", 0
	break
	
	case "ordner:OFF|"
		ordner_status=0
		datei_status=1
		from_folder=0
		from_file=1
		CHECKBOX SET "datei", 1
	break
	
	case "datei:ON|"
		datei_status=1
		ordner_status=0
		from_folder=0
		from_file=1
		CHECKBOX SET "ordner", 0
	break
	
	case "datei:OFF|"
		datei_status=0
		ordner_status=1
		from_folder=1
		from_file=0
		CHECKBOX SET "ordner", 1
	break
	
	case "exit:ON|"
		exit$="on"
		exit_status=1
		CHECKBOX SET "exit", 1
	break
	
	case "exit:OFF|"
		exit$="off"
		exit_status=0
		CHECKBOX SET "exit", 0
	break
	
	case "lang:ON|"
		lang$="on"
		lang_status=1
	break
	
	case "lang:OFF|"
		lang$="off"
		lang_status=0
	break
	
	case "select_dir|"
		directory$ = FILEPANEL "Load-Directory", "Select Directory", "/boot/home"
		TEXTCONTROL CLEAR "source_dir"
		TEXTCONTROL SET "source_dir", directory$
		ordner_status=1
	break
	
	case "select_file|"
		file$ = FILEPANEL "Load-File", "Select File", "/boot/home"
		TEXTCONTROL CLEAR "source_file"
		TEXTCONTROL SET "source_file", file$
		file_status=1
	break
	
	case "select_conf|"
		conf$ = FILEPANEL "Load-File", "Select File", "/boot/apps/Emulators/DosBox"
		TEXTCONTROL CLEAR "source_config"
		TEXTCONTROL SET "source_config", conf$
	break
	
	case "dropbox_selectmachine:"+PartTwo$+"|"
		machine$=PartTwo$
	break
	
	case Programmname$+":Settings:Profile:Save|"
		if(Screenshot$="")then
			Screenshot$="noscreen"
		endif
		save_profile()
	break
	
	case "save|"
		save_profile()
	break
	
	case Programmname$+":Settings:Profile:Delete|"
		if(profile_nr=0)then
		else
			ToDelete$ = LISTBOX GET$ "profiles", profile_nr
			Output$=system$("rm /boot/apps/Emulators/DosBox/profiles/"+"\""+ToDelete$+"\"")
			LISTBOX CLEAR "profiles"
			read_profile()
		endif
	break
	
	case "clear|"
		machine$="VGA"
		config$="/boot/apps/Emulators/DosBox/dosbox.conf"
		CHECKBOX SET "ordner", 1
		TEXTCONTROL CLEAR "source_dir"
		CHECKBOX SET "datei", 0
		TEXTCONTROL CLEAR "source_file"
		DROPBOX SELECT "dropbox_selectmachine", 1
		TEXTCONTROL CLEAR "source_config"
		TEXTCONTROL SET "source_config", config$
		CHECKBOX SET "fullscreen", 0
		CHECKBOX SET "command", 0
		CHECKBOX SET "lang", 0
		TEXTCONTROL CLEAR "source_lang"
		CHECKBOX SET "config", 0
		CHECKBOX SET "machine", 0
		CHECKBOX SET "exit", 0
		TEXTCONTROL CLEAR "source_command"
	break
	
	case "start|"
		Datei$="/boot/apps/Emulators/DosBox/dosbox "
		if(ordner_status=1)then
			start_directory$ = TEXTCONTROL GET$ "source_dir"
			Datei$=Datei$+" "+start_directory$
			//print Datei$
		endif
		if(datei_status=1)then
			start_file$ = TEXTCONTROL GET$ "source_file"
			Datei$=Datei$+" "+start_file$
			//print Datei$
		endif
		if(exit_status=1)then
			Datei$=Datei$+" -exit"
			//print Datei$
		endif
		if(befehl_status=1)then
			start_command$= TEXTCONTROL GET$ "source_command"
			Datei$=Datei$+" -c "+start_command$
			//print Datei$
		endif
		if(bildschirm_status=1)then
			Datei$=Datei$+" -fullscreen"
			//print Datei$
		endif
		if(config_status=1)then
			start_config$= TEXTCONTROL GET$ "source_config"
			Datei$=Datei$+" -conf "+start_config$
			//print Datei$
		endif
		if(machine_status=1)then
			if(machine$="VGA")then
				start_machine$="vga"
			elseif(machine$="CGA")then
				start_machine$="cga"
			elseif(machine$="Hercules")then
				start_machine$="hercules"
			elseif(machine$="Tandy")then
				start_machine$="tandy"
			endif
			Datei$=Datei$+" -machine "+start_machine$
			//print Datei$
		endif
		//print Datei$
		Output$=system$(Datei$)
	break
	
	case Programmname$+":Program:About|"
		about()
	break
	
	case "close|"
		window close "View_About"
	break
	
	case "info_dir|"
		TEXTEDIT CLEAR "help"
		TEXTEDIT ADD "help", "Starts DOSBox using selected Directory as hardrive C:"
	break
	
	case "info_file|"
		TEXTEDIT CLEAR "help"
		TEXTEDIT ADD "help", "Starts to emulated application directly."
	break
	
	case "info_command|"
		TEXTEDIT CLEAR "help"
		TEXTEDIT ADD "help", "Runs the specified command before running the selected Application or Folder. Multiple commands can be specified. A command can be: an Internal Program, a DOS command or an executable on a mounted drive."
	break
	
	case "info_config|"
		TEXTEDIT CLEAR "help"
		TEXTEDIT ADD "help", "Start DOSBox with the options specified in configfile."
	break
	
	case "info_lang|"
		TEXTEDIT CLEAR "help"
		TEXTEDIT ADD "help", "Start DOSBox using the language specified in languagefile."
	break
	
	case "info_machine|"
		TEXTEDIT CLEAR "help"
		TEXTEDIT ADD "help", "Setup DOSBox to emulate a specific type of machine. Valid choices are:hercules, cga, tandy, vga (default). The machinetype has influence on both the videocard and the available soundcards."
	break
	
	case "info_fullscreen|"
		TEXTEDIT CLEAR "help"
		TEXTEDIT ADD "help", "Starts DOSBox in fullscreen mode."
	break
	
	case "info_exit|"
		TEXTEDIT CLEAR "help"
		TEXTEDIT ADD "help", "DOSBox will close itself when the DOS application ends."
	break
	
	case "screenshot_info|"
		TEXTEDIT CLEAR "help"
		TEXTEDIT ADD "help", "Select a Screenshot.\nThe Screenshot need to be a size of max. 210 x 132 pixel."
	break
	
	// Config Generator
	
	case "DosBox GUI:Extras:ConfigGenerator|"
		Configurator()
	break
	
	case "ConfigGen:_QuitRequested|"
		window close "ConfigGen"
	break
	
	case "mapperfile_file|"
		mapperfile_set$ = FILEPANEL "Load-File", "Select File", "/boot/home"
		TEXTCONTROL CLEAR "mapperfile"
		TEXTCONTROL SET "mapperfile", mapperfile_set$
	break
	
	case "language_file|"
		language_set$ = FILEPANEL "Load-File", "Select File", "/boot/home"
		TEXTCONTROL CLEAR "language"
		TEXTCONTROL SET "language", language_set$
	break
	
	case "captures_file|"
		captures_set$ = FILEPANEL "Load-Directory", "Select File", "/boot/home"
		TEXTCONTROL CLEAR "captures"
		TEXTCONTROL SET "captures", captures_set$
	break
	
	case "midiconfig_file|"
		midiconfig_set$ = FILEPANEL "Load-File", "Select File", "/boot/home"
		TEXTCONTROL CLEAR "midiconfig"
		TEXTCONTROL SET "midiconfig", midiconfig_set$
	break
	
	case "screenshot_file|"
		Screenshot$ = FILEPANEL "Load-File", "Select Screenshot", "/boot/home"
		VIEW REMOVE "View_ShowScreenshot"
			VIEW 0,0 TO 275,145, "View_ShowScreenshot", "View_ShowPreview"
			err = DRAW IMAGE 60,5 TO 270,140, Screenshot$, "View_ShowScreenshot"
	break
	
	case "fullscreen_info|"
		TEXTEDIT CLEAR "help2"
		TEXTEDIT ADD "help2", "Start dosbox directly in fullscreen."
	break
	
	case "fulldouble_info|"
		TEXTEDIT CLEAR "help2"
		TEXTEDIT ADD "help2", "Use double buffering in fullscreen."
	break
	
	case "fullfixed_info|"
		TEXTEDIT CLEAR "help2"
		TEXTEDIT ADD "help2", "Don't resize the screen when in fullscreen."
	break
	
	case "fullresolution_info|"	
		TEXTEDIT CLEAR "help2"
		TEXTEDIT ADD "help2", "What resolution to use for fullscreen, use together with fullfixed."
	break
	
	case "output_info|"
		TEXTEDIT CLEAR "help2"
		TEXTEDIT ADD "help2", "What to use for output: surface,overlay,opengl,openglnb."
	break
	
	case "hwscale_info|"
		TEXTEDIT CLEAR "help2"
		TEXTEDIT ADD "help2", "Extra scaling of window if the output device supports hardware scaling."
	break
	
	case "autolock_info|"
		TEXTEDIT CLEAR "help2"
		TEXTEDIT ADD "help2", "Mouse will automatically lock, if you click on the screen."
	break
	
	case "sensitivity_info|"
		TEXTEDIT CLEAR "help2"
		TEXTEDIT ADD "help2", "Mouse sensitivity"
	break
	
	case "waitonerror_info|"
		TEXTEDIT CLEAR "help2"
		TEXTEDIT ADD "help2", "Wait before closing the console if dosbox has an error."
	break
	
	case "priority_info|"
		TEXTEDIT CLEAR "help2"
		TEXTEDIT ADD "help2", "Priority levels for dosbox: lower,normal,higher,highest. Second entry behind the comma is for when dosbox is not focused/minimized."
	break
	
	case "mapperfile_info|"
		TEXTEDIT CLEAR "help2"
		TEXTEDIT ADD "help2", "File used to load/save the key/event mappings from."
	break
	
	case "language_info|"
		TEXTEDIT CLEAR "help2"
		TEXTEDIT ADD "help2", "Select another language file."
	break
	
	case "machine_info|"
		TEXTEDIT CLEAR "help2"
		TEXTEDIT ADD "help2", "The type of machine tries to emulate:hercules,cga,tandy,vga."
	break
	
	case "captures_info|"
		TEXTEDIT CLEAR "help2"
		TEXTEDIT ADD "help2", "Directory where things like wave,midi,screenshot get captured."
	break
	
	case "memsize_info|"
		TEXTEDIT CLEAR "help2"
		TEXTEDIT ADD "help2", "Amount of memory dosbox has in megabytes."
	break
	
	case "frameskip_info|"
		TEXTEDIT CLEAR "help2"
		TEXTEDIT ADD "help2", "How many frames dosbox skips before drawing one."
	break
	
	case "aspect_info|"
		TEXTEDIT CLEAR "help2"
		TEXTEDIT ADD "help2", "Do aspect correction."
	break
	
	case "scaler_info|"
		TEXTEDIT CLEAR "help2"
		TEXTEDIT ADD "help2", "Scaler used to enlarge/enhance low resolution modes. Supported are: none,normal2x,advmame2x,advmame3x,advinterp2x,interp2x,tv2x."
	break
	
	case "core_info|"
		TEXTEDIT CLEAR "help2"
		TEXTEDIT ADD "help2", "CPU Core used in emulation: simple,normal,full,dynamic."
	break
	
	case "cycles_info|"
		TEXTEDIT CLEAR "help2"
		TEXTEDIT ADD "help2", "Amount of instructions dosbox tries to emulate each 	millisecond. Setting this higher than your machine can handle is bad!"
	break
	
	case "cycleup_info|"
		TEXTEDIT CLEAR "help2"
		TEXTEDIT ADD "help2", "Amount of cycles to increase/decrease with keycombo."
	break
	
	case "cycledown_info|"
		TEXTEDIT CLEAR "help2"
		TEXTEDIT ADD "help2", "Setting it lower than 100 will be a percentage."
	break
	
	case "nosound_info|"
		TEXTEDIT CLEAR "help2"
		TEXTEDIT ADD "help2", "Enable silent mode, sound is still emulated though."
	break
	
	case "rate_info|"
		TEXTEDIT CLEAR "help2"
		TEXTEDIT ADD "help2", "Mixer sample rate, setting any devices higher than this will probably lower their sound quality."
	break
	
	case "blocksize_info|"
		TEXTEDIT CLEAR "help2"
		TEXTEDIT ADD "help2", "Mixer block size, larger blocks might help sound stuttering but sound will also be more lagged."
	break
	
	case "prebuffer_info|"
		TEXTEDIT CLEAR "help2"
		TEXTEDIT ADD "help2", "How many milliseconds of data to keep on top of the blocksize."
	break
	
	case "mpu401_info|"
		TEXTEDIT CLEAR "help2"
		TEXTEDIT ADD "help2", "Enable MPU-401 Emulation."
	break
	
	case "midi_intelligent_info|"
		TEXTEDIT CLEAR "help2"
		TEXTEDIT ADD "help2", "Operate in Intelligent mode."
	break
	
	case "midi_device_info|"
		TEXTEDIT CLEAR "help2"
		TEXTEDIT ADD "help2", "Device that will receive the MIDI data from MPU-401. This can be default,alsa,oss,win32,coreaudio,none."
	break
	
	case "midiconfig_info|"
		TEXTEDIT CLEAR "help2"
		TEXTEDIT ADD "help2", "Special configuration options for the device."
	break
	
	case "sb_type_info|"
		TEXTEDIT CLEAR "help2"
		TEXTEDIT ADD "help2", "Type of sblaster to emulate:none,sb1,sb2,sbpro1,sbpro2,sb16."
	break
	
	case "sb_base_info|"
		TEXTEDIT CLEAR "help2"
		TEXTEDIT ADD "help2", "The IO address of the soundblaster."
	break
	
	case "sb_irq_info|"
		TEXTEDIT CLEAR "help2"
		TEXTEDIT ADD "help2", "The IRQ address of the soundblaster."
	break
	
	case "sb_dma_info|"
		TEXTEDIT CLEAR "help2"
		TEXTEDIT ADD "help2", "The DMA address of the soundblaster."
	break
	
	case "sb_hdma_info|"
		TEXTEDIT CLEAR "help2"
		TEXTEDIT ADD "help2", "The High DMA address of the soundblaster."
	break
	
	case "sb_mixer_info|"
		TEXTEDIT CLEAR "help2"
		TEXTEDIT ADD "help2", "Allow the soundblaster mixer to modify the dosbox mixer."
	break
	
	case "sb_oplmode_info|"
		TEXTEDIT CLEAR "help2"
		TEXTEDIT ADD "help2", "Type of OPL emulation: auto,cms,opl2,dualopl2,opl3. On auto 	the mode is determined by sblaster type."
	break
	
	case "sb_oplrate_info|"
		TEXTEDIT CLEAR "help2"
		TEXTEDIT ADD "help2", "Sample rate of OPL music emulation."
	break
	
	case "gus_info|"
		TEXTEDIT CLEAR "help2"
		TEXTEDIT ADD "help2", "Enable the Gravis Ultrasound emulation."
	break
	
	case "gus_rate_info|"
		TEXTEDIT CLEAR "help2"
		TEXTEDIT ADD "help2", "Sample rate of Ultrasound emulation."
	break
	
	case "gus_base_info|"
		TEXTEDIT CLEAR "help2"
		TEXTEDIT ADD "help2", "The IO addresses of the Gravis Ultrasound (Same IRQ's and DMA's are OK.)."
	break
	
	case "gus_irq1_info|"
		TEXTEDIT CLEAR "help2"
		TEXTEDIT ADD "help2", "The IO addresses of the Gravis Ultrasound (Same IRQ's and DMA's are OK.)."
	break
	
	case "gus_irq2_info|"
		TEXTEDIT CLEAR "help2"
		TEXTEDIT ADD "help2", "The IO addresses of the Gravis Ultrasound (Same IRQ's and DMA's are OK.)."
	break
	
	case "gus_dma1_info|"
		TEXTEDIT CLEAR "help2"
		TEXTEDIT ADD "help2", "The IO addresses of the Gravis Ultrasound. (Same IRQ's and DMA's are OK.)"
	break
	
	case "gus_dma2_info|"
		TEXTEDIT CLEAR "help2"
		TEXTEDIT ADD "help2", "The IO addresses of the Gravis Ultrasound (Same IRQ's and DMA's are OK.)."
	break
	
	case "gus_ultradir_info|"
		TEXTEDIT CLEAR "help2"
		TEXTEDIT ADD "help2", "Path to Ultrasound directory. In this directory there should be a MIDI directory that contains  the patch files for GUS playback. Patch sets used with Timidity should work fine."
	break
	
	case "pcspeaker_info|"
		TEXTEDIT CLEAR "help2"
		TEXTEDIT ADD "help2", "Enable PC-Speaker emulation."
	break
	
	case "pcrate_info|"
		TEXTEDIT CLEAR "help2"
		TEXTEDIT ADD "help2", "Sample rate of the PC-Speaker sound generation."
	break
	
	case "tandyrate_info|"
		TEXTEDIT CLEAR "help2"
		TEXTEDIT ADD "help2", "Sample rate of the Tandy 3-Voice generation. Tandysound emulation is present if machine is set to tandy."
	break
	
	case "disney_info|"
		TEXTEDIT CLEAR "help2"
		TEXTEDIT ADD "help2", "Enable Disney Sound Source emulation."
	break
	
	case "xms_info|"
		TEXTEDIT CLEAR "help2"
		TEXTEDIT ADD "help2", "Enable XMS support."
	break
	
	case "ems_info|"
		TEXTEDIT CLEAR "help2"
		TEXTEDIT ADD "help2", "Enable EMS support."
	break
	
	case "modem_info|"
		TEXTEDIT CLEAR "help2"
		TEXTEDIT ADD "help2", "Enable virtual modem emulation."
	break
	
	case "comport_info|"
		TEXTEDIT CLEAR "help2"
		TEXTEDIT ADD "help2", "COM Port modem is connected to."
	break
		
	case "listenport_info|"
		TEXTEDIT CLEAR "help2"
		TEXTEDIT ADD "help2", "TCP Port the modem listens on for incoming connections."
	break
	
	case "ipx_info|"
		TEXTEDIT CLEAR "help2"
		TEXTEDIT ADD "help2", "Enable ipx over UDP/IP emulation."
	break
	
	case "autoexe_info|"
		TEXTEDIT CLEAR "help2"
		TEXTEDIT ADD "help2", "Lines in this section will be run at startup."
	break
		
	case "ConfigGen:Generator:Load|"
		fileload$ = FILEPANEL "Load-File", "Load config file", "/boot/apps/Emulators/DosBox/config"
		auslesen_config()
	break
	
	case "ConfigGen:Generator:Delete|"
		fileload$ = FILEPANEL "Load-File", "Load config file", "/boot/apps/Emulators/DosBox/config"
		Output$=system$("rm "+"\""+fileload$+"\"")
	break
	
	case "ConfigGen:Generator:Save|" 
		save_generator_config()
	break
	
	case "sensitivity:"+PartTwo$+"|"
		TEXTCONTROL SET "mouse_show", PartTwo$
	break
	
	case "frameskip:"+PartTwo$+"|"
		TEXTCONTROL SET "frameskip_show", PartTwo$
	break
	
	case "cycles:"+PartTwo$+"|"
		TEXTCONTROL SET "cycles_show", PartTwo$
	break
	
	case "cycleup:"+PartTwo$+"|"
		TEXTCONTROL SET "cycleup_show", PartTwo$
	break
	
	case "cycledown:"+PartTwo$+"|"
		TEXTCONTROL SET "cycledown_show", PartTwo$
	break
	
	case "rate:"+PartTwo$+"|"
		TEXTCONTROL SET "rate_show", PartTwo$
	break
	
	case "blocksize:"+PartTwo$+"|"
		TEXTCONTROL SET "blocksize_show", PartTwo$
	break
	
	case "prebuffer:"+PartTwo$+"|"
		TEXTCONTROL SET "prebuffer_show", PartTwo$
	break
	
	case "sblaster_oplrate:"+PartTwo$+"|"
		TEXTCONTROL SET "oplrate_show", PartTwo$
	break
	
	case "gus_rate:"+PartTwo$+"|"
		TEXTCONTROL SET "gus_rate_show", PartTwo$
	break
	
	case "pcrate:"+PartTwo$+"|"
		TEXTCONTROL SET "pcrate_show", PartTwo$
	break
	
	case "tandyrate:"+PartTwo$+"|"
		TEXTCONTROL SET "tandyrate_show", PartTwo$
	break
	
	case PartOne$+":"+PartTwo$+"|"
	
		//sdl
		if(PartTwo$="true")then
			DPNr=1
		elseif(PartTwo$="false")then
			DPNr=2
		elseif(PartTwo$="lower,lower")then
			DPNr=1
		elseif(PartTwo$="lower,normal")then
			DPNr=2
		elseif(PartTwo$="lower,higher")then
			DPNr=3
		elseif(PartTwo$="lower,highest")then
			DPNr=4
		elseif(PartTwo$="normal,lower")then
			DPNr=5
		elseif(PartTwo$="normal,normal")then
			DPNr=6
		elseif(PartTwo$="normal,higher")then
			DPNr=7
		elseif(PartTwo$="normal,highest")then
			DPNr=8
		elseif(PartTwo$="higher,lower")then
			DPNr=9
		elseif(PartTwo$="higher,normal")then
			DPNr=10
		elseif(PartTwo$="higher,higher")then
			DPNr=11
		elseif(PartTwo$="higher,highest")then
			DPNr=12
		elseif(PartTwo$="highest,lower")then
			DPNr=13
		elseif(PartTwo$="highest,normal")then
			DPNr=14
		elseif(PartTwo$="highest,higher")then
			DPNr=15
		elseif(PartTwo$="highest,highest")then
			DPNr=16
		elseif(PartTwo$="640x480")then
			DPNr=1
		elseif(PartTwo$="720x576")then
			DPNr=2
		elseif(PartTwo$="768x576")then
			DPNr=3
		elseif(PartTwo$="800x600")then
			DPNr=4
		elseif(PartTwo$="1024x768")then
			DPNr=5
		elseif(PartTwo$="1152x864")then
			DPNr=6
		elseif(PartTwo$="1250x1024")then
			DPNr=7
		elseif(PartTwo$="1600x1200")then
			DPNr=8
		elseif(PartTwo$="surface")then
			DPNr=1
		elseif(PartTwo$="overlay")then
			DPNr=2
		elseif(PartTwo$="opengl")then
			DPNr=3
		elseif(PartTwo$="openglnb")then
			DPNr=4
		elseif(PartTwo$="1.00")then
			DPNr=1
		elseif(PartTwo$="2.00")then
			DPNr=2
		elseif(PartTwo$="3.00")then
			DPNr=3
		elseif(PartTwo$="4.00")then
			DPNr=4
		//dosbox
		elseif(PartTwo$="vga")then
			DPNr=1
		elseif(PartTwo$="cga")then
			DPNr=2
		elseif(PartTwo$="hercules")then
			DPNr=3
		elseif(PartTwo$="tandy")then
			DPNr=4
		elseif(PartTwo$="4")then
			if(PartOne$="memsize")then
				DPNr=1
			else
				DPNr=4
			endif
		elseif(PartTwo$="8")then
			if(PartOne$="memsize")then
				DPNr=2
			else
				DPNr=8
			endif
		elseif(PartTwo$="16")then
			DPNr=3
		elseif(PartTwo$="32")then
			DPNr=4
		elseif(PartTwo$="64")then
			DPNr=5
		//render
		elseif(PartTwo$="none")then
			if(PartOne$="midi_device")then
				DPNr=6
			elseif(PartOne$="scaler")then
				DPNr=1
			endif
		elseif(PartTwo$="normal2x")then
			DPNr=2
		elseif(PartTwo$="advmame2x")then
			DPNr=3
		elseif(PartTwo$="advmame3x")then
			DPNr=4
		elseif(PartTwo$="advinterp2x")then
			DPNr=5
		elseif(PartTwo$="interp2x")then
			DPNr=6
		elseif(PartTwo$="tv2x")then
			DPNr=7
		//cpu
		elseif(PartTwo$="simple")then
			DPNr=1
		elseif(PartTwo$="normal")then
			DPNr=2
		elseif(PartTwo$="full")then
			DPNr=3
		elseif(PartTwo$="dynamic")then
			DPNr=4
		//mixer
		elseif(PartTwo$="default")then
			DPNr=1
		elseif(PartTwo$="alsa")then
			DPNr=2
		elseif(PartTwo$="oss")then
			DPNr=3
		elseif(PartTwo$="win32")then
			DPNr=4
		elseif(PartTwo$="coreaudio")then
			DPNr=5
		//sblaster
		elseif(PartTwo$="sb1")then
			DPNr=2
		elseif(PartTwo$="sb2")then
			DPNr=3
		elseif(PartTwo$="sbpro1")then
			DPNr=4
		elseif(PartTwo$="sbpro2")then
			DPNr=5
		elseif(PartTwo$="sb16")then
			DPNr=6
		elseif(PartTwo$="220")then
			DPNr=1
		elseif(PartTwo$="240")then
			DPNr=2
		elseif(PartTwo$="1")then
			DPNr=1
		elseif(PartTwo$="2")then
			DPNr=2
		elseif(PartTwo$="3")then
			DPNr=3
		elseif(PartTwo$="4")then
			DPNr=4
		elseif(PartTwo$="5")then
			DPNr=5
		elseif(PartTwo$="6")then
			DPNr=6
		elseif(PartTwo$="7")then
			DPNr=7
		elseif(PartTwo$="8")then
			DPNr=8
		elseif(PartTwo$="9")then
			DPNr=9
		elseif(PartTwo$="10")then
			DPNr=10
		elseif(PartTwo$="auto")then
			DPNr=1
		elseif(PartTwo$="cms")then
			DPNr=2
		elseif(PartTwo$="opl2")then
			DPNr=3
		elseif(PartTwo$="dualopl2")then
			DPNr=4
		elseif(PartTwo$="opl3")then
			DPNr=5		
		//gus - keine Angaben, da identische Werte wie oben
		//speaker - keine Angaben, da identische Werte wie oben
		//dos - keine Angaben, da identische Werte wie oben
		//modem - keine Angaben, da identische Werte wie oben
		//ipx - keine Angaben, da identische Werte wie oben
		endif

		//sdl
		if(PartOne$="fullscreen")then
			fullscreen_save$=DROPBOX GET$ PartOne$, DPNr
			//print fullscreen_save$
		elseif(PartOne$="fulldouble")then
			fulldouble_save$=DROPBOX GET$ PartOne$, DPNr
			//print fulldouble_save$
		elseif(PartOne$="fullfixed")then
			fullfixed_save$=DROPBOX GET$ PartOne$, DPNr
			//print fullfixed_save$
		elseif(PartOne$="fullresolution")then
			fullresolution_save$=DROPBOX GET$ PartOne$, DPNr
			//print fullresolution_save$
		elseif(PartOne$="output")then
			output_save$=DROPBOX GET$ PartOne$, DPNr
			//print output_save$
		elseif(PartOne$="hwscale")then
			hwscale_save$=DROPBOX GET$ PartOne$, DPNr
			//print hwscale_save$
		elseif(PartOne$="autolock")then
			autolock_save$=DROPBOX GET$ PartOne$, DPNr
			//print autolock_save$
		elseif(PartOne$="waitonerror")then
			waitonerror_save$=DROPBOX GET$ PartOne$, DPNr
			//print waitonerror_save$
		elseif(PartOne$="priority")then
			priority_save$=DROPBOX GET$ PartOne$, DPNr
			//print priority_save$
		//dosbox
		elseif(PartOne$="machine")then
			machine_save$=DROPBOX GET$ PartOne$, DPNr
			//print machine_save$
		elseif(PartOne$="memsize")then
			memsize_save$=DROPBOX GET$ PartOne$, DPNr
			//print memsize_save$
		//render
		elseif(PartOne$="aspect")then
			aspect_save$=DROPBOX GET$ PartOne$, DPNr
			//print aspect_save$
		elseif(PartOne$="scaler")then
			scaler_save$=DROPBOX GET$ PartOne$, DPNr
			//print scaler_save$
		//cpu
		elseif(PartOne$="core")then
			core_save$=DROPBOX GET$ PartOne$, DPNr
			//print core_save$
		//mixer
		elseif(PartOne$="nosound")then
			nosound_save$=DROPBOX GET$ PartOne$, DPNr
			//print nosound_save$
		//midi
		elseif(PartOne$="mpu401")then
			mpu401_save$=DROPBOX GET$ PartOne$, DPNr
			//print mpu401_save$
		elseif(PartOne$="midi_intelligent")then
			midi_intelligent_save$=DROPBOX GET$ PartOne$, DPNr
			//print midi_intelligent_save$
		elseif(PartOne$="midi_device")then
			midi_device_save$=DROPBOX GET$ PartOne$, DPNr
			//print midi_device_save$
		//sblaster
		elseif(PartOne$="sb_type")then
			sb_type_save$=DROPBOX GET$ PartOne$, DPNr
			//print sb_type_save$
		elseif(PartOne$="sb_base")then
			sb_base_save$=DROPBOX GET$ PartOne$, DPNr
			//print sb_base_save$
		elseif(PartOne$="sb_irq")then
			sb_irq_save$=DROPBOX GET$ PartOne$, DPNr
			//print sb_irq_save$	
		elseif(PartOne$="sb_dma")then
			sb_dma_save$=DROPBOX GET$ PartOne$, DPNr
			//print sb_dma_save$
		elseif(PartOne$="sb_hdma")then
			sb_hdma_save$=DROPBOX GET$ PartOne$, DPNr
			//print sb_hdma_save$	
		elseif(PartOne$="sb_mixer")then
			sb_mixer_save$=DROPBOX GET$ PartOne$, DPNr
			//print sb_mixer_save$
		elseif(PartOne$="sb_oplmode")then
			sb_oplmode_save$=DROPBOX GET$ PartOne$, DPNr
			//print sb_oplmode_save$
		//gus
		elseif(PartOne$="gus")then
			gus_save$=DROPBOX GET$ PartOne$, DPNr
			//print gus_save$
		elseif(PartOne$="gus_base")then
			gus_base_save$=DROPBOX GET$ PartOne$, DPNr
			//print gus_base_save$
		elseif(PartOne$="gus_irq1")then
			gus_irq1_save$=DROPBOX GET$ PartOne$, DPNr
			//print gus_irq1_save$
		elseif(PartOne$="gus_irq2")then
			gus_irq2_save$=DROPBOX GET$ PartOne$, DPNr
			//print gus_irq2_save$	
		elseif(PartOne$="gus_dma1")then
			gus_dma1_save$=DROPBOX GET$ PartOne$, DPNr
			//print gus_dma1_save$
		elseif(PartOne$="gus_dma2")then
			gus_dma2_save$=DROPBOX GET$ PartOne$, DPNr
			//print gus_dma2_save$
		//speaker
		elseif(PartOne$="pcspeaker")then
			pcspeaker_save$=DROPBOX GET$ PartOne$, DPNr
			//print pcspeaker_save$
		elseif(PartOne$="disney")then
			disney_save$=DROPBOX GET$ PartOne$, DPNr
			//print disney_save$
		//dos
		elseif(PartOne$="xms")then
			xms_save$=DROPBOX GET$ PartOne$, DPNr
			//print xms_save$
		elseif(PartOne$="ems")then
			ems_save$=DROPBOX GET$ PartOne$, DPNr
			//print ems_save$
		//modem
		elseif(PartOne$="modem")then
			modem_save$=DROPBOX GET$ PartOne$, DPNr
			//print modem_save$
		elseif(PartOne$="comport")then
			comport_save$=DROPBOX GET$ PartOne$, DPNr
			//print comport_save$
		//ipx
		elseif(PartOne$="ipx")then
			ipx_save$=DROPBOX GET$ PartOne$, DPNr
			//print ipx_save$
		endif
	break
	
	
	default:

	end switch

	if(window count<1) inloop = false
	sleep 0.1
wend

// DOSBox GUI

sub Prg_Fenster()
	window open F_Breite1,F_Hoehe1 to F_Breite2,F_Hoehe2, Hpt_Fenster$, Programmname$
	window set Programmname$, "flags", "not-zoomable, not-h-resizable, not-v-resizable"
		window set Hpt_Fenster$, "MinimumTo", F_minBreite,F_minHoehe
		window set Hpt_Fenster$, "MaximumTo", F_maxBreite,F_maxHoehe
		
	menu "Program", "About", "", Hpt_Fenster$
	menu "Program", "Quit", "", Hpt_Fenster$
		submenu "Settings", "Profile", "Save", "", Hpt_Fenster$
		submenu "Settings", "Profile", "--", "", Hpt_Fenster$
		submenu "Settings", "Profile", "Delete", "", Hpt_Fenster$
	menu "Extras", "ConfigGenerator", "", Hpt_Fenster$
	
	menu set "Program", "Help", "Disable", Hpt_Fenster$
	menu set "Program", "Documentation", "Disable", Hpt_Fenster$
	menu set "Settings", "GUI", "Disable", Hpt_Fenster$
		
	BOXVIEW 10,30 TO 175,495, "View_SelectProfile", "Profiles", 2, Hpt_Fenster$
		LISTBOX 8,5 TO 152,440, "profiles", 3, "View_SelectProfile"
		
	BOXVIEW 185,30 TO 530,105, "View_SelectFile", "Source", 2, Hpt_Fenster$
		CHECKBOX 5,5, "ordner", "Directory", 0, "View_SelectFile"
		CHECKBOX SET "ordner", 1
		TEXTCONTROL 85,7 to 275,17, "source_dir", "","","View_SelectFile"
			BUTTON 280,5 TO 305,10, "select_dir", "v", "View_SelectFile"
			BUTTON 310,5 TO 335,10, "info_dir", "i", "View_SelectFile"
		CHECKBOX 5,30, "datei", "File", 0, "View_SelectFile"
		TEXTCONTROL 85,32 to 275,47, "source_file", "","","View_SelectFile"
			BUTTON 280,30 TO 305,35, "select_file", "v", "View_SelectFile"
			BUTTON 310,30 TO 335,35, "info_file", "i", "View_SelectFile"
			
	BOXVIEW 185,115 TO 530,165, "View_SelectCommand", "Command", 2, Hpt_Fenster$
		CHECKBOX 5,5, "command", "", 0, "View_SelectCommand"
		TEXTCONTROL 20,7 to 305,17, "source_command", "", "", "View_SelectCommand"
		BUTTON 310,5 TO 335,10, "info_command", "i", "View_SelectCommand"
			
	BOXVIEW 185,175 TO 530,325, "View_SelectConfig", "Configuration", 2, Hpt_Fenster$
		CHECKBOX 5,5, "config", "Config.", 0, "View_SelectConfig"
		TEXTCONTROL 85,7 to 275,17, "source_config", "", config$, "View_SelectConfig"
			BUTTON 280,5 TO 305,15, "select_conf", "v", "View_SelectConfig"
			BUTTON 310,5 TO 335,10, "info_config", "i", "View_SelectConfig"	
		CHECKBOX 5,30, "lang", "Language", 0, "View_SelectConfig"
		TEXTCONTROL 85,32 to 275,42, "source_lang", "", lang$, "View_SelectConfig"
			BUTTON 280,30 TO 305,40, "select_lang", "v", "View_SelectConfig"
			BUTTON 310,30 TO 335,40, "info_lang", "i", "View_SelectConfig"
			
		CHECKBOX 5,55, "machine", "Machine", 0, "View_SelectConfig"
		DROPBOX 89,57 TO 276,67, "dropbox_selectmachine", "", "View_SelectConfig"
			dropbox add "dropbox_selectmachine", "VGA"
			dropbox add "dropbox_selectmachine", "CGA"
			dropbox add "dropbox_selectmachine", "Hercules"
			dropbox add "dropbox_selectmachine", "Tandy"
		BUTTON 310,55 TO 335,65, "info_machine", "i", "View_SelectConfig"
		CHECKBOX 5,80, "fullscreen", "Fullscreen", 0, "View_SelectConfig"
			DRAW TEXT 100, 96, "(Shortcut: Alt + Enter)", "View_SelectConfig"
			BUTTON 310,80 TO 335,90, "info_fullscreen", "i", "View_SelectConfig"
		CHECKBOX 5,105, "exit", "Exit DOSBox if emulated Application ends?", 0, "View_SelectConfig"
			BUTTON 310,105 TO 335,115, "info_exit", "i", "View_SelectConfig"
		
	BOXVIEW 185,335 TO 530,495, "View_ShowPreview", "Preview", 2, Hpt_Fenster$
		VIEW 0,0 TO 275,145, "View_ShowScreenshot", "View_ShowPreview"
		BUTTON 280,115 TO 305,125, "screenshot_file", "v", "View_ShowPreview"
		BUTTON 310,115 TO 335,125, "screenshot_info", "i", "View_ShowPreview"
			
	BUTTON 10,505 TO 110,515, "start", "start", Hpt_Fenster$
	BUTTON 320,505 TO 420,515, "clear", "clear", Hpt_Fenster$
	BUTTON 430,505 TO 530,515, "save", "save Profile", Hpt_Fenster$
	
	BOXVIEW 10,535 TO 530,620, "View_Help", "Informations", 2, Hpt_Fenster$
		TEXTEDIT 7,7 TO 507,60, "help", 1, "View_Help"
		TEXTEDIT SET "help", "editable", false
			TEXTEDIT ADD "help", "If you dont want to setup any option for using the emulator, select a Source and press start."

	read_profile()
	
end sub

sub read_profile()
	profile_folder$=system$("ls -G -1 /boot/apps/Emulators/DosBox/profiles")
	dim SplitDirProfiles$(1)
	ndb=0
	db=0
	ndb = split(profile_folder$, SplitDirProfiles$(), "\n")            
	for db = 1 to ndb
		listbox add "profiles", SplitDirProfiles$(db)
	next db
end sub

sub about()
	window open ((B_Breite/2)-130), ((B_Hoehe/2)-100) to ((B_Breite/2)+130), ((B_Hoehe/2)+100), "View_About", "About"
		window set "View_About", "MinimumTo", 260,200
		window set "View_About", "MaximumTo", 260,200
		window set "View_About", "look", "modal"
	
	draw text 15, 25, "DOSBox GUI", "View_About"
	draw text 15, 60, "Version:      ", "View_About"
	draw text 130, 60, Version$+" / "+Versionsdatum$, "View_About"
	draw text 15, 80, "Developer:      ", "View_About"
	draw text 130,80, "Christian Albrecht", "View_About"
	draw text 15, 100, "Nickname:      ", "View_About"
	draw text 130, 100, "Lelldorin", "View_About"
	draw text 15, 120, "Homepage:      ", "View_About"
	texturl 130,112, "Homepage", "http://www.besly.de", "http://www.besly.de", "View_About"
	BUTTON 90,160 TO 170,180, "close", "close", "View_About"
end sub

sub save_profile()
	profile$ = FILEPANEL "Save-File", "Save File", "/boot/apps/Emulators/DosBox/profiles"
		if(profile$="")then
		else
			save_directory$ = TEXTCONTROL GET$ "source_dir"
			save_file$ = TEXTCONTROL GET$ "source_file"
			save_config$= TEXTCONTROL GET$ "source_config"
			save_lang$= TEXTCONTROL GET$ "source_lang"
			save_command$= TEXTCONTROL GET$ "source_command"
			if(machine_set$="on")then
				save_machine_status=1
			endif
			if(machine_set$="off")then
				save_machine_status=0
			endif
			if(machine$="VGA")then
				save_machine=1
			elseif(machine$="CGA")then
				save_machine=2
			elseif(machine$="Hercules")then
				save_machine=3
			elseif(machine$="Tandy")then
				save_machine=4
			endif
			if(config$="on")then
				save_config_status=1
			elseif(config$="off")then
				save_config_status=0
			endif
			if(fullscreen$="on")then
				save_fullscreen=1
			elseif(fullscreen$="off")then
				save_fullscreen=0
			endif
			if(command$="on")then
				save_command_status=1
			elseif(command$="off")then
				save_command_status=0
			endif
			if(lang$="on")then
				save_lang_status=1
			elseif(lang$="off")then
				save_lang_status=0
			endif
			if(exit$="on")then
				save_exit=1
			elseif(exit$="off")then
				save_exit=0
			endif
			save_command$= TEXTCONTROL GET$ "source_command"
			
			if(Screenshot$="noscreen")then
				
			else
				dim ProfileGetName$(1)
				profile_get=split(profile$, ProfileGetName$(), "/")
				Output$=system$("cp "+Screenshot$+" /boot/apps/Emulators/DosBox/preview/"+"\""+ProfileGetName$(7)+"\""+".gfx")
				Screenshot$="/boot/apps/Emulators/DosBox/preview/"+ProfileGetName$(7)+".gfx"				
			endif	
		
			anlegen = open(profile$, "w")
				print #anlegen from_folder
				print #anlegen save_directory$
				print #anlegen from_file
				print #anlegen save_file$
				print #anlegen save_exit
				print #anlegen save_command_status
				print #anlegen save_command$
				print #anlegen save_fullscreen
				print #anlegen save_config_status
				print #anlegen save_config$
				print #anlegen save_lang_status
				print #anlegen save_lang$
				print #anlegen save_machine_status
				print #anlegen save_machine
				print #anlegen Screenshot$
			close(anlegen)
		
			LISTBOX CLEAR "profiles"
			read_profile()
		endif
end sub

// Config Generator

sub Configurator()
	window open (B_Breite/2)-205,(B_Hoehe/2)-285 to (B_Breite/2)+205,(B_Hoehe/2)+285, "ConfigGen", "DOSBox GUI - Config Generator"
	window set "ConfigGen", "flags", "not-zoomable, not-h-resizable, not-v-resizable"
		window set "ConfigGen", "MinimumTo", 360,570
		window set "ConfigGen", "MaximumTo", 360,570
		
	menu "Generator", "Save", "", "ConfigGen"
	menu "Generator", "Load", "", "ConfigGen"
	menu "Generator", "--", "", "ConfigGen"
	menu "Generator", "Delete", "", "ConfigGen"
	
	BUTTON 9,435 TO 109,445, "save_config_gen", "save", "ConfigGen"
	//BUTTON 240,435 TO 350,445, "clear_config_gen", "clear", "ConfigGen"
	
	generator_werte()
	
	BOXVIEW 9,470 TO 350,560, "config_help", " Informations ", 2, "ConfigGen"
		TEXTEDIT 8,8 TO 327,66, "help2", 1, "config_help"

	view 0,21 to 346,420, "Eingabemaske", "ConfigGen"
		SCROLLBAR "GeneratorBar", 1, "Eingabemaske"
			SCROLLBAR SET "GeneratorBar", "Vertical Range", 0,2300 
			
	auslesen_dosboxgui_settings()
	
	//sld
	
	BOXVIEW 10,10 TO 335,410, "sdl_settings", " SDL Settings ", 2, "Eingabemaske"
	
	DRAW TEXT 15, 25, "fullscreen", "sdl_settings"
	DROPBOX 150,10 TO 250,20, "fullscreen", "", "sdl_settings"
		DROPBOX ADD "fullscreen", "true"
		DROPBOX ADD "fullscreen", "false"
			DROPBOX SELECT "fullscreen", 2
	BUTTON 283,8 TO 308,16, "fullscreen_info", "i", "sdl_settings"
	
	DRAW TEXT 15, 55, "fulldouble", "sdl_settings"
	DROPBOX 150,40 TO 250,50, "fulldouble", "", "sdl_settings"
		DROPBOX ADD "fulldouble", "true"
		DROPBOX ADD "fulldouble", "false"
			DROPBOX SELECT "fulldouble", 2
	BUTTON 283,38 TO 308,48, "fulldouble_info", "i", "sdl_settings"
			
	DRAW TEXT 15, 85, "fullfixed", "sdl_settings"
	DROPBOX 150,70 TO 250,80, "fullfixed", "", "sdl_settings"
		DROPBOX ADD "fullfixed", "true"
		DROPBOX ADD "fullfixed", "false"
			DROPBOX SELECT "fullfixed", 2
	BUTTON 283,68 TO 308,76, "fullfixed_info", "i", "sdl_settings"
	
	DRAW TEXT 15, 115, "fullresolution", "sdl_settings"
	DROPBOX 150,100 TO 250,110, "fullresolution", "", "sdl_settings"
		DROPBOX ADD "fullresolution", "640x480"
		DROPBOX ADD "fullresolution", "720x576"
		DROPBOX ADD "fullresolution", "768x576"
		DROPBOX ADD "fullresolution", "800x600"
		DROPBOX ADD "fullresolution", "1024x768"
		DROPBOX ADD "fullresolution", "1152x864"
		DROPBOX ADD "fullresolution", "1250x1024"
		DROPBOX ADD "fullresolution", "1600x1200"
			DROPBOX SELECT "fullresolution", 5
	BUTTON 283,98 TO 308,106, "fullresolution_info", "i", "sdl_settings"
	
	DRAW TEXT 15, 145, "output", "sdl_settings"
	DROPBOX 150,130 TO 250,140, "output", "", "sdl_settings"
		DROPBOX ADD "output", "surface"
		DROPBOX ADD "output", "overlay"
		DROPBOX ADD "output", "opengl"
		DROPBOX ADD "output", "openglnb"
			DROPBOX SELECT "output", 1
	BUTTON 283,128 TO 308,136, "output_info", "i", "sdl_settings"

	DRAW TEXT 15, 175, "hwscale", "sdl_settings"
	DROPBOX 150,160 TO 250,170, "hwscale", "", "sdl_settings"
		DROPBOX ADD "hwscale", "1.00"
		DROPBOX ADD "hwscale", "2.00"
		DROPBOX ADD "hwscale", "3.00"
		DROPBOX ADD "hwscale", "4.00"
			DROPBOX SELECT "hwscale", 1
	BUTTON 283,158 TO 308,166, "hwscale_info", "i", "sdl_settings"	
			
	DRAW TEXT 15, 205, "autolock", "sdl_settings"
	DROPBOX 150,190 TO 250,200, "autolock", "", "sdl_settings"
		DROPBOX ADD "autolock", "true"
		DROPBOX ADD "autolock", "false"
			DROPBOX SELECT "autolock", 1
	BUTTON 283,188 TO 308,196, "autolock_info", "i", "sdl_settings"	

	//DRAW TEXT 15, 245, "sensitivity", "sdl_settings"
	SLIDER 13,225 TO 113,240, "sensitivity", "sensitivity", mouse_mini, mouse_maxi,  "triangle", "sdl_settings"
		SLIDER LABEL "sensitivity", str$(mouse_mini), str$(mouse_maxi)
	TEXTCONTROL 145,245 TO 250,255, "mouse_show", "", "", "sdl_settings"	
	BUTTON 283,243 TO 308,253, "sensitivity_info", "i", "sdl_settings"	
	
	DRAW TEXT 15, 305, "waitonerror", "sdl_settings"
	DROPBOX 150,290 TO 250,300, "waitonerror", "", "sdl_settings"
		DROPBOX ADD "waitonerror", "true"
		DROPBOX ADD "waitonerror", "false"
			DROPBOX SELECT "waitonerror", 1
	BUTTON 283,288 TO 308,298, "waitonerror_info", "i", "sdl_settings"
	
	DRAW TEXT 15, 335, "priority level", "sdl_settings"
	DROPBOX 150,320 TO 250,330, "priority", "", "sdl_settings"
		DROPBOX ADD "priority", "lower,lower"
		DROPBOX ADD "priority", "lower,normal"
		DROPBOX ADD "priority", "lower,higher"
		DROPBOX ADD "priority", "lower,highest"
		DROPBOX ADD "priority", "normal,lower"
		DROPBOX ADD "priority", "normal,normal"
		DROPBOX ADD "priority", "normal,higher"
		DROPBOX ADD "priority", "normal,highest"
		DROPBOX ADD "priority", "higher,lower"
		DROPBOX ADD "priority", "higher,normal"
		DROPBOX ADD "priority", "higher,higher"
		DROPBOX ADD "priority", "higher,highest"
		DROPBOX ADD "priority", "highest,lower"
		DROPBOX ADD "priority", "highest,normal"
		DROPBOX ADD "priority", "highest,higher"
		DROPBOX ADD "priority", "highest,highest"
			DROPBOX SELECT "priority", 10
	BUTTON 283,318 TO 308,328, "priority_info", "i", "sdl_settings"
	
	DRAW TEXT 15, 365, "mapperfile", "sdl_settings"
	TEXTCONTROL 145,350 to 250,360, "mapperfile", "", "", "sdl_settings"
	BUTTON 255,348 TO 280,358, "mapperfile_file", "v", "sdl_settings"
	BUTTON 283,348 TO 308,358, "mapperfile_info", "i", "sdl_settings"
	
	//dosbox
			
	BOXVIEW 10,420 TO 335,570, "dosbox_settings", " DOSBox Settings ", 2, "Eingabemaske"
	
	DRAW TEXT 15, 25, "language", "dosbox_settings"
	TEXTCONTROL 145,10 to 250,20, "language", "", "", "dosbox_settings"
	BUTTON 255,8 TO 280,16, "language_file", "v", "dosbox_settings"
	BUTTON 283,8 TO 308,16, "language_info", "i", "dosbox_settings"
	
	DRAW TEXT 15, 55, "machine", "dosbox_settings"
	DROPBOX 150,40 TO 250,50, "machine", "", "dosbox_settings"
		DROPBOX ADD "machine", "vga"
		DROPBOX ADD "machine", "cga"
		DROPBOX ADD "machine", "hercules"
		DROPBOX ADD "machine", "tandy"
			DROPBOX SELECT "machine", 1
	BUTTON 283,38 TO 308,46, "machine_info", "i", "dosbox_settings"
	
	DRAW TEXT 15, 85, "captures", "dosbox_settings"
	TEXTCONTROL 145,70 to 250,80, "captures", "", "/boot/home", "dosbox_settings"
	BUTTON 255,68 TO 280,76, "captures_file", "v", "dosbox_settings"
	BUTTON 283,68 TO 308,76, "captures_info", "i", "dosbox_settings"
	
	DRAW TEXT 15, 115, "memsize", "dosbox_settings"
	DROPBOX 150,100 TO 250,110, "memsize", "", "dosbox_settings"
		DROPBOX ADD "memsize", "4"
		DROPBOX ADD "memsize", "8"
		DROPBOX ADD "memsize", "16"
		DROPBOX ADD "memsize", "32"
		DROPBOX ADD "memsize", "64"
			DROPBOX SELECT "memsize", 3
	BUTTON 283,98 TO 308,106, "memsize_info", "i", "dosbox_settings"

	//render

	BOXVIEW 10,580 TO 335,745, "render_settings", " Render Settings ", 2, "Eingabemaske"
	
	//DRAW TEXT 15, 25, "frameskip", "render_settings"
	SLIDER 13,15 TO 113,25, "frameskip", "frameskip", frameskip_mini, frameskip_maxi,  "triangle", "render_settings"
		SLIDER LABEL "frameskip", str$(frameskip_mini), str$(frameskip_maxi)
	TEXTCONTROL 145,34 TO 250,44, "frameskip_show", "", "", "render_settings"	
	BUTTON 283,34 TO 308,44, "frameskip_info", "i", "render_settings"	
			
	DRAW TEXT 15, 93, "aspect correction", "render_settings"
	DROPBOX 150,80 TO 250,90, "aspect", "", "render_settings"
		DROPBOX ADD "aspect", "true"
		DROPBOX ADD "aspect", "false"
			DROPBOX SELECT "aspect", 2
	BUTTON 283,79 TO 308,89, "aspect_info", "i", "render_settings"
	
	DRAW TEXT 15, 123, "scaler", "render_settings"
	DROPBOX 150,110 TO 250,120, "scaler", "", "render_settings"
		DROPBOX ADD "scaler", "none"
		DROPBOX ADD "scaler", "normal2x"
		DROPBOX ADD "scaler", "advmame2x"
		DROPBOX ADD "scaler", "advmame3x"
		DROPBOX ADD "scaler", "advinterp2x"
		DROPBOX ADD "scaler", "interp2x"
		DROPBOX ADD "scaler", "tv2x"
			DROPBOX SELECT "scaler", 2
	BUTTON 283,111 TO 308,121, "scaler_info", "i", "render_settings"
	
	//cpu
	
	BOXVIEW 10,755 TO 335,1005, "cpu_settings", " CPU Settings ", 2, "Eingabemaske"
	
	DRAW TEXT 15, 25, "core", "cpu_settings"
	DROPBOX 150,10 TO 250,20, "core", "", "cpu_settings"
		DROPBOX ADD "core", "simple"
		DROPBOX ADD "core", "normal"
		DROPBOX ADD "core", "full"
		DROPBOX ADD "core", "dynamic"
			DROPBOX SELECT "core", 2
	BUTTON 283,7 TO 308,17, "core_info", "i", "cpu_settings"
	
	//DRAW TEXT 15, 60, "cycles", "cpu_settings"
	SLIDER 13,45 TO 113,55, "cycles", "cycles", cycles_mini, cycles_maxi,  "triangle", "cpu_settings"
		SLIDER LABEL "cycles", str$(cycles_mini), str$(cycles_maxi)
	TEXTCONTROL 145,65 TO 250,75, "cycles_show", "", "", "cpu_settings"	
	BUTTON 283,64 TO 308,74, "cycles_info", "i", "cpu_settings"
		
	//DRAW TEXT 15, 115, "cycle up", "cpu_settings"
	SLIDER 13,112 TO 113,122, "cycleup", "cycleup", cycleup_mini, cycleup_maxi,  "triangle", "cpu_settings"
		SLIDER LABEL "cycleup", str$(cycleup_mini), str$(cycleup_maxi)
	TEXTCONTROL 145,132 TO 250,142, "cycleup_show", "", "", "cpu_settings"
	BUTTON 283,131 TO 308,141, "cycleup_info", "i", "cpu_settings"
	
	//DRAW TEXT 15, 165, "cycledown", "cpu_settings"
	SLIDER 13,179 TO 113,189, "cycledown", "cycledown", cycledown_mini, cycledown_maxi,  "triangle", "cpu_settings"
		SLIDER LABEL "cycledown", str$(cycledown_mini), str$(cycledown_maxi)
	TEXTCONTROL 145,199 TO 250,209, "cycledown_show", "", "", "cpu_settings"
	BUTTON 283,198 TO 308,208, "cycledown_info", "i", "cpu_settings"
	
	//mixer
	
	BOXVIEW 10,1015 TO 335,1265, "mixer_settings", " Mixer Settings ", 2, "Eingabemaske"
	
	DRAW TEXT 15, 25, "no sound", "mixer_settings"
	DROPBOX 150,10 TO 250,20, "nosound", "", "mixer_settings"
		DROPBOX ADD "nosound", "true"
		DROPBOX ADD "nosound", "false"
			DROPBOX SELECT "nosound", 2
	BUTTON 283,8 TO 308,18, "nosound_info", "i", "mixer_settings"
			
	//DRAW TEXT 15, 60, "sample rate", "mixer_settings"
	SLIDER 13,45 TO 113,55, "rate", "rate", samplerate_mini, samplerate_maxi,  "triangle", "mixer_settings"
		SLIDER LABEL "rate", str$(samplerate_mini), str$(samplerate_maxi)
	TEXTCONTROL 145,65 TO 250,75, "rate_show", "", "", "mixer_settings"
	BUTTON 283,64 TO 308,74, "rate_info", "i", "mixer_settings"

	//DRAW TEXT 15, 110, "block size", "mixer_settings"
	SLIDER 13,112 TO 113,122, "blocksize", "blocksize", blocksize_mini, blocksize_maxi,  "triangle", "mixer_settings"
		SLIDER LABEL "blocksize", str$(blocksize_mini), str$(blocksize_maxi)
	TEXTCONTROL 145,132 TO 250,142, "blocksize_show", "", "", "mixer_settings"
	BUTTON 283,131 TO 308,141, "blocksize_info", "i", "mixer_settings"
	
	//DRAW TEXT 15, 160, "prebuffer", "mixer_settings"
	SLIDER 13,179 TO 113,189, "prebuffer", "prebuffer", prepuffer_mini, prepuffer_maxi,  "triangle", "mixer_settings"
		SLIDER LABEL "prebuffer", str$(prepuffer_mini), str$(prepuffer_maxi)
	TEXTCONTROL 145,199 TO 250,209, "prebuffer_show", "", "", "mixer_settings"
	BUTTON 283,198 TO 308,208, "prebuffer_info", "i", "mixer_settings"
	
	//midi
	
	BOXVIEW 10,1275 TO 335,1425, "midi_settings", " Midi Settings ", 2, "Eingabemaske"
	
	DRAW TEXT 15, 25, "mpu401", "midi_settings"
	DROPBOX 150,10 TO 250,20, "mpu401", "", "midi_settings"
		DROPBOX ADD "mpu401", "true"
		DROPBOX ADD "mpu401", "false"
			DROPBOX SELECT "mpu401", 1
	BUTTON 283,8 TO 308,18, "mpu401_info", "i", "midi_settings"
			
	DRAW TEXT 15, 55, "intelligent", "midi_settings"
	DROPBOX 150,40 TO 250,50, "midi_intelligent", "", "midi_settings"
		DROPBOX ADD "midi_intelligent", "true"
		DROPBOX ADD "midi_intelligent", "false"
			DROPBOX SELECT "midi_intelligent", 1
	BUTTON 283,38 TO 308,48, "midi_intelligent_info", "i", "midi_settings"
	
	DRAW TEXT 15, 85, "device", "midi_settings"
	DROPBOX 150,70 TO 250,80, "midi_device", "", "midi_settings"
		DROPBOX ADD "midi_device", "default"
		DROPBOX ADD "midi_device", "alsa"
		DROPBOX ADD "midi_device", "oss"
		DROPBOX ADD "midi_device", "win32"
		DROPBOX ADD "midi_device", "coreaudio"
		DROPBOX ADD "midi_device", "none"
			DROPBOX SELECT "midi_device", 1
	BUTTON 283,68 TO 308,78, "midi_device_info", "i", "midi_settings"
	
	DRAW TEXT 15, 115, "config", "midi_settings"
	TEXTCONTROL 145,100 to 250,110, "midiconfig", "", midiconfig$, "midi_settings"
	BUTTON 255,98 TO 280,108, "midiconfig_file", "v", "midi_settings"
	BUTTON 283,98 TO 308,108, "midiconfig_info", "i", "midi_settings"
	
	//sblaster
	
	BOXVIEW 10,1435 TO 335,1735, "sblaster_settings", " Sound Blaster Settings ", 2, "Eingabemaske"
				
	DRAW TEXT 15, 25, "type", "sblaster_settings"
	DROPBOX 150,10 TO 250,20, "sb_type", "", "sblaster_settings"
		DROPBOX ADD "sb_type", "none"
		DROPBOX ADD "sb_type", "sb1"
		DROPBOX ADD "sb_type", "sb2"
		DROPBOX ADD "sb_type", "sbpro1"
		DROPBOX ADD "sb_type", "sbpro2"
		DROPBOX ADD "sb_type", "sb16"
			DROPBOX SELECT "sb_type", 6
	BUTTON 283,8 TO 308,18, "sb_type_info", "i", "sblaster_settings"
	
	DRAW TEXT 15, 55, "base", "sblaster_settings"
	DROPBOX 150,40 TO 250,50, "sb_base", "", "sblaster_settings"
		DROPBOX ADD "sb_base", "220"
		DROPBOX ADD "sb_base", "240"
			DROPBOX SELECT "sb_base", 1
	BUTTON 283,38 TO 308,48, "sb_base_info", "i", "sblaster_settings"
	
	DRAW TEXT 15, 85, "irq", "sblaster_settings"
	DROPBOX 150,70 TO 250,80, "sb_irq", "", "sblaster_settings"
		DROPBOX ADD "sb_irq", "1"
		DROPBOX ADD "sb_irq", "2"
		DROPBOX ADD "sb_irq", "3"
		DROPBOX ADD "sb_irq", "4"
		DROPBOX ADD "sb_irq", "5"
		DROPBOX ADD "sb_irq", "6"
		DROPBOX ADD "sb_irq", "7"
		DROPBOX ADD "sb_irq", "8"
		DROPBOX ADD "sb_irq", "9"
		DROPBOX ADD "sb_irq", "10"
			DROPBOX SELECT "sb_irq", 7
	BUTTON 283,68 TO 308,78, "sb_irq_info", "i", "sblaster_settings"
	
	DRAW TEXT 15, 115, "dma", "sblaster_settings"
	DROPBOX 150,100 TO 250,110, "sb_dma", "", "sblaster_settings"
		DROPBOX ADD "sb_dma", "1"
		DROPBOX ADD "sb_dma", "2"
		DROPBOX ADD "sb_dma", "3"
		DROPBOX ADD "sb_dma", "4"
		DROPBOX ADD "sb_dma", "5"
		DROPBOX ADD "sb_dma", "6"
		DROPBOX ADD "sb_dma", "7"
		DROPBOX ADD "sb_dma", "8"
		DROPBOX ADD "sb_dma", "9"
		DROPBOX ADD "sb_dma", "10"
			DROPBOX SELECT "sb_dma", 1
	BUTTON 283,98 TO 308,108, "sb_dma_info", "i", "sblaster_settings"
	
	DRAW TEXT 15, 145, "hdma", "sblaster_settings"
	DROPBOX 150,130 TO 250,140, "sb_hdma", "", "sblaster_settings"
		DROPBOX ADD "sb_hdma", "1"
		DROPBOX ADD "sb_hdma", "2"
		DROPBOX ADD "sb_hdma", "3"
		DROPBOX ADD "sb_hdma", "4"
		DROPBOX ADD "sb_hdma", "5"
		DROPBOX ADD "sb_hdma", "6"
		DROPBOX ADD "sb_hdma", "7"
		DROPBOX ADD "sb_hdma", "8"
		DROPBOX ADD "sb_hdma", "9"
		DROPBOX ADD "sb_hdma", "10"
			DROPBOX SELECT "sb_hdma", 5
	BUTTON 283,128 TO 308,138, "sb_hdma_info", "i", "sblaster_settings"
	
	DRAW TEXT 15, 175, "mixer", "sblaster_settings"
	DROPBOX 150,160 TO 250,170, "sb_mixer", "", "sblaster_settings"
		DROPBOX ADD "sb_mixer", "true"
		DROPBOX ADD "sb_mixer", "false"
			DROPBOX SELECT "sb_mixer", 1
	BUTTON 283,158 TO 308,168, "sb_mixer_info", "i", "sblaster_settings"
			
	DRAW TEXT 15, 205, "oplmode", "sblaster_settings"
	DROPBOX 150,190 TO 250,200, "sb_oplmode", "", "sblaster_settings"
		DROPBOX ADD "sb_oplmode", "auto"
		DROPBOX ADD "sb_oplmode", "cms"
		DROPBOX ADD "sb_oplmode", "opl2"
		DROPBOX ADD "sb_oplmode", "dualopl2"
		DROPBOX ADD "sb_oplmode", "opl3"
			DROPBOX SELECT "sb_oplmode", 1
	BUTTON 283,188 TO 308,198, "sb_oplmode_info", "i", "sblaster_settings"
	
	//DRAW TEXT 15, 245, "oplrate", "sblaster_settings"
	SLIDER 13,230 TO 113,240, "sblaster_oplrate", "oplrate", oplrate_mini, oplrate_maxi,  "triangle", "sblaster_settings"
		SLIDER LABEL "sblaster_oplrate", str$(oplrate_mini), str$(oplrate_maxi)
	TEXTCONTROL 145,247 TO 250,257, "oplrate_show", "", "", "sblaster_settings"
	BUTTON 283,245 TO 308,255, "sb_oplrate_info", "i", "sblaster_settings"
		
	//gus	
		
	BOXVIEW 10,1745 TO 335,2055, "gus_settings", " Gravis Ultrasound Settings ", 2, "Eingabemaske"
	
	DRAW TEXT 15, 25, "gus", "gus_settings"
	DROPBOX 150,10 TO 250,20, "gus", "", "gus_settings"
		DROPBOX ADD "gus", "true"
		DROPBOX ADD "gus", "false"
			DROPBOX SELECT "gus", 1
	BUTTON 283,8 TO 308,18, "gus_info", "i", "gus_settings"
	
	//DRAW TEXT 15, 60, "rate", "gus_settings"
	SLIDER 13,45 TO 113,55, "gus_rate", "rate", gusrate_mini, gusrate_maxi,  "triangle", "gus_settings"
		SLIDER LABEL "gus_rate", str$(gusrate_mini), str$(gusrate_maxi)
	TEXTCONTROL 145,62 TO 250,72, "gus_rate_show", "", "", "gus_settings"
	BUTTON 283,61 TO 308,71, "gus_rate_info", "i", "gus_settings"
			
	DRAW TEXT 15, 120, "base", "gus_settings"
	DROPBOX 150,105 TO 250,115, "gus_base", "", "gus_settings"
		DROPBOX ADD "gus_base", "220"
		DROPBOX ADD "gus_base", "240"
			DROPBOX SELECT "gus_base", 2
	BUTTON 283,103 TO 308,113, "gus_base_info", "i", "gus_settings"
	
	DRAW TEXT 15, 150, "irq1", "gus_settings"
	DROPBOX 150,135 TO 250,145, "gus_irq1", "", "gus_settings"
		DROPBOX ADD "gus_irq1", "1"
		DROPBOX ADD "gus_irq1", "2"
		DROPBOX ADD "gus_irq1", "3"
		DROPBOX ADD "gus_irq1", "4"
		DROPBOX ADD "gus_irq1", "5"
		DROPBOX ADD "gus_irq1", "6"
		DROPBOX ADD "gus_irq1", "7"
		DROPBOX ADD "gus_irq1", "8"
		DROPBOX ADD "gus_irq1", "9"
		DROPBOX ADD "gus_irq1", "10"
			DROPBOX SELECT "gus_irq1", 5
	BUTTON 283,133 TO 308,143, "gus_irq1_info", "i", "gus_settings"
	
	DRAW TEXT 15, 180, "irq2", "gus_settings"
	DROPBOX 150,165 TO 250,175, "gus_irq2", "", "gus_settings"
		DROPBOX ADD "gus_irq2", "1"
		DROPBOX ADD "gus_irq2", "2"
		DROPBOX ADD "gus_irq2", "3"
		DROPBOX ADD "gus_irq2", "4"
		DROPBOX ADD "gus_irq2", "5"
		DROPBOX ADD "gus_irq2", "6"
		DROPBOX ADD "gus_irq2", "7"
		DROPBOX ADD "gus_irq2", "8"
		DROPBOX ADD "gus_irq2", "9"
		DROPBOX ADD "gus_irq2", "10"
			DROPBOX SELECT "gus_irq2", 5
	BUTTON 283,163 TO 308,173, "gus_irq2_info", "i", "gus_settings"
	
	DRAW TEXT 15, 210, "dma1", "gus_settings"
	DROPBOX 150,195 TO 250,205, "gus_dma1", "", "gus_settings"
		DROPBOX ADD "gus_dma1", "1"
		DROPBOX ADD "gus_dma1", "2"
		DROPBOX ADD "gus_dma1", "3"
		DROPBOX ADD "gus_dma1", "4"
		DROPBOX ADD "gus_dma1", "5"
		DROPBOX ADD "gus_dma1", "6"
		DROPBOX ADD "gus_dma1", "7"
		DROPBOX ADD "gus_dma1", "8"
		DROPBOX ADD "gus_dma1", "9"
		DROPBOX ADD "gus_dma1", "10"
			DROPBOX SELECT "gus_dma1", 3
	BUTTON 283,193 TO 308,203, "gus_dma1_info", "i", "gus_settings"
	
	DRAW TEXT 15, 240, "dma2", "gus_settings"
	DROPBOX 150,225 TO 250,235, "gus_dma2", "", "gus_settings"
		DROPBOX ADD "gus_dma2", "1"
		DROPBOX ADD "gus_dma2", "2"
		DROPBOX ADD "gus_dma2", "3"
		DROPBOX ADD "gus_dma2", "4"
		DROPBOX ADD "gus_dma2", "5"
		DROPBOX ADD "gus_dma2", "6"
		DROPBOX ADD "gus_dma2", "7"
		DROPBOX ADD "gus_dma2", "8"
		DROPBOX ADD "gus_dma2", "9"
		DROPBOX ADD "gus_dma2", "10"
			DROPBOX SELECT "gus_dma2", 3
	BUTTON 283,223 TO 308,233, "gus_dma2_info", "i", "gus_settings"
			
	DRAW TEXT 15, 270, "ultradir", "gus_settings"
	TEXTCONTROL 150,255 to 250,265, "gus_ultradir", "", "C:\ULTRASND", "gus_settings"
	//BUTTON 255,238 TO 280,248, "gus_ultradir_file", "v", "gus_settings"
	BUTTON 283,253 TO 308,263, "gus_ultradir_info", "i", "gus_settings"
	
	//speaker
	
	BOXVIEW 10,2065 TO 335,2290, "speaker_settings", " Speaker Settings ", 2, "Eingabemaske"
	
	DRAW TEXT 15, 25, "pcspeaker", "speaker_settings"
	DROPBOX 150,10 TO 250,20, "pcspeaker", "", "speaker_settings"
		DROPBOX ADD "pcspeaker", "true"
		DROPBOX ADD "pcspeaker", "false"
			DROPBOX SELECT "pcspeaker", 1
	BUTTON 283,8 TO 308,18, "pcspeaker_info", "i", "speaker_settings"
			
	//DRAW TEXT 15, 60, "pcrate", "speaker_settings"
	SLIDER 13,45 TO 113,55, "pcrate", "pcrate", pcrate_mini, pcrate_maxi,  "triangle", "speaker_settings"
		SLIDER LABEL "pcrate", str$(pcrate_mini), str$(pcrate_maxi)
	TEXTCONTROL 145,65 TO 250,75, "pcrate_show", "", "", "speaker_settings"
	BUTTON 283,64 TO 308,74, "pcrate_info", "i", "speaker_settings"		
	
	//DRAW TEXT 15, 110, "tandyrate", "speaker_settings"
	SLIDER 13,112 TO 113,122, "tandyrate", "tandyrate", tandyrate_mini, tandyrate_maxi,  "triangle", "speaker_settings"
		SLIDER LABEL "tandyrate", str$(tandyrate_mini), str$(tandyrate_maxi)
	TEXTCONTROL 145,132 TO 250,142, "tandyrate_show", "", "", "speaker_settings"
	BUTTON 283,131 TO 308,141, "tandyrate_info", "i", "speaker_settings"		
	
	DRAW TEXT 15, 187, "disney", "speaker_settings"
	DROPBOX 150,172 TO 250,182, "disney", "", "speaker_settings"
		DROPBOX ADD "disney", "true"
		DROPBOX ADD "disney", "false"
			DROPBOX SELECT "disney", 1
	BUTTON 283,170 TO 308,180, "disney_info", "i", "speaker_settings"
	
	//dos
	
	BOXVIEW 10,2300 TO 335,2395, "dos_settings", " DOS Settings ", 2, "Eingabemaske"
	
	DRAW TEXT 15, 25, "XMS support", "dos_settings"
	DROPBOX 150,10 TO 250,20, "xms", "", "dos_settings"
		DROPBOX ADD "xms", "true"
		DROPBOX ADD "xms", "false"
			DROPBOX SELECT "xms", 1
	BUTTON 283,8 TO 308,18, "xms_info", "i", "dos_settings"
			
	DRAW TEXT 15, 55, "EMS support", "dos_settings"
	DROPBOX 150,40 TO 250,50, "ems", "", "dos_settings"
		DROPBOX ADD "ems", "true"
		DROPBOX ADD "ems", "false"
			DROPBOX SELECT "ems", 1
	BUTTON 283,38 TO 308,48, "ems_info", "i", "dos_settings"
	
	//modem
	
	BOXVIEW 10,2405 TO 335,2530, "modem_settings", " Modem Settings ", 2, "Eingabemaske"
	
	DRAW TEXT 15, 25, "modem", "modem_settings"
	DROPBOX 150,10 TO 250,20, "modem", "", "modem_settings"
		DROPBOX ADD "modem", "true"
		DROPBOX ADD "modem", "false"
			DROPBOX SELECT "modem", 2
	BUTTON 283,8 TO 308,18, "modem_info", "i", "modem_settings"
			
	DRAW TEXT 15, 55, "com port", "modem_settings"
	DROPBOX 150,40 TO 250,50, "comport", "", "modem_settings"
		DROPBOX ADD "comport", "1"
		DROPBOX ADD "comport", "2"
			DROPBOX SELECT "comport", 2
	BUTTON 283,38 TO 308,48, "comport_info", "i", "modem_settings"
				
	DRAW TEXT 15,85 , "listen to port", "modem_settings"
	TEXTCONTROL 147,70 to 250,80, "listenport", "", "23", "modem_settings"
	BUTTON 283,68 TO 308,78, "listenport_info", "i", "modem_settings"
	
	//ipx
	
	BOXVIEW 10,2540 TO 335,2605, "ipx_settings", " IPX Settings ", 2, "Eingabemaske"
	
	DRAW TEXT 15, 25, "ipx", "ipx_settings"
	DROPBOX 150,10 TO 250,20, "ipx", "", "ipx_settings"
		DROPBOX ADD "ipx", "true"
		DROPBOX ADD "ipx", "false"
			DROPBOX SELECT "ipx", 2
	BUTTON 283,8 TO 308,18, "ipx_info", "i", "ipx_settings"
	
	//autoexec
	
	BOXVIEW 10,2615 TO 335,2680, "autoexe_settings", " autoexe Settings ", 2, "Eingabemaske"
	
	TEXTCONTROL 10,10 to 250,20, "autoexec", "", "", "autoexe_settings"	
	BUTTON 283,8 TO 308,16, "autoexe_info", "i", "autoexe_settings"
	
end sub

sub auslesen_dosboxgui_settings()
	settingsdatei$="/boot/apps/Emulators/DosBox/config/default.cfg"
	splitsymbol_gui$="\n"
	
	j=0
	xgui=0
	splitting_gui=0
	
	configload$="/boot/apps/Emulators/DosBox/settings/dosboxgui.cfg"
		
	auslesen_gui=open(configload$, "r")
	while (not EOF(auslesen_gui))
		line input #auslesen_gui b_gui$
		dim elements_gui$(1)
		numElements_gui = split(b_gui$, elements_gui$(), splitsymbol_gui$)
		
		for j = 1 to numElements_gui
			xgui=xgui+1
			dim dgui$(xgui)
				dgui$(xgui) = elements_gui$(j)
				if(dgui$(xgui)="[sdl]")then
					sdl_anzahl_gui=xgui
					//print "sdl:"+str$(sdl_anzahl_gui)
				elseif(dgui$(xgui)="[render]")then
					render_anzahl_gui=xgui
					//print "render:"+str$(render_anzahl_gui)
				elseif(dgui$(xgui)="[cpu]")then
					cpu_anzahl_gui=xgui
					//print "cpu:"+str$(cpu_anzahl_gui)
				elseif(dgui$(xgui)="[mixer]")then
					mixer_anzahl_gui=xgui
					//print "mixer:"+str$(mixer_anzahl_gui)
				elseif(dgui$(xgui)="[sblaster]")then
					sblaster_anzahl_gui=xgui
					//print "sblaster:"+str$(sblaster_anzahl_gui)
				elseif(dgui$(xgui)="[gus]")then
					gus_anzahl_gui=xgui
					//print "gus:"+str$(gus_anzahl_gui)
				elseif(dgui$(xgui)="[speaker]")then
					speaker_anzahl_gui=xgui
					//print "speaker:"+str$(speaker_anzahl_gui)
				endif
				ende_anzahl_gui=xgui
		next j
		
		for sdl_run_gui = sdl_anzahl_gui to (render_anzahl_gui-1)
		
			dim splitting_config_gui$(1)
			splitting_gui=split(dgui$(sdl_run_gui), splitting_config_gui$(), "=")
				abfrage_gui$=left$(dgui$(sdl_run_gui),1)
				if(abfrage_gui$="[")then
				elseif(abfrage_gui$="/")then
				elseif(abfrage_gui$="#")then
				elseif(abfrage_gui$="")then
				else
					if(splitting_config_gui$(1)="mouse_mini")then
						mouse_mini=val(splitting_config_gui$(2))
					endif
					if(splitting_config_gui$(1)="mouse_maxi")then
						mouse_maxi=val(splitting_config_gui$(2))
					endif
				endif
		next sdl_run_gui
		
		for render_run_gui = render_anzahl_gui to (cpu_anzahl_gui-1)
		
			dim splitting_config_gui$(1)
			splitting_gui=split(dgui$(render_run_gui), splitting_config_gui$(), "=")
				abfrage_gui$=left$(dgui$(render_run_gui),1)
				if(abfrage_gui$="[")then
				elseif(abfrage_gui$="/")then
				elseif(abfrage_gui$="#")then
				elseif(abfrage_gui$="")then
				else
					if(splitting_config_gui$(1)="frameskip_mouse_minimouse_mini")then
						frameskip_mini=val(splitting_config_gui$(2))
					endif
					if(splitting_config_gui$(1)="frameskip_maxi")then
						frameskip_maxi=val(splitting_config_gui$(2))
					endif
				endif
		next render_run_gui
		
		for cpu_run_gui = cpu_anzahl_gui to (mixer_anzahl_gui-1)
		
			dim splitting_config_gui$(1)
			splitting_gui=split(dgui$(cpu_run_gui), splitting_config_gui$(), "=")
				abfrage_gui$=left$(dgui$(cpu_run_gui),1)
				if(abfrage_gui$="[")then
				elseif(abfrage_gui$="/")then
				elseif(abfrage_gui$="#")then
				elseif(abfrage_gui$="")then
				else
					if(splitting_config_gui$(1)="cycles_mini")then
						cycles_mini=val(splitting_config_gui$(2))
					endif
					if(splitting_config_gui$(1)="cycles_maxi")then
						cycles_maxi=val(splitting_config_gui$(2))
					endif
					if(splitting_config_gui$(1)="cycleup_mini")then
						cycleup_mini=val(splitting_config_gui$(2))
					endif
					if(splitting_config_gui$(1)="cycleup_maxi")then
						cycleup_maxi=val(splitting_config_gui$(2))
					endif
					if(splitting_config_gui$(1)="cycleup_mini")then
						cycleup_mini=val(splitting_config_gui$(2))
					endif
					if(splitting_config_gui$(1)="cycleup_maxi")then
						cycleup_maxi=val(splitting_config_gui$(2))
					endif
					if(splitting_config_gui$(1)="cycledown_mini")then
						cycledown_mini=val(splitting_config_gui$(2))
					endif
					if(splitting_config_gui$(1)="cycledown_maxi")then
						cycledown_maxi=val(splitting_config_gui$(2))
					endif
				endif
		next cpu_run_gui
		
		for mixer_run_gui = mixer_anzahl_gui to (sblaster_anzahl_gui-1)
		
			dim splitting_config_gui$(1)
			splitting_gui=split(dgui$(mixer_run_gui), splitting_config_gui$(), "=")
				abfrage_gui$=left$(dgui$(mixer_run_gui),1)
				if(abfrage_gui$="[")then
				elseif(abfrage_gui$="/")then
				elseif(abfrage_gui$="#")then
				elseif(abfrage_gui$="")then
				else
					if(splitting_config_gui$(1)="samplerate_mini")then
						samplerate_mini=val(splitting_config_gui$(2))
					endif
					if(splitting_config_gui$(1)="samplerate_maxi")then
						samplerate_maxi=val(splitting_config_gui$(2))
					endif
					if(splitting_config_gui$(1)="blocksize_mini")then
						blocksize_mini=val(splitting_config_gui$(2))
					endif
					if(splitting_config_gui$(1)="blocksize_maxi")then
						blocksize_maxi=val(splitting_config_gui$(2))
					endif
					if(splitting_config_gui$(1)="prepuffer_mini")then
						prepuffer_mini=val(splitting_config_gui$(2))
					endif
					if(splitting_config_gui$(1)="prepuffer_maxi")then
						prepuffer_maxi=val(splitting_config_gui$(2))
					endif
				endif
		next mixer_run_gui
		
		for sblaster_run_gui = sblaster_anzahl_gui to (gus_anzahl_gui-1)
		
			dim splitting_config_gui$(1)
			splitting_gui=split(dgui$(sblaster_run_gui), splitting_config_gui$(), "=")
				abfrage_gui$=left$(dgui$(sblaster_run_gui),1)
				if(abfrage_gui$="[")then
				elseif(abfrage_gui$="/")then
				elseif(abfrage_gui$="#")then
				elseif(abfrage_gui$="")then
				else
					if(splitting_config_gui$(1)="oplrate_mini")then
						oplrate_mini=val(splitting_config_gui$(2))
					endif
					if(splitting_config_gui$(1)="oplrate_maxi")then
						oplrate_maxi=val(splitting_config_gui$(2))
					endif
				endif
		next sblaster_run_gui
		
		for gus_run_gui = gus_anzahl_gui to (speaker_anzahl_gui-1)
		
			dim splitting_config_gui$(1)
			splitting_gui=split(dgui$(gus_run_gui), splitting_config_gui$(), "=")
				abfrage_gui$=left$(dgui$(gus_run_gui),1)
				if(abfrage_gui$="[")then
				elseif(abfrage_gui$="/")then
				elseif(abfrage_gui$="#")then
				elseif(abfrage_gui$="")then
				else
					if(splitting_config_gui$(1)="gusrate_mini")then
						gusrate_mini=val(splitting_config_gui$(2))
					endif
					if(splitting_config_gui$(1)="gusrate_maxi")then
						gusrate_maxi=val(splitting_config_gui$(2))
					endif
				endif
		next gus_run_gui
		
		for speaker_run_gui = speaker_anzahl_gui to (ende_anzahl_gui)
		
			dim splitting_config_gui$(1)
			splitting_gui=split(dgui$(speaker_run_gui), splitting_config_gui$(), "=")
				abfrage_gui$=left$(dgui$(speaker_run_gui),1)
				if(abfrage_gui$="[")then
				elseif(abfrage_gui$="/")then
				elseif(abfrage_gui$="#")then
				elseif(abfrage_gui$="")then
				else
					if(splitting_config_gui$(1)="pcrate_mini")then

						pcrate_mini=val(splitting_config_gui$(2))
					endif
					if(splitting_config_gui$(1)="pcrate_maxi")then
						pcrate_maxi=val(splitting_config_gui$(2))
					endif
					if(splitting_config_gui$(1)="tandyrate_mini")then
						tandyrate_mini=val(splitting_config_gui$(2))
					endif
					if(splitting_config_gui$(1)="tandyrate_maxi")then
						tandyrate_maxi=val(splitting_config_gui$(2))
					endif
				endif
		next speaker_run_gui

	wend
		
		
end sub

sub auslesen_config()

	fileload$="/boot/apps/Emulators/DosBox/config/default.cfg"
	i=0
	x=0	
	auslesen=open(fileload$, "r")
	while (not EOF(auslesen))

		line input #auslesen b$
		dim elements$(1)
		numElements = split(b$, elements$(), splitsymbol$)

		for i = 1 to numElements
			x=x+1
			dim d$(x) //Array erstellen mit dem Wert x
				d$(x) = elements$(i)
				if(d$(x)="[sdl]")then
					sdl_anzahl=x
					//print "sdl:"+str$(sdl_anzahl)
				elseif(d$(x)="[dosbox]")then
					dosbox_anzahl=x
					//print "dosbox:"+str$(dosbox_anzahl)
				elseif(d$(x)="[render]")then
					render_anzahl=x
					//print "render:"+str$(render_anzahl)
				elseif(d$(x)="[cpu]")then
					cpu_anzahl=x
					//print "cpu:"+str$(cpu_anzahl)
				elseif(d$(x)="[mixer]")then
					mixer_anzahl=x
					//print "mixer:"+str$(mixer_anzahl)
				elseif(d$(x)="[midi]")then
					midi_anzahl=x
					//print "midi:"+str$(midi_anzahl)
				elseif(d$(x)="[sblaster]")then
					sblaster_anzahl=x
					//print "sblaster:"+str$(sblaster_anzahl)
				elseif(d$(x)="[gus]")then
					gus_anzahl=x
					//print "gus:"+str$(gus_anzahl)
				elseif(d$(x)="[speaker]")then
					speaker_anzahl=x
					//print "speaker:"+str$(speaker_anzahl)
				elseif(d$(x)="[bios]")then
					bios_anzahl=x
					//print "bios:"+str$(bios_anzahl)
				elseif(d$(x)="[dos]")then
					dos_anzahl=x
					//print "dos:"+str$(dos_anzahl)
				elseif(d$(x)="[modem]")then
					modem_anzahl=x
					//print "modem:"+str$(modem_anzahl)
				elseif(d$(x)="[ipx]")then
					ipx_anzahl=x
					//print "ipx:"+str$(ipx_anzahl)
				elseif(d$(x)="[autoexec]")then
					autoexec_anzahl=x
					//print "autoexec:"+str$(autoexec_anzahl)
				endif
				end_anzahl=x
		next i
		
		for sdl_run = sdl_anzahl to (dosbox_anzahl-1)
		
			dim splitting_config_entry$(1)
			splitting=split(d$(sdl_run), splitting_config_entry$(), "=")
				abfrage$=left$(d$(sdl_run),1)
				if(abfrage$="[")then
				elseif(abfrage$="/")then
				elseif(abfrage$="#")then
				elseif(abfrage$="")then
				else
					if(splitting_config_entry$(1)="fullscreen")then
						if(splitting_config_entry$(2)="true")then
							DROPBOX SELECT "fullscreen", 1
						elseif(splitting_config_entry$(2)="false")then
							DROPBOX SELECT "fullscreen", 2
						endif
					elseif(splitting_config_entry$(1)="fulldouble")then
						if(splitting_config_entry$(2)="true")then
							DROPBOX SELECT "fulldouble", 1
						elseif(splitting_config_entry$(2)="false")then
							DROPBOX SELECT "fulldouble", 2
						endif
					elseif(splitting_config_entry$(1)="fullfixed")then
						if(splitting_config_entry$(2)="true")then
							DROPBOX SELECT "fullfixed", 1
						elseif(splitting_config_entry$(2)="false")then
							DROPBOX SELECT "fullfixed", 2
						endif
					elseif(splitting_config_entry$(1)="fullresolution")then
						if(splitting_config_entry$(2)="640x480")then
							DROPBOX SELECT "fullresolution", 1
						elseif(splitting_config_entry$(2)="720x576")then
							DROPBOX SELECT "fullresolution", 2
						elseif(splitting_config_entry$(2)="768x576")then
							DROPBOX SELECT "fullresolution", 3
						elseif(splitting_config_entry$(2)="800x600")then
							DROPBOX SELECT "fullresolution", 4
						elseif(splitting_config_entry$(2)="1024x768")then
							DROPBOX SELECT "fullresolution", 5
						elseif(splitting_config_entry$(2)="1152x864")then
							DROPBOX SELECT "fullresolution", 6
						elseif(splitting_config_entry$(2)="1250x1024")then
							DROPBOX SELECT "fullresolution", 7
						elseif(splitting_config_entry$(2)="1600x1200")then
							DROPBOX SELECT "fullresolution", 8							
						endif
					elseif(splitting_config_entry$(1)="output")then
						if(splitting_config_entry$(2)="surface")then
							DROPBOX SELECT "output", 1
						elseif(splitting_config_entry$(2)="overlay")then
							DROPBOX SELECT "output", 2
						elseif(splitting_config_entry$(2)="opengl")then
							DROPBOX SELECT "output", 3
						elseif(splitting_config_entry$(2)="openglnb")then
							DROPBOX SELECT "output", 4						
						endif
					elseif(splitting_config_entry$(1)="hwscale")then
						if(splitting_config_entry$(2)="1.00")then
							DROPBOX SELECT "hwscale", 1
						elseif(splitting_config_entry$(2)="2.00")then
							DROPBOX SELECT "hwscale", 2
						elseif(splitting_config_entry$(2)="3.00")then
							DROPBOX SELECT "hwscale", 3
						elseif(splitting_config_entry$(2)="4.00")then
							DROPBOX SELECT "hwscale", 4
						endif					
					elseif(splitting_config_entry$(1)="autolock")then
						if(splitting_config_entry$(2)="true")then
							DROPBOX SELECT "autolock", 1
						elseif(splitting_config_entry$(2)="false")then
							DROPBOX SELECT "autolock", 2
						endif
					elseif(splitting_config_entry$(1)="sensitivity")then
						SLIDER SET "sensitivity", val(splitting_config_entry$(2))
						TEXTCONTROL SET "mouse_show", splitting_config_entry$(2)
					elseif(splitting_config_entry$(1)="waitonerror")then
						if(splitting_config_entry$(2)="true")then
							DROPBOX SELECT "waitonerror", 1
						elseif(splitting_config_entry$(2)="false")then
							DROPBOX SELECT "waitonerror", 2
						endif
					elseif(splitting_config_entry$(1)="waitonerror")then
						if(splitting_config_entry$(2)="true")then
							DROPBOX SELECT "waitonerror", 1
						elseif(splitting_config_entry$(2)="false")then
							DROPBOX SELECT "waitonerror", 2
						endif
					elseif(splitting_config_entry$(1)="priority")then
						if(splitting_config_entry$(2)="lower,lower")then
							DROPBOX SELECT "priority", 1
						elseif(splitting_config_entry$(2)="lower,normal")then
							DROPBOX SELECT "priority", 2
						elseif(splitting_config_entry$(2)="lower,higher")then
							DROPBOX SELECT "priority", 3
						elseif(splitting_config_entry$(2)="lower,highest")then
							DROPBOX SELECT "priority", 4
						elseif(splitting_config_entry$(2)="normal,lower")then
							DROPBOX SELECT "priority", 5
						elseif(splitting_config_entry$(2)="normal,normal")then
							DROPBOX SELECT "priority", 6
						elseif(splitting_config_entry$(2)="normal,higher")then
							DROPBOX SELECT "priority", 7
						elseif(splitting_config_entry$(2)="normal,highest")then
							DROPBOX SELECT "priority", 8
						elseif(splitting_config_entry$(2)="higher,lower")then
							DROPBOX SELECT "priority", 9
						elseif(splitting_config_entry$(2)="higher,normal")then
							DROPBOX SELECT "priority", 10
						elseif(splitting_config_entry$(2)="higher,higher")then
							DROPBOX SELECT "priority", 11
						elseif(splitting_config_entry$(2)="higher,highest")then
							DROPBOX SELECT "priority", 12
						elseif(splitting_config_entry$(2)="highest,lower")then
							DROPBOX SELECT "priority", 13
						elseif(splitting_config_entry$(2)="highest,normal")then
							DROPBOX SELECT "priority", 14
						elseif(splitting_config_entry$(2)="highest,higher")then
							DROPBOX SELECT "priority", 15
						elseif(splitting_config_entry$(2)="highest,highest")then
							DROPBOX SELECT "priority", 16
						endif
					elseif(splitting_config_entry$(1)="mapperfile")then
						TEXTCONTROL CLEAR "mapperfile"
						TEXTCONTROL SET "mapperfile", splitting_config_entry$(2)
					endif
				endif
		next sdl_run
							
		for dosbox_run = dosbox_anzahl to (render_anzahl-1)
		
			dim splitting_config_entry$(1)
			splitting=split(d$(dosbox_run), splitting_config_entry$(), "=")
				abfrage$=left$(d$(dosbox_run),1)
				if(abfrage$="[")then
				elseif(abfrage$="/")then
				elseif(abfrage$="#")then
				elseif(abfrage$="")then
				else
					if(splitting_config_entry$(1)="language")then
						TEXTCONTROL CLEAR "language"
						TEXTCONTROL SET "language", splitting_config_entry$(2)
					elseif(splitting_config_entry$(1)="machine")then
						if(splitting_config_entry$(2)="vga")then
							DROPBOX SELECT "machine", 1
						elseif(splitting_config_entry$(2)="cga")then
							DROPBOX SELECT "machine", 2
						elseif(splitting_config_entry$(2)="hercules")then
							DROPBOX SELECT "machine", 3
						elseif(splitting_config_entry$(2)="tandy")then
							DROPBOX SELECT "machine", 4
						endif
					elseif(splitting_config_entry$(1)="captures")then
						TEXTCONTROL CLEAR "captures"
						TEXTCONTROL SET "captures", splitting_config_entry$(2)
					elseif(splitting_config_entry$(1)="memsize")then
						if(splitting_config_entry$(2)="4")then
							DROPBOX SELECT "memsize", 1
						elseif(splitting_config_entry$(2)="8")then
							DROPBOX SELECT "memsize", 2
						elseif(splitting_config_entry$(2)="16")then
							DROPBOX SELECT "memsize", 3
						elseif(splitting_config_entry$(2)="32")then
							DROPBOX SELECT "memsize", 4
						elseif(splitting_config_entry$(2)="64")then
							DROPBOX SELECT "memsize", 5
						endif
					endif
				endif
		next dosbox_run
		
		for render_run = render_anzahl to (cpu_anzahl-1)
		
			dim splitting_config_entry$(1)
			splitting=split(d$(render_run), splitting_config_entry$(), "=")
				abfrage$=left$(d$(render_run),1)
				if(abfrage$="[")then
				elseif(abfrage$="/")then
				elseif(abfrage$="#")then
				elseif(abfrage$="")then
				else
					if(splitting_config_entry$(1)="frameskip")then
						SLIDER SET "frameskip", val(splitting_config_entry$(2))
						TEXTCONTROL SET "frameskip_show", splitting_config_entry$(2)
					elseif(splitting_config_entry$(1)="aspect")then
						if(splitting_config_entry$(2)="true")then
							DROPBOX SELECT "aspect", 1
						elseif(splitting_config_entry$(2)="false")then
							DROPBOX SELECT "aspect", 2
						endif
					elseif(splitting_config_entry$(1)="scaler")then
						if(splitting_config_entry$(2)="none")then
							DROPBOX SELECT "scaler", 1
						elseif(splitting_config_entry$(2)="normal2x")then
							DROPBOX SELECT "scaler", 2
						elseif(splitting_config_entry$(2)="advmame2x")then
							DROPBOX SELECT "scaler", 3
						elseif(splitting_config_entry$(2)="advmame3x")then
							DROPBOX SELECT "scaler", 4
						elseif(splitting_config_entry$(2)="advinterp2x")then
							DROPBOX SELECT "scaler", 5
						elseif(splitting_config_entry$(2)="tv2x")then
							DROPBOX SELECT "scaler", 6
						endif
					endif
				endif
		next render_run
		

		for cpu_run = cpu_anzahl to (mixer_anzahl-1)
		
			dim splitting_config_entry$(1)
			splitting=split(d$(cpu_run), splitting_config_entry$(), "=")
				abfrage$=left$(d$(cpu_run),1)
				if(abfrage$="[")then
				elseif(abfrage$="/")then
				elseif(abfrage$="#")then
				elseif(abfrage$="")then
				else
					if(splitting_config_entry$(1)="core")then
						if(splitting_config_entry$(2)="simple")then
							DROPBOX SELECT "core", 1
						elseif(splitting_config_entry$(2)="normal")then
							DROPBOX SELECT "core", 2
						elseif(splitting_config_entry$(2)="full")then
							DROPBOX SELECT "core", 3
						elseif(splitting_config_entry$(2)="dynamic")then
							DROPBOX SELECT "core", 4
						endif
					elseif(splitting_config_entry$(1)="cycles")then
						SLIDER SET "cycles", val(splitting_config_entry$(2))
						TEXTCONTROL SET "cycles_show", splitting_config_entry$(2)
					elseif(splitting_config_entry$(1)="cycleup")then
						SLIDER SET "cycleup", val(splitting_config_entry$(2))
						TEXTCONTROL SET "cycleup_show", splitting_config_entry$(2)
					elseif(splitting_config_entry$(1)="cycledown")then
						SLIDER SET "cycledown", val(splitting_config_entry$(2))
						TEXTCONTROL SET "cycledown_show", splitting_config_entry$(2)
					endif
				endif
		next cpu_run
		
		for mixer_run = mixer_anzahl to (midi_anzahl-1)
		
			dim splitting_config_entry$(1)
			splitting=split(d$(mixer_run), splitting_config_entry$(), "=")
				abfrage$=left$(d$(mixer_run),1)
				if(abfrage$="[")then
				elseif(abfrage$="/")then
				elseif(abfrage$="#")then
				elseif(abfrage$="")then
				else
					if(splitting_config_entry$(1)="nosound")then
						if(splitting_config_entry$(2)="true")then
							DROPBOX SELECT "nosound", 1
						elseif(splitting_config_entry$(2)="false")then
							DROPBOX SELECT "nosound", 2
						endif
					elseif(splitting_config_entry$(1)="rate")then
						SLIDER SET "rate", val(splitting_config_entry$(2))
						TEXTCONTROL SET "rate_show", splitting_config_entry$(2)
					elseif(splitting_config_entry$(1)="blocksize")then
						SLIDER SET "blocksize", val(splitting_config_entry$(2))
						TEXTCONTROL SET "blocksize_show", splitting_config_entry$(2)
					elseif(splitting_config_entry$(1)="prebuffer")then
						SLIDER SET "prebuffer", val(splitting_config_entry$(2))
						TEXTCONTROL SET "prebuffer_show", splitting_config_entry$(2)
					endif
				endif
		next mixer_run
		
		for midi_run = midi_anzahl to (sblaster_anzahl-1)
		
			dim splitting_config_entry$(1)
			splitting=split(d$(midi_run), splitting_config_entry$(), "=")
				abfrage$=left$(d$(midi_run),1)
				if(abfrage$="[")then
				elseif(abfrage$="/")then
				elseif(abfrage$="#")then
				elseif(abfrage$="")then
				else
					if(splitting_config_entry$(1)="mpu401")then
						if(splitting_config_entry$(2)="true")then
							DROPBOX SELECT "mpu401", 1
						elseif(splitting_config_entry$(2)="false")then
							DROPBOX SELECT "mpu401", 2
						endif
					elseif(splitting_config_entry$(1)="intelligent")then
						if(splitting_config_entry$(2)="true")then
							DROPBOX SELECT "midi_intelligent", 1
						elseif(splitting_config_entry$(2)="false")then
							DROPBOX SELECT "midi_intelligent", 2
						endif
					elseif(splitting_config_entry$(1)="device")then
						if(splitting_config_entry$(2)="default")then
							DROPBOX SELECT "midi_device", 1
						elseif(splitting_config_entry$(2)="alsa")then
							DROPBOX SELECT "midi_device", 2
						elseif(splitting_config_entry$(2)="oss")then
							DROPBOX SELECT "midi_device", 3
						elseif(splitting_config_entry$(2)="win32")then
							DROPBOX SELECT "midi_device", 4
						elseif(splitting_config_entry$(2)="coreaudio")then
							DROPBOX SELECT "midi_device", 5
						elseif(splitting_config_entry$(2)="none")then
							DROPBOX SELECT "midi_device", 6
						endif
					elseif(splitting_config_entry$(1)="config")then
						TEXTCONTROL CLEAR "midiconfig"
						TEXTCONTROL SET "midiconfig", splitting_config_entry$(2)
					endif
				endif
		next midi_run
		
		for sblaster_run = sblaster_anzahl to (gus_anzahl-1)
		
			dim splitting_config_entry$(1)
			splitting=split(d$(sblaster_run), splitting_config_entry$(), "=")
				abfrage$=left$(d$(sblaster_run),1)
				if(abfrage$="[")then
				elseif(abfrage$="/")then
				elseif(abfrage$="#")then
				elseif(abfrage$="")then
				else
					if(splitting_config_entry$(1)="type")then
						if(splitting_config_entry$(2)="none")then
							DROPBOX SELECT "sb_type", 1
						elseif(splitting_config_entry$(2)="sb1")then
							DROPBOX SELECT "sb_type", 2
						elseif(splitting_config_entry$(2)="sb2")then
							DROPBOX SELECT "sb_type", 3
						elseif(splitting_config_entry$(2)="sbpro1")then
							DROPBOX SELECT "sb_type", 4
						elseif(splitting_config_entry$(2)="sbpro2")then
							DROPBOX SELECT "sb_type", 5
						elseif(splitting_config_entry$(2)="sb16")then
							DROPBOX SELECT "sb_type", 6
						endif
					elseif(splitting_config_entry$(1)="base")then
						if(splitting_config_entry$(2)="220")then
							DROPBOX SELECT "sb_base", 1
						elseif(splitting_config_entry$(2)="240")then
							DROPBOX SELECT "sb_base", 2
						endif
					elseif(splitting_config_entry$(1)="irq")then
						DROPBOX SELECT "sb_irq", val(splitting_config_entry$(2))
					elseif(splitting_config_entry$(1)="dma")then
						DROPBOX SELECT "sb_dma", val(splitting_config_entry$(2))
					elseif(splitting_config_entry$(1)="hdma")then
						DROPBOX SELECT "sb_hdma", val(splitting_config_entry$(2))
					elseif(splitting_config_entry$(1)="mixer")then
						if(splitting_config_entry$(2)="true")then
							DROPBOX SELECT "sb_mixer", 1
						elseif(splitting_config_entry$(2)="false")then
							DROPBOX SELECT "sb_mixer", 2
						endif
					elseif(splitting_config_entry$(1)="oplmode")then
						if(splitting_config_entry$(2)="auto")then
							DROPBOX SELECT "sb_oplmode", 1
						elseif(splitting_config_entry$(2)="cms")then
							DROPBOX SELECT "sb_oplmode", 2
						elseif(splitting_config_entry$(2)="opl2")then
							DROPBOX SELECT "sb_oplmode", 3
						elseif(splitting_config_entry$(2)="dualopl2")then
							DROPBOX SELECT "sb_oplmode", 4
						elseif(splitting_config_entry$(2)="opl3")then
							DROPBOX SELECT "sb_oplmode", 5
						endif
					elseif(splitting_config_entry$(1)="oplrate")then
						SLIDER SET "sblaster_oplrate", val(splitting_config_entry$(2))
						TEXTCONTROL SET "oplrate_show", splitting_config_entry$(2)
					endif
				endif
		next sblaster_run

		for gus_run = gus_anzahl to (speaker_anzahl-1)
		
			dim splitting_config_entry$(1)
			splitting=split(d$(gus_run), splitting_config_entry$(), "=")
				abfrage$=left$(d$(gus_run),1)
				if(abfrage$="[")then
				elseif(abfrage$="/")then
				elseif(abfrage$="#")then
				elseif(abfrage$="")then
				else
					if(splitting_config_entry$(1)="gus")then
						if(splitting_config_entry$(2)="true")then
							DROPBOX SELECT "gus", 1
						elseif(splitting_config_entry$(2)="false")then
							DROPBOX SELECT "gus", 2
						endif
					elseif(splitting_config_entry$(1)="rate")then
						SLIDER SET "gus_rate", val(splitting_config_entry$(2))
						TEXTCONTROL SET "gus_rate_show", splitting_config_entry$(2)
					elseif(splitting_config_entry$(1)="base")then
						if(splitting_config_entry$(2)="220")then
							DROPBOX SELECT "gus_base", 1
						elseif(splitting_config_entry$(2)="240")then
							DROPBOX SELECT "gus_base", 2
						endif
					elseif(splitting_config_entry$(1)="irq1")then
						DROPBOX SELECT "gus_irq1", val(splitting_config_entry$(2))
					elseif(splitting_config_entry$(1)="irq2")then
						DROPBOX SELECT "gus_irq2", val(splitting_config_entry$(2))
					elseif(splitting_config_entry$(1)="dma1")then
						DROPBOX SELECT "gus_dma1", val(splitting_config_entry$(2))
					elseif(splitting_config_entry$(1)="dma2")then
						DROPBOX SELECT "gus_dma2", val(splitting_config_entry$(2))
					elseif(splitting_config_entry$(1)="ultradir")then
						TEXTCONTROL CLEAR "gus_ultradir"
						TEXTCONTROL SET "gus_ultradir", splitting_config_entry$(2)
					endif
				endif
		next gus_run		
		
		for speaker_run = speaker_anzahl to (bios_anzahl-1)
		
			dim splitting_config_entry$(1)
			splitting=split(d$(speaker_run), splitting_config_entry$(), "=")
				abfrage$=left$(d$(speaker_run),1)
				if(abfrage$="[")then
				elseif(abfrage$="/")then
				elseif(abfrage$="#")then
				elseif(abfrage$="")then
				else
					if(splitting_config_entry$(1)="pcspeaker")then
						if(splitting_config_entry$(2)="true")then
							DROPBOX SELECT "pcspeaker", 1
						elseif(splitting_config_entry$(2)="false")then
							DROPBOX SELECT "pcspeaker", 2
						endif
					elseif(splitting_config_entry$(1)="pcrate")then
						SLIDER SET "pcrate", val(splitting_config_entry$(2))
						TEXTCONTROL SET "pcrate_show", splitting_config_entry$(2)
					elseif(splitting_config_entry$(1)="tandyrate")then
						SLIDER SET "tandyrate", val(splitting_config_entry$(2))
						TEXTCONTROL SET "tandyrate_show", splitting_config_entry$(2)
					elseif(splitting_config_entry$(1)="disney")then
						if(splitting_config_entry$(2)="true")then
							DROPBOX SELECT "disney", 1
						elseif(splitting_config_entry$(2)="false")then
							DROPBOX SELECT "disney", 2
						endif
					endif
				endif
		next speaker_run

		for dos_run = dos_anzahl to (modem_anzahl-1)
		
			dim splitting_config_entry$(1)
			splitting=split(d$(dos_run), splitting_config_entry$(), "=")
				abfrage$=left$(d$(dos_run),1)
				if(abfrage$="[")then
				elseif(abfrage$="/")then
				elseif(abfrage$="#")then
				elseif(abfrage$="")then
				else
					if(splitting_config_entry$(1)="xms")then
						if(splitting_config_entry$(2)="true")then
							DROPBOX SELECT "xms", 1
						elseif(splitting_config_entry$(2)="false")then
							DROPBOX SELECT "xms", 2
						endif
					elseif(splitting_config_entry$(1)="ems")then
						if(splitting_config_entry$(2)="true")then
							DROPBOX SELECT "ems", 1
						elseif(splitting_config_entry$(2)="false")then
							DROPBOX SELECT "ems", 2
						endif
					endif
				endif
		next dos_run
		
		
		for modem_run = modem_anzahl to (ipx_anzahl-1)
		
			dim splitting_config_entry$(1)
			splitting=split(d$(modem_run), splitting_config_entry$(), "=")
				abfrage$=left$(d$(modem_run),1)
				if(abfrage$="[")then
				elseif(abfrage$="/")then
				elseif(abfrage$="#")then
				elseif(abfrage$="")then
				else
					if(splitting_config_entry$(1)="modem")then
						if(splitting_config_entry$(2)="true")then
							DROPBOX SELECT "modem", 1
						elseif(splitting_config_entry$(2)="false")then
							DROPBOX SELECT "modem", 2
						endif
					elseif(splitting_config_entry$(1)="comport")then
						if(splitting_config_entry$(2)="1")then
							DROPBOX SELECT "comport", 1
						elseif(splitting_config_entry$(2)="2")then
							DROPBOX SELECT "comport", 2
						endif
					elseif(splitting_config_entry$(1)="listenport")then
						TEXTCONTROL CLEAR "listenport"
						TEXTCONTROL SET "listenport", splitting_config_entry$(2)
					endif
				endif
		next modem_run
		
		for ipx_run = ipx_anzahl to (autoexec_anzahl-1)
		
			dim splitting_config_entry$(1)
			splitting=split(d$(ipx_run), splitting_config_entry$(), "=")
				abfrage$=left$(d$(ipx_run),1)
				if(abfrage$="[")then
				elseif(abfrage$="/")then
				elseif(abfrage$="#")then
				elseif(abfrage$="")then
				else
					if(splitting_config_entry$(1)="ipx")then
						if(splitting_config_entry$(2)="true")then
							DROPBOX SELECT "ipx", 1
						elseif(splitting_config_entry$(2)="false")then
							DROPBOX SELECT "ipx", 2
						endif
					endif
				endif
		next ipx_run
		
		for autoexec_run = autoexec_anzahl to end_anzahl
		
			dim splitting_config_entry$(1)
			splitting=split(d$(autoexec_run), splitting_config_entry$(), "=")
				abfrage$=left$(d$(autoexec_run),1)
				if(abfrage$="[")then
				elseif(abfrage$="/")then
				elseif(abfrage$="#")then
				elseif(abfrage$="")then
				else
					if(splitting_config_entry$(1)="autoexec")then
						TEXTEDIT CLEAR "autoexec"
						TEXTEDIT ADD "autoexec", splitting_config_entry$(2)
					endif
				endif
		next autoexec_run
		
	wend
	
	close(auslesen)
end sub

sub generator_werte()
	//sdl
	fullscreen_save$="false"
	fulldouble_save$="false"
	fullfixed_save$="false"
	fullresolution_save$="1024x768"
	output_save$="surface"
	hwscale_save$="1.00"
	autolock_save$="true"
	waitonerror_save$="true"
	priority_save$="higher,normal"
	//dosbox
	machine_save$="vga"
	memsize_save$="16"
	//render
	aspect_save$="false"
	scaler_save$="normal2x"
	//cpu
	core_save$="normal"
	//mixer
	nosound_save$="false"
	//midi
	mpu401_save$="true"
	midi_itelligent_save$="true"
	midi_device_save$="default"
	//sblaster
	sb_type_save$="sb16"
	sb_base_save$="220"
	sb_irq_save$="7"
	sb_dma_save$="1"
	sb_hdma_save$="5"
	sb_mixer_save$="true"
	sb_oplmode_save$="auto"
	//gus
	gus_save$="true"
	gus_base_save$="240"
	gus_irq1_save$="5"
	gus_irq2_save$="5"
	gus_dma1_save$="3"
	gus_dma2_save$="3"
	//speaker
	pcspeaker_save$="true"
	disney_save$="true"
	//dos
	xms_save$="true"
	ems_save$="true"
	//modem
	modem_save$="false"
	comport_save$="2"
	//ipx
	ipx_save$="false"
end sub

sub save_generator_config()

	SaveConfigFile$ = FILEPANEL "Save-File", "Save configuration", "/boot/apps/Emulators/DosBox/config"
	
		//slider get
		//sdl
		sensitivity_save = SLIDER GET "sensitivity"
		sensitivity_save$=str$(sensitivity_save)
		//print sensitivity_save
		//render
		frameskip_save = SLIDER GET "frameskip"
		frameskip_save$=str$(frameskip_save)
		//print frameskip_save
		//cpu
		cycles_save = SLIDER GET "cycles"
		cycles_save$=str$(cycles_save)
		//print cycles_save
		cycleup_save = SLIDER GET "cycleup"
		cycleup_save$=str$(cycleup_save)
		//print cycleup_save
		cycledown_save = SLIDER GET "cycledown"
		cycledown_save$=str$(cycledown_save)
		//print cycledown_save
		//mixer
		rate_save = SLIDER GET "rate"
		rate_save$=str$(rate_save)
		//print rate_save
		blocksize_save = SLIDER GET "blocksize"
		blocksize_save$=str$(blocksize_save)
		//print blocksize_save
		prebuffer_save = SLIDER GET "prebuffer"
		prebuffer_save$=str$(prebuffer_save)
		//print prebuffer_save
		//sblaster
		sblaster_oplrate_save = SLIDER GET "sblaster_oplrate"
		sb_oplrate_save$=str$(sblaster_oplrate_save)
		//print sblaster_oplrate_save
		//gus
		gus_rate_save = SLIDER GET "gus_rate"
		gus_rate_save$=str$(gus_rate_save)
		//print gus_rate_save
		//speaker
		pcrate_save = SLIDER GET "pcrate"
		pcrate_save$=str$(pcrate_save)
		//print pcrate_save
		tandyrate_save = SLIDER GET "tandyrate"
		tandyrate_save$=str$(tandyrate_save)
		//print tandyrate_save
		
		//textcontrols get
		//sdl
		mapperfile_save$ = TEXTCONTROL GET$ "mapperfile"
		//dosbox
		language_save$ = TEXTCONTROL GET$ "language"
		captures_save$ = TEXTCONTROL GET$ "captures"
		//midi
		midiconfig_save$ = TEXTCONTROL GET$ "midiconfig"
		//gus
		gus_ultradir_save$ = TEXTCONTROL GET$ "gus_ultradir"
		//modem
		listenport_save$ = TEXTCONTROL GET$ "listenport"
		//autoexec
		autoexec_save$ = TEXTCONTROL GET$ "autoexec"
	
	anlegen_config = open(SaveConfigFile$, "w")
		print #anlegen_config "[sdl]"
		print #anlegen_config "fullscreen="+fullscreen_save$
		print #anlegen_config "fulldouble="+fulldouble_save$
		print #anlegen_config "fullfixed="+fullfixed_save$
		print #anlegen_config "fullresolution="+fullresolution_save$
		print #anlegen_config "output="+output_save$
		print #anlegen_config "hwscale="+hwscale_save$
		print #anlegen_config "autolock="+autolock_save$
		print #anlegen_config "sensitivity="+sensitivity_save$
		print #anlegen_config "waitonerror="+waitonerror_save$
		print #anlegen_config "priority="+priority_save$
		print #anlegen_config "mapperfile="+mapperfile_save$
		print #anlegen_config "[dosbox]"
		print #anlegen_config "language="+language_save$
		print #anlegen_config "machine="+machine_save$
		print #anlegen_config "captures="+captures_save$
		print #anlegen_config "memsize="+memsize_save$
		print #anlegen_config "[render]"
		print #anlegen_config "frameskip="+frameskip_save$
		print #anlegen_config "aspect="+aspect_save$
		print #anlegen_config "scaler="+scaler_save$
		print #anlegen_config "[cpu]"
		print #anlegen_config "core="+core_save$
		print #anlegen_config "cycles="+cycles_save$
		print #anlegen_config "cycleup="+cycleup_save$
		print #anlegen_config "cycledown="+cycledown_save$
		print #anlegen_config "[mixer]"
		print #anlegen_config "nosound="+nosound_save$
		print #anlegen_config "rate="+rate_save$
		print #anlegen_config "blocksize="+blocksize_save$
		print #anlegen_config "prebuffer="+prebuffer_save$
		print #anlegen_config "[midi]"
		print #anlegen_config "mpu401="+mpu401_save$
		print #anlegen_config "intelligent="+midi_itelligent_save$
		print #anlegen_config "device="+midi_device_save$
		print #anlegen_config "config="+midiconfig_save$
		print #anlegen_config "[sblaster]"
		print #anlegen_config "type="+sb_type_save$
		print #anlegen_config "base="+sb_base_save$
		print #anlegen_config "irq="+sb_irq_save$
		print #anlegen_config "dma="+sb_dma_save$
		print #anlegen_config "hdma="+sb_hdma_save$
		print #anlegen_config "mixer="+sb_mixer_save$
		print #anlegen_config "oplmode="+sb_oplmode_save$
		print #anlegen_config "oplrate="+sb_oplrate_save$
		print #anlegen_config "[gus]"
		print #anlegen_config "gus="+gus_save$
		print #anlegen_config "rate="+gus_rate_save$
		print #anlegen_config "base="+gus_base_save$
		print #anlegen_config "irq1="+gus_irq1_save$
		print #anlegen_config "irq2="+gus_irq2_save$
		print #anlegen_config "dma1="+gus_dma1_save$
		print #anlegen_config "dma2="+gus_dma2_save$
		print #anlegen_config "ultradir="+gus_ultradir_save$
		print #anlegen_config "[speaker]"
		print #anlegen_config "pcspeaker="+pcspeaker_save$
		print #anlegen_config "pcrate="+pcrate_save$
		print #anlegen_config "tandyrate="+tandyrate_save$
		print #anlegen_config "disney="+disney_save$
		print #anlegen_config "[bios]"
		print #anlegen_config "# Nothing to setup yet!"
		print #anlegen_config "[dos]"
		print #anlegen_config "xms="+xms_save$
		print #anlegen_config "ems="+ems_save$
		print #anlegen_config "[modem]"
		print #anlegen_config "modem="+modem_save$
		print #anlegen_config "comport="+comport_save$
		print #anlegen_config "listenport="+listenport_save$
		print #anlegen_config "[ipx]"
		print #anlegen_config "ipx="+ipx_save$
		print #anlegen_config "[autoexec]"
		print #anlegen_config autoexec_save$
	close(anlegen_config)
end sub


// Startup
// Check Folders

//config folder

sub create_default_config()

	ceck1_1$="default.cfg"
	ceck1_1_check$=system$("find /boot/apps/Emulators/DosBox/config/default.cfg")
	ceck1_1_ready$=system$("basename "+ceck1_1_check$)
	if(ceck1_1$=ceck1_1_ready$)then
	else
		anlegen = open("/boot/apps/Emulators/DosBox/config/default.cfg", "w")
				print #anlegen "[sdl]"
				print #anlegen "fullscreen=false"
				print #anlegen "fulldouble=false"
				print #anlegen "fullfixed=false"
				print #anlegen "fullresolution=1024x768"
				print #anlegen "output=surface"
				print #anlegen "hwscale=1.00"
				print #anlegen "autolock=true"
				print #anlegen "sensitivity=100"
				print #anlegen "waitonerror=true"
				print #anlegen "priority=higher,normal"
				print #anlegen "mapperfile=mapper.txt"
				print #anlegen "[dosbox]"
				print #anlegen "language="
				print #anlegen "machine=vga"
				print #anlegen "captures=capture"
				print #anlegen "memsize=16"
				print #anlegen "[render]"
				print #anlegen "frameskip=0"
				print #anlegen "aspect=false"
				print #anlegen "scaler=normal2x"
				print #anlegen "[cpu]"
				print #anlegen "core=normal"
				print #anlegen "cycles=2500"
				print #anlegen "cycleup=500"
				print #anlegen "cycledown=20"
				print #anlegen "[mixer]"
				print #anlegen "nosound=false"
				print #anlegen "rate=22050"
				print #anlegen "blocksize=2048"
				print #anlegen "prebuffer=10"
				print #anlegen "[midi]"
				print #anlegen "mpu401=true"
				print #anlegen "intelligent=true"
				print #anlegen "device=default"
				print #anlegen "config="
				print #anlegen "[sblaster]"
				print #anlegen "type=sb16"
				print #anlegen "base=220"
				print #anlegen "irq=7"
				print #anlegen "dma=1"
				print #anlegen "hdma=5"
				print #anlegen "mixer=true"
				print #anlegen "oplmode=auto"
				print #anlegen "oplrate=22050"
				print #anlegen "[gus]"
				print #anlegen "gus=true"
				print #anlegen "rate=22050"
				print #anlegen "base=240"
				print #anlegen "irq1=5"
				print #anlegen "irq2=5"
				print #anlegen "dma1=3"
				print #anlegen "dma2=3"
				print #anlegen "ultradir=C:\ULTRASND"
				print #anlegen "[speaker]"
				print #anlegen "pcspeaker=true"
				print #anlegen "pcrate=22050"
				print #anlegen "tandyrate=22050"
				print #anlegen "disney=true"
				print #anlegen "[bios]"
				print #anlegen "# Nothing to setup yet!"
				print #anlegen "[dos]"
				print #anlegen "xms=true"
				print #anlegen "ems=true"
				print #anlegen "[modem]"
				print #anlegen "modem=false"
				print #anlegen "comport=2"
				print #anlegen "listenport=23"
				print #anlegen "[ipx]"
				print #anlegen "ipx=false"
				print #anlegen "[autoexec]"
				print #anlegen ""
			close(anlegen)
		endif
end sub

//settings folder

sub create_dosboxgui_settings()

	ceck2_1$="dosboxgui.cfg"
	ceck2_1_check$=system$("find /boot/apps/Emulators/DosBox/settings/dosboxgui.cfg")
	ceck2_1_ready$=system$("basename "+ceck2_1_check$)
	if(ceck2_1$=ceck2_1_ready$)then
	else
		anlegen = open("/boot/apps/Emulators/DosBox/settings/dosboxgui.cfg", "w")
				print #anlegen "[sdl]"
				print #anlegen "mouse_mini=0"
				print #anlegen "mouse_maxi=100"
				print #anlegen "[render]"
				print #anlegen "frameskip_mini=0"
				print #anlegen "frameskip_maxi=10"
				print #anlegen "[cpu]"
				print #anlegen "cycles_mini=0"
				print #anlegen "cycles_maxi=2500"
				print #anlegen "cycleup_mini=0"
				print #anlegen "cycleup_maxi=500"
				print #anlegen "cycledown_mini=0"
				print #anlegen "cycledown_maxi=20"
				print #anlegen "[mixer]"
				print #anlegen "samplerate_mini=0"
				print #anlegen "samplerate_maxi=22050"
				print #anlegen "blocksize_mini=0"
				print #anlegen "blocksize_maxi=2048"
				print #anlegen "prepuffer_mini=0"
				print #anlegen "prepuffer_maxi=10"
				print #anlegen "[sblaster]"
				print #anlegen "oplrate_mini=0"
				print #anlegen "oplrate_maxi=22050"
				print #anlegen "[gus]"
				print #anlegen "gusrate_mini=0"
				print #anlegen "gusrate_maxi=22050"
				print #anlegen "[speaker]"
				print #anlegen "pcrate_mini=0"
				print #anlegen "pcrate_maxi=22050"
				print #anlegen "tandyrate_mini=0"
				print #anlegen "tandyrate_maxi=22050"
			close(anlegen)
		endif
end sub

 sub IfExists(filename$)
     return not system("test -e "+filename$)
end sub