openMSX
Classes | Typedefs | Enumerations | Functions | Variables
openmsx::YM2413Okazaki Namespace Reference

Classes

struct  ArAdjustTable
 
class  Channel
 
struct  Db2LinTab
 
struct  DphaseDRTable
 
class  Patch
 
struct  SinTable
 
class  Slot
 
struct  SlTable
 
struct  TllTable
 
class  YM2413
 

Typedefs

using EnvPhaseIndex = FixedPoint< EP_FP_BITS >
 

Enumerations

enum  EnvelopeState {
  ATTACK, DECAY, SUSHOLD, SUSTAIN,
  RELEASE, SETTLE, FINISH
}
 

Functions

constexpr SinTable makeSinTable ()
 

Variables

constexpr int PM_FP_BITS = 8
 
constexpr int DB_BITS = 8
 
constexpr int DB_MUTE = 1 << DB_BITS
 
constexpr int DBTABLEN = 3 * DB_MUTE
 
constexpr double DB_STEP = 48.0 / DB_MUTE
 
constexpr double EG_STEP = 0.375
 
constexpr double TL_STEP = 0.75
 
constexpr int PG_BITS = 9
 
constexpr int PG_WIDTH = 1 << PG_BITS
 
constexpr int PG_MASK = PG_WIDTH - 1
 
constexpr int DP_BITS = 18
 
constexpr int DP_BASE_BITS = DP_BITS - PG_BITS
 
constexpr int EG_BITS = 7
 
constexpr int DB2LIN_AMP_BITS = 8
 
constexpr int SLOT_AMP_BITS = DB2LIN_AMP_BITS
 
constexpr int AM_PG_BITS = 8
 
constexpr int AM_PG_WIDTH = 1 << AM_PG_BITS
 
constexpr int AM_DP_BITS = 16
 
constexpr int AM_DP_WIDTH = 1 << AM_DP_BITS
 
constexpr int AM_DP_MASK = AM_DP_WIDTH - 1
 
constexpr unsigned LFO_AM_TAB_ELEMENTS = 210
 
constexpr EnvPhaseIndex EG_DP_MAX = EnvPhaseIndex(1 << 7)
 
constexpr EnvPhaseIndex EG_DP_INF = EnvPhaseIndex(1 << 8)
 
constexpr signed char pmTable [8][8]
 
constexpr unsigned char lfo_am_table [LFO_AM_TAB_ELEMENTS]
 
constexpr byte mlTable [16]
 
constexpr Db2LinTab dB2Lin = makeDB2LinTable()
 
constexpr ArAdjustTable arAdjust = makeAdjustTable()
 
constexpr TllTable tll = makeTllTable()
 
constexpr SinTable sinTable = makeSinTable()
 
constexpr unsigned const *const waveform [2] = {sinTable.full, sinTable.half}
 
constexpr DphaseDRTable dphaseDR = makeDphaseDRTable()
 
constexpr SlTable sl = makeSusLevTable()
 
constexpr int EP_FP_BITS = 15
 

Typedef Documentation

◆ EnvPhaseIndex

Definition at line 14 of file YM2413Okazaki.hh.

Enumeration Type Documentation

◆ EnvelopeState

Enumerator
ATTACK 
DECAY 
SUSHOLD 
SUSTAIN 
RELEASE 
SETTLE 
FINISH 

Definition at line 16 of file YM2413Okazaki.hh.

Function Documentation

◆ makeSinTable()

constexpr SinTable openmsx::YM2413Okazaki::makeSinTable ( )

Variable Documentation

◆ AM_DP_BITS

constexpr int openmsx::YM2413Okazaki::AM_DP_BITS = 16

Definition at line 52 of file YM2413Okazaki.cc.

◆ AM_DP_MASK

constexpr int openmsx::YM2413Okazaki::AM_DP_MASK = AM_DP_WIDTH - 1

Definition at line 54 of file YM2413Okazaki.cc.

◆ AM_DP_WIDTH

constexpr int openmsx::YM2413Okazaki::AM_DP_WIDTH = 1 << AM_DP_BITS

Definition at line 53 of file YM2413Okazaki.cc.

◆ AM_PG_BITS

constexpr int openmsx::YM2413Okazaki::AM_PG_BITS = 8

Definition at line 50 of file YM2413Okazaki.cc.

◆ AM_PG_WIDTH

constexpr int openmsx::YM2413Okazaki::AM_PG_WIDTH = 1 << AM_PG_BITS

Definition at line 51 of file YM2413Okazaki.cc.

◆ arAdjust

constexpr ArAdjustTable openmsx::YM2413Okazaki::arAdjust = makeAdjustTable()

Definition at line 198 of file YM2413Okazaki.cc.

◆ dB2Lin

constexpr Db2LinTab openmsx::YM2413Okazaki::dB2Lin = makeDB2LinTable()

Definition at line 179 of file YM2413Okazaki.cc.

◆ DB2LIN_AMP_BITS

constexpr int openmsx::YM2413Okazaki::DB2LIN_AMP_BITS = 8

Definition at line 46 of file YM2413Okazaki.cc.

Referenced by openmsx::YM2413Okazaki::Slot::calc_slot_hat().

◆ DB_BITS

constexpr int openmsx::YM2413Okazaki::DB_BITS = 8

Definition at line 25 of file YM2413Okazaki.cc.

◆ DB_MUTE

constexpr int openmsx::YM2413Okazaki::DB_MUTE = 1 << DB_BITS

Definition at line 26 of file YM2413Okazaki.cc.

◆ DB_STEP

constexpr double openmsx::YM2413Okazaki::DB_STEP = 48.0 / DB_MUTE

Definition at line 29 of file YM2413Okazaki.cc.

◆ DBTABLEN

constexpr int openmsx::YM2413Okazaki::DBTABLEN = 3 * DB_MUTE

Definition at line 27 of file YM2413Okazaki.cc.

◆ DP_BASE_BITS

constexpr int openmsx::YM2413Okazaki::DP_BASE_BITS = DP_BITS - PG_BITS

Definition at line 40 of file YM2413Okazaki.cc.

Referenced by openmsx::YM2413Okazaki::Slot::calc_phase().

◆ DP_BITS

constexpr int openmsx::YM2413Okazaki::DP_BITS = 18

Definition at line 39 of file YM2413Okazaki.cc.

Referenced by openmsx::YM2413Okazaki::Slot::updatePG().

◆ dphaseDR

constexpr DphaseDRTable openmsx::YM2413Okazaki::dphaseDR = makeDphaseDRTable()

Definition at line 294 of file YM2413Okazaki.cc.

◆ EG_BITS

constexpr int openmsx::YM2413Okazaki::EG_BITS = 7

Definition at line 43 of file YM2413Okazaki.cc.

◆ EG_DP_INF

constexpr EnvPhaseIndex openmsx::YM2413Okazaki::EG_DP_INF = EnvPhaseIndex(1 << 8)

Definition at line 75 of file YM2413Okazaki.cc.

Referenced by openmsx::YM2413Okazaki::Slot::setEnvelopeState().

◆ EG_DP_MAX

constexpr EnvPhaseIndex openmsx::YM2413Okazaki::EG_DP_MAX = EnvPhaseIndex(1 << 7)

Definition at line 74 of file YM2413Okazaki.cc.

Referenced by openmsx::YM2413Okazaki::Slot::setEnvelopeState().

◆ EG_STEP

constexpr double openmsx::YM2413Okazaki::EG_STEP = 0.375

Definition at line 30 of file YM2413Okazaki.cc.

◆ EP_FP_BITS

constexpr int openmsx::YM2413Okazaki::EP_FP_BITS = 15

Definition at line 13 of file YM2413Okazaki.hh.

◆ LFO_AM_TAB_ELEMENTS

constexpr unsigned openmsx::YM2413Okazaki::LFO_AM_TAB_ELEMENTS = 210

Definition at line 71 of file YM2413Okazaki.cc.

◆ lfo_am_table

constexpr unsigned char openmsx::YM2413Okazaki::lfo_am_table[LFO_AM_TAB_ELEMENTS]

Definition at line 91 of file YM2413Okazaki.cc.

◆ mlTable

constexpr byte openmsx::YM2413Okazaki::mlTable[16]
Initial value:
= {
1, 1*2, 2*2, 3*2, 4*2, 5*2, 6*2, 7*2,
8*2, 9*2, 10*2, 10*2, 12*2, 12*2, 15*2, 15*2
}

Definition at line 147 of file YM2413Okazaki.cc.

◆ PG_BITS

constexpr int openmsx::YM2413Okazaki::PG_BITS = 9

Definition at line 34 of file YM2413Okazaki.cc.

◆ PG_MASK

constexpr int openmsx::YM2413Okazaki::PG_MASK = PG_WIDTH - 1

◆ PG_WIDTH

constexpr int openmsx::YM2413Okazaki::PG_WIDTH = 1 << PG_BITS

Definition at line 35 of file YM2413Okazaki.cc.

Referenced by makeSinTable().

◆ PM_FP_BITS

constexpr int openmsx::YM2413Okazaki::PM_FP_BITS = 8

Definition at line 22 of file YM2413Okazaki.cc.

◆ pmTable

constexpr signed char openmsx::YM2413Okazaki::pmTable[8][8]
Initial value:
=
{
{ 0, 0, 0, 0, 0, 0, 0, 0, },
{ 0, 0, 1, 0, 0, 0,-1, 0, },
{ 0, 1, 2, 1, 0,-1,-2,-1, },
{ 0, 1, 3, 1, 0,-1,-3,-1, },
{ 0, 2, 4, 2, 0,-2,-4,-2, },
{ 0, 2, 5, 2, 0,-2,-5,-2, },
{ 0, 3, 6, 3, 0,-3,-6,-3, },
{ 0, 3, 7, 3, 0,-3,-7,-3, },
}

Definition at line 78 of file YM2413Okazaki.cc.

◆ sinTable

constexpr SinTable openmsx::YM2413Okazaki::sinTable = makeSinTable()

Definition at line 268 of file YM2413Okazaki.cc.

Referenced by makeSinTable().

◆ sl

constexpr SlTable openmsx::YM2413Okazaki::sl = makeSusLevTable()

◆ SLOT_AMP_BITS

constexpr int openmsx::YM2413Okazaki::SLOT_AMP_BITS = DB2LIN_AMP_BITS

Definition at line 47 of file YM2413Okazaki.cc.

◆ TL_STEP

constexpr double openmsx::YM2413Okazaki::TL_STEP = 0.75

Definition at line 31 of file YM2413Okazaki.cc.

◆ tll

constexpr TllTable openmsx::YM2413Okazaki::tll = makeTllTable()

Definition at line 229 of file YM2413Okazaki.cc.

◆ waveform

constexpr unsigned const* const openmsx::YM2413Okazaki::waveform[2] = {sinTable.full, sinTable.half}