2018-04-22 04:21:57 +00:00
|
|
|
//
|
|
|
|
// NIB.hpp
|
|
|
|
// Clock Signal
|
|
|
|
//
|
|
|
|
// Created by Thomas Harte on 21/04/2018.
|
2018-05-13 19:19:52 +00:00
|
|
|
// Copyright 2018 Thomas Harte. All rights reserved.
|
2018-04-22 04:21:57 +00:00
|
|
|
//
|
|
|
|
|
|
|
|
#ifndef NIB_hpp
|
|
|
|
#define NIB_hpp
|
|
|
|
|
|
|
|
#include "../DiskImage.hpp"
|
|
|
|
#include "../../../FileHolder.hpp"
|
|
|
|
|
|
|
|
namespace Storage {
|
|
|
|
namespace Disk {
|
|
|
|
|
|
|
|
/*!
|
|
|
|
Provides a @c DiskImage describing an Apple NIB disk image:
|
|
|
|
mostly a bit stream capture, but syncs are implicitly packed
|
|
|
|
into 8 bits instead of 9.
|
|
|
|
*/
|
|
|
|
class NIB: public DiskImage {
|
|
|
|
public:
|
|
|
|
NIB(const std::string &file_name);
|
|
|
|
|
2018-05-07 03:17:36 +00:00
|
|
|
HeadPosition get_maximum_head_position() override;
|
2018-04-22 04:21:57 +00:00
|
|
|
|
|
|
|
std::shared_ptr<::Storage::Disk::Track> get_track_at_position(::Storage::Disk::Track::Address address) override;
|
|
|
|
|
|
|
|
private:
|
|
|
|
FileHolder file_;
|
|
|
|
long get_file_offset_for_position(Track::Address address);
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif /* NIB_hpp */
|