diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2014-05-10 01:20:46 -0400 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2014-06-04 11:06:58 -0400 |
commit | 02f7676421af87f59e0b8e039fb7f13aaecd0b2b (patch) | |
tree | 634a221e7d1fc149d1955f2e5a2906119ed923b2 /src/disk.c | |
parent | 9e735bbd1d45b41319bb27358c3d2e8079c9786a (diff) | |
download | seabios-hppa-02f7676421af87f59e0b8e039fb7f13aaecd0b2b.zip seabios-hppa-02f7676421af87f59e0b8e039fb7f13aaecd0b2b.tar.gz seabios-hppa-02f7676421af87f59e0b8e039fb7f13aaecd0b2b.tar.bz2 |
cdemu: store internal cdemu fields in standard "el-torito" spec format.
Store the fields necessary to export the "el-torito" spec information
directly in an internal copy of the "el-torito" struct. This
simplifies the interface and obviates the need for an internal home
grown struct with the same info.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'src/disk.c')
-rw-r--r-- | src/disk.c | 15 |
1 files changed, 8 insertions, 7 deletions
@@ -41,9 +41,10 @@ getLCHS(struct drive_s *drive_gf) // populate the geometry directly in the driveid because the // geometry is only known after the bios segment is made // read-only). - res.cylinder = GET_LOW(CDEmu.lchs.cylinder); - res.head = GET_LOW(CDEmu.lchs.head); - res.sector = GET_LOW(CDEmu.lchs.sector); + u8 sptcyl = GET_LOW(CDEmu.chs.sptcyl); + res.cylinder = GET_LOW(CDEmu.chs.cyllow) + ((sptcyl << 2) & 0x300) + 1; + res.head = GET_LOW(CDEmu.chs.heads) + 1; + res.sector = sptcyl & 0x3f; return res; } res.cylinder = GET_GLOBALFLAT(drive_gf->lchs.cylinder); @@ -238,8 +239,8 @@ disk_1308(struct bregs *regs, struct drive_s *drive_gf) return; } - if (CONFIG_CDROM_EMU && GET_LOW(CDEmu.active)) { - u8 emudrive = GET_LOW(CDEmu.emulated_extdrive); + if (CONFIG_CDROM_EMU && GET_LOW(CDEmu.media)) { + u8 emudrive = GET_LOW(CDEmu.emulated_drive); if (((emudrive ^ regs->dl) & 0x80) == 0) // Note extra drive due to emulation. count++; @@ -663,8 +664,8 @@ handle_13(struct bregs *regs) cdemu_134b(regs); return; } - if (GET_LOW(CDEmu.active)) { - u8 emudrive = GET_LOW(CDEmu.emulated_extdrive); + if (GET_LOW(CDEmu.media)) { + u8 emudrive = GET_LOW(CDEmu.emulated_drive); if (extdrive == emudrive) { // Access to an emulated drive. struct drive_s *cdemu_gf = GET_GLOBAL(cdemu_drive_gf); |