mirror of
https://github.com/akuker/RASCSI.git
synced 2025-01-11 09:29:53 +00:00
Data type update for block count
This commit is contained in:
parent
61c43ba1b6
commit
1e0f51488e
@ -442,7 +442,7 @@ void Disk::Read6(SASIDEV *controller)
|
||||
}
|
||||
|
||||
// Check capacity
|
||||
DWORD capacity = GetBlockCount();
|
||||
uint32_t capacity = GetBlockCount();
|
||||
if (record > capacity || record + ctrl->blocks > capacity) {
|
||||
ostringstream s;
|
||||
s << "Media capacity of " << capacity << " blocks exceeded: "
|
||||
@ -575,7 +575,7 @@ void Disk::Write6(SASIDEV *controller)
|
||||
}
|
||||
|
||||
// Check capacity
|
||||
DWORD capacity = GetBlockCount();
|
||||
uint32_t capacity = GetBlockCount();
|
||||
if (record > capacity || record + ctrl->blocks > capacity) {
|
||||
ostringstream s;
|
||||
s << "Media capacity of " << capacity << " blocks exceeded: "
|
||||
@ -2520,7 +2520,7 @@ bool Disk::GetStartAndCount(SASIDEV *controller, uint64_t& start, uint32_t& coun
|
||||
}
|
||||
|
||||
// Check capacity
|
||||
uint64_t capacity = GetBlockCount();
|
||||
uint32_t capacity = GetBlockCount();
|
||||
if (start > capacity || start + count > capacity) {
|
||||
ostringstream s;
|
||||
s << "Media capacity of " << capacity << " blocks exceeded: "
|
||||
@ -2570,7 +2570,7 @@ void Disk::SetConfiguredSectorSize(int configured_sector_size)
|
||||
this->configured_sector_size = configured_sector_size;
|
||||
}
|
||||
|
||||
DWORD Disk::GetBlockCount() const
|
||||
uint32_t Disk::GetBlockCount() const
|
||||
{
|
||||
return disk.blocks;
|
||||
}
|
||||
|
@ -223,7 +223,7 @@ public:
|
||||
void SetSectorSizeConfigurable(bool);
|
||||
int GetConfiguredSectorSize() const;
|
||||
void SetConfiguredSectorSize(int);
|
||||
DWORD GetBlockCount() const;
|
||||
uint32_t GetBlockCount() const;
|
||||
void SetBlockCount(DWORD);
|
||||
bool GetStartAndCount(SASIDEV *, uint64_t&, uint32_t&, bool);
|
||||
|
||||
|
@ -259,7 +259,7 @@ int SCSIMO::AddVendor(int page, BOOL change, BYTE *buf)
|
||||
if (IsReady()) {
|
||||
unsigned spare = 0;
|
||||
unsigned bands = 0;
|
||||
DWORD blocks = GetBlockCount();
|
||||
uint32_t blocks = GetBlockCount();
|
||||
|
||||
if (GetSectorSize() == 9) switch (blocks) {
|
||||
// 128MB
|
||||
|
Loading…
x
Reference in New Issue
Block a user