Support 1.44MB floppy disk.

Submitted by:	Nobuyuki Koganemaru <kogane@koganemaru.co.jp>,
             	NOKUBI Hirotaka <hnokubi@yyy.or.jp>
This commit is contained in:
kato 1998-05-02 02:06:08 +00:00
parent 196e205b7b
commit 82fff9408a
4 changed files with 25 additions and 6 deletions

View File

@ -24,7 +24,7 @@
* the rights to redistribute these changes.
*
* from: Mach, Revision 2.2 92/04/04 11:34:26 rpd
* $Id: bios.S,v 1.7 1997/05/18 12:28:38 kato Exp $
* $Id: bios.S,v 1.8 1997/07/13 12:13:01 kato Exp $
*/
/*
@ -123,8 +123,11 @@ ENTRY(biosread)
movb 0x08(%ebp), %al /* DA/UA */
movb $0x06, %ah
andb $0xf0, %al
cmpb $0x30, %al
jz fd
cmpb $0x90, %al
jnz 1f
fd:
incb %dl
movb $0x02, %ch
movb $0xd6, %ah
@ -357,6 +360,8 @@ ENTRY(get_diskinfo)
movb %dl, %al /* ask for disk info */
andb $0xf0, %al
cmpb $0x30, %al
jz fdd4
cmpb $0x90, %al
jz fdd
@ -370,7 +375,12 @@ ENTRY(get_diskinfo)
* Urk. Call failed. It is not supported for floppies by old BIOS's.
* Guess it's a 15-sector floppy.
*/
fdd4:
movb $18, %dl
jmp 1f
fdd:
movb $15, %dl /* max sector */
1:
subb %ah, %ah /* %ax = 0 */
movb %al, %al
movb %ah, %bh /* %bh = 0 */
@ -379,7 +389,6 @@ fdd:
movb $79, %ch /* max track */
movb $1, %cl /* # floppy drives installed */
movb $2, %dh /* max head */
movb $15, %dl /* max sector */
/* es:di = parameter table */
/* carry = 0 */
ok:

View File

@ -24,7 +24,7 @@
* the rights to redistribute these changes.
*
* from: Mach, Revision 2.2 92/04/04 11:36:29 rpd
* $Id$
* $Id: start.S,v 1.4 1997/02/22 09:43:09 peter Exp $
*/
/*
@ -195,6 +195,9 @@ nothireso:
/* bootstrap passes */
mov %cs, %bx
data32
cmp $0x1fe0, %ebx
jz fd
data32
cmp $0x1fc0, %ebx
jnz hd
data32
@ -204,6 +207,8 @@ nothireso:
addr32
movb 0x584, %al
andb $0xf0, %al
cmpb $0x30, %al
jz fd
cmpb $0x90, %al
jnz hd
fd:

View File

@ -24,7 +24,7 @@
* the rights to redistribute these changes.
*
* from: Mach, Revision 2.2 92/04/04 11:36:34 rpd
* $Id: sys.c,v 1.13 1997/06/09 13:44:04 kato Exp $
* $Id: sys.c,v 1.14 1998/04/12 04:48:11 kato Exp $
*/
/*
@ -292,6 +292,11 @@ openrd(void)
dosdev_copy = biosdrive;
#endif
break;
#ifdef PC98
case 6:/* 1.44MB FD */
dosdev_copy = (maj << 3) | unit;
break;
#endif
default:
printf("Unknown device\n");
return 1;

View File

@ -24,7 +24,7 @@
* the rights to redistribute these changes.
*
* from: Mach, Revision 2.2 92/04/04 11:36:43 rpd
* $Id$
* $Id: table.c,v 1.5 1997/02/22 09:43:11 peter Exp $
*/
/*
@ -145,5 +145,5 @@ struct pseudo_desc Idtr_real = { 0x400 - 1, 0x0, 0x0 };
* All initialized data is defined in one file to reduce space wastage from
* fragmentation.
*/
char *devs[] = { "wd", "dk", "fd", "wt", "sd", 0 };
char *devs[] = { "wd", "dk", "fd", "wt", "sd", "dk", "fd", 0 };
unsigned long tw_chars = 0x5C2D2F7C; /* "\-/|" */