> > From: Klaus Espenlaub <[email protected]> > Subject: Re: [vbox-dev] Patch to PC BIOS file: > \src\VBox\Devices\PC\BIOS\floppy.c > To: [email protected] > Message-ID: <[email protected]> > Content-Type: text/plain; charset=windows-1252; format=flowed > > On 16.02.2015 12:18, Michal Necasek wrote: > > > > Hi Dave, > > > > Thanks for the patch! I'll take a look at it in detail soon (at first > > glance it looks very reasonable). However, I'm not going to commit > > anything unless I can run at least the most basic verification that the > > code does something useful. So what can I use as a testcase so check > > that the modified code does what it's supposed to? > > It seems to do some additional 0x40:0x90 and 0x40:0x91 updating only > (the 0x18 one doesn't update the DPT which I assume a real BIOS would), > and for that it's surprisingly much code. Proper handling of these calls > should also include telling the floppy controller about the density etc. > - of course I know that it doesn't have an influence on a software > floppy controller implementation behavior, as it doesn't care about > precompensation and so on. Some even smarter software out there might > check the floppy controller registers and get confused. > > In any case there's significant functionality overlap with function > floppy_media_sense, and as the BIOS code size has hard limits any code > redundancy should be eliminated. > > Also I wonder if 0x40:0x92 and 0x40:0x93 should be updated by the BIOS, > too. They aren't as well documented as the others. > > Klaus >
Hi Klaus, My understanding is that 17h/18h are most often used when a format is required of a diskette at something other than the maximum capacity of the drive. For example a format of a 720k disk in a 1.44MB drive (eg: dos command FORMAT a: /F:720). In this scenario, one of these entry points would be called prior to the first int13 5h format call. My reading indicates that the 17h/18h calls only 'setup' the media status for the specified parameters (although 18h also points to a DPT entry). I suspect normally the DPT would contain an entry for each possible combination of media/drive, so there would be an entry for a 1.44MB dive, and also one for 720k media in a 1.44 drive. VirtualBox ‘sort of’ does this (there seems to be an entry for a 360k disk in a 1.2mb drive – but not for a 720k disk in a 1.44mb drive). This really means that the 18h call could possibly be somewhat smaller if it could just iterate over the DPT looking for the matching entry to return. While I considered this, I thought that - particularly as a first time contributor - changes of this magnitude (splitting out the DPT structures into a header file, adding new entries to the DPT ..etc) would not help my cause (larger changes to the BIOS code I suspect would be resisted). So, I tried to introduce these new functions using code with the same ‘look & feel’ (I hope) as the existing code. As for these entry points needing to tell the floppy controller 'what has changed', I'm not sure this is required, as I suspect this this is one of the first tasks done by the format (5h) call – I suspect via a call to 'floppy_prepare_controller'. However I suspect your knowledge of this area exceeds mine. Regards, dave > > Regards, > > Michal > > > > ----- Original Message ----- > > From: [email protected] > > To: [email protected] > > Sent: Sunday, February 15, 2015 10:07:41 AM GMT +01:00 Amsterdam / > > Berlin / Bern / Rome / Stockholm / Vienna > > Subject: [vbox-dev] Patch to PC BIOS file: > > \src\VBox\Devices\PC\BIOS\floppy.c > > > > Hi, > > I'd like to contribute a patch to the file: > > '\src\VBox\Devices\PC\BIOS\floppy.c'. This patch is submitted under the > > MIT License. > > The patch provides an implementation for 2 BIOS entry points that are - > > in the current source tree - stubbed out as 'not available'. The 2 entry > > points are: > > Int 13/AH=17h - FLOPPY DISK - SET DISK TYPE FOR FORMAT (AT,PS) > > Int 13/AH=18h - FLOPPY DISK - SET MEDIA TYPE FOR FORMAT (AT model > > 3x9,XT2,XT286,PS) > > As mentioned, these are not currently implemented - so I see little risk > > to existing software. The patch was developed on a Win32 XP platform, > > the usual dev tools and Open Watcom 1.9 > > The motivation for this patch is a requirement to get an old (early > > 90's) database system to load in VirtualBox. It uses these entry points > > not to perform format operations, but to setup the floppy for subsequent > > IO operations. Why it does this I cannot say... > > The patch is in the attached text file, and was created against the > > current file image from the source repository. > > Regards, > > Dave > > > > ------------------------------ > >
_______________________________________________ vbox-dev mailing list [email protected] https://www.virtualbox.org/mailman/listinfo/vbox-dev
