diff options
Diffstat (limited to 'apps/codecs/libgme/gb_oscs.h')
-rw-r--r-- | apps/codecs/libgme/gb_oscs.h | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/apps/codecs/libgme/gb_oscs.h b/apps/codecs/libgme/gb_oscs.h index 0cc9d3f567..7245b4ca50 100644 --- a/apps/codecs/libgme/gb_oscs.h +++ b/apps/codecs/libgme/gb_oscs.h | |||
@@ -37,9 +37,9 @@ struct Gb_Osc { | |||
37 | // 11-bit frequency in NRx3 and NRx4 | 37 | // 11-bit frequency in NRx3 and NRx4 |
38 | static inline int Osc_frequency( struct Gb_Osc* this ) { return (this->regs [4] & 7) * 0x100 + this->regs [3]; } | 38 | static inline int Osc_frequency( struct Gb_Osc* this ) { return (this->regs [4] & 7) * 0x100 + this->regs [3]; } |
39 | 39 | ||
40 | void Osc_update_amp( struct Gb_Osc* this, blip_time_t, int new_amp ) ICODE_ATTR; | 40 | void Osc_update_amp( struct Gb_Osc* this, blip_time_t, int new_amp ); |
41 | int Osc_write_trig( struct Gb_Osc* this, int frame_phase, int max_len, int old_data ) ICODE_ATTR; | 41 | int Osc_write_trig( struct Gb_Osc* this, int frame_phase, int max_len, int old_data ); |
42 | void Osc_clock_length( struct Gb_Osc* this ) ICODE_ATTR; | 42 | void Osc_clock_length( struct Gb_Osc* this ); |
43 | void Osc_reset( struct Gb_Osc* this ); | 43 | void Osc_reset( struct Gb_Osc* this ); |
44 | 44 | ||
45 | // Square | 45 | // Square |
@@ -61,9 +61,9 @@ struct Gb_Square { | |||
61 | bool sweep_neg; | 61 | bool sweep_neg; |
62 | }; | 62 | }; |
63 | 63 | ||
64 | bool Square_write_register( struct Gb_Square* this, int frame_phase, int reg, int old_data, int data ) ICODE_ATTR; | 64 | bool Square_write_register( struct Gb_Square* this, int frame_phase, int reg, int old_data, int data ); |
65 | void Square_run( struct Gb_Square* this, blip_time_t, blip_time_t ) ICODE_ATTR; | 65 | void Square_run( struct Gb_Square* this, blip_time_t, blip_time_t ); |
66 | void Square_clock_envelope( struct Gb_Square* this ) ICODE_ATTR; | 66 | void Square_clock_envelope( struct Gb_Square* this ); |
67 | 67 | ||
68 | static inline void Square_reset( struct Gb_Square* this ) | 68 | static inline void Square_reset( struct Gb_Square* this ) |
69 | { | 69 | { |
@@ -84,8 +84,8 @@ static inline int Square_reload_env_timer( struct Gb_Square* this ) | |||
84 | 84 | ||
85 | // Sweep square | 85 | // Sweep square |
86 | 86 | ||
87 | void clock_sweep( struct Gb_Square* this ) ICODE_ATTR; | 87 | void clock_sweep( struct Gb_Square* this ); |
88 | void Sweep_write_register( struct Gb_Square* this, int frame_phase, int reg, int old_data, int data ) ICODE_ATTR; | 88 | void Sweep_write_register( struct Gb_Square* this, int frame_phase, int reg, int old_data, int data ); |
89 | 89 | ||
90 | static inline void Sweep_reset( struct Gb_Square* this ) | 90 | static inline void Sweep_reset( struct Gb_Square* this ) |
91 | { | 91 | { |
@@ -100,8 +100,8 @@ static inline void Sweep_reset( struct Gb_Square* this ) | |||
100 | this->osc.delay = 0x40000000; // TODO: something less hacky (never clocked until first trigger) | 100 | this->osc.delay = 0x40000000; // TODO: something less hacky (never clocked until first trigger) |
101 | } | 101 | } |
102 | 102 | ||
103 | void calc_sweep( struct Gb_Square* this, bool update ) ICODE_ATTR; | 103 | void calc_sweep( struct Gb_Square* this, bool update ); |
104 | void reload_sweep_timer( struct Gb_Square* this ) ICODE_ATTR; | 104 | void reload_sweep_timer( struct Gb_Square* this ); |
105 | 105 | ||
106 | // Noise | 106 | // Noise |
107 | 107 | ||
@@ -117,8 +117,8 @@ struct Gb_Noise { | |||
117 | int divider; // noise has more complex frequency divider setup | 117 | int divider; // noise has more complex frequency divider setup |
118 | }; | 118 | }; |
119 | 119 | ||
120 | void Noise_run( struct Gb_Noise* this, blip_time_t, blip_time_t ) ICODE_ATTR; | 120 | void Noise_run( struct Gb_Noise* this, blip_time_t, blip_time_t ); |
121 | void Noise_write_register( struct Gb_Noise* this, int frame_phase, int reg, int old_data, int data ) ICODE_ATTR; | 121 | void Noise_write_register( struct Gb_Noise* this, int frame_phase, int reg, int old_data, int data ); |
122 | 122 | ||
123 | static inline void Noise_reset( struct Gb_Noise* this ) | 123 | static inline void Noise_reset( struct Gb_Noise* this ) |
124 | { | 124 | { |
@@ -130,7 +130,7 @@ static inline void Noise_reset( struct Gb_Noise* this ) | |||
130 | this->osc.delay = 4 * clk_mul; // TODO: remove? | 130 | this->osc.delay = 4 * clk_mul; // TODO: remove? |
131 | } | 131 | } |
132 | 132 | ||
133 | void Noise_clock_envelope( struct Gb_Noise* this ) ICODE_ATTR; | 133 | void Noise_clock_envelope( struct Gb_Noise* this ); |
134 | 134 | ||
135 | // Non-zero if DAC is enabled | 135 | // Non-zero if DAC is enabled |
136 | static inline int Noise_dac_enabled( struct Gb_Noise* this) { return this->osc.regs [2] & 0xF8; } | 136 | static inline int Noise_dac_enabled( struct Gb_Noise* this) { return this->osc.regs [2] & 0xF8; } |
@@ -159,8 +159,8 @@ struct Gb_Wave { | |||
159 | uint8_t* wave_ram; // 32 bytes (64 nybbles), stored in APU | 159 | uint8_t* wave_ram; // 32 bytes (64 nybbles), stored in APU |
160 | }; | 160 | }; |
161 | 161 | ||
162 | void Wave_write_register( struct Gb_Wave* this, int frame_phase, int reg, int old_data, int data ) ICODE_ATTR; | 162 | void Wave_write_register( struct Gb_Wave* this, int frame_phase, int reg, int old_data, int data ); |
163 | void Wave_run( struct Gb_Wave* this, blip_time_t, blip_time_t ) ICODE_ATTR; | 163 | void Wave_run( struct Gb_Wave* this, blip_time_t, blip_time_t ); |
164 | 164 | ||
165 | static inline void Wave_reset( struct Gb_Wave* this ) | 165 | static inline void Wave_reset( struct Gb_Wave* this ) |
166 | { | 166 | { |
@@ -179,7 +179,7 @@ void corrupt_wave( struct Gb_Wave* this ); | |||
179 | static inline uint8_t* wave_bank( struct Gb_Wave* this ) { return &this->wave_ram [(~this->osc.regs [0] & bank40_mask) >> 2 & this->agb_mask]; } | 179 | static inline uint8_t* wave_bank( struct Gb_Wave* this ) { return &this->wave_ram [(~this->osc.regs [0] & bank40_mask) >> 2 & this->agb_mask]; } |
180 | 180 | ||
181 | // Wave index that would be accessed, or -1 if no access would occur | 181 | // Wave index that would be accessed, or -1 if no access would occur |
182 | int wave_access( struct Gb_Wave* this, int addr ) ICODE_ATTR; | 182 | int wave_access( struct Gb_Wave* this, int addr ); |
183 | 183 | ||
184 | // Reads/writes wave RAM | 184 | // Reads/writes wave RAM |
185 | static inline int Wave_read( struct Gb_Wave* this, int addr ) | 185 | static inline int Wave_read( struct Gb_Wave* this, int addr ) |