-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathsubq.h
46 lines (40 loc) · 1.12 KB
/
subq.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#pragma once
#include <stdint.h>
namespace picostation {
class DiscImage;
class SubQ {
public:
struct Data // Mode 1 for DATA-Q
{
union {
struct {
uint8_t ctrladdr; // [0] 4 bits control, 4 bits address
uint8_t tno; // [1] Track number
union {
uint8_t point, x; // [2]
};
uint8_t min; // [3]
uint8_t sec; // [4]
uint8_t frame; // [5]
uint8_t zero; // [6]
union {
uint8_t amin, pmin; // [7]
};
union {
uint8_t asec, psec; // [8]
};
union {
uint8_t aframe, pframe; // [9]
};
uint16_t crc; // [10],[11]
};
uint8_t raw[12];
};
};
SubQ(DiscImage *discImage) : m_discImage(discImage) {}
void start_subq(const int sector);
private:
void printf_subq(const uint8_t *data);
DiscImage *m_discImage;
};
} // namespace picostation