resonance 1.0.1
Loading...
Searching...
No Matches
sectorencoder.h
Go to the documentation of this file.
1#pragma once
2
3#include <cstddef>
4#include <cstdint>
5#include <span>
6
7namespace Tools::BuildImage {
8
11public:
13 static constexpr std::size_t kDataSize = 2048;
15 static constexpr std::size_t kRawSize = 2352;
17 static constexpr std::size_t kDataOffset = 24;
18
26 static void encode(std::uint32_t lba,
27 std::span<const std::uint8_t, kDataSize> data,
28 std::span<std::uint8_t, kRawSize> sector);
29};
30
31} // namespace Tools::BuildImage
Encoder of CD-ROM XA Mode 2 Form 1 sectors with table-driven EDC and ECC.
Definition sectorencoder.h:10
static constexpr std::size_t kDataOffset
Offset of the data bytes within a raw Mode 2 Form 1 sector.
Definition sectorencoder.h:17
static constexpr std::size_t kRawSize
Bytes in one raw sector.
Definition sectorencoder.h:15
static void encode(std::uint32_t lba, std::span< const std::uint8_t, kDataSize > data, std::span< std::uint8_t, kRawSize > sector)
Encode one data sector with the data subheader.
static constexpr std::size_t kDataSize
Data bytes in one sector.
Definition sectorencoder.h:13
Writer of a FreQuency disc image with the built executable and module in place.
Definition byteorder.h:7