Make Media ID table relative to DPB table. Fixes Hattrick by Ikarion.
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@4116
This commit is contained in:
parent
ff8d4f287f
commit
1afaf28921
5 changed files with 15 additions and 12 deletions
|
@ -494,10 +494,10 @@ static Bitu DOS_21Handler(void) {
|
|||
Bit8u drive=reg_dl;
|
||||
if (!drive || reg_ah==0x1f) drive = DOS_GetDefaultDrive();
|
||||
else drive--;
|
||||
if (Drives[drive]) {
|
||||
if (drive < DOS_DRIVES && Drives[drive] && !Drives[drive]->isRemovable()) {
|
||||
reg_al = 0x00;
|
||||
SegSet16(ds,dos.tables.dpb);
|
||||
reg_bx = drive;//Faking only the first entry (that is the driveletter)
|
||||
reg_bx = drive*5;//Faking the first entry (drive number) and media id
|
||||
LOG(LOG_DOSMISC,LOG_ERROR)("Get drive parameter block.");
|
||||
} else {
|
||||
reg_al=0xff;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue