Running (Free)DOS from ROM

Running (Free)DOS from ROM

Post by Ruud » Sun, 07 Aug 2011 02:08:37



Hallo allemaal,

I'm hobbying more then a bit with some old IBM PC-XT (compatibles).
And I found an old REX EPROM card capable of handling up to six*
27512s, good for 1 MByte of data. IMHO enough to contain the most used
files of FreeDOS or MS-DOS. But how to do it?

I know I need a kind of device driver to tell DOS with what device, in
this case the EPROM card, is dealing. Problem: drivers are only loaded
_after_ various other files have been loaded. The PC knows this
because the BIOS contains info how to deal with a floppy drive. Or
with an hard disk drive thanks to the EPROM on the HDD card. Having
written
my own BIOS which I can adapt to my own needs, I won't need an extra
EPROM though :)

I'm sure I could figure it out myself after some time (I think) but if
anybody has done this before and wants to share the knowledge, I would
be very pleased!

Thank you very much in advance!

Groetjes, Ruud Baltissen

 
 
 

Running (Free)DOS from ROM

Post by Ross Ridg » Sun, 07 Aug 2011 03:20:15



>I'm sure I could figure it out myself after some time (I think) but if
>anybody has done this before and wants to share the knowledge, I would
>be very pleased!

I haven't done anything like this, and I doubt anyone has, but I'm
wondering what the problem you're actually facing is.  You seem to know
the obvious solutions, a block-mode device driver, an INT 13h hooking
boot ROM, or adding the functionality to your own BIOS.  You don't like
the first option, but I don't see what's preventing you from implementing
one of the second two solutions.

                                        Ross Ridge

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

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

 
 
 

Running (Free)DOS from ROM

Post by Rod Pemberto » Sun, 07 Aug 2011 16:49:35



Quote:

> I'm hobbying more then a bit with some old IBM PC-XT (compatibles).
> And I found an old REX EPROM card capable of handling up to six*
> 27512s, good for 1 MByte of data. IMHO enough to contain the most used
> files of FreeDOS or MS-DOS. But how to do it?

> I know I need a kind of device driver to tell DOS with what device, in
> this case the EPROM card, is dealing. Problem: drivers are only loaded
> _after_ various other files have been loaded. The PC knows this
> because the BIOS contains info how to deal with a floppy drive. Or
> with an hard disk drive thanks to the EPROM on the HDD card. Having
> written
> my own BIOS which I can adapt to my own needs, I won't need an extra
> EPROM though :)

> I'm sure I could figure it out myself after some time (I think) but if
> anybody has done this before and wants to share the knowledge, I would
> be very pleased!

Sorry, not I ...

I would guess that you should just have the BIOS emulate a harddisk using
the data on the EEPROM.  IIRC, the first IBM PCs had no hard drive routines
in their BIOS.  AIUI, their hard drives had their own interface cards which
also had ROM routines on that card.  Later on, the BIOS gained interrupt
routines for hard drives.  AIUI, Int 13h was originally for floppies and is
redirected to Int 40h if a hard disk is found.  If a hard disk is found,
then Int 13h is for hard disk.  I'm assuming Int 13h must redirect floppies
to Int 40h when a hard disk is installed.  AIUI, the BIOS will enable ROM
code for other devices.  Apparently, it searches for AA55h signature between
640KB and 1MB on 2KB boundaries to locate other BIOS routines, e.g., video
BIOS, add in cards, etc.  So, as I see it, you're emulating a "ramdisk", via
your own add in device routines placed somewhere between 640K and 1MB in
ROM/EPROM/EEPROM that need an AA55h on a 2KB boundary, probably trapping Int
13h, maybe Int 18h and/or 19h, or somesuch ...  E.g., the "new" Int 13h
would need to "know" that it was accesses the EPROM and use different
routines from what it uses for a hard drive or floppy.

1981 BIOS Int 13h floppy support: 1981 for IBM PC
1984 BIOS extended Int 13h hard disk support: 1984 for IBM AT
1992 IBM/MS Int 13h extensions
1994 Phoenix EDD 1.0 - BIOS extended Int 13h CHS translation
1996 BBS (Bios Boot Spec) 1.01 - boot devices w/out Int 13h support
   (BBS adjusts Int 18h and 19h operation also)
1998 Phoenix EDD 3.0 - BIOS extended Int 13h for 28-bit LBA

Some of those might be work a look, e.g., BBS.

Rod Pemberton
(from comp.os.msdos.programmer)

 
 
 

Running (Free)DOS from ROM

Post by Ruud » Fri, 12 Aug 2011 01:54:28


Hallo Rod,

Quote:> I would guess that you should just have the BIOS emulate a harddisk using
> the data on the EEPROM.

BINGO, I knew there should be a "simple" solution but I simply didn't
see it!

Thank you very much !!!

Groetjes, Ruud Baltissen
www.Baltissen.org

 
 
 

Running (Free)DOS from ROM

Post by monahan » Sun, 14 Aug 2011 02:17:56



Quote:> Hallo Rod,

> > I would guess that you should just have the BIOS emulate a harddisk using
> > the data on the EEPROM.

> BINGO, I knew there should be a "simple" solution but I simply didn't
> see it!

> Thank you very much !!!

> Groetjes, Ruud Baltissenwww.Baltissen.org

Ruud, I'm in the process of writing my own BIOS to allow MS-DOS
(Actually PC-DOS V2.1) run on an S-100 Bus system (see for example:-
http://s100computers.com/Software%20Folder/8086%20Monitor/8086%20Moni...)

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).

Obviously I will try for later versions of DOS later. But right now
they will not floppy boot. Clearly more work needed!

Do you have a link to your bios code or a summary of it? I cannot get
your www.Baltissen.org to link up.

John

 
 
 

Running (Free)DOS from ROM

Post by Ross Ridg » Sun, 14 Aug 2011 03:54:23



>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  //  

 
 
 

Running (Free)DOS from ROM

Post by monahan » Sun, 14 Aug 2011 06:54:23




> >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.

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?

 
 
 

Running (Free)DOS from ROM

Post by Single Stage to Orbi » Sun, 14 Aug 2011 06:54:36



> 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).

Yes definitely as long as the floppy disk controller supports it.
--
Tactical Nuclear Kittens
 
 
 

Running (Free)DOS from ROM

Post by Single Stage to Orbi » Sun, 14 Aug 2011 07:22:11



> 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.

Looks like the floppy disk controller isn't being set up correctly to
read/write 1.44MB floppies.
--
Tactical Nuclear Kittens
 
 
 

Running (Free)DOS from ROM

Post by Rod Pemberto » Mon, 15 Aug 2011 15:36:28



Quote:

> 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 information I have indicates the listed disks were added with listed
version:

MS-DOS 1.00 160KB 5.25" SS/SD floppy disks
MS-DOS 1.10 320KB 5.25" DS/SD floppy disks
MS-DOS 1.25 360KB 5.25" DS/DD floppy disks
MS-DOS 3.00 1.2MB 5.25" DS/HD floppy disks
MS-DOS 3.20 720KB 3.5"  DS/DD floppy disks
MS-DOS 3.30 1.44MB 3.5" DS/HD floppy disks

HTH,

Rod Pemberton

 
 
 

Running (Free)DOS from ROM

Post by Ruud » Mon, 15 Aug 2011 16:33:17


Hallo John,

Quote:> My question is: ?if I return the correct disk parameters ?to Int 13H
> will DOS V2.1 be able to read the disk

At this moment a 1.44 MB drive has been connected to my IBM XT and it
boots fine from a 720 KB floppy. Writing is no problem, formatting
is.
Regarding the parameters, I'm still using the original ones as I have
no idea what they should be. In fact I had no idea at all what to
change to be able to handle 1.44 MB drives and floppies. I know that a
faster controler is needed as well. If the rest is so simple as
changing that parameter list :)

Quote:> Do you have a link to your bios code or a summary of it? I cannot get
> your www.Baltissen.org to link up.

http://www.Baltissen.org should work. http://www.baltissen.org/files/BIOSRB.ASM
is the file.
REMARK: the file is three bytes short !!! I have no idea how to
assemble the file so I assemble it as a COM file. If I add those three
bytes, TASM complains the file is too big. As I had to write a small
Pascal program anyway that cuts the first 56 KB and has to calculate
the checksum, it also adds those bytes.

If anyone can explain how I can assemble the ASM not using the above
trick, please be welcome!

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

 
 
 

Running (Free)DOS from ROM

Post by monahan » Tue, 16 Aug 2011 02:04:21






> > 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 information I have indicates the listed disks were added with listed
> version:

> MS-DOS 1.00 160KB 5.25" SS/SD floppy disks
> MS-DOS 1.10 320KB 5.25" DS/SD floppy disks
> MS-DOS 1.25 360KB 5.25" DS/DD floppy disks
> MS-DOS 3.00 1.2MB 5.25" DS/HD floppy disks
> MS-DOS 3.20 720KB 3.5" ?DS/DD floppy disks
> MS-DOS 3.30 1.44MB 3.5" DS/HD floppy disks

> HTH,

> Rod Pemberton

Thanks Rob. Yes I had the same information, but from above some people
are telling me if I return the correct DP table I can get 2.0 to work
with a 1.44M disk.

I would go to a V3.0 however the boot hangs on my hardware. The
problem is I am adapting my BIOS for a non PC setup (S100 System).
There must be something different in the Int calls in 3.0 that is not
in 2.0. I just cannot figure it out - still looking.  What I cannot
understand is that I have an "unimplemented INT trap" for all the 8086
Ints., yet it picks up nothing. Must be looking for some unusual
returned value in the same Ints I implement for V2.0

 
 
 

Running (Free)DOS from ROM

Post by monahan » Tue, 16 Aug 2011 02:09:35



Quote:> Hallo John,

> > My question is: ?if I return the correct disk parameters ?to Int 13H
> > will DOS V2.1 be able to read the disk

> At this moment a 1.44 MB drive has been connected to my IBM XT and it
> boots fine from a 720 KB floppy. Writing is no problem, formatting
> is.
> Regarding the parameters, I'm still using the original ones as I have
> no idea what they should be. In fact I had no idea at all what to
> change to be able to handle 1.44 MB drives and floppies. I know that a
> faster controler is needed as well. If the rest is so simple as
> changing that parameter list :)

> > Do you have a link to your bios code or a summary of it? I cannot get
> > yourwww.Baltissen.orgto link up.

> http://www.Baltissen.orgshould work.http://www.baltissen.org/files/BIOSRB.ASM
> is the file.
> REMARK: the file is three bytes short !!! I have no idea how to
> assemble the file so I assemble it as a COM file. If I add those three
> bytes, TASM complains the file is too big. As I had to write a small
> Pascal program anyway that cuts the first 56 KB and has to calculate
> the checksum, it also adds those bytes.

> If anyone can explain how I can assemble the ASM not using the above
> trick, please be welcome!

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

OK Rudd, perhaps I'll try a 720 today. Not worried about formatting, I
can easily do that independent of the OS.
Thanks for the AT Bios link. Actually I have the complete AT Bios
(hand entered) from the manual around here somewhere, but its not much
use since I am using different hardware (2793 FDC etc). See:-
http://s100computers.com/My%20System%20Pages/ZFDC%20Board/ZFDC.htm

John

 
 
 

Running (Free)DOS from ROM

Post by Rod Pemberto » Tue, 16 Aug 2011 16:42:56



Quote:

> I would go to a V3.0 however the boot hangs on my hardware. The
> problem is I am adapting my BIOS for a non PC setup (S100 System).
> There must be something different in the Int calls in 3.0 that is not
> in 2.0. I just cannot figure it out - still looking.  What I cannot
> understand is that I have an "unimplemented INT trap" for all the 8086
> Ints., yet it picks up nothing. Must be looking for some unusual
> returned value in the same Ints I implement for V2.0

Have you implemented a BIOS interrupt trace?

You could print out to the screen which BIOS Int is called, it's AX, and
maybe BX.

Or, you could use the TF cpu flag to trace the assembly, but that requires a
bit more work.

For personal use, I've written a few DOS TSRs that trace interrupts.  They
write to the last line in a narrow column on the right hand side of the
screen.  I use Int 10h, AH=06h "SCROLL UP WINDOW" to set the text window
area and to scroll the output in that column up.  If you save the last
interrupt, you can compare it and only output new interrupts.  I output an
asterisk if the interrupt is repeated.  I'd think that should work for BIOS
also as long as the text screen is setup correctly.

Rod Pemberton

 
 
 

Running (Free)DOS from ROM

Post by monahan » Wed, 17 Aug 2011 02:05:44






> > I would go to a V3.0 however the boot hangs on my hardware. The
> > problem is I am adapting my BIOS for a non PC setup (S100 System).
> > There must be something different in the Int calls in 3.0 that is not
> > in 2.0. I just cannot figure it out - still looking. ?What I cannot
> > understand is that I have an "unimplemented INT trap" for all the 8086
> > Ints., yet it picks up nothing. Must be looking for some unusual
> > returned value in the same Ints I implement for V2.0

> Have you implemented a BIOS interrupt trace?

> You could print out to the screen which BIOS Int is called, it's AX, and
> maybe BX.

> Or, you could use the TF cpu flag to trace the assembly, but that requires a
> bit more work.

> For personal use, I've written a few DOS TSRs that trace interrupts. ?They
> write to the last line in a narrow column on the right hand side of the
> screen. ?I use Int 10h, AH=06h "SCROLL UP WINDOW" to set the text window
> area and to scroll the output in that column up. ?If you save the last
> interrupt, you can compare it and only output new interrupts. ?I output an
> asterisk if the interrupt is repeated. ?I'd think that should work for BIOS
> also as long as the text screen is setup correctly.

> Rod Pemberton

Yes I actually have that built into the BIOS. I output to a serial
port to a PC terminal. I'm actually looking at the "traces" currently.
Yesterday I found that using a PC and if I diskcopy my IBM-PC 2.1 360K
dos disk to another that disk, that disk works fine in my S100/BIOS
system, BUT if I format a disk with "\S" low and behold that disk does
not boot. This is a work in progress but I am suspicious of the
initial BOOT sector. Will compare both.  The boot on the format disk
reads slightly different initial sectors!!!

I'm hoping this also could explain why I can't boot DOS 3+.

Thanks for remaining with this tread.

 
 
 

1. Getting my CD-Rom to run in DOS

On Wed, 12 Apr 2000 19:30:08 GMT, Denise Zuniga

Locate, acquire, and install the DOS driver for the CD-ROM drive.

This is somewhat offtopic in comp.os.msdos.programmer but ontopic
in comp.os.msdos.misc; crosspost added and followups set.

--
Damian Yerrick
"I refuse to listen to those who refuse to listen to reason."
See the whole sig: http://www.rose-hulman.edu/~yerricde/sig.html

This is McAfee VirusScan. Add these two lines to your signature to
prevent the spread of signature viruses.  http://www.mcafee.com/

2. BASin R5 up

3. running dos cd-rom games in Win95

4. Mouse-compatible driver specs needed

5. Getting my CD-Rom to run in DOS

6. Samba 3.0 Beta 1 To Replace Windows NT 4 SP6a BDC -> I have some problems ... HELP ...

7. HIMEM.SYS, MSCDEX.EXE, Getting CD-ROM to run in DOS?

8. Clients not regestering with Seconday site

9. running cd rom games under dos

10. Is ROM in dos-boxes identical with original ROM ?

11. Running DJGPP from a CD-ROM-drive

12. Run..Run & Run..Step Over in RHIDE 1.1

13. FREE "Getting Started w/CD-ROM" Pamphlet