home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!munnari.oz.au!spool.mu.edu!caen!destroyer!gatech!prism!gt8134b
- From: gt8134b@prism.gatech.EDU (Howlin' Bob)
- Newsgroups: comp.os.linux
- Subject: DOS emulation
- Message-ID: <79132@hydra.gatech.EDU>
- Date: 5 Jan 93 15:01:19 GMT
- Organization: Georgia Institute of Technology
- Lines: 57
-
- wolff@liberator.et.tudelft.nl (Rogier Wolff) writes:
- >Now I don't agree with this. the windows API has in the HUNDREDS of calls.
- >Also given that hardware is slightly logical because making exceptions
- >and so forth in silicon is very expensive.
-
- Well, try it in software. I promise you, it doesn't look cheap from
- that side either.
-
- >This is what is wrong with the current DOS emulator. It starts by emulating
- >the MSDOS API. You should start by emulating the hardware, and after you
-
- It doesn't really emulate the MS-DOS "API," as it were. The DOS emulator
- emulates the BIOS, and a very few int 21h calls that are necessary for
- the "network redirector" (linux.exe) and good performance. IBM thought
- enough ahead to make a slight buffer between software and hardware: the
- BIOS. A lot of software calls the BIOS (for disk access, a lot of video
- stuff, etc.) MS-DOS itself calls the BIOS. It is absolutely necessary
- to have some BIOS emulation. Furthermore, the whole point of the BIOS is
- hardware independence; the PC builder writes a BIOS to take advantage of
- whatever features, quirks, and slight incompatibilities his machine might
- have. Running under Linux is a major feature of the DOS emulator. Matthias
- wrote the BIOS with such in mind. :-)
-
- It would be idiotic to rely totally on hardware emulation and then run the
- machine's native (ROM) BIOS under that. The overhead would be tremendous.
- If I can write a pseudo-BIOS trap for all int 10h (video) calls that
- handles most calls with a very few lines of C (say, a few variable
- assignments, input/output, etc), whyever would I want to do otherwise.
- The entire int 10h section in my emulator is under 200 lines (I think)
- and is sufficient for most programs. (of course, direct screen writes
- are also handled with a special feature of vm86 mode).
-
- >are able to run MSDOS using that, you can start optimizing performance
- >and functionality by trapping some MSDOS calls that you know are often
- >used and are best emulated. The basic hardware that MSDOS needs is:
- >Keyboard/timers/video/floppy (harddisk).
-
- Almost no programs directly hit the harddisk/floppydisk. But I agree
- with the others, and am working on it.
-
- >At first video emulation need only be at 80x25 textmode. In the end it
- >shouldn't be too hard to detect "going into graphics", and emulate that
- >too. It might become a little slow, but it should at least work....
-
- That becomes difficult. I plan on getting around to it, but it's not the
- most urgent thing right now. I would be most pleased if you implemented
- such a thing, however. Please mail me any suggestions/diffs you have.
-
- Robert Sanders
- gt8134b@prism.gatech.edu
-
-
- --
- Robert Sanders
- Georgia Institute of Technology, Atlanta Georgia, 30332
- uucp: ...!{decvax,hplabs,ncar,purdue,rutgers}!gatech!prism!gt8134b
- Internet: gt8134b@prism.gatech.edu
-