----------------------------- Dave's DosBox Distribution --- updated: Dec-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. This is fundamentally the H-A-L-9000 "Megabuild-6" version which has enhanced serial/networking support enabled and a couple of minor tweaks/fixes. ** I am aware that there are newer editions of DosBox, but this one has worked ** very well for me, and I find it's core of 6 files/just over 2mb is quite ** reasonable - contast this to over-complexity (100's of files, >8x the size) ** of the newer editions and I decided to stick with this one for now. 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 archive contains "my working" DosBox This distribution has some changes/additions/removals which (for me) serve to simplify it and improve the DOS environment: DosBox has been modified to use "DOSBOX.INI" as the config file name instead of "DOSBOX.CONF" - This avoids a compatibility issue with "Long Filenames" in some cases, and makes the file name consistant in both environments. 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.) COM2 serial port "" COM3 "null modem" (useful to talk to other instances of DosBox) 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 to configure some basic .INI operating parameters. After this, just run: DOSBOX.EXE You may want to setup 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 site: WINPCAP - for Win7 W10PCAP - for Win10+ 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. 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 ** -- 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: 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. -- 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! -- 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) 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. I have also preset COM3 to invoke a "null modem" network connection. -- 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 (WINPCAP or W10PCAP) on your PC. NOTE: This is NOT required unless you intend to use DOS networking. To see a list of available network devices in DosBox: type: realnic list (at DosBox command line) This whil show the network devices in the DosBox status window Note: Main DosBox working window openes in front of the status window! Select network device from the list, and set the "realnic=" line in 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, work ultra reliably under real DOS, but sometimes the emulated NE2000 under DosBox just stops accessing the network. ------------------- 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. --- Filename completion: ** I have fixed this problem in my edition SVN_MB6/DD however it has existed ** in ALL other editions of DosBox that I've seen! 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. --- 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. -- 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. 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 MYPGM.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:MY to complete the name> - Due to above bug, DosBox uses : copy MYPGM.C which copies it to itself and zero's it... 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. I have provided CP, a slightly improved COPY which resolved some of the problems with copying files. --- 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. ------------------------------- Included files ------------------------------ ** I'd like to fix more of these bugs - but DosBox is a HUGE proggrm and I ** don't have a whole lot of experience in non-embedded/windows development, ** which can make it hard for me to locate exactly how/where a particular ** function is being performed - anyone with more such experience who would ** be willing to help out - PLEASE CONTACT ME!