Adding support for formatting CoCo RS-DOS file systems (#9405)

This commit is contained in:
npwoods 2022-04-07 08:39:59 -04:00 committed by GitHub
parent ed94ca1181
commit b7e654b28d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 1 deletions

View File

@ -41,7 +41,7 @@ void coco_rsdos_image::enumerate_f(floppy_enumerator &fe, u32 form_factor, const
bool coco_rsdos_image::can_format() const
{
return false;
return true;
}
bool coco_rsdos_image::can_read() const
@ -105,6 +105,12 @@ void coco_rsdos_image::impl::drop_root_ref()
m_root = nullptr;
}
void coco_rsdos_image::impl::format(const meta_data &meta)
{
// formatting RS-DOS is easy - just fill everything with 0xFF
m_blockdev.fill(0xFF);
}
fsblk_t::block_t coco_rsdos_image::impl::read_sector(int track, int sector) const
{
// the CoCo RS-DOS world thinks in terms of tracks/sectors, but we have a block device

View File

@ -105,6 +105,7 @@ private:
virtual meta_data metadata() override;
virtual dir_t root() override;
virtual void format(const meta_data &meta) override;
private:
dir_t m_root;