openMSX
Namespaces | Variables
YM2151.cc File Reference
#include "YM2151.hh"
#include "DeviceConfig.hh"
#include "Math.hh"
#include "cstd.hh"
#include "ranges.hh"
#include "serialize.hh"
#include <cmath>
#include <cstring>
Include dependency graph for YM2151.cc:

Go to the source code of this file.

Namespaces

 openmsx
 Thanks to enen for testing this on a real cartridge:
 

Variables

constexpr int openmsx::FREQ_SH = 16
 
constexpr int openmsx::FREQ_MASK = (1 << FREQ_SH) - 1
 
constexpr int openmsx::ENV_BITS = 10
 
constexpr int openmsx::ENV_LEN = 1 << ENV_BITS
 
constexpr float openmsx::ENV_STEP = 128.0f / ENV_LEN
 
constexpr int openmsx::MAX_ATT_INDEX = ENV_LEN - 1
 
constexpr int openmsx::MIN_ATT_INDEX = 0
 
constexpr unsigned openmsx::EG_ATT = 4
 
constexpr unsigned openmsx::EG_DEC = 3
 
constexpr unsigned openmsx::EG_SUS = 2
 
constexpr unsigned openmsx::EG_REL = 1
 
constexpr unsigned openmsx::EG_OFF = 0
 
constexpr int openmsx::SIN_BITS = 10
 
constexpr int openmsx::SIN_LEN = 1 << SIN_BITS
 
constexpr int openmsx::SIN_MASK = SIN_LEN - 1
 
constexpr int openmsx::TL_RES_LEN = 256
 
constexpr unsigned openmsx::TL_TAB_LEN = 13 * 2 * TL_RES_LEN
 
constexpr unsigned openmsx::ENV_QUIET = TL_TAB_LEN >> 3
 
constexpr unsigned openmsx::RATE_STEPS = 8
 
constexpr byte openmsx::eg_inc [19 *RATE_STEPS]
 
constexpr byte openmsx::eg_rate_select [32+64+32]
 
constexpr byte openmsx::eg_rate_shift [32+64+32]
 
constexpr unsigned openmsx::dt2_tab [4] = { 0, 384, 500, 608 }
 
constexpr byte openmsx::dt1_tab [4 *32]
 
constexpr word openmsx::phaseinc_rom [768]
 
constexpr byte openmsx::lfo_noise_waveform [256]
 
 openmsx::YM2151