LMMS
Loading...
Searching...
No Matches
Hes_Emu Class Reference

#include <Hes_Emu.h>

Inheritance diagram for Hes_Emu:
Hes_Cpu Classic_Emu Music_Emu Gme_File

Classes

struct  header_t

Public Types

enum  { header_size = 0x20 }
Public Types inherited from Music_Emu
typedef short sample_t
typedef gme_equalizer_t equalizer_t
Public Types inherited from Gme_File
enum  { max_field_ = 255 }

Public Member Functions

header_t constheader () const
 Hes_Emu ()
 ~Hes_Emu ()
Public Member Functions inherited from Classic_Emu
 Classic_Emu ()
 ~Classic_Emu ()
void set_buffer (Multi_Buffer *)
blargg_err_t set_multi_channel (bool is_enabled) override
Public Member Functions inherited from Music_Emu
blargg_err_t set_sample_rate (long sample_rate)
blargg_err_t start_track (int)
blargg_err_t play (long count, sample_t *buf)
long sample_rate () const
int current_track () const
int voice_count () const
const char ** voice_names () const
bool multi_channel () const
long tell () const
long tell_samples () const
blargg_err_t seek (long msec)
blargg_err_t seek_samples (long n)
blargg_err_t skip (long n)
bool track_ended () const
void set_fade (long start_msec, long length_msec=8000)
void ignore_silence (bool disable=true)
blargg_err_t track_info (track_info_t *out) const
void set_tempo (double)
void mute_voice (int index, bool mute=true)
void mute_voices (int mask)
void set_gain (double)
void enable_accuracy (bool enable=true)
equalizer_t constequalizer () const
void set_equalizer (equalizer_t const &)
 Music_Emu ()
 ~Music_Emu ()
blargg_err_t track_info (track_info_t *out, int track) const
Public Member Functions inherited from Gme_File
blargg_err_t load_file (const char *path)
blargg_err_t load (Data_Reader &)
blargg_err_t load_mem (void const *data, long size)
blargg_err_t load_m3u (const char *path)
blargg_err_t load_m3u (Data_Reader &in)
void clear_playlist ()
gme_type_t type () const
const char * warning ()
int track_count () const
blargg_err_t track_info (track_info_t *out, int track) const
void set_user_data (void *p)
voiduser_data () const
void set_user_cleanup (gme_user_cleanup_t func)
int error_count () const
 Gme_File ()
virtual ~Gme_File ()
blargg_err_t remap_track_ (int *track_io) const

Static Public Member Functions

static gme_type_t static_type ()
Static Public Member Functions inherited from Music_Emu
static const equalizer_t make_equalizer (double treble, double bass)
Static Public Member Functions inherited from Gme_File
static void copy_field_ (char *out, const char *in)
static void copy_field_ (char *out, const char *in, int len)

Protected Member Functions

blargg_err_t track_info_ (track_info_t *, int track) const
blargg_err_t load_ (Data_Reader &)
blargg_err_t start_track_ (int)
blargg_err_t run_clocks (blip_time_t &, int)
void set_tempo_ (double)
void set_voice (int, Blip_Buffer *, Blip_Buffer *, Blip_Buffer *)
void update_eq (blip_eq_t const &)
void unload ()
Protected Member Functions inherited from Classic_Emu
void set_voice_types (int const *t)
blargg_err_t setup_buffer (long clock_rate)
long clock_rate () const
void change_clock_rate (long)
blargg_err_t set_sample_rate_ (long sample_rate)
void mute_voices_ (int)
void set_equalizer_ (equalizer_t const &)
blargg_err_t play_ (long, sample_t *)
Protected Member Functions inherited from Music_Emu
void set_max_initial_silence (int n)
void set_silence_lookahead (int n)
void set_voice_count (int n)
void set_voice_names (const char *const *names)
void set_track_ended ()
double gain () const
double tempo () const
void remute_voices ()
blargg_err_t set_multi_channel_ (bool is_enabled)
virtual void enable_accuracy_ (bool)
virtual blargg_err_t skip_ (long count)
virtual void pre_load ()
virtual void post_load_ ()
Protected Member Functions inherited from Gme_File
void set_track_count (int n)
void set_warning (const char *s)
void set_type (gme_type_t t)
blargg_err_t load_remaining_ (void const *header, long header_size, Data_Reader &remaining)
virtual blargg_err_t load_mem_ (byte const *data, long size)
virtual void clear_playlist_ ()

Private Types

typedef Hes_Cpu cpu
Private Types inherited from Hes_Cpu
enum  { page_size = 0x2000 }
enum  { page_shift = 13 }
enum  { page_count = 8 }
enum  { idle_addr = 0x1FFF }
enum  { cpu_padding = 8 }
enum  { irq_inhibit = 0x04 }

Private Member Functions

int cpu_read_ (hes_addr_t)
int cpu_read (hes_addr_t)
void cpu_write_ (hes_addr_t, int data)
void cpu_write (hes_addr_t, int)
void cpu_write_vdp (int addr, int data)
byte constcpu_set_mmr (int page, int bank)
int cpu_done ()
void recalc_timer_load ()
void irq_changed ()
void run_until (hes_time_t)
Private Member Functions inherited from Hes_Cpu
void reset ()
void set_mmr (int reg, int bank)
uint8_t constget_code (hes_addr_t)
bool run (hes_time_t end_time)
hes_time_t time () const
void set_time (hes_time_t t)
void adjust_time (int delta)
hes_time_t irq_time () const
void set_irq_time (hes_time_t)
hes_time_t end_time () const
void set_end_time (hes_time_t)
void end_frame (hes_time_t)
 Hes_Cpu ()

Private Attributes

bytewrite_pages [page_count+1]
Rom_Data< page_sizerom
header_t header_
hes_time_t play_period
hes_time_t last_frame_hook
int timer_base
struct { 
   hes_time_t   last_time 
   blargg_long   count 
   blargg_long   load 
   int   raw_load 
   byte   enabled 
   byte   fired 
timer
struct { 
   hes_time_t   next_vbl 
   byte   latch 
   byte   control 
vdp
struct { 
   hes_time_t   timer 
   hes_time_t   vdp 
   byte   disables 
irq
Hes_Apu apu
byte sgx [3 *page_size+cpu_padding]
Private Attributes inherited from Hes_Cpu
uint8_t ram [page_size]
registers_t r
uint8_t mmr [page_count+1]

Friends

class Hes_Cpu

Additional Inherited Members

Public Attributes inherited from Gme_File
BLARGG_DISABLE_NOTHROW typedef uint8_t byte
Static Public Attributes inherited from Music_Emu
static equalizer_t const tv_eq
Protected Types inherited from Classic_Emu
enum  { wave_type = 0x100 , noise_type = 0x200 , mixed_type = wave_type | noise_type }

Member Typedef Documentation

◆ cpu

typedef Hes_Cpu Hes_Emu::cpu
private

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
header_size 

Constructor & Destructor Documentation

◆ Hes_Emu()

Hes_Emu::Hes_Emu ( )

◆ ~Hes_Emu()

Hes_Emu::~Hes_Emu ( )

Member Function Documentation

◆ cpu_done()

int Hes_Emu::cpu_done ( )
private

◆ cpu_read()

int Hes_Emu::cpu_read ( hes_addr_t addr)
private

◆ cpu_read_()

int Hes_Emu::cpu_read_ ( hes_addr_t addr)
private

◆ cpu_set_mmr()

byte const * Hes_Emu::cpu_set_mmr ( int page,
int bank )
inlineprivate

◆ cpu_write()

void Hes_Emu::cpu_write ( hes_addr_t addr,
int data )
private

◆ cpu_write_()

void Hes_Emu::cpu_write_ ( hes_addr_t addr,
int data )
private

◆ cpu_write_vdp()

void Hes_Emu::cpu_write_vdp ( int addr,
int data )
private

◆ header()

header_t const & Hes_Emu::header ( ) const
inline

◆ irq_changed()

void Hes_Emu::irq_changed ( )
private

◆ load_()

blargg_err_t Hes_Emu::load_ ( Data_Reader & in)
protectedvirtual

Reimplemented from Gme_File.

◆ recalc_timer_load()

void Hes_Emu::recalc_timer_load ( )
private

◆ run_clocks()

blargg_err_t Hes_Emu::run_clocks ( blip_time_t & duration_,
int  )
protectedvirtual

Implements Classic_Emu.

◆ run_until()

void Hes_Emu::run_until ( hes_time_t present)
private

◆ set_tempo_()

void Hes_Emu::set_tempo_ ( double t)
protectedvirtual

Implements Music_Emu.

◆ set_voice()

void Hes_Emu::set_voice ( int i,
Blip_Buffer * center,
Blip_Buffer * left,
Blip_Buffer * right )
protectedvirtual

Implements Classic_Emu.

◆ start_track_()

blargg_err_t Hes_Emu::start_track_ ( int track)
protectedvirtual

Implements Classic_Emu.

◆ static_type()

gme_type_t Hes_Emu::static_type ( )
inlinestatic

◆ track_info_()

blargg_err_t Hes_Emu::track_info_ ( track_info_t * out,
int track ) const
protectedvirtual

Implements Gme_File.

◆ unload()

void Hes_Emu::unload ( )
protectedvirtual

Reimplemented from Music_Emu.

◆ update_eq()

void Hes_Emu::update_eq ( blip_eq_t const & eq)
protectedvirtual

Implements Classic_Emu.

◆ Hes_Cpu

friend class Hes_Cpu
friend

Member Data Documentation

◆ apu

Hes_Apu Hes_Emu::apu
private

◆ control

byte Hes_Emu::control

◆ count

blargg_long Hes_Emu::count

◆ disables

byte Hes_Emu::disables

◆ enabled

byte Hes_Emu::enabled

◆ fired

byte Hes_Emu::fired

◆ header_

header_t Hes_Emu::header_
private

◆ [struct]

struct { ... } Hes_Emu::irq

◆ last_frame_hook

hes_time_t Hes_Emu::last_frame_hook
private

◆ last_time

hes_time_t Hes_Emu::last_time

◆ latch

byte Hes_Emu::latch

◆ load

blargg_long Hes_Emu::load

◆ next_vbl

hes_time_t Hes_Emu::next_vbl

◆ play_period

hes_time_t Hes_Emu::play_period
private

◆ raw_load

int Hes_Emu::raw_load

◆ rom

Rom_Data<page_size> Hes_Emu::rom
private

◆ sgx

byte Hes_Emu::sgx[3 *page_size+cpu_padding]
private

◆ timer [1/2]

hes_time_t Hes_Emu::timer

◆ [struct] [2/2]

struct { ... } Hes_Emu::timer

◆ timer_base

int Hes_Emu::timer_base
private

◆ vdp [1/2]

hes_time_t Hes_Emu::vdp

◆ [struct] [2/2]

struct { ... } Hes_Emu::vdp

◆ write_pages

byte* Hes_Emu::write_pages[page_count+1]
private

The documentation for this class was generated from the following files: