- floppy read/write commands: return value of status register 1 is 0x85 when

the requested sector doesn't exist.
- BX_PANIC message for requested cylinder > tracks on media fixed
This commit is contained in:
Volker Ruppert 2002-08-03 06:58:56 +00:00
parent efd02e9c19
commit 16dfd66163

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////
// $Id: floppy.cc,v 1.45 2002-08-01 07:34:59 vruppert Exp $
// $Id: floppy.cc,v 1.46 2002-08-03 06:58:56 vruppert Exp $
/////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2002 MandrakeSoft S.A.
@ -89,7 +89,7 @@ bx_floppy_ctrl_c::init(bx_devices_c *d, bx_cmos_c *cmos)
{
Bit8u i;
BX_DEBUG(("Init $Id: floppy.cc,v 1.45 2002-08-01 07:34:59 vruppert Exp $"));
BX_DEBUG(("Init $Id: floppy.cc,v 1.46 2002-08-03 06:58:56 vruppert Exp $"));
BX_FD_THIS devices = d;
BX_REGISTER_DMA8_CHANNEL(2, bx_floppy.dma_read, bx_floppy.dma_write, "Floppy Drive");
@ -890,7 +890,7 @@ bx_floppy_ctrl_c::floppy_command(void)
BX_PANIC(("sector_size not 512"));
}
if ( cylinder >= BX_FD_THIS s.media[drive].tracks ) {
BX_PANIC(("io: norm r/w parms out of range: sec#%02xh cyl#%02xh eot#%02h head#%02xh",
BX_PANIC(("io: norm r/w parms out of range: sec#%02xh cyl#%02xh eot#%02xh head#%02xh",
(unsigned) sector, (unsigned) cylinder, (unsigned) eot,
(unsigned) head));
return;
@ -914,7 +914,7 @@ bx_floppy_ctrl_c::floppy_command(void)
BX_FD_THIS s.status_reg0 = 0x40 | (BX_FD_THIS s.head[drive]<<2) | drive;
BX_FD_THIS s.result[0] = BX_FD_THIS s.status_reg0;
// 1000 0101 end of cyl/NDAT/NID
BX_FD_THIS s.result[1] = 0x86;
BX_FD_THIS s.result[1] = 0x85;
// 0000 0000
BX_FD_THIS s.result[2] = 0x00;
BX_FD_THIS s.result[3] = BX_FD_THIS s.cylinder[drive];