VOGONS


INT 13h bug

Topic actions

First post, by format c:

User metadata
Rank Newbie
Rank
Newbie

Hi,

I've just found a small bug in the emulation of int 13h (or that's what I think 😀 ).

In function 8 of int 13h (Get drive parameters) DOSBox seems to report one more cylinder than the correct value. For instance, for a 1.44'' floppy drive it returns CX = 5012h, when it should be 4F12h.

I've had a look at the source code; the solution seems to be pretty simple. In src/ints/bios_disk.cpp I added the following line after line 445:

tmpcyl--;

I found the bug while trying to install DOS 4.01 in a hard disk image. Before the correction the setup program gave a "Bad media" error and exited; after the correction it works.

Reply 1 of 1, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author

Thanks for the info, got to look through that if it's only wrong for floppies
and if so if the original value is at least good.