Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
alexbevi
GitHub Repository: alexbevi/BizHawk
Path: blob/master/libsnes/bsnes/gameboy/apu/square1/square1.hpp
2 views
1
struct Square1 {
2
bool enable;
3
4
uint3 sweep_frequency;
5
bool sweep_direction;
6
uint3 sweep_shift;
7
bool sweep_negate;
8
uint2 duty;
9
unsigned length;
10
uint4 envelope_volume;
11
bool envelope_direction;
12
uint3 envelope_frequency;
13
uint11 frequency;
14
bool counter;
15
16
int16 output;
17
bool duty_output;
18
uint3 phase;
19
unsigned period;
20
uint3 envelope_period;
21
uint3 sweep_period;
22
signed frequency_shadow;
23
bool sweep_enable;
24
uint4 volume;
25
26
bool dac_enable();
27
28
void run();
29
void sweep(bool update);
30
void clock_length();
31
void clock_sweep();
32
void clock_envelope();
33
void write(unsigned r, uint8 data);
34
void power();
35
void serialize(serializer&);
36
};
37
38