2
0
mirror of https://github.com/xcat2/xNBA.git synced 2024-12-14 15:21:32 +00:00

Auto-assign drive number only if set to 0xff; almost all applications

require that we use drive 0x80, so it should probably be the default.
This commit is contained in:
Michael Brown 2007-08-23 20:50:24 +01:00
parent d078fb3cb7
commit 01b755704a

View File

@ -543,8 +543,9 @@ void register_int13_drive ( struct int13_drive *drive ) {
/* Assign drive number if none specified, update BIOS drive count */
get_real ( num_drives, BDA_SEG, BDA_NUM_DRIVES );
if ( ! drive->drive )
drive->drive = ( num_drives | 0x80 );
if ( ( drive->drive & 0xff ) == 0xff )
drive->drive = num_drives;
drive->drive |= 0x80;
num_drives++;
if ( num_drives <= ( drive->drive & 0x7f ) )
num_drives = ( ( drive->drive & 0x7f ) + 1 );