mirror of
https://github.com/TomHarte/CLK.git
synced 2025-01-11 08:30:55 +00:00
Turns MFM bit length into a globally-available constant.
This commit is contained in:
parent
c3e1489a8e
commit
51c0c45e04
@ -9,6 +9,7 @@
|
|||||||
#include "AcornADF.hpp"
|
#include "AcornADF.hpp"
|
||||||
|
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
|
#include "../../Encodings/MFM/Constants.hpp"
|
||||||
#include "../../Encodings/MFM/Encoder.hpp"
|
#include "../../Encodings/MFM/Encoder.hpp"
|
||||||
#include "../../Track/TrackSerialiser.hpp"
|
#include "../../Track/TrackSerialiser.hpp"
|
||||||
#include "../../Encodings/MFM/SegmentParser.hpp"
|
#include "../../Encodings/MFM/SegmentParser.hpp"
|
||||||
@ -90,7 +91,7 @@ std::shared_ptr<Track> AcornADF::get_track_at_position(unsigned int head, unsign
|
|||||||
void AcornADF::set_track_at_position(unsigned int head, unsigned int position, const std::shared_ptr<Track> &track) {
|
void AcornADF::set_track_at_position(unsigned int head, unsigned int position, const std::shared_ptr<Track> &track) {
|
||||||
std::map<size_t, Storage::Encodings::MFM::Sector> sectors =
|
std::map<size_t, Storage::Encodings::MFM::Sector> sectors =
|
||||||
Storage::Encodings::MFM::sectors_from_segment(
|
Storage::Encodings::MFM::sectors_from_segment(
|
||||||
Storage::Disk::track_serialisation(*track, Time(1, 100000)),
|
Storage::Disk::track_serialisation(*track, Storage::Encodings::MFM::MFMBitLength),
|
||||||
true);
|
true);
|
||||||
|
|
||||||
std::vector<uint8_t> parsed_track(sectors_per_track*bytes_per_sector, 0);
|
std::vector<uint8_t> parsed_track(sectors_per_track*bytes_per_sector, 0);
|
||||||
|
@ -9,6 +9,8 @@
|
|||||||
#ifndef Constants_h
|
#ifndef Constants_h
|
||||||
#define Constants_h
|
#define Constants_h
|
||||||
|
|
||||||
|
#include "../../../Storage.hpp"
|
||||||
|
|
||||||
namespace Storage {
|
namespace Storage {
|
||||||
namespace Encodings {
|
namespace Encodings {
|
||||||
namespace MFM {
|
namespace MFM {
|
||||||
@ -30,6 +32,9 @@ const uint16_t MFMPostSyncCRCValue = 0xcdb4; // the value the CRC generator sho
|
|||||||
const uint8_t MFMIndexSyncByteValue = 0xc2;
|
const uint8_t MFMIndexSyncByteValue = 0xc2;
|
||||||
const uint8_t MFMSyncByteValue = 0xa1;
|
const uint8_t MFMSyncByteValue = 0xa1;
|
||||||
|
|
||||||
|
const Time MFMBitLength = Time(1, 100000);
|
||||||
|
const Time FMBitLength = Time(1, 50000);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user