diff options
Diffstat (limited to 'apps/codecs/libgme/gb_oscs.h')
-rw-r--r-- | apps/codecs/libgme/gb_oscs.h | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/apps/codecs/libgme/gb_oscs.h b/apps/codecs/libgme/gb_oscs.h index 7245b4ca50..3c8dfef51f 100644 --- a/apps/codecs/libgme/gb_oscs.h +++ b/apps/codecs/libgme/gb_oscs.h | |||
@@ -36,9 +36,7 @@ struct Gb_Osc { | |||
36 | 36 | ||
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 ); | ||
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 ); | 40 | void Osc_clock_length( struct Gb_Osc* this ); |
43 | void Osc_reset( struct Gb_Osc* this ); | 41 | void Osc_reset( struct Gb_Osc* this ); |
44 | 42 | ||
@@ -61,7 +59,6 @@ struct Gb_Square { | |||
61 | bool sweep_neg; | 59 | bool sweep_neg; |
62 | }; | 60 | }; |
63 | 61 | ||
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 ); | 62 | void Square_run( struct Gb_Square* this, blip_time_t, blip_time_t ); |
66 | void Square_clock_envelope( struct Gb_Square* this ); | 63 | void Square_clock_envelope( struct Gb_Square* this ); |
67 | 64 | ||
@@ -85,7 +82,6 @@ static inline int Square_reload_env_timer( struct Gb_Square* this ) | |||
85 | // Sweep square | 82 | // Sweep square |
86 | 83 | ||
87 | void clock_sweep( struct Gb_Square* this ); | 84 | 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 ); | ||
89 | 85 | ||
90 | static inline void Sweep_reset( struct Gb_Square* this ) | 86 | static inline void Sweep_reset( struct Gb_Square* this ) |
91 | { | 87 | { |
@@ -99,9 +95,6 @@ static inline void Sweep_reset( struct Gb_Square* this ) | |||
99 | Osc_reset( &this->osc ); | 95 | Osc_reset( &this->osc ); |
100 | this->osc.delay = 0x40000000; // TODO: something less hacky (never clocked until first trigger) | 96 | this->osc.delay = 0x40000000; // TODO: something less hacky (never clocked until first trigger) |
101 | } | 97 | } |
102 | |||
103 | void calc_sweep( struct Gb_Square* this, bool update ); | ||
104 | void reload_sweep_timer( struct Gb_Square* this ); | ||
105 | 98 | ||
106 | // Noise | 99 | // Noise |
107 | 100 | ||
@@ -118,7 +111,6 @@ struct Gb_Noise { | |||
118 | }; | 111 | }; |
119 | 112 | ||
120 | void Noise_run( struct Gb_Noise* this, blip_time_t, blip_time_t ); | 113 | 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 ); | ||
122 | 114 | ||
123 | static inline void Noise_reset( struct Gb_Noise* this ) | 115 | static inline void Noise_reset( struct Gb_Noise* this ) |
124 | { | 116 | { |
@@ -159,7 +151,6 @@ struct Gb_Wave { | |||
159 | uint8_t* wave_ram; // 32 bytes (64 nybbles), stored in APU | 151 | uint8_t* wave_ram; // 32 bytes (64 nybbles), stored in APU |
160 | }; | 152 | }; |
161 | 153 | ||
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 ); | 154 | void Wave_run( struct Gb_Wave* this, blip_time_t, blip_time_t ); |
164 | 155 | ||
165 | static inline void Wave_reset( struct Gb_Wave* this ) | 156 | static inline void Wave_reset( struct Gb_Wave* this ) |
@@ -174,8 +165,6 @@ static inline int Wave_period( struct Gb_Wave* this ) { return (2048 - Osc_frequ | |||
174 | // Non-zero if DAC is enabled | 165 | // Non-zero if DAC is enabled |
175 | static inline int Wave_dac_enabled( struct Gb_Wave* this ) { return this->osc.regs [0] & 0x80; } | 166 | static inline int Wave_dac_enabled( struct Gb_Wave* this ) { return this->osc.regs [0] & 0x80; } |
176 | 167 | ||
177 | void corrupt_wave( struct Gb_Wave* this ); | ||
178 | |||
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]; } | 168 | 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 | 169 | ||
181 | // Wave index that would be accessed, or -1 if no access would occur | 170 | // Wave index that would be accessed, or -1 if no access would occur |