joncampbell123 / dosbox-x

DOSBox-X fork of the DOSBox project
GNU General Public License v2.0
2.68k stars 381 forks source link

Ability to edit Wiki #1462

Closed rderooy closed 4 years ago

rderooy commented 4 years ago

Is your feature request related to a problem? Please describe. I would like to contribute to the Wiki, in particular to write a guide on setting up old DOS versions in DOSBox-X. Could you give me access to edit pages and create new pages on the DOSBox-X wiki?

To give you an idea, here is a draft version I have been working on:

DOS Installation Guide

This guide explains how to boot regular Microsoft MS-DOS or IBM PC-DOS in DOSBox-X, including Hard disk images. Before going through this guide, consider if you really need this as the integrated DOS in DOSBox-X is more convenient for regular use. Booting regular DOS is normally not necessary to run DOS applications such as games or even Windows version up to 3.11 in DOSBox-X. And even if you need to have a specific DOS version, you can change the version of the integrated DOS in DOSBox-X with the VER command (e.g. "VER SET 6 22" and DOSBox-X will claim to be version 6.22, instead of the default 5.00).

General guidelines

This document assumes that you have MS-DOS or PC-DOS disk images. Getting these images files is outside the scope of this document.

DOS versions

Unless noted otherwise, the MS-DOS and PC-DOS versions are equivalent for this document. There are various limitations that DOS imposes that are dependant on the version. A few milestones:

DOS editions

MS-DOS was licensed by many clone manufacturers and in the early days these OEM editions were often 'personalized' to the manufacturer, and therefore it is possible that these older OEM specific editions don't work in DOSBox-X. An example is the Tandy licensed version of MS-DOS, which will not work unless you set machine=tandy.

Booting DOS from disks

Booting DOS from a disk image is pretty straight forward. Start DOSBox-X and you should find yourself at the DOSBox-X Z:\> prompt. This is not real DOS, but a 'simulated' DOS that is compatible with most DOS games and applications. Now type something equivalent to

 BOOT dos.img

Assuming that dos.img is an uncompressed DOS disk image in your current working directory, it should start it. This even works for IBM PC-DOS 1.00.

Creating a DOS 2.0 HDD image

TBD...

Creating a DOS 3.0-3.2 HDD image

First we start DOSBox-X and create an empty HDD image file. Note that due to DOS limitations, the size cannot exceed 31MB, and you can only have a single DOS partition per HDD.

 IMGMAKE hdd.img -t hd -size 32 -nofs
 IMGMOUNT 2 hdd.img -t hdd -size 512,32,2,992 -fs none

If you specify a smaller size value then 31MB for the IMGMAKE command, pay close attention to the output of IMGMAKE as you will need to adjust the IMGMOUNT size parameter values accordingly. The IMGMOUNT size parameter should be 512,<sectors>,<heads>,<cylinders>.

 BOOT dos.img

Assuming that your uncompressed DOS 3.0-3.2 image is named dos.img and in your current working directory, it should boot DOS from the disk image. These early DOS versions did not have an installer, so the preparation and installation is a manual process. We need to start with creating partitions.

Run FDISK and select to create a new DOS partition. After your finished, DOS will reboot DOSBox-X and your again at the DOSBox-X Z:\> prompt. At this point are HDD image is partitioned, but not yet formatted or made bootable, so that is what we need to do next.

 IMGMOUNT 2 hdd.img -t hdd -size 512,32,2,992 -fs none
 BOOT dos.img

We have now again booted from the disk image, and are ready to format the C: and transfer the system files.

 FORMAT C: /S

We can optionally copy over the rest of the disk at this point

 MKDIR C:\DOS
 COPY *.* C:\DOS

You can also create a AUTOEXEC.BAT and CONFIG.SYS on the HDD with the EDLIN editor. From the DOSBox-X menu bar select Main and then select Reset guest system. We are again at the DOSBox-X Z:\> prompt.

Our setup is now complete and all that is left is how to boot the image normally. From the DOSBox-X Z:\> prompt this can be accomplished with

IMGMOUNT C hdd.img -size 512,32,2,992
BOOT -L C

You probably don't want to memorize those last two commands, so do yourself a favour and create yourself a DOSBox-X .conf file and place those commands in the [Autoexec] section of that config file.

Creating a DOS 3.3 HDD image

Creating a DOS 3.3 HDD image is nearly identical to that of DOS 3.0-3.2 above with a few small notes

IMGMOUNT C hdd.img
BOOT -l C

Creating a PC-DOS 4.0 HDD image

TBD...

Creating a MS-DOS 4.0x HDD image

First of all, consider if you really, really want to use MS-DOS 4.x as it was considered a very buggy release. If you decide to continue, and you have the choice, do yourself a favour and use the 3.5" version as it will minimize the amount of disk swapping required.

MS-DOS 4.0x on 5.25" media consists of the following six disks

MS-DOS 4.0x on 3.5" media consists of the following three disks

OEM versions could have additional disks such as a Diagnostic disk.

Starting with MS-DOS 4 the process to create a HDD image with DOSBox-X, should be easier. But unfortunately there is some kind of compatibility issue between DOSBox-X and the MS-DOS 4.0x installer. If you let DOSBox-X create a image that is already partitioned and formatted the MS-DOS 4.0x installer will not offer the option to install to the HDD.

In these examples we still use a 32MB HDD. MS-DOS 4.0x supports HDDs up to 4,095MB split into two partitions of 2,047MB each. Since DOSBox-X supports only HDD images with primary partitions, 2,047MB is our effective maximum HDD size.

Bare-bones install

If we decide to do just an absolute minimal install, and effectively skip the MS-DOS 4.0x install program, we don't need to worry about the buggy MS-DOS 4.0x installer, and we can take a shortcut.

 IMGMAKE hdd.img -t hd -size 32
 IMGMOUNT C hdd.img

Now we need to boot from the first MS-DOS 4.0x disk, which is called either Setup or Install depending on the media type.

 BOOT SETUP.IMG

When at the Welcome screen (3.5" media) or prompted to insert the SELECT disk (5.25" media), simply press ESC instead followed by F3 to drop to the MS-DOS prompt and run the following command:

 SYS C:

The HDD image is now bootable and we can optionally copy some of the DOS utilities from the diskette to the HDD.

Full install from 3.5" media

First of all the MS-DOS 4.0x installer can corrupt its own installation diskettes, as such you should change the permission of the disk images in the host OS such that the image files are READ-ONLY. In turn DOSBox-X will treat them as if the disks have the write-protect set.

We first need to create a HDD disk image without partition and filesystem and mount it.

 IMGMAKE hdd.img -t hd -size 32 -nofs
 IMGMOUNT 2 hdd.img -t hdd -size 512,63,2,520 -fs none

If you specify a different size value then 32MB for the IMGMAKE command, pay close attention to the output of IMGMAKE as you will need to adjust the IMGMOUNT size parameter values accordingly. The IMGMOUNT size parameter should be 512,,,.

During install, the installer will insist on a blank disk to be labelled "SELECT COPY". Unfortunately will it seems the installer should allow to use the B: drive for this purpose this does not seem to work in practice.

 IMGMAKE SELECT_COPY.IMG -t fd_720
 BOOT SETUP.IMG SELECT_COPY.IMG

For the first stage of the install, we only need to use the Setup and the blank disk (SELECT_COPY).

It is important that you keep track of the order of the disks that you specify on the BOOT line, as you will need to switch between them using either a keyboard shortcut or the "Swap floppy" option on the DOSBox-X menu bar located under the DOS heading. Unfortunately at this point there is no visual indication in DOSBox-X itself, as to which diskette is the current one inserted, you can however look at the DOSBox messages logged to the console if you have it open to see a message as to which disk is currently inserted. When you cycle through them one by one, once you reach the end, you will simply go back to the first.

Note that while the first MS-DOS 4.0x 3.5" disk is labelled "Setup" the installer will actually refer to it as "INSTALL".

Let the installer create the primary partition, and reset the guest system once it asks you to press Ctrl-Alt-Del. You will now be again at the DOSBox-X Z:\> prompt and we need to mount the images again. There is now a partition, but not yet a filesystem, and as such DOSBox-X's autodetect does not yet work and we still need to fully specify all the parameters again.

 IMGMOUNT 2 hdd.img -t hdd -size 512,63,2,520 -fs none
 BOOT SETUP.IMG SELECT_COPY.IMG OPERATING.IMG MSSHELL.IMG

Notice how we have now specified all the disks on the BOOT line, plus the SELECT_COPY disk. We need to go through all the installer questions a second time, and again we need to create the backup copy. Once you get to the partition question, select to skip and the install will then ask for the Operating and finally (if you elected to install it) the Shell disk. After this it will ask to reset the computer, so use the Reset guest system option in DOSBox-X to go back to the Z:\> prompt.

Full install from 5.25" media

This process is basically the same as for the 3.5" media, but you have more disks and they are labelled differently.

Booting MS-DOS 4.0x from HDD

Now that we have created a bootable HDD image we can boot it from the DOSBox-X Z:\> prompt with the following commands:

IMGMOUNT C hdd.img
BOOT -l C

Creating a MS-DOS 5.0+ HDD image

TBD...

Wengier commented 4 years ago

@rderooy Corrections about DOS versions: MS-DOS version 7.0 is only included in Windows 95 (or 95A), which introduced VFAT support but without support for FAT32 or LBA drives. The MS-DOS version included in Windows 95 OSR2 and Windows 98 is 7.10, with support of FAT32 and LBA drives (up to 2TB). For example, if you set "VER SET 7 10", you will be able to use DOS commands from Windows 98 instead of getting the error message "Incorrect MS-DOS version". PC-DOS version 7.x is very different from MS-DOS version 7.x.

rderooy commented 4 years ago

@Wengier Thanks for the correction on MS-DOS 7.1. I will incorporate it. About PC-DOS 7.x/2000, I'm aware that it diverged at the time of MS-DOS 5.0 and that it is completely different. That is something that still needed to be added.

rderooy commented 4 years ago

About the 2TB limit, that is a FAT32 filesystem limit. And to support such large drives requires LBA48 (Win9x has LBA28) which did not come out until 2003.

There are patches to support LBA48 on Windows 98/98SE it seems, but I have no experience with it. So without patches the limit is 128GB.

joncampbell123 commented 4 years ago

I'm not sure how to enable editing, except by adding you as a collaborator, but you can git clone the wiki and edit locally, then ask me to merge your changes.

git clone https://github.com/joncampbell123/dosbox-x.wiki.git

Allofich commented 4 years ago

you can change the version of the integrated DOS in DOSBox-X with the VER command (e.g. "VER SET 6 22" and DOSBox-X will claim to be version 6.22, instead of the default 5.00).

There is also a setting in dosbox.conf: ver under the [dos] section. The description makes it sound like it doesn't just change the reported version, it also affects emulation. The only such difference described, though, is "LFN (long filename) support will be enabled with an initial DOS version of 7.0 or higher."

If it makes emulation more accurate to the specified version, this seems like a better option than "VER", which has a description of "View and set the reported DOS version."

I just tested and confirmed that using "ver = 7.0" in the dosbox.conf file gave me long filenames with a DIR command, while starting with an earlier version and then using "VER SET 7.0" did not enable long filenames.

Wengier commented 4 years ago

About the 2TB limit, that is a FAT32 filesystem limit. And to support such large drives requires LBA48 (Win9x has LBA28) which did not come out until 2003.

There are patches to support LBA48 on Windows 98/98SE it seems, but I have no experience with it. So without patches the limit is 128GB.

@rderooy I think you are talking about the Windows 98 GUI or the included FDISK tool rather than the MS-DOS 7.1 kernel. While the Windows 98 GUI and the included FDISK tool may not support LBA48 correctly without patches, the MS-DOS 7.1 kernel itself supports drives larger than 128GB just fine. I have been using standalone MS-DOS 7.1 (without Windows) as my primary DOS on very large drives (>200GB) for many years without issues, as long as I do not use the original FDISK tool to make partitions on such drives.

joncampbell123 commented 4 years ago

MS-DOS 7.1 or higher uses the INT 13h extensions to read the disk, which can access up to 2TB (and much larger considering the 64-bit sector field though I doubt any BIOS at the time bothered with the upper DWORD). As long as the BIOS has no issue with >= 128GB neither should MS-DOS 7.1.

The 128GB limit is another issue within Windows if the IDE driver is active because it requires talking to the IDE controller differently. The whole reason the 128GB limit exists is because of the 28-bit bitfield available when reading/writing in LBA mode. Exceeding the limit requires writing the I/O ports using a newer LBA48 scheme to extend the bitfield and that's what the later Win98 patch updates the IDE driver to support.

Older versions that use the normal INT 13h read/write functions are limited to what the geometry can provide which at most can go up to about 8GB.

joncampbell123 commented 4 years ago

Apologies if I didn't make myself clear, but you can git clone the wiki and work locally.

git clone https://github.com/joncampbell123/dosbox-x.wiki.git

rderooy commented 4 years ago

The problem with doing a local git clone that way is that I don't know how to check the wiki formatting.

It would be great if you could fork the wiki in github itself, but you cannot (https://github.community/t5/How-to-use-Git-and-GitHub/How-to-fork-a-wiki-and-send-a-PR/td-p/23557#)

edit Never mind. Found a way to edit .md (MarkDown) documents such that I can check the validity of the formatting.

Wengier commented 4 years ago

@rderooy Alternatively, you can edit the DOSBox-X Wiki directly from the link below, where I worked on it before and have now invited you as a collaborator. When finished it can be merged to the master wiki again.

https://github.com/Wengier/dosbox-x-wiki/wiki

rderooy commented 4 years ago

@Wengier Thanks. I had been using Atom editor to edit the MarkDown files. I have uploaded my new document to you wiki, but quickly ran into an issue. Seems you cannot create directories or upload images to the wiki directly from the web interface. For now I have placed the images, and latest version of the .md file in the repository itself because of this, instead of using the wiki.

edit I know there are some ugly ways, such as using an external image hosting service, or creating a new "issue" in github, dragging an image into it, and then copying the URL over. But I was trying to preserve the way that @joncampbell123 had structured things, so images into the /images directory with clear names.

Wengier commented 4 years ago

@rderooy That looks like a limitation of the GitHub Wiki web interface. But that is okay, you can just edit the MD pages in DOSBox-X Wiki as usual, but put images in the repository itself as you had already done in https://github.com/Wengier/dosbox-x-wiki/tree/master/images. I will then put the images you uploaded into the DOSBox-X Wiki /images directory, as I have already done for the following:

https://github.com/Wengier/dosbox-x-wiki/wiki/images/MS-DOS:MS-DOS_3.3_BOOT_HDD.png https://github.com/Wengier/dosbox-x-wiki/wiki/images/MS-DOS:MS-DOS_4.01_BOOT_FDD.png https://github.com/Wengier/dosbox-x-wiki/wiki/images/MS-DOS:MS-DOS_4.01_BOOT_HDD.png https://github.com/Wengier/dosbox-x-wiki/wiki/images/MS-DOS:MS-DOS_4.01_FDISK.png https://github.com/Wengier/dosbox-x-wiki/wiki/images/MS-DOS:MS-DOS_4.01_FDISK2.png https://github.com/Wengier/dosbox-x-wiki/wiki/images/MS-DOS:MS-DOS_4.01_FDISK3.png https://github.com/Wengier/dosbox-x-wiki/wiki/images/MS-DOS:MS-DOS_4.01_FDISK4.png https://github.com/Wengier/dosbox-x-wiki/wiki/images/MS-DOS:MS-DOS_4.01_FORMAT.png https://github.com/Wengier/dosbox-x-wiki/wiki/images/MS-DOS:MS-DOS_4.01_INSTALLER.png https://github.com/Wengier/dosbox-x-wiki/wiki/images/MS-DOS:MS-DOS_4.01_INSTALLER_EXIT.png https://github.com/Wengier/dosbox-x-wiki/wiki/images/MS-DOS:PC-DOS_1.0.png https://github.com/Wengier/dosbox-x-wiki/wiki/images/MS-DOS:PC-DOS_3.2_BOOT.png https://github.com/Wengier/dosbox-x-wiki/wiki/images/MS-DOS:PC-DOS_3.2_BOOT_HDD.png https://github.com/Wengier/dosbox-x-wiki/wiki/images/MS-DOS:PC-DOS_3.2_FDISK.png https://github.com/Wengier/dosbox-x-wiki/wiki/images/MS-DOS:PC-DOS_3.2_FDISK_Restart.png https://github.com/Wengier/dosbox-x-wiki/wiki/images/MS-DOS:PC-DOS_3.2_FORMAT.png https://github.com/Wengier/dosbox-x-wiki/wiki/images/MS-DOS:PC-DOS_3.2_IMGMAKE.png

arromdee commented 4 years ago

Don't forget that Windows ME had DOS 8.0, though there's probably no reason you'd ever want to use it. It disabled some things, although there's a hack to enable them.

Wengier commented 4 years ago

Don't forget that Windows ME had DOS 8.0, though there's probably no reason you'd ever want to use it. It disabled some things, although there's a hack to enable them.

Thanks for mentioning DOS 8.0, even though it disabled some features and there is probably no reason to use it as you said. It is now added to the Wiki page: https://github.com/Wengier/dosbox-x-wiki/wiki/Guide%3ADOS-Installation-in-DOSBox%E2%80%90X