2018-01-07 21:35:57 +00:00
|
|
|
//
|
2021-06-22 10:54:17 +00:00
|
|
|
// FAT12.hpp
|
2018-01-07 21:35:57 +00:00
|
|
|
// Clock Signal
|
|
|
|
//
|
|
|
|
// Created by Thomas Harte on 07/01/2018.
|
2018-05-13 19:19:52 +00:00
|
|
|
// Copyright 2018 Thomas Harte. All rights reserved.
|
2018-01-07 21:35:57 +00:00
|
|
|
//
|
|
|
|
|
2023-12-01 22:23:13 +00:00
|
|
|
#ifndef FAT12_hpp
|
|
|
|
#define FAT12_hpp
|
2018-01-07 21:35:57 +00:00
|
|
|
|
|
|
|
#include "MFMSectorDump.hpp"
|
|
|
|
|
2018-04-06 21:42:24 +00:00
|
|
|
#include <string>
|
|
|
|
|
2023-05-10 21:02:18 +00:00
|
|
|
namespace Storage::Disk {
|
2018-01-07 21:35:57 +00:00
|
|
|
|
|
|
|
/*!
|
2021-06-22 10:54:17 +00:00
|
|
|
Provides a @c DiskImage holding an MSDOS-style FAT12 disk image:
|
2018-01-07 21:35:57 +00:00
|
|
|
a sector dump of appropriate proportions.
|
|
|
|
*/
|
2021-06-22 10:54:17 +00:00
|
|
|
class FAT12: public MFMSectorDump {
|
2018-01-07 21:35:57 +00:00
|
|
|
public:
|
2021-06-22 10:54:17 +00:00
|
|
|
FAT12(const std::string &file_name);
|
2020-01-24 03:57:51 +00:00
|
|
|
HeadPosition get_maximum_head_position() final;
|
|
|
|
int get_head_count() final;
|
2018-01-07 21:35:57 +00:00
|
|
|
|
|
|
|
private:
|
2020-01-24 03:57:51 +00:00
|
|
|
long get_file_offset_for_position(Track::Address address) final;
|
2018-01-07 21:35:57 +00:00
|
|
|
|
|
|
|
int head_count_;
|
|
|
|
int track_count_;
|
2021-06-22 10:54:17 +00:00
|
|
|
int sector_count_;
|
|
|
|
int sector_size_;
|
2018-01-07 21:35:57 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2023-12-01 22:23:13 +00:00
|
|
|
#endif /* FAT12_hpp */
|