Changeset 1737 in vbox
- Timestamp:
- Mar 27, 2007 4:15:38 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/PC/BIOS/rombios.c
r1694 r1737 5294 5294 count = read_byte(ebda_seg, &EbdaData->ata.hdcount); 5295 5295 5296 #ifndef VBOX 5296 5297 nlc = nlc - 2; /* 0 based , last sector not used */ 5298 #else /* VBOX */ 5299 /* Maximum cylinder number is just one less than the number of cylinders. */ 5300 nlc = nlc - 1; /* 0 based , last sector not used */ 5301 #endif /* VBOX */ 5297 5302 SET_AL(0); 5298 5303 SET_CH(nlc & 0xff); … … 5328 5333 5329 5334 // Compute sector count seen by int13 5335 #ifndef VBOX 5330 5336 lba = (Bit32u)(npc - 1) * (Bit32u)nph * (Bit32u)npspt; 5337 #else /* VBOX */ 5338 /* Is it so hard to multiply a couple of counts (without introducing 5339 * arbitrary off by one errors)? */ 5340 lba = (Bit32u)npc * (Bit32u)nph * (Bit32u)npspt; 5341 #endif /* VBOX */ 5331 5342 CX = lba >> 16; 5332 5343 DX = lba & 0xffff;
Note:
See TracChangeset
for help on using the changeset viewer.