Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DOS kernel init order fixup, IO.SYS, MSDOS.SYS, and "built-in" device drivers #289

Open
joncampbell123 opened this issue Sep 5, 2017 · 4 comments

Comments

@joncampbell123
Copy link
Owner

https://en.wikipedia.org/wiki/IO.SYS

DOSBox-X should create all common device drivers that exist on MS-DOS. IO.SYS is said to include built-in drivers, regardless of actual hardware.

Here is a List of Lists dump of MS-DOS 5.0:

0116:0048 NUL
0070:0023 CON
0070:0035 AUX
0070:0047 PRN
0070:0059 CLOCK$
0070:006B (block device driver)
0070:007B COM1
0070:008D LPT1
0070:009F LPT2
0070:00B8 LPT3
0070:00CA COM2
0070:00DC COM3
0070:00EE COM4

You can tell which ones are built-in to IO.SYS by the segment value "0070:"

I'm guessing the one block device driver is responsible for A:, C:, etc.

@joncampbell123
Copy link
Owner Author

Also noteworthy is that MS-DOS 5.0 appears to install new device drivers at the head of the list, after the "NUL" device.

Having HIMEM.SYS and SMARTDRV.SYS installed in CONFIG.SYS, the list becomes:

0116:0048 NUL
02A0:0000 SMARTAAR
0255:0000 XMSXXXX0
0070:0023 CON
0070:0035 AUX
0070:0047 PRN
0070:0059 CLOCK$
0070:006B (block device driver)
0070:007B COM1
0070:008D LPT1
0070:009F LPT2
0070:00B8 LPT3
0070:00CA COM2
0070:00DC COM3
0070:00EE COM4

@joncampbell123
Copy link
Owner Author

Part of this accuracy improvement is that DOSBox-X's HIMEM.SYS emulation should not just register XMSXXXX0 but add it to the aforementioned linked list.

@joncampbell123
Copy link
Owner Author

Init order, according to Wikipedia:

In the PC bootup sequence, the first sector of the boot disk is loaded into memory and executed. If this is the DOS boot sector, it loads the first three sectors of IO.SYS into memory and transfers control to it. IO.SYS then:

Loads the rest of itself into memory.
Initializes each default device driver in turn (console, disk, serial port, etc..). At this point, the default devices are available.
Loads the DOS kernel and calls its initialization routine. The kernel is stored in MSDOS.SYS with MS-DOS and in IO.SYS with Windows 9x. At this point, "normal" file access is available.
Processes the MSDOS.SYS file with Windows 9x.
Processes the CONFIG.SYS file, in MS-DOS 2.0 and higher and Windows 9x.
Loads COMMAND.COM (or other operating system shell if specified).
Displays the bootsplash in Windows 9x. If LOGO.SYS is present, it is used as the bootsplash. Otherwise, the bootsplash in IO.SYS is used.

@joncampbell123
Copy link
Owner Author

We should also add a config.sys section to dosbox.conf, which would consist of DEVICE= commands for the DOSBox-X kernel to load SYS files from. A special command (something like @import) would instruct DOSBox-X to parse a file of the user's choice as CONFIG.SYS.

@joncampbell123 joncampbell123 self-assigned this Sep 5, 2017
@joncampbell123 joncampbell123 changed the title DOS kernel init order fixup, IO.SYS, MSDOS.SY, and "built-in" device drivers DOS kernel init order fixup, IO.SYS, MSDOS.SYS, and "built-in" device drivers Sep 5, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants