----------------------------- Dave's DosBox Distribution --- updated: Sep-2022 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: 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. I have been working with TWO quite different DoxBox editions: *** DOSBOX-X *** This is the newest DosBox, is much better (in non-gaming aspects) and it is the one I am most working with these days... It is however MASSIVE and brings along a bunch of things that I really don't need/want (eg: 4DOS). Fortunately all you need to have is DOSBOX.EXE (which is still big: 19M vs 4M for the complete "MegaBuild-6". For this reason I've not included all of the distrubution files. You can get "everything" at: https://dosbox-x.com *** DosBox-SVN Megabuild6 *** An older but much smaller DosBox that has most everyting I want .. I've used this one for years, and am mainly moving to DosBox-X because some of the bugs and limitations in SVN implementaition of DOS itself. This is fundamentally the H-A-L-9000 "Megabuild 6" version which has enhanced serial/networking support turned on. Note that the stated intent of the DosBox SVN 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, the DOS environment itself has a few limitations on things not generally needed for gaming. ------------------------------------------------------------------------------ This distribution has some changes/additions/removals which (for me) serve to simplify it and and to improve the DOS environment: Some DOSBOX-X files I don't use (or are HUGE like the default .conf and .TXT files) are not provided here - see the DosBox-X site (above). The DOSBOX.EXE executable has been patched to use "DOSBOX.INI" as the config file name instead of "DOSBOX.CONF" - This avoids a compatibility issue with Windows "Long Filenames" in some cases, and makes the file name consistant in both environments. Below are the binary differences between the DOSBOX.EXE contained herein and the original: See readme in downloads! Note that DosBox-X has increased the size of the .INI (conf) file to the point where I really don't like working it in DOS - to mitigate this somewhat, I have removed the comments (which you really want to help configure), and provided INICMT.EXE which reproduces these comments: INICMT <= Show on console INICMT file[.TXT] <= Place in FILE.TXT 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. ------------------------------------------------------------------------------ I've moved most of my DosBox specific utilities programs to a separate archive called DBUTIL.ZIP which you can download from my site (see below). ------------------------------------------------------------------------------ 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) The system should basically work "as is" with simple video. 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. Go there and run _DBSETUP.BAT - this will launch DosBox/DBSETUP to configure basic .INI operationg parameters. After this, just run: DOSBOX.EXE You mau want to setup a shortcut to run \DOSBOX\DOSBOX.EXE 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. - If this is NOT the same location where the CD/USB was "mounted" before, run "_DBMOVE.BAT" (See below) - 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: Note that DBSETUP has an ability to re-configure a complete DosBox setup to allow it to run correctly from a new location - very useful when you have it on a portable drive. See: DBSETUP ? and look at _DBMOVE.BAT for more information. Additional notes: The file 'DOSBOX.INI' contains the DosBox configuration - it's a TXT file, and contains comments describing the various configuration options that are available. You can modify DosBox.INI with any text editor. **This is mostly the config file I used with an older version of DosBox and **there are likele many more options. See the DosBox-X site. -- 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. -- Function keys MegaBuild-6 defaults to a mix of Ctrl and Alt modifiers on various keys to access it's internal features, which can interfere with some DOS programs that use Ctrl and Alt as modifiers for function keys. To alleviate this problem, I have provided DBKEYS.COM which can be run from the DosBox command prompt, and manipulates the DosBox keymapper file DOSBOX.MAP - see: DBKEYS (no arguments) NOTE: DOSBOX.INI must contain the [sdl] line: mapperfile=DOSBOX.MAP 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) F11-M 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 Also note that the mapper only works on scancodes, which means you can't remap only certain modes (Shift, Ctrl, Alt) of keys, and you can't remap a key to a function invoked by a key at a different mode. See my KEYSUB for a solution! -- Serial ports I've preset a DOS COM1 and COM2 to windows COM1 & COM2 You can change this assignment from the DosBox console, example: eg: serial2=directserial realport:COM5 This changes DOS serial port 1 (COM1) to reference windows serial port COM5. -- 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. Select network device from the list, and set the "realnic=" line is DOSBOX.INI to that value (you can use DBSETUP). 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. Within DosBox, go to Y:\, and load the NE2000 packet driver with: NE2000 0x60 NOTE: I have found the NE2000 emulater network interface not 100% reliable. Some programs which do raw packet networking (like my DDLINK), work ultra reliably under real DOS, but sometimes the emulated NE2000 under DosBox just stops accessing the network. ------------------- DosBox Bugs/Problems ------------------- ** Megabuikd-6 ** --- 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. --- 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 drive 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. --- RENAME seems to work when it doesn't: 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 over 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). --- 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. ** Megabuid-6 AND DosBox-X ** --- 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. -- Open/WRITE to file opened READ in not blocked: If you open a file for write that is already open for read, standard DOS will not allow this. But DosBox does (and zeros it), and it can cause you to lose data if you accidently try to copy a file to itself. --- 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. --- 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. ------------------------------------------------------------------------------ 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 DBPATCH utility (included) to patch internal command names. --- Here are the files included in this DosBox distribution: 00README.TXT This file DOSBOX.EXE DosBox executable program DOSBOX.INI DosBoxConfig file (called DOSBOX.CONF is std DosBox) DOSBOX.MAP Custom key map (see DBYS) DOSBOX.TXT DosBox documentation DOSBOXDX.BAT (Windows) Run DosBox with generic Video instead of DIRECT-X DBPATCH.COM Program to perform various patchs on DosBox.EXE DBSETUP.COM Simplified DosBox inital SETUP and MOVE (portable drive) DBKEYS.COM "" key map/layout modification DOSBOX.DBP DataBase for dbPAtch _DBSETUP.BAT (Windows) perform inital DosBox setup _DBMOVE.BAT (Windows) change "system" files for portable drive location EDT.EXE Simple DOS text editor INICMT.EXE Show original comments for .INI file NE2000.COM NE2000 packet driver Note that most of my utilities will show command help/usage run with no arguments, or in some cases with: ? or -? --- 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 written a number of little tools for Windows using LCCWIN32, one of the simplest (and smallest) Win32 toolsets I've found. I wanted to provide ICONs for these programs so they would be more apparent within Windows explorer. 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! Another way to find me: Search "Dave's Old Computers" and see my "personal" link at bottom.