From owner-freebsd-hackers Fri Jan 30 22:30:58 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id WAA26768 for hackers-outgoing; Fri, 30 Jan 1998 22:30:58 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from eac.iafrica.com (196-31-98-24.iafrica.com [196.31.98.24]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id WAA26762 for ; Fri, 30 Jan 1998 22:30:50 -0800 (PST) (envelope-from rnordier@iafrica.com) Received: (from rnordier@localhost) by eac.iafrica.com (8.8.7/8.6.12) id IAA04898; Sat, 31 Jan 1998 08:27:21 +0200 (SAT) From: Robert Nordier Message-Id: <199801310627.IAA04898@eac.iafrica.com> Subject: Re: floppy media change detection In-Reply-To: <19980129175913.55683@aahz.jf.intel.com> from Alan Batie at "Jan 29, 98 05:59:13 pm" To: batie@aahz.jf.intel.com (Alan Batie) Date: Sat, 31 Jan 1998 08:27:10 +0200 (SAT) Cc: hackers@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL31 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG X-To-Unsubscribe: mail to majordomo@FreeBSD.org "unsubscribe hackers" Alan Batie wrote: > Dating myself horribly, I seem to remember the days of 360K floppies > where in the dos world, you'd do yourself in bigtime by swapping floppies > and the directory would be cached and you'd end up writing the wrong > one back out. It seems like a few of the later 360's and then the 1.2's > and 1.44's fixed this with a media change signal of some sort (maybe it > was the transition from 180K to 360K?). Am I hallucinating? I don't > remember how you told dos you wanted to change the floppy certainly, so > it's possible... A quick scan through the fd controller doesn't indicate > any such thing, and it would be really handy for an application I'm > working on... Am I out of luck? Thanks... This is usually known as "change line" detection, and as from the AT (not PC/XT) became available via the digital input register (DIR) at port address 0x3f7. The MS-DOS default block device also implements a virtual change line capability by storing system clock ticks at each access. In response to a "media check" request from the kernel, if <= two seconds have elapsed, the media is assumed to be unchanged. IIRC, the DOS kernel could be told you wanted to change media by doing a CP/M-style "warm boot". I think there was a keystroke for this, but I've forgotten it. -- Robert Nordier