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
7
namespace
Tools::BuildImage
{
8
10
class
SectorEncoder
{
11
public
:
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
Tools::BuildImage::SectorEncoder
Encoder of CD-ROM XA Mode 2 Form 1 sectors with table-driven EDC and ECC.
Definition
sectorencoder.h:10
Tools::BuildImage::SectorEncoder::kDataOffset
static constexpr std::size_t kDataOffset
Offset of the data bytes within a raw Mode 2 Form 1 sector.
Definition
sectorencoder.h:17
Tools::BuildImage::SectorEncoder::kRawSize
static constexpr std::size_t kRawSize
Bytes in one raw sector.
Definition
sectorencoder.h:15
Tools::BuildImage::SectorEncoder::encode
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.
Tools::BuildImage::SectorEncoder::kDataSize
static constexpr std::size_t kDataSize
Data bytes in one sector.
Definition
sectorencoder.h:13
Tools::BuildImage
Writer of a FreQuency disc image with the built executable and module in place.
Definition
byteorder.h:7
tools
build-image
sectorencoder.h
Generated by
1.15.0