Has anyone successfully pried the BDOS out of 86-DOS 1.0?

Discuss MS-DOS, Windows 1, 2 and 3.
Post Reply
buricco
User avatar
Posts: 92
Joined: Tue Jul 21, 2015 7:44 am

Has anyone successfully pried the BDOS out of 86-DOS 1.0?

Post by buricco »

I know it's a weird question, but I wanted to see if what was out there would be sufficient for making 86-DOS 1.0, the forerunner of MS-DOS and PC DOS, run natively on a PC, just because. :evil:

The copy I find, which works on one particular emulator, seems not to have the BIOS and BDOS in their own files, but in system tracks?

roytam1
Posts: 738
Joined: Mon Nov 03, 2008 6:15 am

Re: Has anyone successfully pried the BDOS out of 86-DOS 1.0

Post by roytam1 »

yes it is in first 52 sectors(128bytes/sector).

buricco
User avatar
Posts: 92
Joined: Tue Jul 21, 2015 7:44 am

Re: Has anyone successfully pried the BDOS out of 86-DOS 1.0

Post by buricco »

That was somewhat useful - managed to extract the data, but haven't made it usable yet.

I'm *guessing* the first 1152 bytes are the BIOS, and the remainder starting "E9 D6 12"... is the BDOS. But I haven't quite figured everything out yet, since making the BDOS "ibmdos.com" and trying to strap it with an IBM BIOS doesn't work - most likely, there's still not enough I know.

AltairMan
Posts: 16
Joined: Thu Sep 03, 2020 1:47 am

Re: Has anyone successfully pried the BDOS out of 86-DOS 1.0?

Post by AltairMan »

I know this is an old thread, but I just joined so I thought I'd add to it. If you look at the 86-DOS disk image available on-line, it contains the source files for everything BUT MSDOS.SYS. There is a file called "DOSIO.ASM" that is the rough equivalent of the CP/M BDOS the OP refers to.

Like CP/M and MS-DOS 1.x (and I think early MS-DOS 2.x) the files were written to the system tracks and were not accessible.

86-DOS was written for the Seattle Gazelle which had no video card and used only Cromemco or Tarbell floppy controllers (my Gazelle has a Tarbell controller). I don't think 86-DOS was publicly available on the PC other than a development version as Tim Paterson was in the process of adapting it for the PC. The version of DOSIO that came with my Gazelle 86-DOS distribution is dated April 28, 1981.

My machine has both MS-DOS 1.25 and 2.0. I extracted MSDOS.SYS from the MS-DOS 1.25 disk and compared it to what was released on CHM and it was substantially the same. I have not done the same with the 86-DOS disk, but I suspect you can do that by booting it in SIMH and using the included DEBUG to load the first few sectors.

Lucas Brooks
Posts: 773
Joined: Sat Oct 20, 2018 11:37 am
Contact:

Re: Has anyone successfully pried the BDOS out of 86-DOS 1.0?

Post by Lucas Brooks »

In the early days, DOS was made up of 4 parts, boot sector (BOOT.ASM), DOS BIOS (DOSIO.ASM), DOS kernel (86DOS.ASM) and Command Interpreter (COMMAND.ASM). The boot sector and DOS kernel used to reside in the reserved tracks before FAT (prior to 86-DOS 1.10) but since more functionalities were added to 86-DOS 1.10, the DOS kernel exceeded the maximum size those reserved sectors can hold. They introduced a hidden file called 86DOS.SYS (MSDOS.SYS or IBMDOS.COM in later versions) and modified the DOS BIOS to load from FAT partition. After Microsoft took over, they decided to remove all those reserved sectors and use the boot sector to load both the DOS BIOS and kernel from the FAT partition. This means MS-DOS 1.25 cannot read any 86-DOS disks and vice versa.

I was able to extract the DOS kernel from 86-DOS 1.00 and use 86-DOS 1.14's DOS BIOS to load it from the FAT partition. I have also attempted to patch 86-DOS's DOS kernel to run on PC-compatible emulators and it did boot. I recall there were some fatal problems with my patch and sometimes it hangs the machine randomly. I might still have the patched kernel sitting somewhere on my hard drives but can't guarantee I'll be able to find it.

I have uploaded 86-DOS 0.3's BOOT.ASM and DOSIO.ASM in case anyone would like to take a look. I do not have 86-DOS 0.3 itself so if anyone still owns an 86-DOS 0.3 floppy, please dump it.

AltairMan, could you please dump the 86-DOS 1.00, MS-DOS 1.25 and 2.00 disks you have? At least 2 different copies of 86-DOS 1.00, 4 copies SCP MS-DOS 1.25 and 6 copies of SCP MS-DOS 2.00 are know to exist and it would be great if we can have more of those earlier versions collected.

AltairMan
Posts: 16
Joined: Thu Sep 03, 2020 1:47 am

Re: Has anyone successfully pried the BDOS out of 86-DOS 1.0?

Post by AltairMan »

I don’t have FTP access yet but I believe I put those images on bitsavers, along with the MS-DOS 2 disks I have.

Don’t forget that on the Gazelle it also had a system monitor which had the first-level bootstrap.

I would definitely like to see 86dos.asm if you can find it. I have not tried to recompile DOS 1.0 from CHM on the Gazelle itself. My recollection from some emails with Tim is that they used a custom machine with above-normal RAM. I think I’ve gotten mine up to 896k, but I think Tim said 768k.

My Gazelle came from a guy who developed programs in Pascal, so I have a bunch of those disks. I also have what I think is a DOS 2.0 OAK. I modified my DOSIO to use a serial port for the printer rather than a parallel port and then wrote a new system disk.

os2fan2
User avatar
Donator
Posts: 1394
Joined: Sun Dec 30, 2007 8:12 am
Location: Brisbane, Queensland
Contact:

Re: Has anyone successfully pried the BDOS out of 86-DOS 1.0?

Post by os2fan2 »

With DOS1 and DOS 2, if you over-write the first 32 bytes of the file with a proper DDT, you can just open the file correctly in winimage or whatever. DDT = disk describer table. It came in with DOS 3 i think, but the items described existed in DOS 1 and DOS 2. I have a rexx script for fixing 160 kb floppy images.

Code: Select all

/* rexx  fix160*/
/* a program to fix the boot sector of a dos 1 160 diskette */

nldr = 'EB 3C 90 49 42 4D 20 32 2E 30 20 00 02 01 01 00'x
nldr = nldr || '02 40 00 40 01 FE 01 00 08 00 01 00 00 00 00 00'x

oldr = 'EB 2F 14 00  00 00 60 00  20 37 2D 4D  61 79 2D 38'x
oldr = oldr || '31 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00'x

parse arg diskimg
call stream diskimg , 'c', 'open both'
call charout diskimg, nldr, 1
call stream diskimg, 'c', 'close'
This is uses 'open both', so i imagine you need to get hold of regina rexx for the exercise. You can get a DOS, Win32, Win64, OS/2 and various linux versions.

`regina fix160 diskimage`

For different sizes, you have to replace the 'nldr' part of it.

Lucas Brooks
Posts: 773
Joined: Sat Oct 20, 2018 11:37 am
Contact:

Re: Has anyone successfully pried the BDOS out of 86-DOS 1.0?

Post by Lucas Brooks »

There is no way you can make MS-DOS 1.25 read 86-DOS 1.x disks or vice versa. DOS 1.x did not support BPB and adding one will destroy the (128-byte) boot sector. Of course it is possible to load the image with tools like WinImage after adding a BPB but the disk will never boot again.

86-DOS disks are slightly different from normal MS-DOS 2.0+ disks, they use 128-byte sectors and 77 tracks with 26 sectors per track.

Image

Image

Here are some DiskExplorer profiles for 8" 86-DOS and MS-DOS disks:

Code: Select all

[86-DOS 8" SSSD Floppy Disk Image]
Extension   = ".IMG"
FileSize    = 256256
ProfileType = 2
DiskStart   = 0
FileSystem  = DOS
FATType     = FAT12
FAT         = 6656
FATCount    = 2
FATSize     = 768
RootDir     = 8192
UserArea    = 10240
ClusterSize = 512
ClustersCount = 500

[MS-DOS 8" SSSD Floppy Disk Image]
Extension   = ".IMG"
FileSize    = 256256
ProfileType = 2
DiskStart   = 0
FileSystem  = DOS
FATType     = FAT12
FAT         = 128
FATCount    = 2
FATSize     = 768
RootDir     = 1664
UserArea    = 3840
ClusterSize = 512
ClustersCount = 500

[MS-DOS 8" DSDD Floppy Disk Image]
Extension   = ".IMG"
FileSize    = 1261568
ProfileType = 2
DiskStart   = 0
FileSystem  = DOS
FATType     = FAT12
FAT         = 1024
FATCount    = 2
FATSize     = 2048
RootDir     = 5120
UserArea    = 11264
ClusterSize = 1024
ClustersCount = 1215

os2fan2
User avatar
Donator
Posts: 1394
Joined: Sun Dec 30, 2007 8:12 am
Location: Brisbane, Queensland
Contact:

Re: Has anyone successfully pried the BDOS out of 86-DOS 1.0?

Post by os2fan2 »

You use a copy if you want to extract files.

Lucas Brooks
Posts: 773
Joined: Sat Oct 20, 2018 11:37 am
Contact:

Re: Has anyone successfully pried the BDOS out of 86-DOS 1.0?

Post by Lucas Brooks »

Well, file extraction should be pretty easy, considering it uses 32-byte directory entries and FAT12. DiskExplorer will have no troubles reading the disk as long as the correct profile is used (86-DOS and MS-DOS disks are different). Adding a BPB sometimes does not work well because many tools assumes the sector size or does not recognize the 128-byte boot sector.

Image

Extraction of the DOS BIOS is a bit harder, you must use a hex editor and it is completely useless if you want to run it on a PC-compatible machine. DOS kernel is located right after the DOS BIOS (86-DOS 1.00) or in a file called 86DOS.SYS (86-DOS 1.1x). I might try to reconstruct 86DOS.ASM one day based on the MS-DOS 1.25 source code released by Microsoft.

AltairMan
Posts: 16
Joined: Thu Sep 03, 2020 1:47 am

Re: Has anyone successfully pried the BDOS out of 86-DOS 1.0?

Post by AltairMan »

The SSSD logical disk format (77/26/128) is the standard CP/M disk geometry, so that's not surprising. SCP also distributed DOS 2.0 masters in a 1.2MB DSDD format of 77/8/1024, but I'd have to pull the disk image to confirm. I remember it was very hard to get a clean image from those disks, and I wound up using Teledisk rather than ImageDisk and converting it later. It seems that they were meant for distribution/installation only rather than real use...the "format" command prepared only 256K (SSSD) disks.

ImageDIsk has the ability to extract bytes from the image file, so maybe I'll extract the 86DOS file and run it though Sourcer and try a rough compare against the version of DOS released by CHM.

AltairMan
Posts: 16
Joined: Thu Sep 03, 2020 1:47 am

Re: Has anyone successfully pried the BDOS out of 86-DOS 1.0?

Post by AltairMan »

I'm working on this comparison now. The 86DOS.SYS I extracted from a disk labeled "Q-DOS 1.1" has an internal version number of 1.14. I'm manually lining up jump locations and scanning the code. So far, the first few hundred bytes line-up with the MS-DOS 1.1 released by CHM.

{later}

I'm up to around line 1900 of the source file (about half-way through). There's a very high correlation between the two files. Many of the differences I've found are in the FAT code.

More to come.

AltairMan
Posts: 16
Joined: Thu Sep 03, 2020 1:47 am

Re: Has anyone successfully pried the BDOS out of 86-DOS 1.0?

Post by AltairMan »

I finished the comparison today. Q-DOS 1.1 (called 1.14 in the code) is very highly correlated to MS-DOS 1.1 from CHM. Of the differences, you can see some minor tweaking/bug fixes here and there, but most of the changes related to handling the FAT and FCBs, and, oddly, date/time stuff (how the date/time was packed, for example.) I know that the RTC used on the Gazelle was different than the PC so it's possible it's related. It also looks like Q-DOS doesn't have a critical error stack by default (it looks like there may be a compilation switch for it). Also, the relocation code during DOSINIT is more complete in MS-DOS.

JustZisGuy
Posts: 271
Joined: Wed Dec 11, 2013 3:24 am

Re: Has anyone successfully pried the BDOS out of 86-DOS 1.0?

Post by JustZisGuy »

Are you sure your terminology is correct? I'm very confused reading this.

I'm not aware of any 86-DOS releases publicly downloadable that are early enough to have been called "QDOS". Even a picture of an 0.3 manual clearly shows "86-DOS(TM)"

The CHM MS-DOS code contains MS-DOS 1.25 and 2.0. Confusingly, the code is in a "1.1" folder because it roughly corresponds with IBM PC-DOS 1.1. (IBM used their own version numbering)

As far as I know, Microsoft used the same version numbering as 86-DOS, so MS-DOS 1.25 SCP OEM was the follow up and replacement for 86-DOS 1.14.

Although Microsoft was involved with SCP 86-DOS fairly early on, I'm not aware that they officially used the name MS-DOS for anything earlier than MS-DOS 1.25. (They did throw the name MS-DOS around in the media quite a bit).

AltairMan
Posts: 16
Joined: Thu Sep 03, 2020 1:47 am

Re: Has anyone successfully pried the BDOS out of 86-DOS 1.0?

Post by AltairMan »

Q-DOS is my error; I should have called it 86DOS. Q-DOS was the early SCP name for it and some of the 8" disks I have are labeled that way, but others are labeled 86DOS with similar version numbers. I would agree about not seeing anything publicly that would have Q-DOS written in the code.

The two versions of MS-DOS I have with my system are MS-DOS 1.25 and 2.0. IO.ASM is labeled v1.20, MSDOS.ASM is labeled 1.25 and COMMAND.ASM is labeled v1.17. The "master" file for it (STDDOS.ASM) has v1.25 in it. I need a GPS. BTW, even worse is the version numbering on the system monitor used in the Gazelle (obviously not a PC issue).

The email from Tim included with the code says IBM PC/DOS 1.1 is MS-DOS 1.24. It also says that v1.25 is the first OEM version, so I'd agree with you on the last point.

Lucas Brooks
Posts: 773
Joined: Sat Oct 20, 2018 11:37 am
Contact:

Re: Has anyone successfully pried the BDOS out of 86-DOS 1.0?

Post by Lucas Brooks »

Sorry for the bump.
AltairMan wrote:
Mon Sep 07, 2020 10:39 pm
I finished the comparison today. Q-DOS 1.1 (called 1.14 in the code) is very highly correlated to MS-DOS 1.1 from CHM. Of the differences, you can see some minor tweaking/bug fixes here and there, but most of the changes related to handling the FAT and FCBs, and, oddly, date/time stuff (how the date/time was packed, for example.) I know that the RTC used on the Gazelle was different than the PC so it's possible it's related. It also looks like Q-DOS doesn't have a critical error stack by default (it looks like there may be a compilation switch for it). Also, the relocation code during DOSINIT is more complete in MS-DOS.
I'd say those changes are quite big - SMALLDIR code got nuked, filesystem code changed a lot and the initialization code probably got completely rewritten. Of course the biggest change is switching to MASM in my opinion. Paterson said he did the translation, so he probably enjoyed the process as much as I did reverting back to SCP's ASM.

Here is a full disassembly of 86-DOS 1.14: https://github.com/LucasBrooks/DOS-Disa ... /86DOS.ASM

If you want to re-assemble it, you must download 86DOS.ASM.BIN and rename it to .ASM, because GitHub mercilessly took out all carriage returns. Needless to say, you must use SCP's assembler - this is perhaps the last version of DOS released before they switched to MASM. I changed BIOSSEG to 60H for it to be PC-compatible, changing it back to 40H makes the output identical to the 86DOS.SYS on that 86-DOS 1.14 disk. Currently there is no way of building the IBM version of 86-DOS 1.14 - I will probably add some IBM ifdefs in the future.

AltairMan
Posts: 16
Joined: Thu Sep 03, 2020 1:47 am

Re: Has anyone successfully pried the BDOS out of 86-DOS 1.0?

Post by AltairMan »

@Lucas --

Thanks! This is some great work. Downloaded it and will take a look.

roytam1
Posts: 738
Joined: Mon Nov 03, 2008 6:15 am

Re: Has anyone successfully pried the BDOS out of 86-DOS 1.0?

Post by roytam1 »

Lucas Brooks wrote:
Sat Sep 05, 2020 6:36 am
Well, file extraction should be pretty easy, considering it uses 32-byte directory entries and FAT12. DiskExplorer will have no troubles reading the disk as long as the correct profile is used (86-DOS and MS-DOS disks are different). Adding a BPB sometimes does not work well because many tools assumes the sector size or does not recognize the 128-byte boot sector.

Image

Extraction of the DOS BIOS is a bit harder, you must use a hex editor and it is completely useless if you want to run it on a PC-compatible machine. DOS kernel is located right after the DOS BIOS (86-DOS 1.00) or in a file called 86DOS.SYS (86-DOS 1.1x). I might try to reconstruct 86DOS.ASM one day based on the MS-DOS 1.25 source code released by Microsoft.
what about 16bytes directory entry format?
and DiskExplorer opening 86-DOS 0.1 and 0.34 shows garbage before and after normal entries.

roytam1
Posts: 738
Joined: Mon Nov 03, 2008 6:15 am

Re: Has anyone successfully pried the BDOS out of 86-DOS 1.0?

Post by roytam1 »

Lucas Brooks wrote:
Sat Oct 02, 2021 7:14 am
Sorry for the bump.
AltairMan wrote:
Mon Sep 07, 2020 10:39 pm
I finished the comparison today. Q-DOS 1.1 (called 1.14 in the code) is very highly correlated to MS-DOS 1.1 from CHM. Of the differences, you can see some minor tweaking/bug fixes here and there, but most of the changes related to handling the FAT and FCBs, and, oddly, date/time stuff (how the date/time was packed, for example.) I know that the RTC used on the Gazelle was different than the PC so it's possible it's related. It also looks like Q-DOS doesn't have a critical error stack by default (it looks like there may be a compilation switch for it). Also, the relocation code during DOSINIT is more complete in MS-DOS.
I'd say those changes are quite big - SMALLDIR code got nuked, filesystem code changed a lot and the initialization code probably got completely rewritten. Of course the biggest change is switching to MASM in my opinion. Paterson said he did the translation, so he probably enjoyed the process as much as I did reverting back to SCP's ASM.

Here is a full disassembly of 86-DOS 1.14: https://github.com/LucasBrooks/DOS-Disa ... /86DOS.ASM

If you want to re-assemble it, you must download 86DOS.ASM.BIN and rename it to .ASM, because GitHub mercilessly took out all carriage returns. Needless to say, you must use SCP's assembler - this is perhaps the last version of DOS released before they switched to MASM. I changed BIOSSEG to 60H for it to be PC-compatible, changing it back to 40H makes the output identical to the 86DOS.SYS on that 86-DOS 1.14 disk. Currently there is no way of building the IBM version of 86-DOS 1.14 - I will probably add some IBM ifdefs in the future.
BTW any chance on disassembling PC DOS 0.90's IBMBIO.COM? which is basically a direct port of 86-DOS 1.05 to IBM PC.

roytam1
Posts: 738
Joined: Mon Nov 03, 2008 6:15 am

Re: Has anyone successfully pried the BDOS out of 86-DOS 1.0?

Post by roytam1 »

and BTW there is a write-up from the author who port 86-DOS 1.14 to IBM PC: https://flyingpigtech.wordpress.com/202 ... he-ibm-pc/

while he also ports 86-DOS 1.00 as well, without using pre-release PC DOS 1.00(i.e. 0.90/1.00 alpha/beta)
https://forum.vcfed.org/index.php?threa ... st-1360910

vbdasc
Posts: 350
Joined: Fri Apr 30, 2010 6:14 pm

Re: Has anyone successfully pried the BDOS out of 86-DOS 1.0?

Post by vbdasc »

roytam1 wrote:
Sat Jan 06, 2024 5:39 am
what about 16bytes directory entry format?
and DiskExplorer opening 86-DOS 0.1 and 0.34 shows garbage before and after normal entries.
If you just want to copy files from/to 16-bytes directory format disks, you could use the 86-Dos 1.0 that is circulating. It supports both the 16b and 32b directory formats.

Post Reply