2019-10-04 02:10:10 +00:00
|
|
|
//
|
|
|
|
// MSA.hpp
|
|
|
|
// Clock Signal
|
|
|
|
//
|
|
|
|
// Created by Thomas Harte on 03/10/2019.
|
|
|
|
// Copyright © 2019 Thomas Harte. All rights reserved.
|
|
|
|
//
|
|
|
|
|
|
|
|
#ifndef MSA_hpp
|
|
|
|
#define MSA_hpp
|
|
|
|
|
|
|
|
#include "../DiskImage.hpp"
|
|
|
|
#include "../../../FileHolder.hpp"
|
|
|
|
|
2019-10-04 02:41:20 +00:00
|
|
|
#include <vector>
|
|
|
|
|
2019-10-04 02:10:10 +00:00
|
|
|
namespace Storage {
|
|
|
|
namespace Disk {
|
|
|
|
|
|
|
|
/*!
|
|
|
|
Provides a @c DiskImage describing an Atari ST MSA disk image:
|
|
|
|
a track dump with some metadata and potentially patches of RLE compression.
|
|
|
|
*/
|
|
|
|
class MSA final: public DiskImage {
|
|
|
|
public:
|
|
|
|
MSA(const std::string &file_name);
|
|
|
|
|
|
|
|
// Implemented to satisfy @c DiskImage.
|
|
|
|
HeadPosition get_maximum_head_position() override;
|
2019-10-04 02:41:20 +00:00
|
|
|
int get_head_count() override;
|
2019-10-04 02:10:10 +00:00
|
|
|
std::shared_ptr<::Storage::Disk::Track> get_track_at_position(::Storage::Disk::Track::Address address) override;
|
|
|
|
|
|
|
|
private:
|
|
|
|
FileHolder file_;
|
2019-10-04 02:41:20 +00:00
|
|
|
uint16_t sectors_per_track_;
|
|
|
|
uint16_t sides_;
|
|
|
|
uint16_t starting_track_;
|
|
|
|
uint16_t ending_track_;
|
|
|
|
|
|
|
|
std::vector<std::vector<uint8_t>> uncompressed_tracks_;
|
2019-10-04 02:10:10 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif /* MSA_hpp */
|