summaryrefslogtreecommitdiff
path: root/apps/codecs/libgme/gb_oscs.h
diff options
context:
space:
mode:
Diffstat (limited to 'apps/codecs/libgme/gb_oscs.h')
-rw-r--r--apps/codecs/libgme/gb_oscs.h13
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
38static inline int Osc_frequency( struct Gb_Osc* this ) { return (this->regs [4] & 7) * 0x100 + this->regs [3]; } 38static inline int Osc_frequency( struct Gb_Osc* this ) { return (this->regs [4] & 7) * 0x100 + this->regs [3]; }
39 39
40void Osc_update_amp( struct Gb_Osc* this, blip_time_t, int new_amp );
41int Osc_write_trig( struct Gb_Osc* this, int frame_phase, int max_len, int old_data );
42void Osc_clock_length( struct Gb_Osc* this ); 40void Osc_clock_length( struct Gb_Osc* this );
43void Osc_reset( struct Gb_Osc* this ); 41void 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
64bool Square_write_register( struct Gb_Square* this, int frame_phase, int reg, int old_data, int data );
65void Square_run( struct Gb_Square* this, blip_time_t, blip_time_t ); 62void Square_run( struct Gb_Square* this, blip_time_t, blip_time_t );
66void Square_clock_envelope( struct Gb_Square* this ); 63void 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
87void clock_sweep( struct Gb_Square* this ); 84void clock_sweep( struct Gb_Square* this );
88void Sweep_write_register( struct Gb_Square* this, int frame_phase, int reg, int old_data, int data );
89 85
90static inline void Sweep_reset( struct Gb_Square* this ) 86static 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
103void calc_sweep( struct Gb_Square* this, bool update );
104void 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
120void Noise_run( struct Gb_Noise* this, blip_time_t, blip_time_t ); 113void Noise_run( struct Gb_Noise* this, blip_time_t, blip_time_t );
121void Noise_write_register( struct Gb_Noise* this, int frame_phase, int reg, int old_data, int data );
122 114
123static inline void Noise_reset( struct Gb_Noise* this ) 115static 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
162void Wave_write_register( struct Gb_Wave* this, int frame_phase, int reg, int old_data, int data );
163void Wave_run( struct Gb_Wave* this, blip_time_t, blip_time_t ); 154void Wave_run( struct Gb_Wave* this, blip_time_t, blip_time_t );
164 155
165static inline void Wave_reset( struct Gb_Wave* this ) 156static 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
175static inline int Wave_dac_enabled( struct Gb_Wave* this ) { return this->osc.regs [0] & 0x80; } 166static inline int Wave_dac_enabled( struct Gb_Wave* this ) { return this->osc.regs [0] & 0x80; }
176 167
177void corrupt_wave( struct Gb_Wave* this );
178
179static inline uint8_t* wave_bank( struct Gb_Wave* this ) { return &this->wave_ram [(~this->osc.regs [0] & bank40_mask) >> 2 & this->agb_mask]; } 168static 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