mirror of
https://github.com/dingusdev/dingusppc.git
synced 2024-11-04 04:06:42 +00:00
atahd: break long lines.
This commit is contained in:
parent
155b8cdad9
commit
71dabf5334
@ -63,14 +63,16 @@ int AtaHardDisk::device_postinit() {
|
||||
|
||||
void AtaHardDisk::insert_image(std::string filename) {
|
||||
if (!this->hdd_img.open(filename)) {
|
||||
ABORT_F("%s: could not open image file \"%s\"", this->name.c_str(), filename.c_str());
|
||||
ABORT_F("%s: could not open image file \"%s\"", this->name.c_str(),
|
||||
filename.c_str());
|
||||
}
|
||||
|
||||
this->img_size = this->hdd_img.size();
|
||||
uint64_t sectors = this->hdd_img.size() / ATA_HD_SEC_SIZE;
|
||||
this->total_sectors = (uint32_t)sectors;
|
||||
if (sectors != this->total_sectors) {
|
||||
ABORT_F("%s: image file \"%s\" is too big", this->name.c_str(), filename.c_str());
|
||||
ABORT_F("%s: image file \"%s\" is too big", this->name.c_str(),
|
||||
filename.c_str());
|
||||
}
|
||||
this->calc_chs_params();
|
||||
}
|
||||
|
@ -30,9 +30,13 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
#include <string>
|
||||
|
||||
#define ATA_HD_SEC_SIZE 512
|
||||
#define ATA_BIOS_LIMIT 16514064 // C:16383 x H:16 x S:63 = C:1032 x H:254 x S:63 = 8063.5078125 MiB = 8.46 GB
|
||||
#define REAL_CHS_LIMIT 267382800 // C:65535 x H:16 x S:255 = 127.498 GiB = 136.900 GB = largest identify
|
||||
#define CHS_LIMIT 267386880 // C:65536 x H:16 x S:255 = 127.500 GiB = 136.902 GB = largest address
|
||||
|
||||
// C:16383 x H:16 x S:63 = C:1032 x H:254 x S:63 = 8063.5078125 MiB = 8.46 GB
|
||||
#define ATA_BIOS_LIMIT 16514064
|
||||
// C:65535 x H:16 x S:255 = 127.498 GiB = 136.900 GB = largest identify
|
||||
#define REAL_CHS_LIMIT 267382800
|
||||
// C:65536 x H:16 x S:255 = 127.500 GiB = 136.902 GB = largest address
|
||||
#define CHS_LIMIT 267386880
|
||||
|
||||
class AtaHardDisk : public AtaBaseDevice
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user