----------------------------- Dave's DOSBOX Distribution - updated: Dec-2020 Much of my software was written in the fairly early days of personal computers and runs under DOS. This was great back in the day, but 16-bit DOS software is not supported on modern 64 bit systems. Being somewhat of a DOSHEAD, I've found a decent solution! The DOSBOX project provides a nice DOS compatible environment on modern systems. Note that the stated intent of the DOSBOX developers is running DOS games, and they have no interest in creating a DOS for any other use. As games are among the most challenging of applications to run, this means DosBox hardware compatibility is excellent, but the DOS environment itself has some limitations on things not generally needed for gaming. This file contains a LOT of information, and many people won't want to bother reading all of it - You may want to at least read the section: "DosBox Bugs / Problems" to avoid unnecessary surprises. This is my own DOSBOX distribution which is fundamentally the H-A-L-9000 "Megabuild 6" version which has enhanced serial/networking support, except that some additional things improveing the DOS environment have been set in place for you, and the executable has been patched to use "DOSBOX.INI" as the configuration file name instead of "DOSBOX.CONF" - This avoids a compatibility issue with Windows "Long Filenames" (see below), and makes the config file name consistant in both environments. Here are the binary differences between this DOSBOX.EXE and the original H-A-L-9000 DOSBOX.EXE: 002008E8: 63 6F 6E 66 'conf' -> 69 6E 69 20 'ini ' 00200973: 63 6F 6E 66 2E 0A 'conf.?' -> 69 6E 69 2E 0A 00 'ini.??' 00200990: 63 6F 6E 66 'conf' -> 69 6E 69 20 'ini ' 002009FB: 63 6F 6E 66 'conf' -> 69 6E 69 00 'ini?' 00204B53: 63 6F 6E 66 'conf' -> 69 6E 69 00 'ini?' 00205042: 63 6F 6E 66 'conf' -> 69 6E 69 20 'ini ' Pretty much all of my add-on tools/utilities which I've published in various places work fine in DOSBOX, however my DOSBOX distribution also includes a few utilities I've created to replace standard DOS commands that are either non-existant or limited in DOSBOX. This package contains a pre-configured DOS emulator (DOSBOX) which allows DDS 16-bit software to be used under 64bit windows, and provides access to Windows serial ports and network interfaces within these DOS programs. This preconfigured DOSBOX installation includes: Drive C: for virtual C drive Drive R: for temporary storage (I use a RAMdrive) Drive Y: for access to DOSBOX home directory Drive Z: for DOSBOX internal commands COM1 serial port (works with USB serial ports etc.) NE2000 packet driver (requires WinPcap) I have provided a DB$ETUP command which allows you to easily configure these parameters. ('$ETUP' because even though DB$ETUP only writes DOSBOX.INI in it's own directory, Windows will prompt "Are you sure?" for any program with 'SETUP' in the name). Information on manually configuring the needed parameters in DOSBOX.INI is provided under "additional notes" in the relevant sections. *** Installation *** Unpack this archive to a directory of your choice. \DOSBOX is recommended. Run the Win32 program 'DB$ETUP.EXE' within that directory to set up the initial DOSBOX.INI configuration file. Set up a shortcut to run \DOSBOX\DOSBOX.EXE *** Microsoft DIRECT-X has an issue where it uses an incorrect keyboard *** mapping with some systems/keyboards - if your keyboard does not work *** correctly (Right shift key does not work is a common example), try *** changing the shortcut to run: \DOSBOX\DOSBOXDX.BAT *** instead. This runs DOSBOX with generic windows I/O instead of DIRECT-X, *** which resolves most keyboard problems (but has slower video performance) NOTE: Although this DOSBOX does NOT have to be installed, it may leave some "droppings", like: \Users\...\AppData\Local\DOSBox\ keep this in mind if you wish to completely remove it later! If you wish to use networking within DOSBOX, install WinPcap if you do not already have it on your system. (available on my web site). Place the content you wish to show as your C: drive into: \DOSBOX\C Place any additional commands/utilities that you wish to have available while running DOSBOX into the \DOSBOX\Cmds - this will show up in your PATH as a subdirectry of drive 'Y:' within my DosBox setup. DOSBOX notes: DOSBOX is a Win32 DOS emulator, use it to: - Run 16-bit DOS applications under 64 bit windows. - Access windows COM ports from DOS programs. - Emulate DOS network, sound, video and other hardware which is not available in native windows DOS emulator. This version of DOSBOX can be run from a CD or USBstick without installing it or modifying the host system. Follow these steps to use DOSBOX: - Open the CD/USBstick and navigate to the DOSBOX folder. - Double click the "dosbox.exe" file - this will start DOSBOX, you should see two windows open on your screen. One is the "console" window, and the other will contain the DOS command prompt. - There is always a default 'Z' drive which contains internal DOSBOX commands. Additional "drives" may be auto-mounted by the AUTOEXEC section of DOSBOX.INI (see below). Examine Z:\AUTOEXEC.BAT to see the startup commands. - You can mount directories from your system with the MOUNT command: MOUNT E D:\ <= Mount the CD (assuming D:) as drive E: E: <= Switch to drive E: - You can now access the commands and utiltiies from the CD. If you need to access directories from your local system hard drive, you can mount them as well: MOUNT F c:\tmp <= Mount C:\tmp as drive F: Additional notes: See DOSBOX.TXT for more information about DOSBOX. You can also visit the official DOSBOX web site at: www.dosbox.com and H-A-L-9000's site at: http://home.arcor.de/h-a-l-9000 ** The H-A-L-9000 page appears to be no longer available ** The file 'DOSBOX.INI' contains the DOSBOX configuration - it is a text file and contains plenty of comments describing the various configuration options that are available. You can modify it with any text editor. -- Cycles I have had DOSBOX lock up on a Win7-64 system when 'cycles=max' is set in DOSBOX.INI under [CPU] - changing this to a fixed number prevents the problem! I am now defaulting to: cycles=fixed 25000. You can try 'cycles=max' if it works on your system you will get the maximum possible DOSBOX performance. -- Refreshing Directories DOSBOX does not automatically see changes made to mounted directories on the host system (ie: if you create new files on the host, DOSBOX will not see them until the next time the drive is mounted). To see files changed outside of DOSBOX, type 'rescan' to refresh the directory cache. NOTE: 'rescan' only refreshes the currently CD'd disk. I have provided XRS.COM which does a 'rescan' of all mounted drives. -- Function keys The default DOSBOX function keys use a mix of Ctrl and Alt modifiers which interfere with some DOS utilities which often use Ctrl and Alt as modifiers for function keys. To alleviate this problem, I have provided a KEYS utility which can be run from the DOSBOX command prompt, and manipulates the DOSBOX keymapper file DOSBOX.MAP. NOTE: DOSBOX.INI must contain the [sdl] line: mapperfile=DOSBOX.MAP KEYS /I Installs my (DDS) function key mappings which use Ctrl+Alt+Shift modifiers for all DOSBOX functions. To see the new mappings, use: KEYS Displays the current function key mappings. KEYS /D Deletes DOSBOX.MAP, returning to the default DOSBOX function key mappings. KEYS /? Displays all KEYS command line options. You can further modify the keyboard map (or create your own completely new map) using the DOSBOX interactive mapper by pressing: Ctrl+Alt+Shift-F1 (my map) NOTE: I have found the keymapper hit-and-miss ... sometimes modifiers seem tied to physical keys, and therefore modifications are ignored or never work. - it can take a bit of experimentation to find a setup that is workable - keep a backup of DOSBOX.MAP -- DosBoxTweak I have provided DBT.COM which allows you to easily override a few useful configuration options in the DOSBOX.INI file for the current session only. Use: 'DBT /?' to see the available options. NOTE: The options I've implemented reflect the settings I most often want to change on a session basis -- if you need something else, please contact me and I will look into adding it in. -- Serial ports I've preset a DOS COM1 port to windows COM1 You can change this assignment from the DOSBOX console, example: serial1=directserial realport:COM5 This changes DOS serial port 1 (COM1) to reference windows serial port COM5. serial2=directserial realport:COM2 Sets DOS serial port 2 (COM2) to reference windows serial port COM2. -- Parallel Ports If you wish to use "real" parallel ports in DOSBOX, you need to install the "PortTalk" I/O driver: (available on my web site). Copy PortTalk.SYS to your windows system32\drivers directory. Double-click PortTalk.REG to install the registry entries. You will now be able to configure DOSBOX "real" parallel ports which will pass through to the physical system ports: parallel1=reallpt realbase:378 Assigns LPT1 as a real port, using the hardware parallel port at address 0x378. If you wish, you can remove the PortTalk driver by running 'portoff.exe'. There are reports that PortTalk does NOT work under Vista/Win7/Win64. -- Networking If you wish to use networking in DOSBOX, you will need to install the windows packet capture library on your PC, double-click the 'WinPcap_4_1_2.exe' file and follow the on-screen instructions. NOTE: WinPcap is NOT required unless you intend to use DOS networking. To see a list of available network devices in the DOSBOX status window, type: realnic list at the DOSBOX command line (note: The status window normally opens BEHIND the main DOSBOX command window). Select a network device from the list, eg: realnic 1 to select the first device in the list as the DOSBOX network device. This will enable a virtual NE2000 network card in DOSBOX which is bridged to the indicated physical network device. I have included a DOS NE2000 packet driver in the DOSBOX files. After you have mounted the CD, go to the \DOSBOX directory, and load the NE2000 packet driver with: NE2000 0x60 ------------------- DosBox Bugs/Problems ------------------- --- Long Filenames: There is an issue with Long Filename compatibility under DOSBOX. DOSBOX does not use the "short" versions of Long Filenames generated by Windows, instead it generates it's own names when it loads and scans a directory. This is often - but NOT ALWAYS correct. For example: Under windows command shell, perform: echo 1 >Longfile1.file echo 2 >Longfile2.file echo 3 >Longfile3.file del Longfile2.file As expected, this leaves two files, which are: Long-Name Short-Name Content -------------- ------------ ------- Longfile1.file LONGFI~1.FIL 1 Longfile3.file LONGFI~3.FIL 3 Now, if you run DOSBOX and look, you will find two files: Name Content ------------ ------- LONGFI~1.FIL 1 LONGFI~2.FIL 3 Note the discrepancy between the Windows short name vs the DOSBOX name of the file containing '3'. For these reasons you cannot trust DOSBOX names for long filenames to be the same as the Windows short name, and for the DOSBOX names not to change from time to time. Another problem is that DOSBOX doesn't know about certain characters which are allowed in windows long filenames, but NOT in DOS/SHORT filenames. For example try (within windows): echo >"A,B,C" Windows will create this file, and since ',' is not valid in a DOS filename, will assign it the short name (seen with DIR/x): "A_B_C~1". DOSBOX will see it as "A,B,C" but cannot access that name. You do have some access if you know the windows short filename "A_B_C~1" but you see the wrong name in DIR listings. You can open/read/write with the windows short name, but you cannot delete the file. You can however rename it to something you can delete. --- Setting timestamp: DOSBOX does NOT support INT 21h, function 5701h which sets the timestamp on an open file. It appears to work, but the file timestamp does not change. This can play havoc in file copy/backup programs which try to conserve the timestamp of copied files. This even affects the built in COPY command. --- Filename completion: DOSBOX has a nice feature (borrowed from Windows) where it will auto- complete filenames on the command line if you press TAB - and if there are more matching names, you can keep pressing TAB to cycle through them. This can be quite nice, but it has a bug. It works properly if the filename is preceeded by spaces or the directory seperator '\' (in this case it does complete from the preceeding directory name and leaves it on the command line so you get the full filename). The problem occurs if you are accessing files from the current directory on another drive - with the : preceeding the name. DOSBOX does correctly complete from the current directory on the selected drive, but it REMOVES the : prefix. The resulting name is that of a file on the other drive, but entered like any other local file. Most commands will try to access this file from the current directory on the currently selected drive. A good work-around to access files on another dive without having to enter the whole directory path is to use ":.\" as the prefix. This lets DOSBOX know it's a directory reference and it keeps it. --- COPY seems to work when it doesn't: When a file you try to COPY exists, but DOSBOX can't actually open it, the COPY command produces exactly the same console output that it would it it had been able to copy the files - this makes the unwary think that the file has been copied even when it hasn't. Even worse, DOSBOX opens the destination file for WRITE (effectively zeroing it) BEFORE it has failed to copy the source file into it. This means your destination file is now EMPTY instead of containing the source file. This might seem very unlikey to happen, but with the preceeding bug (Filename completion), it has happened to me a lot and I have lost data. Consider: - You have MYOWNPRO.C - a complex C source file. - To try some tricky changes on it, you copy it to your R:\ ramdisk and work on it there. - You make the changes, they work - so you want to copy the new version back over the original. - From C drive, you enter : copy R:MYO - Due to above bug, DosBox uses : copy MYOWNPRO.C MYOWNPRO.C can't be read while open for write, so it has just been emptied. But everything seemed to work, and if you fail to notice it before shutting the system/ramdisk down you will lose both copies. I've had to get used to using my COMP command to compare the two files after I copy them. --- RENAME seems to work when it doesn't: Like COPY, rename will produce the exact same console output (none) when it fails (due to new file already existing or bad new name), as it does when it works. You don't seem to automatically lose anything, but you can if for example you rename an old file before copying a new one of the old name. When rename fails you overwrite the original file. --- Control-C does not work within DOS --- Many programs run under DOSBOX handle Control-C in their own, but DOSBOX does not. Prime examplem when writing/debugging a more complex .BAT file, I often add 'pause' to stop, see if the output looks ok, and if not, press Control-C to halt the batch file. This does NOT work under DOSBOX, nor can you halt it if the batch file is looping "forever". To help with this, I have provided _PAUSE.COM, a program that works like 'pause' but sets the ERRORLEVEL based on key pressed. It can also use ESC to completely restart DOSBOX and put you back where you were (there is no other way to asynchronously stop a .BAT file). --- MOUNT does not report full paths --- Some of my utilities use the output of 'MOUNT' to work out the relationship between DOSBOX drives/files and the actual Windows host drives/files. This works well if you MOUNTed the drive using a full path, however DOSBOX 'MOUNT' only shows what was passed as an operand, not the actual path to the mounted directory. eg: if you use: MOUNT C .\C to mount the C subdirectory under the DOSBOX installation, 'MOUNT' would show: Drive C is mounted as local directory .\C\ This can cause trouble when figuring out where the file is actually located on the host. If however you had used: MOUNT C C:\DOSBOX\C - 'MOUNT' would show: Drive C is mounted as local directory C:\DOSBOX\C This is why I always use full paths when mounting DOSBOX drives, and why DB$ETUP exists (to get the correct MOUNT paths in DOSBOX.INI). --- 0x1A text EOF is not handled In normal DOS, you can have a text file ending with 0x1A followed by some binary content. If you "type" the file, you will only see text portion because TYPE stops if it sees 0x1A the end-of-text indicator. DOSBOX does not recognize this and happily continues trying to send the binary data to the console. I do not know what other DOSBOX things are affected by this, but TYPE shows it quite well. --- Subtle file accessing differances: I haven't nailed this down further, but under DosBox, TASM gives a Fatal error that it can't open the .OBJ file if it already exists. This does NOT happen under real DOS or WinXP command shell, so there is obviously a difference in how the file can be accessed under DosBox. ------------------------------------------------------------ --- Added DOS commands: Native DOSBOX is missing or limited in the commands which were normally provided with DOS. These are commands I have missed which I created to fill in these gaps. Most of my commands show syntax when run with no arguments, or with /? or ? option. COMP.COM - Missing in DOSBOX My COMP does binary compares only (ASCII is handled much better by my eXpress Compare tool which lets you move between the differences) and has a 2000 file limit. FIND.COM - Missing in DOSBOX My find can search subdirectories and displays a summary of total matches at the end. TREE.COM - Missing in DOSBOX WCMD.COM - run host Windows CoMmanDs within DOSBOX See WCMD.TXT for more information. XCOPY.COM - Missing in DOSBOX Affected by the "Setting timestamp" issue mentioned above, copied files always have current time. XCD - eXpress Change Directory Change both drive and directory at the same time. eg: XCD Y:\CMDS Can save current drive/direcrory before changing eg: XCD =R:\TEMP and restore to it later. eg1: XCD - (Return to '=' dir, Deletes Temporary File) eg2: XCD + (Return to '=' dir, Keeps Temporary File) XDIR.COM - Dir is limited in DOSBOX Named XDIR as "DIR" is taken by internal command, **See Note below Can list subdirectories (DIR accepts /S but appears to ignore it). Can sort files listed. Other additions (see /?). NOTE: Unlike "normal" DOS "DIR" command, XDIR can sort files in all subdirectories at once. Very useful for finding the newest/oldest largest/smallest occurance of a file. To do so it stores all file and directory information in 64k RAM segments. This imposes limits on how many files it can handle in one go: Directories = ParentLink(2)+TimeStamp(4)+NameSize(1)+#charsInName. File = DirLink(2)+TimeStamp(4)+Size(4)+NameSize(1)+#charsInName. Doing math with filenames ranging from 1 to 12 characters (8.3), we get 8-19 and 12-23 bytes respectively. In segments of 65536 bytes, this translates to 8192-3449 directories and 5461-2849 files. So, you can run into limitations when viewing every file in large directory trees, but I find the ability to sort all files well worth it. XRS.COM - eXpressREscan (multiple drives) DosBox's built in RESCAN command can be a bit annoying because it only rescans the drive you have selected. This means: If you need to rescan a drive other than the one you have selected, or you want to be sure multiple drives are accurate, you need to go to each drive and RESCAN individually. _PAUSE.COM - overcome DOSBOX ^C bug in stopping BATCH files (+more) Use: '_PAUSE ?' for more information. BAX.COM - BAtch eXtended Overcomes some of the limitations of DosBox .BAT files, and makes them much more powerful. DBSC.COM - Not included with DOS but handy with DOSBOX. This utiity is handy for saving some command output to a file because DosBox can't redirect error output (stderr) - normally done in DOS with: 2> It also does not perform console I/O via BIOS call, so reading from the screen is the easiest reliable way to get small output. It limits what you can get to the last 43 lines ... but this is enough for many of my utility help screens. EDT.EXE - Simple TEXT editor See EDT.TXT for more information. VLT.COM - View Large Text files - handy to see DOSBOX.TXT Note: DOSBOX command names are "baked" into the program and cannot be easily changed. If you want to replace a DOSBOX internal command with a DOS program, you can use my DBCMDPAT utility (included) to patch internal command names. --- Here are the files included in the MY DosBox distribution: 00README.TXT - This file DB$ETUP.EXE - Win32 program to setup initial DOSBOX.INI DBCMDPAT.EXE - Win32 program to patch DOSBOX internal comand names DBT.COM - DosBoxTweak, easily reconfigure useful config items DBWCMD.EXE - Run host Windows Comands within DOSBOX (see WCMD.TXT) DOSBOX.EXE - DosBox executable program DOSBOX.INI - DosBoxConfig file (called DOSBOX.CONF is std DosBox) DOSBOX.MAP - Custom key map (see KEYS) DOSBOX.TXT - DosBox documentation EDT.TXT - EDT text editor documentation KEYS.COM - Key management program NE2000.COM - NE2000 packet driver MSVCP71.DLL - MSVisualC DLL needed by DosBox MSVCR71.DLL - MSVisualC DLL needed by DosBox SDL.DLL - SimpleDirectmediaLayer DLL needed by DosBox SDL_NET.DLL - SimpleDirectmediaLayer DLL needed by DosBox WCMD.TXT - WCMD/DBWCMD documentation CMDS\BAX.COM - BAtch eXtended- overcome some .BAT limitations CMDS\COMP.COM - Replaces missing COMP command CMDS\DBSC.COM - DosBox Screen Capture- because you can't redirect stderr CMDS\FIND.COM - Replaces missing FIND command CMDS\TREE.COM - Replaces missing TREE command CMDS\WCMD.COM - Run host Windows Comands within DOSBOX (see WCMD.TXT) CMDS\XCOPY.COM - Replaces missing XCOPY command CMDS\XCD.COM - Improved CD command CMDS\XDIR.COM - Improved DIR command CMDS\XRS.COM - Rescans multiple drives more easily CMDS\_PAUSE.COM - Improved PAUSE command CMDS\EDT.EXE - EDT text editor CMDS\VLT.COM - View Large Text files --- Technical Question --- If you are technically bent (like me), perhaps you can help me solve a little Windows progamming problem? If you have an answer, please CONTACT ME. I've included a few Win32 .EXE programs: DB$SETUP, DBCMDPAT and DBWCMD I wanted to provide ICONs for these programs so they would be more apparent within Windows explorer. These are compiled using LCCWIN32, one of the simplest (and smallest) Win32 toolsets I've found that works well for small utilities. But so far I have not been able to make the .EXE's it produces take and display an ICON. I can make ICONs, and using the likes of "Resource Hacker", "RESEDIT", "RCEDIT" etc, I can add them as resources to other small .EXEs and make them appear in explorer, but have NOT been able to make this happen with programs built using LCCWIN32. Either the ICON does not show or in a couple of my attempts it does show, but the .EXE become invalidated and will not run! ?any ideas? Dave Dunfield - https://dunfield.themindfactory.com Download and see my product CATALOG.