1
0
Fork 0
forked from len0rd/rockbox

Remove all IRAM attributes from libGME to be able to restart the IRAM optimization on a clean code base. As first step move the sample buffers to IRAM which results in a 1-5% speedup for all codecs.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30284 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Andree Buschmann 2011-08-13 16:41:14 +00:00
parent 724a2d2514
commit a1145a1d04
60 changed files with 213 additions and 227 deletions

View file

@ -10,7 +10,7 @@ CODEC_HEADER
#define CHUNK_SIZE (1024*2)
static int16_t samples[CHUNK_SIZE] IBSS_ATTR;
static struct Ay_Emu ay_emu IDATA_ATTR CACHEALIGN_ATTR;
static struct Ay_Emu ay_emu;
/****************** rockbox interface ******************/

View file

@ -10,7 +10,7 @@ CODEC_HEADER
#define CHUNK_SIZE (1024*2)
static int16_t samples[CHUNK_SIZE] IBSS_ATTR;
static struct Gbs_Emu gbs_emu IDATA_ATTR CACHEALIGN_ATTR;
static struct Gbs_Emu gbs_emu;
/****************** rockbox interface ******************/

View file

@ -10,7 +10,7 @@ CODEC_HEADER
#define CHUNK_SIZE (1024*2)
static int16_t samples[CHUNK_SIZE] IBSS_ATTR;
static struct Hes_Emu hes_emu IDATA_ATTR CACHEALIGN_ATTR;
static struct Hes_Emu hes_emu;
/****************** rockbox interface ******************/

View file

@ -10,7 +10,7 @@ CODEC_HEADER
#define CHUNK_SIZE (1024*2)
static int16_t samples[CHUNK_SIZE] IBSS_ATTR;
static struct Kss_Emu kss_emu IDATA_ATTR CACHEALIGN_ATTR;
static struct Kss_Emu kss_emu;
/****************** rockbox interface ******************/

View file

@ -46,8 +46,8 @@ void Ay_apu_init( struct Ay_Apu* this );
static inline void Ay_apu_write_addr( struct Ay_Apu* this, int data ) { this->addr_ = data & 0x0F; }
// Emulates to time t, then writes to current data register
void run_until( struct Ay_Apu* this, blip_time_t final_end_time ) ICODE_ATTR;;
void write_data_( struct Ay_Apu* this, int addr, int data ) ICODE_ATTR;
void run_until( struct Ay_Apu* this, blip_time_t final_end_time );;
void write_data_( struct Ay_Apu* this, int addr, int data );
static inline void Ay_apu_write_data( struct Ay_Apu* this, blip_time_t t, int data ) { run_until( this, t ); write_data_( this, this->addr_, data ); }
// Reads from current data register

View file

@ -359,7 +359,7 @@ void Sound_set_tempo( struct Ay_Emu *this, int t )
this->play_period = (blip_time_t) ((p * FP_ONE_TEMPO) / t);
}
void fill_buf( struct Ay_Emu *this ) ICODE_ATTR;;
void fill_buf( struct Ay_Emu *this );;
blargg_err_t Ay_start_track( struct Ay_Emu *this, int track )
{
clear_track_vars( this );
@ -543,7 +543,7 @@ blargg_err_t Track_seek( struct Ay_Emu *this, long msec )
return Track_skip( this, time - this->out_time );
}
blargg_err_t play_( struct Ay_Emu *this, long count, sample_t* out ) ICODE_ATTR;
blargg_err_t play_( struct Ay_Emu *this, long count, sample_t* out );
static blargg_err_t skip_( struct Ay_Emu *this, long count )
{
// for long skip, mute sound

View file

@ -25,20 +25,6 @@
#define FP_ONE_GAIN (1LL << 24)
#define FP_ONE_VOLUME FP_ONE_GAIN
#if 1 /* IRAM configuration is not yet active for all libGME codecs. */
#undef ICODE_ATTR
#define ICODE_ATTR
#undef IDATA_ATTR
#define IDATA_ATTR
#undef ICONST_ATTR
#define ICONST_ATTR
#undef IBSS_ATTR
#define IBSS_ATTR
#endif
// BLARGG_RESTRICT: equivalent to C99's restrict, where supported
#if __GNUC__ >= 3 || _MSC_VER >= 1100
#define BLARGG_RESTRICT __restrict

View file

@ -65,12 +65,12 @@ struct Blip_Buffer {
};
// not documented yet
void Blip_set_modified( struct Blip_Buffer* this ) ICODE_ATTR;
int Blip_clear_modified( struct Blip_Buffer* this ) ICODE_ATTR;
void Blip_remove_silence( struct Blip_Buffer* this, long count ) ICODE_ATTR;
blip_resampled_time_t Blip_resampled_duration( struct Blip_Buffer* this, int t ) ICODE_ATTR;
blip_resampled_time_t Blip_resampled_time( struct Blip_Buffer* this, blip_time_t t ) ICODE_ATTR;
blip_resampled_time_t Blip_clock_rate_factor( struct Blip_Buffer* this, long clock_rate ) ICODE_ATTR;
void Blip_set_modified( struct Blip_Buffer* this );
int Blip_clear_modified( struct Blip_Buffer* this );
void Blip_remove_silence( struct Blip_Buffer* this, long count );
blip_resampled_time_t Blip_resampled_duration( struct Blip_Buffer* this, int t );
blip_resampled_time_t Blip_resampled_time( struct Blip_Buffer* this, blip_time_t t );
blip_resampled_time_t Blip_clock_rate_factor( struct Blip_Buffer* this, long clock_rate );
// Initializes Blip_Buffer structure
void Blip_init( struct Blip_Buffer* this );
@ -92,13 +92,13 @@ static inline void Blip_set_clock_rate( struct Blip_Buffer* this, long cps )
// End current time frame of specified duration and make its samples available
// (along with any still-unread samples) for reading with read_samples(). Begins
// a new time frame at the end of the current frame.
void Blip_end_frame( struct Blip_Buffer* this, blip_time_t time ) ICODE_ATTR;
void Blip_end_frame( struct Blip_Buffer* this, blip_time_t time );
// Read at most 'max_samples' out of buffer into 'dest', removing them from from
// the buffer. Returns number of samples actually read and removed. If stereo is
// true, increments 'dest' one extra time after writing each sample, to allow
// easy interleving of two channels into a stereo output buffer.
long Blip_read_samples( struct Blip_Buffer* this, blip_sample_t* dest, long max_samples, int stereo ) ICODE_ATTR;
long Blip_read_samples( struct Blip_Buffer* this, blip_sample_t* dest, long max_samples, int stereo );
// Additional optional features
@ -141,20 +141,20 @@ static inline long Blip_samples_avail( struct Blip_Buffer* this )
}
// Remove 'count' samples from those waiting to be read
void Blip_remove_samples( struct Blip_Buffer* this, long count ) ICODE_ATTR;
void Blip_remove_samples( struct Blip_Buffer* this, long count );
// Experimental features
// Count number of clocks needed until 'count' samples will be available.
// If buffer can't even hold 'count' samples, returns number of clocks until
// buffer becomes full.
blip_time_t Blip_count_clocks( struct Blip_Buffer* this, long count ) ICODE_ATTR;
blip_time_t Blip_count_clocks( struct Blip_Buffer* this, long count );
// Number of raw samples that can be mixed within frame of specified duration.
long Blip_count_samples( struct Blip_Buffer* this, blip_time_t duration ) ICODE_ATTR;
long Blip_count_samples( struct Blip_Buffer* this, blip_time_t duration );
// Mix 'count' samples from 'buf' into buffer.
void Blip_mix_samples( struct Blip_Buffer* this, blip_sample_t const* buf, long count ) ICODE_ATTR;
void Blip_mix_samples( struct Blip_Buffer* this, blip_sample_t const* buf, long count );
// Range specifies the greatest expected change in amplitude. Calculate it
// by finding the difference between the maximum and minimum expected
@ -170,10 +170,10 @@ struct Blip_Synth {
void Synth_init( struct Blip_Synth* this );
// Set overall volume of waveform
void Synth_volume( struct Blip_Synth* this, int v ) ICODE_ATTR;
void Synth_volume( struct Blip_Synth* this, int v );
// Get/set Blip_Buffer used for output
const struct Blip_Buffer* Synth_output( struct Blip_Synth* this ) ICODE_ATTR;
const struct Blip_Buffer* Synth_output( struct Blip_Synth* this );
// Low-level interface

View file

@ -132,14 +132,14 @@ EMU2413_API void OPLL_set_internal_mute(OPLL *, e_uint32 mute);
EMU2413_API e_uint32 OPLL_is_internal_muted(OPLL *);
/* Port/Register access */
EMU2413_API void OPLL_writeIO(OPLL *, e_uint32 reg, e_uint32 val); ICODE_ATTR
EMU2413_API void OPLL_writeReg(OPLL *, e_uint32 reg, e_uint32 val); ICODE_ATTR
EMU2413_API void OPLL_writeIO(OPLL *, e_uint32 reg, e_uint32 val);
EMU2413_API void OPLL_writeReg(OPLL *, e_uint32 reg, e_uint32 val);
EMU2413_API e_uint32 OPLL_read(OPLL *, e_uint32 port);
/* Synthsize */
EMU2413_API e_int16 OPLL_calc(OPLL *) ; ICODE_ATTR
EMU2413_API void OPLL_calc_stereo(OPLL *, e_int32 out[2]) ; ICODE_ATTR
EMU2413_API e_int16 *OPLL_update_buffer(OPLL *, e_uint32 length) ; ICODE_ATTR
EMU2413_API e_int16 OPLL_calc(OPLL *) ;
EMU2413_API void OPLL_calc_stereo(OPLL *, e_int32 out[2]) ;
EMU2413_API e_int16 *OPLL_update_buffer(OPLL *, e_uint32 length) ;
/* Misc */
EMU2413_API void OPLL_setPatch(OPLL *, const e_uint8 *dump) ;

View file

@ -6,7 +6,7 @@
#include "emutypes.h"
static const e_uint16 sin_coeff[] ICONST_ATTR = {
static const e_uint16 sin_coeff[] = {
255, 203, 171, 152, 139, 129, 120,
113, 107, 102, 97, 92, 88, 85,
81, 78, 75, 72, 70, 67, 65,
@ -28,7 +28,7 @@ static const e_uint16 sin_coeff[] ICONST_ATTR = {
0, 0,
};
static const e_int32 pm_coeff[] ICONST_ATTR = {
static const e_int32 pm_coeff[] = {
256, 256, 256, 256, 256, 256, 256,
256, 256, 256, 256, 256, 256, 256,
256, 256, 256, 256, 256, 256, 256,
@ -68,7 +68,7 @@ static const e_int32 pm_coeff[] ICONST_ATTR = {
255, 255, 255, 255,
};
static const e_int16 db2lin_coeff[] ICONST_ATTR = {
static const e_int16 db2lin_coeff[] = {
255, 249, 244, 239, 233, 228, 224,
219, 214, 209, 205, 201, 196, 192,
188, 184, 180, 176, 172, 169, 165,
@ -145,7 +145,7 @@ static const e_int16 db2lin_coeff[] ICONST_ATTR = {
0,
};
static const e_uint16 ar_adjust_coeff[] ICONST_ATTR = {
static const e_uint16 ar_adjust_coeff[] = {
127, 108, 98, 90, 84, 80, 75,
72, 69, 66, 64, 61, 59, 57,
56, 54, 52, 51, 49, 48, 47,

View file

@ -136,7 +136,7 @@ void Apu_reset( struct Gb_Apu* this, enum gb_mode_t mode, bool agb_wave )
reset_lengths( this );
// Load initial wave RAM
static byte const initial_wave [2] [16] ICONST_ATTR = {
static byte const initial_wave [2] [16] = {
{0x84,0x40,0x43,0xAA,0x2D,0x78,0x92,0x3C,0x60,0x59,0x59,0xB0,0x34,0xB8,0x2E,0xDA},
{0x00,0xFF,0x00,0xFF,0x00,0xFF,0x00,0xFF,0x00,0xFF,0x00,0xFF,0x00,0xFF,0x00,0xFF},
};
@ -383,7 +383,7 @@ int Apu_read_register( struct Gb_Apu* this, blip_time_t time, int addr )
return Wave_read( &this->wave, addr );
// Value read back has some bits always set
static byte const masks [] ICONST_ATTR = {
static byte const masks [] = {
0x80,0x3F,0x00,0xFF,0xBF,
0xFF,0x3F,0x00,0xFF,0xBF,
0x7F,0xFF,0x9F,0xFF,0xBF,

View file

@ -49,16 +49,16 @@ struct Gb_Apu {
void Apu_init( struct Gb_Apu* this );
// Emulates to time t, then writes data to addr
void Apu_write_register( struct Gb_Apu* this, blip_time_t t, int addr, int data ) ICODE_ATTR;
void Apu_write_register( struct Gb_Apu* this, blip_time_t t, int addr, int data );
// Emulates to time t, then subtracts t from the current time.
// OK if previous write call had time slightly after t.
void Apu_end_frame( struct Gb_Apu* this,blip_time_t t ) ICODE_ATTR;
void Apu_end_frame( struct Gb_Apu* this,blip_time_t t );
// More features
// Emulates to time t, then reads from addr
int Apu_read_register( struct Gb_Apu* this, blip_time_t t, int addr ) ICODE_ATTR;
int Apu_read_register( struct Gb_Apu* this, blip_time_t t, int addr );
// Resets hardware to state after power, BEFORE boot ROM runs. Mode selects
// sound hardware. If agb_wave is true, enables AGB's extra wave features.
@ -80,6 +80,6 @@ void Apu_reduce_clicks( struct Gb_Apu* this, bool reduce );
void Apu_set_tempo( struct Gb_Apu* this, int t );
void write_osc( struct Gb_Apu* this, int reg, int old_data, int data ) ICODE_ATTR;
void write_osc( struct Gb_Apu* this, int reg, int old_data, int data );
#endif

View file

@ -54,7 +54,7 @@ void Cpu_reset( struct Gb_Cpu* this, void* unmapped );
// Maps code memory (memory accessed via the program counter). Start and size
// must be multiple of page_size.
void Cpu_map_code( struct Gb_Cpu* this, addr_t start, int size, void* code ) ICODE_ATTR;
void Cpu_map_code( struct Gb_Cpu* this, addr_t start, int size, void* code );
// Current time.
static inline int Cpu_time( struct Gb_Cpu* this ) { return this->cpu_state->time; }

View file

@ -172,7 +172,7 @@ loop:
#define GET_ADDR() GET_LE16( instr )
static byte const instr_times [256*2] ICONST_ATTR = {
static byte const instr_times [256*2] = {
// 0 1 2 3 4 5 6 7 8 9 A B C D E F
4,12, 8, 8, 4, 4, 8, 4,20, 8, 8, 8, 4, 4, 8, 4,// 0
4,12, 8, 8, 4, 4, 8, 4,12, 8, 8, 8, 4, 4, 8, 4,// 1

View file

@ -395,8 +395,8 @@ void write_osc( struct Gb_Apu* this, int reg, int old_data, int data )
void Square_run( struct Gb_Square* this, blip_time_t time, blip_time_t end_time )
{
// Calc duty and phase
static byte const duty_offsets [4] ICONST_ATTR = { 1, 1, 3, 7 };
static byte const duties [4] ICONST_ATTR = { 1, 2, 4, 6 };
static byte const duty_offsets [4] = { 1, 1, 3, 7 };
static byte const duties [4] = { 1, 2, 4, 6 };
struct Gb_Osc* osc = &this->osc;
int const duty_code = osc->regs [1] >> 6;
@ -595,7 +595,7 @@ void Noise_run( struct Gb_Noise* this, blip_time_t time, blip_time_t end_time )
}
// Run timer and calculate time of next LFSR clock
static byte const period1s [8] ICONST_ATTR = { 1, 2, 4, 6, 8, 10, 12, 14 };
static byte const period1s [8] = { 1, 2, 4, 6, 8, 10, 12, 14 };
int const period1 = period1s [osc->regs [3] & 7] * clk_mul;
#ifdef GB_APU_FAST
@ -680,7 +680,7 @@ void Wave_run( struct Gb_Wave* this, blip_time_t time, blip_time_t end_time )
int const volume_shift = shifts [volume_idx];
int const volume_mul = 1;
#else
static byte const volumes [8] ICONST_ATTR = { 0, 4, 2, 1, 3, 3, 3, 3 };
static byte const volumes [8] = { 0, 4, 2, 1, 3, 3, 3, 3 };
int const volume_shift = 2 + 4;
int const volume_idx = this->osc.regs [2] >> 5 & (this->agb_mask | 3); // 2 bits on DMG/CGB, 3 on AGB
int const volume_mul = volumes [volume_idx];

View file

@ -37,9 +37,9 @@ struct Gb_Osc {
// 11-bit frequency in NRx3 and NRx4
static inline int Osc_frequency( struct Gb_Osc* this ) { return (this->regs [4] & 7) * 0x100 + this->regs [3]; }
void Osc_update_amp( struct Gb_Osc* this, blip_time_t, int new_amp ) ICODE_ATTR;
int Osc_write_trig( struct Gb_Osc* this, int frame_phase, int max_len, int old_data ) ICODE_ATTR;
void Osc_clock_length( struct Gb_Osc* this ) ICODE_ATTR;
void Osc_update_amp( struct Gb_Osc* this, blip_time_t, int new_amp );
int Osc_write_trig( struct Gb_Osc* this, int frame_phase, int max_len, int old_data );
void Osc_clock_length( struct Gb_Osc* this );
void Osc_reset( struct Gb_Osc* this );
// Square
@ -61,9 +61,9 @@ struct Gb_Square {
bool sweep_neg;
};
bool Square_write_register( struct Gb_Square* this, int frame_phase, int reg, int old_data, int data ) ICODE_ATTR;
void Square_run( struct Gb_Square* this, blip_time_t, blip_time_t ) ICODE_ATTR;
void Square_clock_envelope( struct Gb_Square* this ) ICODE_ATTR;
bool Square_write_register( struct Gb_Square* this, int frame_phase, int reg, int old_data, int data );
void Square_run( struct Gb_Square* this, blip_time_t, blip_time_t );
void Square_clock_envelope( struct Gb_Square* this );
static inline void Square_reset( struct Gb_Square* this )
{
@ -84,8 +84,8 @@ static inline int Square_reload_env_timer( struct Gb_Square* this )
// Sweep square
void clock_sweep( struct Gb_Square* this ) ICODE_ATTR;
void Sweep_write_register( struct Gb_Square* this, int frame_phase, int reg, int old_data, int data ) ICODE_ATTR;
void clock_sweep( struct Gb_Square* this );
void Sweep_write_register( struct Gb_Square* this, int frame_phase, int reg, int old_data, int data );
static inline void Sweep_reset( struct Gb_Square* this )
{
@ -100,8 +100,8 @@ static inline void Sweep_reset( struct Gb_Square* this )
this->osc.delay = 0x40000000; // TODO: something less hacky (never clocked until first trigger)
}
void calc_sweep( struct Gb_Square* this, bool update ) ICODE_ATTR;
void reload_sweep_timer( struct Gb_Square* this ) ICODE_ATTR;
void calc_sweep( struct Gb_Square* this, bool update );
void reload_sweep_timer( struct Gb_Square* this );
// Noise
@ -117,8 +117,8 @@ struct Gb_Noise {
int divider; // noise has more complex frequency divider setup
};
void Noise_run( struct Gb_Noise* this, blip_time_t, blip_time_t ) ICODE_ATTR;
void Noise_write_register( struct Gb_Noise* this, int frame_phase, int reg, int old_data, int data ) ICODE_ATTR;
void Noise_run( struct Gb_Noise* this, blip_time_t, blip_time_t );
void Noise_write_register( struct Gb_Noise* this, int frame_phase, int reg, int old_data, int data );
static inline void Noise_reset( struct Gb_Noise* this )
{
@ -130,7 +130,7 @@ static inline void Noise_reset( struct Gb_Noise* this )
this->osc.delay = 4 * clk_mul; // TODO: remove?
}
void Noise_clock_envelope( struct Gb_Noise* this ) ICODE_ATTR;
void Noise_clock_envelope( struct Gb_Noise* this );
// Non-zero if DAC is enabled
static inline int Noise_dac_enabled( struct Gb_Noise* this) { return this->osc.regs [2] & 0xF8; }
@ -159,8 +159,8 @@ struct Gb_Wave {
uint8_t* wave_ram; // 32 bytes (64 nybbles), stored in APU
};
void Wave_write_register( struct Gb_Wave* this, int frame_phase, int reg, int old_data, int data ) ICODE_ATTR;
void Wave_run( struct Gb_Wave* this, blip_time_t, blip_time_t ) ICODE_ATTR;
void Wave_write_register( struct Gb_Wave* this, int frame_phase, int reg, int old_data, int data );
void Wave_run( struct Gb_Wave* this, blip_time_t, blip_time_t );
static inline void Wave_reset( struct Gb_Wave* this )
{
@ -179,7 +179,7 @@ void corrupt_wave( struct Gb_Wave* this );
static inline uint8_t* wave_bank( struct Gb_Wave* this ) { return &this->wave_ram [(~this->osc.regs [0] & bank40_mask) >> 2 & this->agb_mask]; }
// Wave index that would be accessed, or -1 if no access would occur
int wave_access( struct Gb_Wave* this, int addr ) ICODE_ATTR;
int wave_access( struct Gb_Wave* this, int addr );
// Reads/writes wave RAM
static inline int Wave_read( struct Gb_Wave* this, int addr )

View file

@ -17,7 +17,7 @@ License along with this module; if not, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */
const char gme_wrong_file_type [] ICONST_ATTR = "Wrong file type for this emulator";
const char gme_wrong_file_type [] = "Wrong file type for this emulator";
int const idle_addr = 0xF00D;
int const tempo_unit = 16;
@ -334,7 +334,7 @@ blargg_err_t Gbs_start_track( struct Gbs_Emu* this, int track )
Buffer_clear( &this->stereo_buf );
// Reset APU to state expected by most rips
static byte const sound_data [] ICONST_ATTR = {
static byte const sound_data [] = {
0x80, 0xBF, 0x00, 0x00, 0xB8, // square 1 DAC disabled
0x00, 0x3F, 0x00, 0x00, 0xB8, // square 2 DAC disabled
0x7F, 0xFF, 0x9F, 0x00, 0xB8, // wave DAC disabled

View file

@ -126,7 +126,7 @@ blargg_err_t Gbs_start_track( struct Gbs_Emu* this, int );
// Generate 'count' samples info 'buf'. Output is in stereo. Any emulation
// errors set warning string, and major errors also end track.
blargg_err_t Gbs_play( struct Gbs_Emu* this, long count, sample_t* buf ) ICODE_ATTR;
blargg_err_t Gbs_play( struct Gbs_Emu* this, long count, sample_t* buf );
// Track status/control
// Number of milliseconds (1000 msec = 1 second) played since beginning of track
@ -178,16 +178,16 @@ static inline void Sound_set_gain( struct Gbs_Emu* this, int g )
// Emulation (You shouldn't touch these)
blargg_err_t Run_clocks( struct Gbs_Emu* this, blip_time_t duration ) ICODE_ATTR;
void Set_bank( struct Gbs_Emu* this, int ) ICODE_ATTR;
void Update_timer( struct Gbs_Emu* this ) ICODE_ATTR;
blargg_err_t Run_clocks( struct Gbs_Emu* this, blip_time_t duration );
void Set_bank( struct Gbs_Emu* this, int );
void Update_timer( struct Gbs_Emu* this );
// Runs CPU until time becomes >= 0
void Run_cpu( struct Gbs_Emu* this ) ICODE_ATTR;
void Run_cpu( struct Gbs_Emu* this );
// Reads/writes memory and I/O
int Read_mem( struct Gbs_Emu* this, addr_t addr ) ICODE_ATTR;
void Write_mem( struct Gbs_Emu* this, addr_t addr, int data ) ICODE_ATTR;
int Read_mem( struct Gbs_Emu* this, addr_t addr );
void Write_mem( struct Gbs_Emu* this, addr_t addr, int data );
// Current time
static inline blip_time_t Time( struct Gbs_Emu* this )
@ -195,10 +195,10 @@ static inline blip_time_t Time( struct Gbs_Emu* this )
return Cpu_time( &this->cpu ) + this->end_time;
}
void Jsr_then_stop( struct Gbs_Emu* this, byte const [] ) ICODE_ATTR;
void Write_io_inline( struct Gbs_Emu* this, int offset, int data, int base ) ICODE_ATTR;
void Write_io_( struct Gbs_Emu* this, int offset, int data ) ICODE_ATTR;
int Read_io( struct Gbs_Emu* this, int offset ) ICODE_ATTR;
void Write_io( struct Gbs_Emu* this, int offset, int data ) ICODE_ATTR;
void Jsr_then_stop( struct Gbs_Emu* this, byte const [] );
void Write_io_inline( struct Gbs_Emu* this, int offset, int data, int base );
void Write_io_( struct Gbs_Emu* this, int offset, int data );
int Read_io( struct Gbs_Emu* this, int offset );
void Write_io( struct Gbs_Emu* this, int offset, int data );
#endif

View file

@ -18,10 +18,10 @@ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */
enum { center_waves = 1 }; // reduces asymmetry and clamping when starting notes
static void Apu_balance_changed( struct Hes_Apu* this, struct Hes_Osc* osc ) ICODE_ATTR;
static void Apu_balance_changed( struct Hes_Apu* this, struct Hes_Osc* osc );
static void Apu_balance_changed( struct Hes_Apu* this, struct Hes_Osc* osc )
{
static short const log_table [32] ICONST_ATTR = { // ~1.5 db per step
static short const log_table [32] = { // ~1.5 db per step
#define ENTRY( factor ) (short) (factor * amp_range / 31.0 + 0.5)
ENTRY( 0.000000 ),ENTRY( 0.005524 ),ENTRY( 0.006570 ),ENTRY( 0.007813 ),
ENTRY( 0.009291 ),ENTRY( 0.011049 ),ENTRY( 0.013139 ),ENTRY( 0.015625 ),

View file

@ -31,7 +31,7 @@ struct Hes_Osc
unsigned char control;
};
void Osc_run_until( struct Hes_Osc* this, struct Blip_Synth* synth, blip_time_t ) ICODE_ATTR;
void Osc_run_until( struct Hes_Osc* this, struct Blip_Synth* synth, blip_time_t );
struct Hes_Apu {
struct Hes_Osc oscs [osc_count];
@ -47,9 +47,9 @@ void Apu_init( struct Hes_Apu* this );
// Reset HES apu couns chip
void Apu_reset( struct Hes_Apu* this );
void Apu_osc_output( struct Hes_Apu* this, int index, struct Blip_Buffer* center, struct Blip_Buffer* left, struct Blip_Buffer* right ) ICODE_ATTR;
void Apu_write_data( struct Hes_Apu* this, blip_time_t, int addr, int data ) ICODE_ATTR;
void Apu_end_frame( struct Hes_Apu* this, blip_time_t ) ICODE_ATTR;
void Apu_osc_output( struct Hes_Apu* this, int index, struct Blip_Buffer* center, struct Blip_Buffer* left, struct Blip_Buffer* right );
void Apu_write_data( struct Hes_Apu* this, blip_time_t, int addr, int data );
void Apu_end_frame( struct Hes_Apu* this, blip_time_t );
static inline void Apu_volume( struct Hes_Apu* this, int v ) { Synth_volume( &this->synth, (v*9)/5 / osc_count / amp_range ); }
#endif

View file

@ -55,7 +55,7 @@ static short stepsize[49] = {
876, 963,1060,1166,1282,1411,1552
};
static int Adpcm_decode( struct Hes_Apu_Adpcm* this,int code ) ICODE_ATTR;
static int Adpcm_decode( struct Hes_Apu_Adpcm* this,int code );
static int Adpcm_decode( struct Hes_Apu_Adpcm* this,int code )
{
struct State* state = &this->state;
@ -87,7 +87,7 @@ static int Adpcm_decode( struct Hes_Apu_Adpcm* this,int code )
state->ad_sample = 2047;
}
static int const steps [8] ICONST_ATTR = {
static int const steps [8] = {
-1, -1, -1, -1, 2, 4, 6, 8
};
state->ad_ref_index += steps [c];
@ -99,7 +99,7 @@ static int Adpcm_decode( struct Hes_Apu_Adpcm* this,int code )
return state->ad_sample;
}
static void Adpcm_run_until( struct Hes_Apu_Adpcm* this, blip_time_t end_time ) ICODE_ATTR;
static void Adpcm_run_until( struct Hes_Apu_Adpcm* this, blip_time_t end_time );
static void Adpcm_run_until( struct Hes_Apu_Adpcm* this, blip_time_t end_time )
{
struct State* state = &this->state;

View file

@ -75,14 +75,14 @@ static inline void Adpcm_set_output( struct Hes_Apu_Adpcm* this, int chan, struc
}
// Emulates to time t, then writes data to addr
void Adpcm_write_data( struct Hes_Apu_Adpcm* this, blip_time_t t, int addr, int data ) ICODE_ATTR;
void Adpcm_write_data( struct Hes_Apu_Adpcm* this, blip_time_t t, int addr, int data );
// Emulates to time t, then reads from addr
int Adpcm_read_data( struct Hes_Apu_Adpcm* this, blip_time_t t, int addr ) ICODE_ATTR;
int Adpcm_read_data( struct Hes_Apu_Adpcm* this, blip_time_t t, int addr );
// Emulates to time t, then subtracts t from the current time.
// OK if previous write call had time slightly after t.
void Adpcm_end_frame( struct Hes_Apu_Adpcm* this,blip_time_t t ) ICODE_ATTR;
void Adpcm_end_frame( struct Hes_Apu_Adpcm* this,blip_time_t t );
// Sets overall volume, where 1.0 is normal
static inline void Adpcm_volume( struct Hes_Apu_Adpcm* this, int v ) { Synth_volume( &this->synth, (v*3)/5 / adpcm_osc_count / adpcm_amp_range ); }

View file

@ -185,7 +185,7 @@ loop:
#endif
// TODO: each reference lists slightly different timing values, ugh
static uint8_t const clock_table [256] ICONST_ATTR =
static uint8_t const clock_table [256] =
{// 0 1 2 3 4 5 6 7 8 9 A B C D E F
1,7,3, 4,6,4,6,7,3,2,2,2,7,5,7,6,// 0
4,7,7, 4,6,4,6,7,2,5,2,2,7,5,7,6,// 1

View file

@ -65,9 +65,9 @@ void Cpu_reset( struct Hes_Cpu* this );
// Set end_time and run CPU from current time. Returns true if any illegal
// instructions were encountered.
bool Cpu_run( struct Hes_Emu* this, hes_time_t end_time ) ICODE_ATTR;
bool Cpu_run( struct Hes_Emu* this, hes_time_t end_time );
void Cpu_set_mmr( struct Hes_Emu* this, int reg, int bank ) ICODE_ATTR;
void Cpu_set_mmr( struct Hes_Emu* this, int reg, int bank );
// Time of ning of next instruction to be executed
static inline hes_time_t Cpu_time( struct Hes_Cpu* this )

View file

@ -29,7 +29,7 @@ int const silence_threshold = 0x10;
long const fade_block_size = 512;
int const fade_shift = 8; // fade ends with gain at 1.0 / (1 << fade_shift)
const char gme_wrong_file_type [] ICONST_ATTR = "Wrong file type for this emulator";
const char gme_wrong_file_type [] = "Wrong file type for this emulator";
static void clear_track_vars( struct Hes_Emu* this )
{
@ -151,7 +151,7 @@ blargg_err_t Hes_load( struct Hes_Emu* this, void* data, long size )
// Emulation
void recalc_timer_load( struct Hes_Emu* this ) ICODE_ATTR;
void recalc_timer_load( struct Hes_Emu* this );
void recalc_timer_load( struct Hes_Emu* this )
{
this->timer.load = this->timer.raw_load * this->timer_base + 1;
@ -159,8 +159,8 @@ void recalc_timer_load( struct Hes_Emu* this )
// Hardware
void irq_changed( struct Hes_Emu* this ) ICODE_ATTR;
void run_until( struct Hes_Emu* this, hes_time_t present ) ICODE_ATTR;
void irq_changed( struct Hes_Emu* this );
void run_until( struct Hes_Emu* this, hes_time_t present );
void Cpu_write_vdp( struct Hes_Emu* this, int addr, int data )
{
switch ( addr )
@ -419,7 +419,7 @@ void irq_changed( struct Hes_Emu* this )
this->cpu.end_time, (this->cpu.irq_time = time) );
}
static void adjust_time( blargg_long* time, hes_time_t delta ) ICODE_ATTR;
static void adjust_time( blargg_long* time, hes_time_t delta );
static void adjust_time( blargg_long* time, hes_time_t delta )
{
if ( *time < (blargg_long)future_hes_time )
@ -430,7 +430,7 @@ static void adjust_time( blargg_long* time, hes_time_t delta )
}
}
blargg_err_t run_clocks( struct Hes_Emu* this, blip_time_t* duration_ ) ICODE_ATTR;
blargg_err_t run_clocks( struct Hes_Emu* this, blip_time_t* duration_ );
blargg_err_t run_clocks( struct Hes_Emu* this, blip_time_t* duration_ )
{
blip_time_t duration = *duration_; // cache
@ -463,7 +463,7 @@ blargg_err_t run_clocks( struct Hes_Emu* this, blip_time_t* duration_ )
return 0;
}
blargg_err_t play_( struct Hes_Emu* this, long count, sample_t* out ) ICODE_ATTR;
blargg_err_t play_( struct Hes_Emu* this, long count, sample_t* out );
blargg_err_t play_( struct Hes_Emu* this, long count, sample_t* out )
{
long remain = count;
@ -557,7 +557,7 @@ void Sound_set_tempo( struct Hes_Emu* this, int t )
this->tempo_ = t;
}
void fill_buf( struct Hes_Emu* this ) ICODE_ATTR;
void fill_buf( struct Hes_Emu* this );
blargg_err_t Hes_start_track( struct Hes_Emu* this, int track )
{
clear_track_vars( this );
@ -654,7 +654,7 @@ blargg_err_t Track_seek( struct Hes_Emu* this, long msec )
return Track_skip( this, time - this->out_time );
}
blargg_err_t skip_( struct Hes_Emu* this, long count ) ICODE_ATTR;
blargg_err_t skip_( struct Hes_Emu* this, long count );
blargg_err_t skip_( struct Hes_Emu* this, long count )
{
// for long skip, mute sound
@ -726,7 +726,7 @@ void Track_set_fade( struct Hes_Emu* this, long start_msec, long length_msec )
}
// unit / pow( 2.0, (double) x / step )
static int int_log( blargg_long x, int step, int unit ) ICODE_ATTR;
static int int_log( blargg_long x, int step, int unit );
static int int_log( blargg_long x, int step, int unit )
{
int shift = x / step;
@ -734,7 +734,7 @@ static int int_log( blargg_long x, int step, int unit )
return ((unit - fraction) + (fraction >> 1)) >> shift;
}
void handle_fade( struct Hes_Emu* this, long out_count, sample_t* out ) ICODE_ATTR;
void handle_fade( struct Hes_Emu* this, long out_count, sample_t* out );
void handle_fade( struct Hes_Emu* this, long out_count, sample_t* out )
{
int i;
@ -759,7 +759,7 @@ void handle_fade( struct Hes_Emu* this, long out_count, sample_t* out )
// Silence detection
void emu_play( struct Hes_Emu* this, long count, sample_t* out ) ICODE_ATTR;
void emu_play( struct Hes_Emu* this, long count, sample_t* out );
void emu_play( struct Hes_Emu* this, long count, sample_t* out )
{
check( current_track_ >= 0 );
@ -775,7 +775,7 @@ void emu_play( struct Hes_Emu* this, long count, sample_t* out )
}
// number of consecutive silent samples at end
static long count_silence( sample_t* begin, long size ) ICODE_ATTR;
static long count_silence( sample_t* begin, long size );
static long count_silence( sample_t* begin, long size )
{
sample_t first = *begin;

View file

@ -136,7 +136,7 @@ blargg_err_t Hes_start_track( struct Hes_Emu* this, int );
// Generate 'count' samples info 'buf'. Output is in stereo. Any emulation
// errors set warning string, and major errors also end track.
blargg_err_t Hes_play( struct Hes_Emu* this, long count, sample_t* buf ) ICODE_ATTR;
blargg_err_t Hes_play( struct Hes_Emu* this, long count, sample_t* buf );
// Track status/control
// Number of milliseconds (1000 msec = 1 second) played since ning of track
@ -188,13 +188,13 @@ static inline void Sound_set_gain( struct Hes_Emu* this, int g )
// Emulation (You shouldn't touch these)
int Cpu_read( struct Hes_Emu* this, hes_addr_t ) ICODE_ATTR;
void Cpu_write( struct Hes_Emu* this, hes_addr_t, int ) ICODE_ATTR;
void Cpu_write_vdp( struct Hes_Emu* this, int addr, int data ) ICODE_ATTR;
int Cpu_done( struct Hes_Emu* this ) ICODE_ATTR;
int Cpu_read( struct Hes_Emu* this, hes_addr_t );
void Cpu_write( struct Hes_Emu* this, hes_addr_t, int );
void Cpu_write_vdp( struct Hes_Emu* this, int addr, int data );
int Cpu_done( struct Hes_Emu* this );
int Emu_cpu_read( struct Hes_Emu* this, hes_addr_t ) ICODE_ATTR;
void Emu_cpu_write( struct Hes_Emu* this, hes_addr_t, int data ) ICODE_ATTR;
int Emu_cpu_read( struct Hes_Emu* this, hes_addr_t );
void Emu_cpu_write( struct Hes_Emu* this, hes_addr_t, int data );
static inline byte const* Emu_cpu_set_mmr( struct Hes_Emu* this, int page, int bank )
{

View file

@ -155,7 +155,7 @@ blargg_err_t Kss_start_track( struct Kss_Emu* this, int track );
// Generate 'count' samples info 'buf'. Output is in stereo. Any emulation
// errors set warning string, and major errors also end track.
blargg_err_t Kss_play( struct Kss_Emu* this, long count, sample_t* buf ) ICODE_ATTR;
blargg_err_t Kss_play( struct Kss_Emu* this, long count, sample_t* buf );
// Track status/control
@ -210,13 +210,13 @@ static inline void Sound_set_gain( struct Kss_Emu* this, int g )
}
// Emulation (You shouldn't touch these
void cpu_write( struct Kss_Emu* this, kss_addr_t, int ) ICODE_ATTR;
int cpu_in( struct Kss_Emu* this, kss_time_t, kss_addr_t ) ICODE_ATTR;
void cpu_out( struct Kss_Emu* this, kss_time_t, kss_addr_t, int ) ICODE_ATTR;
void cpu_write( struct Kss_Emu* this, kss_addr_t, int );
int cpu_in( struct Kss_Emu* this, kss_time_t, kss_addr_t );
void cpu_out( struct Kss_Emu* this, kss_time_t, kss_addr_t, int );
void cpu_write_( struct Kss_Emu* this, kss_addr_t addr, int data ) ICODE_ATTR;
bool run_cpu( struct Kss_Emu* this, kss_time_t end ) ICODE_ATTR;
void jsr( struct Kss_Emu* this, byte const addr [] ) ICODE_ATTR;
void cpu_write_( struct Kss_Emu* this, kss_addr_t addr, int data );
bool run_cpu( struct Kss_Emu* this, kss_time_t end );
void jsr( struct Kss_Emu* this, byte const addr [] );
static inline int sms_psg_enabled( struct Kss_Emu* this ) { return this->chip_flags & sms_psg_flag; }
static inline int sms_fm_enabled( struct Kss_Emu* this ) { return this->chip_flags & sms_fm_flag; }

View file

@ -42,10 +42,10 @@ static inline void Scc_set_output( struct Scc_Apu* this, int index, struct Blip_
}
// Emulates to time t, then writes data to reg
void Scc_write( struct Scc_Apu* this, blip_time_t time, int addr, int data ) ICODE_ATTR;
void Scc_write( struct Scc_Apu* this, blip_time_t time, int addr, int data );
// Emulates to time t, then subtracts t from the current time.
// OK if previous write call had time slightly after t.
void Scc_end_frame( struct Scc_Apu* this, blip_time_t end_time ) ICODE_ATTR;
void Scc_end_frame( struct Scc_Apu* this, blip_time_t end_time );
#endif

View file

@ -38,18 +38,18 @@ void Buffer_clock_rate( struct Stereo_Buffer* this, long );
void Buffer_bass_freq( struct Stereo_Buffer* this, int );
void Buffer_clear( struct Stereo_Buffer* this );
struct channel_t Buffer_channel( struct Stereo_Buffer* this );
void Buffer_end_frame( struct Stereo_Buffer* this, blip_time_t ) ICODE_ATTR;
void Buffer_end_frame( struct Stereo_Buffer* this, blip_time_t );
long Buffer_read_samples( struct Stereo_Buffer* this, blip_sample_t*, long ) ICODE_ATTR;
long Buffer_read_samples( struct Stereo_Buffer* this, blip_sample_t*, long );
// Count of changes to channel configuration. Incremented whenever
// a change is made to any of the Blip_Buffers for any channel.
unsigned Buffer_channels_changed_count( struct Stereo_Buffer* this ) ICODE_ATTR;
void Buffer_channels_changed( struct Stereo_Buffer* this ) ICODE_ATTR;
unsigned Buffer_channels_changed_count( struct Stereo_Buffer* this );
void Buffer_channels_changed( struct Stereo_Buffer* this );
void Buffer_mix_stereo_no_center( struct Stereo_Buffer* this, blip_sample_t*, blargg_long ) ICODE_ATTR;
void Buffer_mix_stereo( struct Stereo_Buffer* this, blip_sample_t*, blargg_long ) ICODE_ATTR;
void Buffer_mix_mono( struct Stereo_Buffer* this, blip_sample_t*, blargg_long ) ICODE_ATTR;
void Buffer_mix_stereo_no_center( struct Stereo_Buffer* this, blip_sample_t*, blargg_long );
void Buffer_mix_stereo( struct Stereo_Buffer* this, blip_sample_t*, blargg_long );
void Buffer_mix_mono( struct Stereo_Buffer* this, blip_sample_t*, blargg_long );
// Number of samples per output frame (1 = mono, 2 = stereo)
static inline int Buffer_samples_per_frame( struct Stereo_Buffer* this )

View file

@ -272,7 +272,7 @@ void Apu_end_frame( struct Nes_Apu* this, nes_time_t end_time )
// registers
static const unsigned char length_table [0x20] ICONST_ATTR = {
static const unsigned char length_table [0x20] = {
0x0A, 0xFE, 0x14, 0x02, 0x28, 0x04, 0x50, 0x06,
0xA0, 0x08, 0x3C, 0x0A, 0x0E, 0x0C, 0x1A, 0x0E,
0x0C, 0x10, 0x18, 0x12, 0x30, 0x14, 0x60, 0x16,

View file

@ -48,22 +48,22 @@ struct Nes_Apu {
void Apu_init( struct Nes_Apu* this );
// Set buffer to generate all sound into, or disable sound if NULL
void Apu_output( struct Nes_Apu* this, struct Blip_Buffer* ) ICODE_ATTR;
void Apu_output( struct Nes_Apu* this, struct Blip_Buffer* );
// All time values are the number of cpu clock cycles relative to the
// beginning of the current time frame. Before resetting the cpu clock
// count, call end_frame( last_cpu_time ).
// Write to register (0x4000-0x4017, except 0x4014 and 0x4016)
void Apu_write_register( struct Nes_Apu* this, nes_time_t, addr_t, int data ) ICODE_ATTR;
void Apu_write_register( struct Nes_Apu* this, nes_time_t, addr_t, int data );
// Read from status register at 0x4015
int Apu_read_status( struct Nes_Apu* this, nes_time_t ) ICODE_ATTR;
int Apu_read_status( struct Nes_Apu* this, nes_time_t );
// Run all oscillators up to specified time, end current time frame, then
// start a new time frame at time 0. Time frames have no effect on emulation
// and each can be whatever length is convenient.
void Apu_end_frame( struct Nes_Apu* this, nes_time_t ) ICODE_ATTR;
void Apu_end_frame( struct Nes_Apu* this, nes_time_t );
// Additional optional features (can be ignored without any problem)
@ -81,7 +81,7 @@ void Apu_volume( struct Nes_Apu* this, int );
// Run DMC until specified time, so that any DMC memory reads can be
// accounted for (i.e. inserting cpu wait states).
void Apu_run_until( struct Nes_Apu* this, nes_time_t ) ICODE_ATTR;
void Apu_run_until( struct Nes_Apu* this, nes_time_t );
// Set sound output of specific oscillator to buffer. If buffer is NULL,
// the specified oscillator is muted and emulation accuracy is reduced.
@ -129,6 +129,6 @@ static inline nes_time_t Dmc_next_read_time( struct Nes_Dmc* this )
// Time when next DMC memory read will occur
static inline nes_time_t Apu_next_dmc_read_time( struct Nes_Apu* this ) { return Dmc_next_read_time( &this->dmc ); }
void Apu_irq_changed( struct Nes_Apu* this ) ICODE_ATTR;
void Apu_irq_changed( struct Nes_Apu* this );
#endif

View file

@ -42,7 +42,7 @@ void Fds_reset( struct Nes_Fds_Apu* this )
this->mod_pos = 0;
this->mod_write_pos = 0;
static byte const initial_regs [0x0B] ICONST_ATTR = {
static byte const initial_regs [0x0B] = {
0x80, // disable envelope
0, 0, 0xC0, // disable wave and lfo
0x80, // disable sweep

View file

@ -68,7 +68,7 @@ static inline void Fds_set_output( struct Nes_Fds_Apu* this, int i, struct Blip_
this->output_ = b;
}
void Fds_run_until( struct Nes_Fds_Apu* this, blip_time_t ) ICODE_ATTR;
void Fds_run_until( struct Nes_Fds_Apu* this, blip_time_t );
static inline void Fds_end_frame( struct Nes_Fds_Apu* this, blip_time_t end_time )
{
if ( end_time > this->last_time )
@ -77,7 +77,7 @@ static inline void Fds_end_frame( struct Nes_Fds_Apu* this, blip_time_t end_time
assert( this->last_time >= 0 );
}
void Fds_write_( struct Nes_Fds_Apu* this, unsigned addr, int data ) ICODE_ATTR;
void Fds_write_( struct Nes_Fds_Apu* this, unsigned addr, int data );
static inline void Fds_write( struct Nes_Fds_Apu* this, blip_time_t time, unsigned addr, int data )
{
Fds_run_until( this, time );

View file

@ -40,7 +40,7 @@ void Fme7_reset( struct Nes_Fme7_Apu* this )
memset( this->delays, 0, sizeof this->delays );
}
static unsigned char const amp_table [16] ICONST_ATTR =
static unsigned char const amp_table [16] =
{
#define ENTRY( n ) (unsigned char) (n * amp_range + 0.5)
ENTRY(0.0000), ENTRY(0.0078), ENTRY(0.0110), ENTRY(0.0156),

View file

@ -63,7 +63,7 @@ static inline void Fme7_output( struct Nes_Fme7_Apu* this, struct Blip_Buffer* b
static inline void Fme7_write_latch( struct Nes_Fme7_Apu* this, int data ) { this->latch = data; }
// (addr & addr_mask) == data_addr
void Fme7_run_until( struct Nes_Fme7_Apu* this, blip_time_t end_time ) ICODE_ATTR;
void Fme7_run_until( struct Nes_Fme7_Apu* this, blip_time_t end_time );
static inline void Fme7_write_data( struct Nes_Fme7_Apu* this, blip_time_t time, int data )
{
if ( (unsigned) this->latch >= fme7_reg_count )

View file

@ -37,7 +37,7 @@ void Namco_init( struct Nes_Namco_Apu* this );
void Namco_output( struct Nes_Namco_Apu* this, struct Blip_Buffer* );
void Namco_reset( struct Nes_Namco_Apu* this );
void Namco_end_frame( struct Nes_Namco_Apu* this, blip_time_t ) ICODE_ATTR;
void Namco_end_frame( struct Nes_Namco_Apu* this, blip_time_t );
static inline uint8_t* namco_access( struct Nes_Namco_Apu* this )
{
@ -61,7 +61,7 @@ static inline void Namco_osc_output( struct Nes_Namco_Apu* this, int i, struct B
}
// Read/write data register is at 0x4800
void Namco_run_until( struct Nes_Namco_Apu* this, blip_time_t ) ICODE_ATTR;
void Namco_run_until( struct Nes_Namco_Apu* this, blip_time_t );
static inline void Namco_write_data( struct Nes_Namco_Apu* this, blip_time_t time, int data )
{
Namco_run_until( this, time );

View file

@ -326,7 +326,7 @@ int Dmc_count_reads( struct Nes_Dmc* this, nes_time_t time, nes_time_t* last_rea
return count;
}
static short const dmc_period_table [2] [16] ICONST_ATTR = {
static short const dmc_period_table [2] [16] = {
{428, 380, 340, 320, 286, 254, 226, 214, // NTSC
190, 160, 142, 128, 106, 84, 72, 54},
@ -340,7 +340,7 @@ inline void Dmc_reload_sample( struct Nes_Dmc* this )
this->osc.length_counter = this->osc.regs [3] * 0x10 + 1;
}
static byte const dac_table [128] ICONST_ATTR =
static byte const dac_table [128] =
{
0, 1, 2, 3, 4, 5, 6, 7, 7, 8, 9,10,11,12,13,14,
15,15,16,17,18,19,20,20,21,22,23,24,24,25,26,27,
@ -479,7 +479,7 @@ void Dmc_run( struct Nes_Dmc* this, nes_time_t time, nes_time_t end_time )
// Nes_Noise
static short const noise_period_table [16] ICONST_ATTR = {
static short const noise_period_table [16] = {
0x004, 0x008, 0x010, 0x020, 0x040, 0x060, 0x080, 0x0A0,
0x0CA, 0x0FE, 0x17C, 0x1FC, 0x2FA, 0x3F8, 0x7F2, 0xFE4
};

View file

@ -153,13 +153,13 @@ struct Nes_Dmc
};
void Dmc_start( struct Nes_Dmc* this );
void Dmc_write_register( struct Nes_Dmc* this, int, int ) ICODE_ATTR;
void Dmc_run( struct Nes_Dmc* this, nes_time_t, nes_time_t ) ICODE_ATTR;
void Dmc_recalc_irq( struct Nes_Dmc* this ) ICODE_ATTR;
void Dmc_fill_buffer( struct Nes_Dmc* this ) ICODE_ATTR;
void Dmc_reload_sample( struct Nes_Dmc* this ) ICODE_ATTR;
void Dmc_reset( struct Nes_Dmc* this ) ICODE_ATTR;
void Dmc_write_register( struct Nes_Dmc* this, int, int );
void Dmc_run( struct Nes_Dmc* this, nes_time_t, nes_time_t );
void Dmc_recalc_irq( struct Nes_Dmc* this );
void Dmc_fill_buffer( struct Nes_Dmc* this );
void Dmc_reload_sample( struct Nes_Dmc* this );
void Dmc_reset( struct Nes_Dmc* this );
int Dmc_count_reads( struct Nes_Dmc* this, nes_time_t, nes_time_t* ) ICODE_ATTR;
int Dmc_count_reads( struct Nes_Dmc* this, nes_time_t, nes_time_t* );
#endif

View file

@ -39,12 +39,12 @@ struct Nes_Vrc6_Apu {
void Vrc6_init( struct Nes_Vrc6_Apu* this );
void Vrc6_reset( struct Nes_Vrc6_Apu* this );
void Vrc6_output( struct Nes_Vrc6_Apu* this, struct Blip_Buffer* );
void Vrc6_end_frame( struct Nes_Vrc6_Apu* this, blip_time_t ) ICODE_ATTR;
void Vrc6_end_frame( struct Nes_Vrc6_Apu* this, blip_time_t );
// Oscillator 0 write-only registers are at $9000-$9002
// Oscillator 1 write-only registers are at $A000-$A002
// Oscillator 2 write-only registers are at $B000-$B002
void Vrc6_write_osc( struct Nes_Vrc6_Apu* this, blip_time_t, int osc, int reg, int data ) ICODE_ATTR;
void Vrc6_write_osc( struct Nes_Vrc6_Apu* this, blip_time_t, int osc, int reg, int data );
static inline void Vrc6_osc_output( struct Nes_Vrc6_Apu* this, int i, struct Blip_Buffer* buf )
{

View file

@ -28,10 +28,10 @@ struct Nes_Vrc7_Apu {
void Vrc7_init( struct Nes_Vrc7_Apu* this );
void Vrc7_reset( struct Nes_Vrc7_Apu* this );
void Vrc7_set_rate( struct Nes_Vrc7_Apu* this, int r );
void Vrc7_end_frame( struct Nes_Vrc7_Apu* this, blip_time_t ) ICODE_ATTR;
void Vrc7_end_frame( struct Nes_Vrc7_Apu* this, blip_time_t );
void Vrc7_write_reg( struct Nes_Vrc7_Apu* this, int reg ) ICODE_ATTR;
void Vrc7_write_data( struct Nes_Vrc7_Apu* this, blip_time_t, int data ) ICODE_ATTR;
void Vrc7_write_reg( struct Nes_Vrc7_Apu* this, int reg );
void Vrc7_write_data( struct Nes_Vrc7_Apu* this, blip_time_t, int data );
void output_changed( struct Nes_Vrc7_Apu* this );
static inline void Vrc7_set_output( struct Nes_Vrc7_Apu* this, int i, struct Blip_Buffer* buf )

View file

@ -18,7 +18,7 @@ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */
#include "blargg_source.h"
const char gme_wrong_file_type [] ICONST_ATTR = "Wrong file type for this emulator";
const char gme_wrong_file_type [] = "Wrong file type for this emulator";
long const clock_divisor = 12;
int const stereo = 2; // number of channels for stereo
@ -859,7 +859,7 @@ blargg_err_t Track_seek( struct Nsf_Emu* this, long msec )
return Track_skip( this, time - this->out_time );
}
blargg_err_t skip_( struct Nsf_Emu* this, long count ) ICODE_ATTR;
blargg_err_t skip_( struct Nsf_Emu* this, long count );
blargg_err_t Track_skip( struct Nsf_Emu* this, long count )
{
require( this->current_track >= 0 ); // start_track() must have been called already
@ -890,7 +890,7 @@ blargg_err_t Track_skip( struct Nsf_Emu* this, long count )
return 0;
}
blargg_err_t play_( struct Nsf_Emu* this, long count, sample_t* out ) ICODE_ATTR;
blargg_err_t play_( struct Nsf_Emu* this, long count, sample_t* out );
blargg_err_t skip_( struct Nsf_Emu* this, long count )
{
// for long skip, mute sound
@ -960,7 +960,7 @@ static void handle_fade( struct Nsf_Emu* this, long out_count, sample_t* out )
// Silence detection
void emu_play( struct Nsf_Emu* this, long count, sample_t* out ) ICODE_ATTR;
void emu_play( struct Nsf_Emu* this, long count, sample_t* out );
void emu_play( struct Nsf_Emu* this, long count, sample_t* out )
{
check( current_track_ >= 0 );

View file

@ -209,13 +209,13 @@ static inline void Sound_set_gain( struct Nsf_Emu* this, int g )
blargg_err_t run_clocks( struct Nsf_Emu* this, blip_time_t* duration, int );
void map_memory( struct Nsf_Emu* this ) ICODE_ATTR;
void write_bank( struct Nsf_Emu* this, int index, int data ) ICODE_ATTR;
int cpu_read( struct Nsf_Emu* this, addr_t ) ICODE_ATTR;
void cpu_write( struct Nsf_Emu* this, addr_t, int ) ICODE_ATTR;
void push_byte( struct Nsf_Emu* this, int ) ICODE_ATTR;
addr_t get_addr( byte const [] ) ICODE_ATTR;
bool run_cpu_until( struct Nsf_Emu* this, nes_time_t end ) ICODE_ATTR;
void map_memory( struct Nsf_Emu* this );
void write_bank( struct Nsf_Emu* this, int index, int data );
int cpu_read( struct Nsf_Emu* this, addr_t );
void cpu_write( struct Nsf_Emu* this, addr_t, int );
void push_byte( struct Nsf_Emu* this, int );
addr_t get_addr( byte const [] );
bool run_cpu_until( struct Nsf_Emu* this, nes_time_t end );
// Sets clocks between calls to play routine to p + 1/2 clock
static inline void set_play_period( struct Nsf_Emu* this, int p ) { this->play_period = p; }
@ -224,26 +224,26 @@ static inline void set_play_period( struct Nsf_Emu* this, int p ) { this->play_p
static inline nes_time_t play_time( struct Nsf_Emu* this ) { return this->next_play; }
// Emulates to at least time t. Might emulate a few clocks extra.
void run_until( struct Nsf_Emu* this, nes_time_t t ) ICODE_ATTR;
void run_until( struct Nsf_Emu* this, nes_time_t t );
// Runs cpu to at least time t and returns false, or returns true
// if it encounters illegal instruction (halt).
bool run_cpu_until( struct Nsf_Emu* this, nes_time_t t ) ICODE_ATTR;
bool run_cpu_until( struct Nsf_Emu* this, nes_time_t t );
// cpu calls through to these to access memory (except instructions)
int read_mem( struct Nsf_Emu* this, addr_t ) ICODE_ATTR;
void write_mem( struct Nsf_Emu* this, addr_t, int ) ICODE_ATTR;
int read_mem( struct Nsf_Emu* this, addr_t );
void write_mem( struct Nsf_Emu* this, addr_t, int );
// Address of play routine
static inline addr_t play_addr( struct Nsf_Emu* this ) { return get_addr( this->header.play_addr ); }
// Same as run_until, except emulation stops for any event (routine returned,
// play routine called, illegal instruction).
void run_once( struct Nsf_Emu* this, nes_time_t ) ICODE_ATTR;
void run_once( struct Nsf_Emu* this, nes_time_t );
// Reads byte as cpu would when executing code. Only works for RAM/ROM,
// NOT I/O like sound chips.
int read_code( struct Nsf_Emu* this, addr_t addr ) ICODE_ATTR;
int read_code( struct Nsf_Emu* this, addr_t addr );
static inline byte* fdsram( struct Nsf_Emu* this ) { return &this->high_ram [fdsram_offset]; }
static inline byte* sram( struct Nsf_Emu* this ) { return this->high_ram; }

View file

@ -51,12 +51,12 @@ static inline void Opl_osc_output( struct Opl_Apu* this, int i, struct Blip_Buff
}
static inline void Opl_set_output( struct Opl_Apu* this, struct Blip_Buffer* buf ) { Opl_osc_output( this, 0, buf ); }
void Opl_end_frame( struct Opl_Apu* this, blip_time_t ) ICODE_ATTR;
void Opl_end_frame( struct Opl_Apu* this, blip_time_t );
static inline void Opl_write_addr( struct Opl_Apu* this, int data ) { this->addr = data; }
void Opl_write_data( struct Opl_Apu* this, blip_time_t, int data ) ICODE_ATTR;
void Opl_write_data( struct Opl_Apu* this, blip_time_t, int data );
int Opl_read( struct Opl_Apu* this, blip_time_t, int port ) ICODE_ATTR;
int Opl_read( struct Opl_Apu* this, blip_time_t, int port );
static inline bool Opl_supported( void ) { return true; }

View file

@ -4,7 +4,7 @@
/* Precalculated emu8950 tables for use in Rockbox,
Calculated for 44Khz sampling rate */
static const short ar_adjust_coeff[] ICONST_ATTR = {
static const short ar_adjust_coeff[] = {
255, 227, 210, 198, 189, 181, 175, 170, 165, 161, 157,
153, 150, 147, 144, 141, 139, 136, 134, 132, 130, 128,
126, 125, 123, 121, 120, 118, 117, 115, 114, 113, 112,
@ -54,7 +54,7 @@ static const short ar_adjust_coeff[] ICONST_ATTR = {
0, 0, 0, 0, 0
};
static const short db2lin_coeff[] ICONST_ATTR = {
static const short db2lin_coeff[] = {
2047, 2003, 1960, 1918, 1877, 1837, 1798, 1759, 1722, 1685, 1649,
1614, 1579, 1546, 1513, 1480, 1449, 1418, 1387, 1358, 1329, 1300,
1273, 1245, 1219, 1193, 1167, 1142, 1118, 1094, 1071, 1048, 1025,
@ -104,7 +104,7 @@ static const short db2lin_coeff[] ICONST_ATTR = {
0, 0, 0, 0, 0, 0
};
static const short sin_coeff[] ICONST_ATTR = {
static const short sin_coeff[] = {
511, 235, 203, 185, 171, 161, 152, 145, 139, 134, 129,
124, 120, 117, 113, 110, 107, 104, 102, 99, 97, 95,
92, 90, 88, 87, 85, 83, 81, 80, 78, 77, 75,
@ -131,7 +131,7 @@ static const short sin_coeff[] ICONST_ATTR = {
0, 0, 0,
};
static const short pm0_coeff[] ICONST_ATTR = {
static const short pm0_coeff[] = {
256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256,
256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256,
256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256,
@ -158,7 +158,7 @@ static const short pm0_coeff[] ICONST_ATTR = {
255, 255, 255,
};
static const short pm1_coeff[] ICONST_ATTR = {
static const short pm1_coeff[] = {
256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256,
256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 257,
257, 257, 257, 257, 257, 257, 257, 257, 257, 257, 257,
@ -185,7 +185,7 @@ static const short pm1_coeff[] ICONST_ATTR = {
255, 255, 255,
};
static const short am0_coeff[] ICONST_ATTR = {
static const short am0_coeff[] = {
2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3,
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
@ -212,7 +212,7 @@ static const short am0_coeff[] ICONST_ATTR = {
2, 2, 2,
};
static const short am1_coeff[] ICONST_ATTR = {
static const short am1_coeff[] = {
12, 13, 13, 13, 14, 14, 14, 14, 15, 15, 15,
16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 19,
19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21,

View file

@ -47,7 +47,7 @@ static inline void Resampler_init( struct Resampler* this )
blargg_err_t Resampler_reset( struct Resampler* this, int max_pairs );
void Resampler_resize( struct Resampler* this, int pairs_per_frame );
void Resampler_play( struct Resampler* this, long count, dsample_t* out, struct Stereo_Buffer* ) ICODE_ATTR;
void Resampler_play( struct Resampler* this, long count, dsample_t* out, struct Stereo_Buffer* );
static inline void Resampler_set_callback(struct Resampler* this, int (*func)( void*, blip_time_t, int, dsample_t* ), void* user_data )
{

View file

@ -306,7 +306,7 @@ void Sound_set_tempo( struct Sgc_Emu* this, int t )
this->play_period = (int) ((clock_rate( this ) * FP_ONE_TEMPO) / (this->header.rate ? 50 : 60) / t);
}
void fill_buf( struct Sgc_Emu* this ) ICODE_ATTR;
void fill_buf( struct Sgc_Emu* this );
blargg_err_t Sgc_start_track( struct Sgc_Emu* this, int track )
{
clear_track_vars( this );
@ -430,7 +430,7 @@ blargg_err_t Track_seek( struct Sgc_Emu* this, long msec )
return Track_skip( this, time - this->out_time );
}
blargg_err_t skip_( struct Sgc_Emu* this, long count ) ICODE_ATTR;
blargg_err_t skip_( struct Sgc_Emu* this, long count );
blargg_err_t Track_skip( struct Sgc_Emu* this, long count )
{
require( this->current_track >= 0 ); // start_track() must have been called already
@ -463,7 +463,7 @@ blargg_err_t Track_skip( struct Sgc_Emu* this, long count )
return 0;
}
blargg_err_t play_( struct Sgc_Emu* this, long count, sample_t* out ) ICODE_ATTR;
blargg_err_t play_( struct Sgc_Emu* this, long count, sample_t* out );
blargg_err_t skip_( struct Sgc_Emu* this, long count )
{
// for long skip, mute sound

View file

@ -191,9 +191,9 @@ static inline bool sega_mapping( struct Sgc_Emu* this )
// Emulation (You shouldn't touch these)
bool run_cpu( struct Sgc_Emu* this, cpu_time_t end_time ) ICODE_ATTR;
void cpu_out( struct Sgc_Emu* this, cpu_time_t time, addr_t addr, int data ) ICODE_ATTR;
void cpu_write( struct Sgc_Emu* this, addr_t addr, int data ) ICODE_ATTR;
void jsr( struct Sgc_Emu* this, byte addr [2] ) ICODE_ATTR;
bool run_cpu( struct Sgc_Emu* this, cpu_time_t end_time );
void cpu_out( struct Sgc_Emu* this, cpu_time_t time, addr_t addr, int data );
void cpu_write( struct Sgc_Emu* this, addr_t addr, int data );
void jsr( struct Sgc_Emu* this, byte addr [2] );
#endif

View file

@ -139,7 +139,7 @@ static void run_until( struct Sms_Apu* this, blip_time_t end_time )
if ( out )
{
// volumes [i] ~= 64 * pow( 1.26, 15 - i ) / pow( 1.26, 15 )
static unsigned char const volumes [16] ICONST_ATTR = {
static unsigned char const volumes [16] = {
64, 50, 40, 32, 25, 20, 16, 13, 10, 8, 6, 5, 4, 3, 2, 0
};

View file

@ -43,14 +43,14 @@ void Sms_apu_init( struct Sms_Apu* this );
void Sms_apu_set_output( struct Sms_Apu* this, int i, struct Blip_Buffer* center, struct Blip_Buffer* left, struct Blip_Buffer* right);
// Emulates to time t, then writes data to Game Gear left/right assignment byte
void Sms_apu_write_ggstereo( struct Sms_Apu* this, blip_time_t t, int data ) ICODE_ATTR;
void Sms_apu_write_ggstereo( struct Sms_Apu* this, blip_time_t t, int data );
// Emulates to time t, then writes data
void Sms_apu_write_data( struct Sms_Apu* this, blip_time_t t, int data ) ICODE_ATTR;
void Sms_apu_write_data( struct Sms_Apu* this, blip_time_t t, int data );
// Emulates to time t, then subtracts t from the current time.
// OK if previous write call had time slightly after t.
void Sms_apu_end_frame( struct Sms_Apu* this, blip_time_t t ) ICODE_ATTR;
void Sms_apu_end_frame( struct Sms_Apu* this, blip_time_t t );
// More features

View file

@ -28,7 +28,7 @@ void Fm_apu_reset( struct Sms_Fm_Apu* this )
Ym2413_reset( &this->apu );
}
void fm_run_until( struct Sms_Fm_Apu* this, blip_time_t end_time ) ICODE_ATTR;
void fm_run_until( struct Sms_Fm_Apu* this, blip_time_t end_time );
void Fm_apu_write_data( struct Sms_Fm_Apu* this, blip_time_t time, int data )
{
if ( time > this->next_time )

View file

@ -36,8 +36,8 @@ static inline void Fm_apu_volume( struct Sms_Fm_Apu* this, int v ) { Synth_volum
void Fm_apu_reset( struct Sms_Fm_Apu* this );
static inline void Fm_apu_write_addr( struct Sms_Fm_Apu* this, int data ) { this->addr = data; }
void Fm_apu_write_data( struct Sms_Fm_Apu* this, blip_time_t, int data ) ICODE_ATTR;
void Fm_apu_write_data( struct Sms_Fm_Apu* this, blip_time_t, int data );
void Fm_apu_end_frame( struct Sms_Fm_Apu* this, blip_time_t t ) ICODE_ATTR;
void Fm_apu_end_frame( struct Sms_Fm_Apu* this, blip_time_t t );
#endif

View file

@ -407,7 +407,7 @@ static blargg_err_t play_( struct Vgm_Emu* this, long count, sample_t* out )
static inline int command_len( int command )
{
static byte const lens [0x10] ICONST_ATTR = {
static byte const lens [0x10] = {
// 0 1 2 3 4 5 6 7 8 9 A B C D E F
1,1,1,2,2,3,1,1,1,1,3,3,4,4,5,5
};

View file

@ -155,7 +155,7 @@ blargg_err_t Vgm_start_track( struct Vgm_Emu* this );
// Generate 'count' samples info 'buf'. Output is in stereo. Any emulation
// errors set warning string, and major errors also end track.
blargg_err_t Vgm_play( struct Vgm_Emu* this, long count, sample_t* buf ) ICODE_ATTR;
blargg_err_t Vgm_play( struct Vgm_Emu* this, long count, sample_t* buf );
// Track status/control

View file

@ -34,10 +34,10 @@ void Ym2413_reset( struct Ym2413_Emu* this );
void Ym2413_mute_voices( struct Ym2413_Emu* this, int mask );
// Writes data to addr
void Ym2413_write( struct Ym2413_Emu* this, int addr, int data ) ICODE_ATTR;
void Ym2413_write( struct Ym2413_Emu* this, int addr, int data );
// Runs and writes pair_count*2 samples to output
void Ym2413_run( struct Ym2413_Emu* this, int pair_count, short* out ) ICODE_ATTR;
void Ym2413_run( struct Ym2413_Emu* this, int pair_count, short* out );
static inline void Ym2413_enable( struct Ym2413_Emu* this, bool b ) { this->last_time = b ? 0 : disabled_time; }
static inline bool Ym2413_enabled( struct Ym2413_Emu* this ) { return this->last_time != disabled_time; }

View file

@ -43,7 +43,7 @@ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */
const int output_bits = 14;
static const unsigned char DT_DEF_TAB [4 * 32] ICONST_ATTR =
static const unsigned char DT_DEF_TAB [4 * 32] =
{
// FD = 0
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@ -62,7 +62,7 @@ static const unsigned char DT_DEF_TAB [4 * 32] ICONST_ATTR =
8 , 8, 9, 10, 11, 12, 13, 14, 16, 17, 19, 20, 22, 22, 22, 22
};
static const unsigned char FKEY_TAB [16] ICONST_ATTR =
static const unsigned char FKEY_TAB [16] =
{
0, 0, 0, 0,
0, 0, 0, 1,
@ -70,12 +70,12 @@ static const unsigned char FKEY_TAB [16] ICONST_ATTR =
3, 3, 3, 3
};
static const unsigned char LFO_AMS_TAB [4] ICONST_ATTR =
static const unsigned char LFO_AMS_TAB [4] =
{
31, 4, 1, 0
};
static const unsigned char LFO_FMS_TAB [8] ICONST_ATTR =
static const unsigned char LFO_FMS_TAB [8] =
{
LFO_FMS_BASE * 0, LFO_FMS_BASE * 1,
LFO_FMS_BASE * 2, LFO_FMS_BASE * 3,

View file

@ -208,13 +208,13 @@ void Ym2612_reset( struct Ym2612_Emu* this_ );
void Ym2612_mute_voices( struct Ym2612_Emu* this_, int mask );
// Writes addr to register 0 then data to register 1
void Ym2612_write0( struct Ym2612_Emu* this_, int addr, int data ) ICODE_ATTR;
void Ym2612_write0( struct Ym2612_Emu* this_, int addr, int data );
// Writes addr to register 2 then data to register 3
void Ym2612_write1( struct Ym2612_Emu* this_, int addr, int data ) ICODE_ATTR;
void Ym2612_write1( struct Ym2612_Emu* this_, int addr, int data );
// Runs and adds pair_count*2 samples into current output buffer contents
void Ym2612_run( struct Ym2612_Emu* this_, int pair_count, short* out ) ICODE_ATTR;
void Ym2612_run( struct Ym2612_Emu* this_, int pair_count, short* out );
static inline void Ym2612_enable( struct Ym2612_Emu* this_, bool b ) { this_->last_time = b ? 0 : ym2612_disabled_time; }
static inline bool Ym2612_enabled( struct Ym2612_Emu* this_ ) { return this_->last_time != ym2612_disabled_time; }

View file

@ -3,7 +3,7 @@
/* Precompiled ym2612 tables for use in Rockbox */
static const int tl_coeff[] ICONST_ATTR = {
static const int tl_coeff[] = {
268435455, 267712100, 266990695, 266271234, 265553712, 264838123, 264124462, 263412725, 262702906, 261994999, 261289000,
260584903, 259882704, 259182396, 258483976, 257787438, 257092777, 256399988, 255709066, 255020006, 254332802, 253647450,
252963945, 252282282, 251602456, 250924462, 250248294, 249573949, 248901421, 248230705, 247561797, 246894691, 246229383,
@ -309,7 +309,7 @@ static const int tl_coeff[] ICONST_ATTR = {
34345, 34253, 34160, 34068, 33976, 33885
};
static const short sindb_coeff[] ICONST_ATTR = {
static const short sindb_coeff[] = {
2401, 2144, 1994, 1887, 1804, 1737, 1680, 1630, 1587, 1548, 1512, 1480, 1450,
1423, 1397, 1373, 1351, 1330, 1310, 1291, 1273, 1255, 1239, 1223, 1208, 1194,
1180, 1166, 1153, 1141, 1128, 1117, 1105, 1094, 1084, 1073, 1063, 1053, 1043,
@ -392,7 +392,7 @@ static const short sindb_coeff[] ICONST_ATTR = {
};
static const short lfo_freq_coeff[] ICONST_ATTR = {
static const short lfo_freq_coeff[] = {
0, 3, 6, 9, 12, 15, 18, 21, 25, 28, 31, 34, 37,
40, 43, 46, 50, 53, 56, 59, 62, 65, 68, 71, 74, 78,
81, 84, 87, 90, 93, 96, 99, 102, 105, 108, 111, 115, 118,
@ -474,7 +474,7 @@ static const short lfo_freq_coeff[] ICONST_ATTR = {
-31, -28, -25, -21, -18, -15, -12, -9, -6, -3
};
static const short lfo_env_coeff[] ICONST_ATTR = {
static const short lfo_env_coeff[] = {
251, 253, 254, 256, 257, 259, 260, 262, 264, 265, 267, 268, 270,
271, 273, 274, 276, 277, 279, 281, 282, 284, 285, 287, 288, 290,
291, 293, 294, 296, 297, 299, 300, 302, 303, 305, 306, 308, 309,

View file

@ -12,7 +12,7 @@ CODEC_HEADER
#define CHUNK_SIZE (1024*2)
static int16_t samples[CHUNK_SIZE] IBSS_ATTR;
static struct Nsf_Emu nsf_emu IDATA_ATTR CACHEALIGN_ATTR;
static struct Nsf_Emu nsf_emu;
/****************** rockbox interface ******************/

View file

@ -10,7 +10,7 @@ CODEC_HEADER
#define CHUNK_SIZE (1024*2)
static int16_t samples[CHUNK_SIZE] IBSS_ATTR;
static struct Sgc_Emu sgc_emu IDATA_ATTR CACHEALIGN_ATTR;
static struct Sgc_Emu sgc_emu;
/* Coleco Bios */
/* Colecovision not supported yet

View file

@ -16,7 +16,7 @@ CODEC_HEADER
#define MAINMEMBUF 0
static int16_t samples[CHUNK_SIZE] IBSS_ATTR;
static struct Vgm_Emu vgm_emu IDATA_ATTR CACHEALIGN_ATTR;
static struct Vgm_Emu vgm_emu;
static void *inflatebuf; /* heap for gunzip */
static char *songbuf; /* destination for uncompressed song */