LMMS
Loading...
Searching...
No Matches
Spc_Cpu.cpp File Reference
#include "Snes_Spc.h"
#include <string.h>
#include "blargg_source.h"
#include "Spc_Cpu.h"

Macros

#define RAM   (m.ram.ram)
#define REGS   (m.smp_regs [0])
#define REGS_IN   (m.smp_regs [1])
#define IF_0_THEN_256(n)
#define SPC_MORE_ACCURACY   0
#define TIMER_DIV(t, n)
#define TIMER_MUL(t, n)
#define RUN_DSP(time, offset)
#define MEM_ACCESS(time, addr)
#define SPC_CPU_RUN_FUNC
#define SPC_CPU_RUN_FUNC_END

Variables

int const max_reg_time = 29
int const no_read_before_write = 0x2000
int const cpu_lag_max = 12 - 1

Macro Definition Documentation

◆ IF_0_THEN_256

#define IF_0_THEN_256 ( n)
Value:
((uint8_t) ((n) - 1) + 1)
unsigned char uint8_t
Definition mid.cpp:98
int n
Definition crypt.c:458

◆ MEM_ACCESS

#define MEM_ACCESS ( time,
addr )
Value:
check( !check_echo_access( (uint16_t) addr ) );
#define check(expr)
Definition blargg_source.h:32
unsigned short uint16_t
Definition mid.cpp:99

◆ RAM

#define RAM   (m.ram.ram)

◆ REGS

#define REGS   (m.smp_regs [0])

◆ REGS_IN

#define REGS_IN   (m.smp_regs [1])

◆ RUN_DSP

#define RUN_DSP ( time,
offset )
Value:
int count = (time) - (offset) - m.dsp_time;\
if ( count >= 0 )\
{\
int clock_count = (count & ~(clocks_per_sample - 1)) + clocks_per_sample;\
m.dsp_time += clock_count;\
dsp.run( clock_count );\
}
unsigned * m
Definition inflate.c:1559
Definition audio_fx.h:36
_WDL_CSTRING_PREFIX void INT_PTR count
Definition wdlcstring.h:263

◆ SPC_CPU_RUN_FUNC

#define SPC_CPU_RUN_FUNC
Value:
uint8_t* Snes_Spc::run_until_( time_t end_time )\
{\
rel_time_t rel_time = m.spc_time - end_time;\
assert( rel_time <= 0 );\
m.spc_time = end_time;\
m.dsp_time += rel_time;\
m.timers [0].next_time += rel_time;\
m.timers [1].next_time += rel_time;\
m.timers [2].next_time += rel_time;
uint8_t * run_until_(time_t end_time)

◆ SPC_CPU_RUN_FUNC_END

#define SPC_CPU_RUN_FUNC_END
Value:
m.spc_time += rel_time;\
m.dsp_time -= rel_time;\
m.timers [0].next_time -= rel_time;\
m.timers [1].next_time -= rel_time;\
m.timers [2].next_time -= rel_time;\
assert( m.spc_time <= end_time );\
return &REGS [r_cpuio0];\
}
#define REGS
Definition Snes_Spc.cpp:23

◆ SPC_MORE_ACCURACY

#define SPC_MORE_ACCURACY   0

◆ TIMER_DIV

#define TIMER_DIV ( t,
n )
Value:
((n) / t->prescaler)
struct huft * t
Definition inflate.c:943

◆ TIMER_MUL

#define TIMER_MUL ( t,
n )
Value:
((n) * t->prescaler)

Variable Documentation

◆ cpu_lag_max

int const cpu_lag_max = 12 - 1

◆ max_reg_time

int const max_reg_time = 29

◆ no_read_before_write

int const no_read_before_write = 0x2000