2016-08-01 07:09:15 -04:00
|
|
|
//
|
|
|
|
// D64.hpp
|
|
|
|
// Clock Signal
|
|
|
|
//
|
|
|
|
// Created by Thomas Harte on 01/08/2016.
|
2018-05-13 15:19:52 -04:00
|
|
|
// Copyright 2016 Thomas Harte. All rights reserved.
|
2016-08-01 07:09:15 -04:00
|
|
|
//
|
|
|
|
|
|
|
|
#ifndef D64_hpp
|
|
|
|
#define D64_hpp
|
|
|
|
|
2017-09-22 20:28:11 -04:00
|
|
|
#include "../DiskImage.hpp"
|
2017-09-22 22:39:23 -04:00
|
|
|
#include "../../../FileHolder.hpp"
|
2016-08-01 07:09:15 -04:00
|
|
|
|
|
|
|
namespace Storage {
|
2016-08-27 17:15:09 -04:00
|
|
|
namespace Disk {
|
2016-08-01 07:09:15 -04:00
|
|
|
|
|
|
|
/*!
|
2018-05-13 15:34:31 -04:00
|
|
|
Provides a @c Disk containing a D64 disk image: a decoded sector dump of a C1540-format disk.
|
2016-08-01 07:09:15 -04:00
|
|
|
*/
|
2017-11-02 22:32:00 -04:00
|
|
|
class D64: public DiskImage {
|
2016-08-01 07:09:15 -04:00
|
|
|
public:
|
|
|
|
/*!
|
|
|
|
Construct a @c D64 containing content from the file with name @c file_name.
|
|
|
|
|
2018-04-27 23:18:45 -04:00
|
|
|
@throws Storage::FileHolder::Error::CantOpen if this file can't be opened.
|
|
|
|
@throws Error::InvalidFormat if the file doesn't appear to contain a .D64 format image.
|
2016-08-01 07:09:15 -04:00
|
|
|
*/
|
2018-04-06 17:42:24 -04:00
|
|
|
D64(const std::string &file_name);
|
2016-08-01 07:09:15 -04:00
|
|
|
|
|
|
|
// implemented to satisfy @c Disk
|
2020-01-23 22:57:51 -05:00
|
|
|
HeadPosition get_maximum_head_position() final;
|
2017-10-03 19:36:06 -04:00
|
|
|
using DiskImage::get_is_read_only;
|
2020-01-23 22:57:51 -05:00
|
|
|
std::shared_ptr<Track> get_track_at_position(Track::Address address) final;
|
2016-08-01 07:09:15 -04:00
|
|
|
|
|
|
|
private:
|
2017-11-02 22:32:00 -04:00
|
|
|
Storage::FileHolder file_;
|
2017-10-06 21:45:12 -04:00
|
|
|
int number_of_tracks_;
|
2016-11-21 20:14:09 +08:00
|
|
|
uint16_t disk_id_;
|
2016-08-01 07:09:15 -04:00
|
|
|
};
|
|
|
|
|
2016-08-27 17:15:09 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-08-01 07:09:15 -04:00
|
|
|
#endif /* D64_hpp */
|