summaryrefslogtreecommitdiff
path: root/apps/codecs/libgme/nsf_emu.h
diff options
context:
space:
mode:
Diffstat (limited to 'apps/codecs/libgme/nsf_emu.h')
-rw-r--r--apps/codecs/libgme/nsf_emu.h26
1 files changed, 13 insertions, 13 deletions
diff --git a/apps/codecs/libgme/nsf_emu.h b/apps/codecs/libgme/nsf_emu.h
index 513443226c..adb5b8e153 100644
--- a/apps/codecs/libgme/nsf_emu.h
+++ b/apps/codecs/libgme/nsf_emu.h
@@ -209,13 +209,13 @@ static inline void Sound_set_gain( struct Nsf_Emu* this, int g )
209 209
210blargg_err_t run_clocks( struct Nsf_Emu* this, blip_time_t* duration, int ); 210blargg_err_t run_clocks( struct Nsf_Emu* this, blip_time_t* duration, int );
211 211
212void map_memory( struct Nsf_Emu* this ) ICODE_ATTR; 212void map_memory( struct Nsf_Emu* this );
213void write_bank( struct Nsf_Emu* this, int index, int data ) ICODE_ATTR; 213void write_bank( struct Nsf_Emu* this, int index, int data );
214int cpu_read( struct Nsf_Emu* this, addr_t ) ICODE_ATTR; 214int cpu_read( struct Nsf_Emu* this, addr_t );
215void cpu_write( struct Nsf_Emu* this, addr_t, int ) ICODE_ATTR; 215void cpu_write( struct Nsf_Emu* this, addr_t, int );
216void push_byte( struct Nsf_Emu* this, int ) ICODE_ATTR; 216void push_byte( struct Nsf_Emu* this, int );
217addr_t get_addr( byte const [] ) ICODE_ATTR; 217addr_t get_addr( byte const [] );
218bool run_cpu_until( struct Nsf_Emu* this, nes_time_t end ) ICODE_ATTR; 218bool run_cpu_until( struct Nsf_Emu* this, nes_time_t end );
219 219
220// Sets clocks between calls to play routine to p + 1/2 clock 220// Sets clocks between calls to play routine to p + 1/2 clock
221static inline void set_play_period( struct Nsf_Emu* this, int p ) { this->play_period = p; } 221static 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
224static inline nes_time_t play_time( struct Nsf_Emu* this ) { return this->next_play; } 224static inline nes_time_t play_time( struct Nsf_Emu* this ) { return this->next_play; }
225 225
226// Emulates to at least time t. Might emulate a few clocks extra. 226// Emulates to at least time t. Might emulate a few clocks extra.
227void run_until( struct Nsf_Emu* this, nes_time_t t ) ICODE_ATTR; 227void run_until( struct Nsf_Emu* this, nes_time_t t );
228 228
229// Runs cpu to at least time t and returns false, or returns true 229// Runs cpu to at least time t and returns false, or returns true
230// if it encounters illegal instruction (halt). 230// if it encounters illegal instruction (halt).
231bool run_cpu_until( struct Nsf_Emu* this, nes_time_t t ) ICODE_ATTR; 231bool run_cpu_until( struct Nsf_Emu* this, nes_time_t t );
232 232
233// cpu calls through to these to access memory (except instructions) 233// cpu calls through to these to access memory (except instructions)
234int read_mem( struct Nsf_Emu* this, addr_t ) ICODE_ATTR; 234int read_mem( struct Nsf_Emu* this, addr_t );
235void write_mem( struct Nsf_Emu* this, addr_t, int ) ICODE_ATTR; 235void write_mem( struct Nsf_Emu* this, addr_t, int );
236 236
237// Address of play routine 237// Address of play routine
238static inline addr_t play_addr( struct Nsf_Emu* this ) { return get_addr( this->header.play_addr ); } 238static inline addr_t play_addr( struct Nsf_Emu* this ) { return get_addr( this->header.play_addr ); }
239 239
240// Same as run_until, except emulation stops for any event (routine returned, 240// Same as run_until, except emulation stops for any event (routine returned,
241// play routine called, illegal instruction). 241// play routine called, illegal instruction).
242void run_once( struct Nsf_Emu* this, nes_time_t ) ICODE_ATTR; 242void run_once( struct Nsf_Emu* this, nes_time_t );
243 243
244// Reads byte as cpu would when executing code. Only works for RAM/ROM, 244// Reads byte as cpu would when executing code. Only works for RAM/ROM,
245// NOT I/O like sound chips. 245// NOT I/O like sound chips.
246int read_code( struct Nsf_Emu* this, addr_t addr ) ICODE_ATTR; 246int read_code( struct Nsf_Emu* this, addr_t addr );
247 247
248static inline byte* fdsram( struct Nsf_Emu* this ) { return &this->high_ram [fdsram_offset]; } 248static inline byte* fdsram( struct Nsf_Emu* this ) { return &this->high_ram [fdsram_offset]; }
249static inline byte* sram( struct Nsf_Emu* this ) { return this->high_ram; } 249static inline byte* sram( struct Nsf_Emu* this ) { return this->high_ram; }