[vbox-dev] Patch to PC BIOS file: \src\VBox\Devices\PC\BIOS\floppy.c
klaus.espenlaub at oracle.com
Mon Feb 16 13:42:41 UTC 2015
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.
> ----- Original Message -----
> From: stope19 at gmail.com
> To: vbox-dev at virtualbox.org
> 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:
> 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
> 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.
More information about the vbox-dev