1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-07-16 22:28:57 +00:00
CLK/Storage/Disk/DiskImage/Formats/AppleDSK.hpp
Thomas Harte 7b7beb13a3 Eliminates the fiction of setting and getting registers.
The Disk II seems lower level than that; it will read the data bus whenever it likes, it is the programmer's responsibility to keep up with that. It also reserves the right not to load the bus regardless of whether it receives a read or write access.
2018-05-17 21:39:11 -04:00

52 lines
1.1 KiB
C++

//
// AppleDSK.hpp
// Clock Signal
//
// Created by Thomas Harte on 27/04/2018.
// Copyright 2018 Thomas Harte. All rights reserved.
//
#ifndef AppleDSK_hpp
#define AppleDSK_hpp
#include "../DiskImage.hpp"
#include "../../../FileHolder.hpp"
#include <string>
namespace Storage {
namespace Disk {
/*!
Provides a @c DiskImage containing an Apple DSK disk image: a representation of sector contents,
implicitly numbered and located.
*/
class AppleDSK: public DiskImage {
public:
/*!
Construct an @c AppleDSK containing content from the file with name @c file_name.
@throws Storage::FileHolder::Error::CantOpen if this file can't be opened.
@throws Error::InvalidFormat if the file doesn't appear to contain a .G64 format image.
*/
AppleDSK(const std::string &file_name);
// implemented to satisfy @c Disk
HeadPosition get_maximum_head_position() override;
std::shared_ptr<Track> get_track_at_position(Track::Address address) override;
// TEST!
bool get_is_read_only() override { return false; }
private:
Storage::FileHolder file_;
int sectors_per_track_ = 16;
bool is_prodos_ = false;
};
}
}
#endif /* AppleDSK_hpp */