mirror of
https://github.com/davidgiven/fluxengine.git
synced 2025-10-31 11:17:01 -07:00
Eliminate the broken tpi system for a simple drive/format type field.
This commit is contained in:
@@ -214,7 +214,7 @@ private:
|
||||
_directoryBlock = rbr.read_be32();
|
||||
rbr.skip(4);
|
||||
_directorySize = rbr.read_be32();
|
||||
rbr.skip(4);
|
||||
rbr.skip(4);
|
||||
unsigned tracks = rbr.read_be32();
|
||||
unsigned heads = rbr.read_be32();
|
||||
unsigned sectors = rbr.read_be32();
|
||||
|
||||
@@ -69,10 +69,10 @@ private:
|
||||
void putBlock(RolandFsFilesystem* fs, uint8_t offset, uint8_t block)
|
||||
{
|
||||
if (blocks.size() <= offset)
|
||||
blocks.resize(offset+1);
|
||||
blocks.resize(offset + 1);
|
||||
blocks[offset] = block;
|
||||
|
||||
length = (offset+1) * fs->_blockSectors * fs->_sectorSize;
|
||||
length = (offset + 1) * fs->_blockSectors * fs->_sectorSize;
|
||||
attributes[Filesystem::LENGTH] = std::to_string(length);
|
||||
}
|
||||
|
||||
@@ -84,7 +84,7 @@ private:
|
||||
if (!blocknumber)
|
||||
break;
|
||||
|
||||
putBlock(fs, offset+i, blocknumber);
|
||||
putBlock(fs, offset + i, blocknumber);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -336,7 +336,7 @@ private:
|
||||
else
|
||||
de = it->second;
|
||||
|
||||
de->putBlocks(this, extent*16, direntBytes);
|
||||
de->putBlocks(this, extent * 16, direntBytes);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ class Encoder;
|
||||
class SectorInterface
|
||||
{
|
||||
public:
|
||||
virtual ~SectorInterface() {}
|
||||
virtual ~SectorInterface() {}
|
||||
|
||||
public:
|
||||
virtual std::shared_ptr<const Sector> get(
|
||||
|
||||
@@ -281,9 +281,10 @@ Bytes Filesystem::getSector(unsigned track, unsigned side, unsigned sector)
|
||||
Bytes Filesystem::getLogicalSector(uint32_t number, uint32_t count)
|
||||
{
|
||||
if ((number + count) > _locations.size())
|
||||
throw BadFilesystemException(
|
||||
fmt::format("invalid filesystem: sector {} is out of bounds ({} maximum)",
|
||||
number + count - 1, _locations.size()));
|
||||
throw BadFilesystemException(fmt::format(
|
||||
"invalid filesystem: sector {} is out of bounds ({} maximum)",
|
||||
number + count - 1,
|
||||
_locations.size()));
|
||||
|
||||
Bytes data;
|
||||
ByteWriter bw(data);
|
||||
|
||||
Reference in New Issue
Block a user