Running (Free)DOS from ROM

Running (Free)DOS from ROM

Post by Ruud » Wed, 17 Aug 2011 04:44:04



Hallo John,

Quote:> Thanks for the AT Bios link.

It's a _XT_ BIOS.

Groetjes, Ruud Baltissen
http://www.Baltissen.org

 
 
 

Running (Free)DOS from ROM

Post by monahan » Thu, 18 Aug 2011 08:05:43



Quote:> Hallo John,

> > Thanks for the AT Bios link.

> It's a _XT_ BIOS.

> Groetjes, Ruud Baltissenhttp://www.Baltissen.org

If you guys are still following my efforts...
I figured out why I could boot from an original IBM Disk (or one made
with Diskcopy) but NOT from a newly PC formatted disk with /S.
It seems the original supplied IBM disk is a Single Sided disk. I had
to use the FORMAT /1/S option!

So.. I can get IBM SS disks to work fine with my BIOS. I know the
BIOS itself is fine for double sided reading (I use it with CPM86)
what is the magic to tell DOS V2.0 that the disk is in fact double
sided.
What does it look for? Clearly I am not adding something.

For INT 13H, AH=8 I returned:-
        XOR     AX,AX
        MOV     BH,0            ;Always
        MOV     BL,04H          ;0=Unknown, 1=360K, 2=1.2M, 3=720K,
4=1.44M
        MOV     CH,4FH          ;Max Track 79
        MOV     CL,18             ;Max sector
        MOV     DH,1             ;Max heads
        MOV     DL,2                    ;Number of floppy disks!
.....
I'm assuming DH is zero based. If I make it DL=2 will DOS 2.01 be able
to read/boot a SS disk correctly

John

 
 
 

Running (Free)DOS from ROM

Post by Rod Pemberto » Thu, 18 Aug 2011 20:01:18



Quote:> [...]
> What does it look for? Clearly I am not adding something.

> For INT 13H, AH=8 I returned:-
> [...]

First, I'd check to see if you're returning correct results for BL or CL.

Second, are you familiar with RBIL?  Ralf Brown's Interrupt List?

You can look through it's interrupts in html form at two websites.  Some
of the original text files are not converted to html.  So, you may want to
get them as text too.  Links to three versions here:
http://aodfaq.wikispaces.com/rbil

Is you're Int 13h, AH=08h interrupt correct?  According to the "notes"
section of RBIL, this interrupt is for harddisks prior to AT.  It says DOS
only calls this when Int 11h fails to report installed floppies.  It also
says DOS requires CL to be non-zero result from Int 11h.  This is what is
publicly known about Int 13h, AH=08h, from one of the DJGPP html-ized
versions of RBIL:
http://www.delorie.com/djgpp/doc/rbinter/id/27/6.html

Int 11h
http://www.delorie.com/djgpp/doc/rbinter/id/81/5.html

You might look at Int 13h, AH=15h too:
http://www.delorie.com/djgpp/doc/rbinter/id/45/6.html

Or, Int 1Eh.  Apparently, it points to the diskette parameter table in the
BIOS ROM.  The table specifies diskette specifics.
http://www.delorie.com/djgpp/doc/rbinter/id/55/24.html
http://www.delorie.com/djgpp/doc/rbinter/it/64/12.html

CMOS location 10h also has floppy disk specific info.  This is in RBIL's
CMOS.LST file.  This file isn't in the html'ized versions of RBIL.  The
following link is not guaranteed to be available.  I found it by searching.
You'll need to get the original text version of RBIL if you want it for
reference.  See "CMOS 10h - IBM - FLOPPY DRIVE TYPE" section:
http://bochs.sourceforge.net/techspec/CMOS-reference.txt

The EBDA (probably not present on an XT) has floppy disk info at E7h.

DOS 1+ has Int21, AH=1Bh which returns the sidedness of the drive.  It has
to be getting the info from the BIOS call or table in BDA or BIOS or CMOS.

I'm not sure what those DOS versions are looking for, but it's probably
there somewhere or elsewhere in RBIL...

HTH,

Rod Pemberton

 
 
 

Running (Free)DOS from ROM

Post by Esra Sdrawkca » Fri, 19 Aug 2011 02:18:20





>> >I currently have is as far as reading 5" 360K disk. I am about to try
>> >and add an HDisk. I was going to first try and add a 1.4M 3" floppy.
>> >My question is:  if I return the correct disk parameters  to Int 13H
>> >will DOS V2.1 be able to read the disk (even though 1.4 disks were not
>> >available at the time).

>> The easiest way to find out would be to get a PC with both a 5 1/4"
>> and 3 1/2' disk drive, boot MS-DOS 2.1 on it and see if it can acess
>> the 3 1/2" drive.  You can probably do this in virtual machine if you
>> don't have the hardware.

>>                                         Ross Ridge

>> --
>>  l/  //   Ross Ridge -- The Great HTMU

>> -()-/()/  http://www.csclub.uwaterloo.ca/~rridge/
>>  db  //

> Well I tried that experiment. Used A: PC-DOS V2.1 and had a 1.44M B:
> with files (from a DOS V3.3 system copy).
> Doing  DIR B: gave garbage file names.
> Could not erase files either to try and  create my own "V2.1"
> directory.
> Not sure what the problem is since both use FAT12.

do you need drivparm?

http://webpages.charter.net/danrollins/techhelp/0279.HTM

Quote:> Interestingly I cannot get MS-DOS V3.3 to BOOT.  If I could I would be
> in great shape. It hangs half way through the boot process. Any ideas?

--
[dash dash space newline sig]

"Nuns! NUNS! Reverse! Reverse!"

 
 
 

Running (Free)DOS from ROM

Post by monahan » Fri, 19 Aug 2011 03:07:09






> > [...]
> > What does it look for? Clearly I am not adding something.

> > For INT 13H, AH=8 I returned:-
> > [...]

> First, I'd check to see if you're returning correct results for BL or CL.

> Second, are you familiar with RBIL? ?Ralf Brown's Interrupt List?

> You can look through it's interrupts in html form at two websites. ?Some
> of the original text files are not converted to html. ?So, you may want to
> get them as text too. ?Links to three versions here:http://aodfaq.wikispaces.com/rbil

> Is you're Int 13h, AH=08h interrupt correct? ?According to the "notes"
> section of RBIL, this interrupt is for harddisks prior to AT. ?It says DOS
> only calls this when Int 11h fails to report installed floppies. ?It also
> says DOS requires CL to be non-zero result from Int 11h. ?This is what is
> publicly known about Int 13h, AH=08h, from one of the DJGPP html-ized
> versions of RBIL:http://www.delorie.com/djgpp/doc/rbinter/id/27/6.html

> Int 11hhttp://www.delorie.com/djgpp/doc/rbinter/id/81/5.html

> You might look at Int 13h, AH=15h too:http://www.delorie.com/djgpp/doc/rbinter/id/45/6.html

> Or, Int 1Eh. ?Apparently, it points to the diskette parameter table in the
> BIOS ROM. ?The table specifies diskette specifics.http://www.delorie.com/djgpp/doc/rbinter/id/55/24.htmlhttp://www.delo...

> CMOS location 10h also has floppy disk specific info. ?This is in RBIL's
> CMOS.LST file. ?This file isn't in the html'ized versions of RBIL. ?The
> following link is not guaranteed to be available. ?I found it by searching.
> You'll need to get the original text version of RBIL if you want it for
> reference. ?See "CMOS 10h - IBM - FLOPPY DRIVE TYPE" section:http://bochs.sourceforge.net/techspec/CMOS-reference.txt

> The EBDA (probably not present on an XT) has floppy disk info at E7h.

> DOS 1+ has Int21, AH=1Bh which returns the sidedness of the drive. ?It has
> to be getting the info from the BIOS call or table in BDA or BIOS or CMOS.

> I'm not sure what those DOS versions are looking for, but it's probably
> there somewhere or elsewhere in RBIL...

> HTH,

> Rod Pemberton

Thanks Rob, yes I have been using Ralf's info a lot. (A tremendous
amount of effort, very useful and appreciated). I am also using "The
Programmers PC Sourcebook" by Thom Hogan.

Thanks for the detailed suggestions. I will try all of them.  While
its probably not related to my single sided 5 disk problem for DOS
v2.1, I'm a bit worried about the CMOS data for later DOS versions
since I do not have that hardware in my current S-100 system. (I use
the 58167A, see:- http://s100computers.com/My%20System%20Pages/PIC&RTC%20Board/My%20PIC...)

Do you by any chance know if DOS 3.x can boot on the original IBM-PC.
(That box obviously does not have a RTC).  Otherwise I will have to do
some more hardware work!

Do you by any chance know if DOS 3.x can boot on the origional

 
 
 

Running (Free)DOS from ROM

Post by Rod Pemberto » Fri, 19 Aug 2011 16:26:16



Quote:

> Do you by any chance know if DOS 3.x can boot on the original IBM-PC.
> (That box obviously does not have a RTC).

No, I don't, sorry.  If someone else here doesn't have an answer, maybe try
a post to comp.arch or alt.folklore.computers, etc.  There are guys on other
groups, like comp.lang.asm.x86 (moderated) or alt.os.development, who may
know also.

Rod Pemberton

 
 
 

Running (Free)DOS from ROM

Post by dg126 » Fri, 19 Aug 2011 17:18:48




Quote:> Do you by any chance know if DOS 3.x can boot on the original IBM-PC.
> (That box obviously does not have a RTC).

Yes, it does.  I still have an IBM-PC 5150.  In place of one of the full-
height 5.25" floppy drives I added a half-height 1.44MB floppy drive and a
half-height 20MB Seagate ST-225 hard drive.  At one time or another, it has
booted various versions of PC-DOS or MS-DOS from 2.1 to 6.22.  ISTR,
though, that to correctly use a 3.5" floppy you needed DOS 3.x+ the
drivparm command in your config.sys file.
 
 
 

Running (Free)DOS from ROM

Post by monahan » Sat, 20 Aug 2011 02:23:42





> > Do you by any chance know if DOS 3.x can boot on the original IBM-PC.
> > (That box obviously does not have a RTC).

> Yes, it does. ?I still have an IBM-PC 5150. ?In place of one of the full-
> height 5.25" floppy drives I added a half-height 1.44MB floppy drive and a
> half-height 20MB Seagate ST-225 hard drive. ?At one time or another, it has
> booted various versions of PC-DOS or MS-DOS from 2.1 to 6.22. ?ISTR,
> though, that to correctly use a 3.5" floppy you needed DOS 3.x+ the
> drivparm command in your config.sys file.

That is really great news dg1261 because that simplifies my BIOS
writing tremendously. I need
only INT 13, AH =0 to 8 for floppies.

Does everybody here agree?   Why then all  the extra AH options that
still have floppy parameters. I know they are
required for hard disks, but why are floppies included (DL < 7FH)

 I can search, but offhand do you have the appropriate config.sys file
listing you used.
Are you booting these OS's from a 5" 360K disk?

 
 
 

Running (Free)DOS from ROM

Post by Jim Leonar » Sat, 20 Aug 2011 03:20:55



Quote:> Are you booting these OS's from a 5" 360K disk?

I am, yes (I'm not the original poster).

In fact, pretty much *all* DOS versions boot on an IBM 5150.  I've
personally tested 1.1, 2.0, 2.11, 3.10, 3.3, 4.0, 5.0, 6.22, 7.0 (PC
DOS 2000), DR-DOS 5.0, DR-DOS 6.0, Caldera DR-DOS 7.03... all boot
just fine on a 1981 IBM 5150 with a 5.25" 360K floppy drive.

So, if you write a DOS that won't, then you've done something wrong
(like relied on the RTC or something).  And if pure DOS won't boot on
your custom BIOS, you've done something else wrong :-)

 
 
 

Running (Free)DOS from ROM

Post by monahan » Sat, 20 Aug 2011 09:29:37




> > Are you booting these OS's from a 5" 360K disk?

> I am, yes (I'm not the original poster).

> In fact, pretty much *all* DOS versions boot on an IBM 5150. ?I've
> personally tested 1.1, 2.0, 2.11, 3.10, 3.3, 4.0, 5.0, 6.22, 7.0 (PC
> DOS 2000), DR-DOS 5.0, DR-DOS 6.0, Caldera DR-DOS 7.03... all boot
> just fine on a 1981 IBM 5150 with a 5.25" 360K floppy drive.

> So, if you write a DOS that won't, then you've done something wrong
> (like relied on the RTC or something). ?And if pure DOS won't boot on
> your custom BIOS, you've done something else wrong :-)

That's really great news guys because it really contains the problem.
I was thinking later versions off the BIOS utilize INT13H with AH>8,
possibly other ints and the CMOS Clock,.   I now beginning to think
the problem is in my formatting the disks.

BTW does anybody have the source code for the BOOT sector.

 
 
 

Running (Free)DOS from ROM

Post by dg126 » Sat, 20 Aug 2011 09:30:17




Quote:> I can search, but offhand do you have the appropriate
> config.sys file listing you used.

Just google for "dos drivparm syntax".

Drivparm is an internal command, though there seems to be a bit of
discrepancy on the 'net re: required DOS version.  I took a quick scan
through the DOS system files and found DRIVPARM inside PC-DOS 3.3
(ibmbio.com) and MS-DOS 3.2 (io.sys) but not in PC-DOS 3.1 or any earlier
versions, so I'd say the minimum DOS version is 3.2.

My 5150 presently boots MS-DOS 6.22 from the hard drive, but I know at one
time or another I've also booted it from any version of my 5.25" DOS
floppies.  I've also booted from a 3.5" floppy of MS-DOS 5.0.  I don't
recall if I ever tried tried booting anything earlier than MS-DOS 5.0 from
the 3.5" floppy.

 
 
 

Running (Free)DOS from ROM

Post by Rod Pemberto » Sat, 20 Aug 2011 16:52:33



Quote:

> BTW does anybody have the source code for the BOOT sector.

Are you writing your own or want to see a disassembled version?  I.e., some
people don't want to look at existing code...  You should find disassemblies
of (copyrighted, probably...) boot sectors at the "Starman's" pages,
"Reverse Engineering DOS ...," and the two "Study of BIOS ..." links.

Anyway, here are some links you might find interesting.  I had to dig
through many of my old posts to get them.  All links should work.  A couple
are no longer available, but are archived via Wayback Machine.  You'll have
to select a date for the WM archived links.  Most should pull up the page
listed.

"MBRs (Master Boot Records"
http://thestarman.pcministry.com/asm/mbr/index.html#MBR

That page covers:
"All about FDISK.EXE"
"What does FDISK.EXE do to a hard drive?"
"The Windows(tm) 7 MBR"
"The Windows(tm) Vista MBR"
"The Windows(tm) 2000/XP MBR"
"The Windows(tm) MBR for FAT32"
"The Standard MBR"
"Notes on DOS 3.30 and an early (1988) OEM version"
"The Ranish MBR/Compact Boot Manager"
"The IBM(rt) Personal Computer(tm) DOS 2.00 MBR and Hom Similar
it is to the Standard MBR (of DOS 3.30)"

Throughout those pages are lots of interesting details, such as Win98's IHC
string for floppies.  You might be interested in a number of other pages he
has,  such as "MBR", "BIOS" - a history of the BIOS, and "A Forensic
Examiniation of 'IBM PC DOS 1.0" and '1.10'"  So, this is "Starman's" home
page:
http://thestarman.pcministry.com/

You may find some of these useful also:

"Reverse-Engineering DOS 1.0 - Part 1: The Boot Sector"
http://www.pagetable.com/?p=165

"Partition types" Andries Brouwer
http://www.win.tue.nl/~aeb/partitions/

"ATA-ATAPI.COM" with Public Domain ATA/ATAPI code by Hale Landis
http://www.ata-atapi.com/

IDE code by "Doors"
http://www.freedoors.org/idework/idework.htm

Alan Cox posted a list of BIOS calls used by Linux v2.4:
http://groups.google.com/group/linux.kernel/msg/8472b20ca0139418

Bruce Simpson posted a list of BIOS calls and BDA references used by
FreeBSD:
https://groups.google.com/group/mailing.freebsd.current/msg/240d2d86c...

"A Study of BIOS Interrupts as used by Microsoft Windows 2000" by Adam
Sulmicki via Wayback Archive:
http://wayback.archive.org/web/*/http://www.missl.cs.umd.edu/winint/i...

"A Study of BIOS Services as used by Microsoft Windows XP" by Adam Sulmicki
via Wayback Archive:
http://wayback.archive.org/web/*/http://www.missl.cs.umd.edu/winint/i...

HTH,

Rod Pemberton

 
 
 

Running (Free)DOS from ROM

Post by monahan » Mon, 22 Aug 2011 09:08:01





> > I can search, but offhand do you have the appropriate
> > config.sys file listing you used.

> Just google for "dos drivparm syntax".

> Drivparm is an internal command, though there seems to be a bit of
> discrepancy on the 'net re: required DOS version. ?I took a quick scan
> through the DOS system files and found DRIVPARM inside PC-DOS 3.3
> (ibmbio.com) and MS-DOS 3.2 (io.sys) but not in PC-DOS 3.1 or any earlier
> versions, so I'd say the minimum DOS version is 3.2.

> My 5150 presently boots MS-DOS 6.22 from the hard drive, but I know at one
> time or another I've also booted it from any version of my 5.25" DOS
> floppies. ?I've also booted from a 3.5" floppy of MS-DOS 5.0. ?I don't
> recall if I ever tried tried booting anything earlier than MS-DOS 5.0 from
> the 3.5" floppy.

Well Rod (and others), I finally solved what the problem was with my
custom S100/8086 ROM BIOS.
To recap, I could read single sided MS-DOS V2.10 5" (360K) disks fine.
But not DS Disks
Yet I had no problem with PC CPM-86 .DS disks.
Long story short.... The problem had to do with the way CPM & MS-DOS
do disk sides. In CPM-86 I had 1-9 sectors on one side and for side B,
sectors were "called" 10-18.  i.e. there was no special set side
command.
In MS-DOS of course the side in in DH.

As is usually the case very simple and obvious when you find it!

Now I will move on to higher DOS versions and 1.44 disks etc.   One
thing this experience did do, is force me to add an extensive debug
stream to a serial terminal . Displays all int info etc.

Thanks for all the help/suggestions.

(I may be back!)

 
 
 

Running (Free)DOS from ROM

Post by s_dubrov.. » Sat, 03 Sep 2011 09:34:32






> > > I can search, but offhand do you have the appropriate
> > > config.sys file listing you used.

> > Just google for "dos drivparm syntax".

> > Drivparm is an internal command, though there seems to be a bit of
> > discrepancy on the 'net re: required DOS version. ?I took a quick scan
> > through the DOS system files and found DRIVPARM inside PC-DOS 3.3
> > (ibmbio.com) and MS-DOS 3.2 (io.sys) but not in PC-DOS 3.1 or any earlier
> > versions, so I'd say the minimum DOS version is 3.2.

> > My 5150 presently boots MS-DOS 6.22 from the hard drive, but I know at one
> > time or another I've also booted it from any version of my 5.25" DOS
> > floppies. ?I've also booted from a 3.5" floppy of MS-DOS 5.0. ?I don't
> > recall if I ever tried tried booting anything earlier than MS-DOS 5.0 from
> > the 3.5" floppy.

> Well Rod (and others), I finally solved what the problem was with my
> custom S100/8086 ROM BIOS.
> To recap, I could read single sided MS-DOS V2.10 5" (360K) disks fine.
> But not DS Disks
> Yet I had no problem with PC CPM-86 .DS disks.
> Long story short.... The problem had to do with the way CPM & MS-DOS
> do disk sides. In CPM-86 I had 1-9 sectors on one side and for side B,
> sectors were "called" 10-18. ?i.e. there was no special set side
> command.

This doesn't sound quite right.  CPM-86 5 1/4 diskettes are DS 320k, 8
spt, or 160k SS.  The 'sideness' is determined by the last byte of the
boot sector. Null is SS, 1h if DS.  The cp/m bios checks that byte to
determine sideness.  Also, the data layout is different; it is tracks
first then side, with side0, trk0..79, then side1, trk79..0 as the
sequencial order.  This pertains to the ibm PC version and ibm PC/XT
version.

The dw 0AA55h signature word in the boot sector came later for msdos.

Probably you know that 3 1/2 720k diskettes can be formatted as
360/320k to take diskette images of 5 1/4 360/320k, this may be an
option for you to test also.

- Show quoted text -

Quote:> In MS-DOS of course the side in in DH.

> As is usually the case very simple and obvious when you find it!

> Now I will move on to higher DOS versions and 1.44 disks etc. ? One
> thing this experience did do, is force me to add an extensive debug
> stream to a serial terminal . Displays all int info etc.

> Thanks for all the help/suggestions.

> (I may be back!)- Hide quoted text -

> - Show quoted text -