abstract class Yuno::AbstractChip
- Yuno::AbstractChip
- Reference
- Object
Overview
Base class for all chip implementations.
Direct Known Subclasses
- Yuno::Chips::Ay8910
- Yuno::Chips::C140
- Yuno::Chips::C352
- Yuno::Chips::DMG
- Yuno::Chips::ES5503
- Yuno::Chips::GA20
- Yuno::Chips::HuC6280
- Yuno::Chips::K051649
- Yuno::Chips::K053260
- Yuno::Chips::K054539
- Yuno::Chips::MultiPCM
- Yuno::Chips::Nes
- Yuno::Chips::OKIMSM6258
- Yuno::Chips::OKIMSM6295
- Yuno::Chips::Pwm
- Yuno::Chips::QSound
- Yuno::Chips::Rf5c164
- Yuno::Chips::Saa1099
- Yuno::Chips::SegaPCM
- Yuno::Chips::SN76489
- Yuno::Chips::Upd7759
- Yuno::Chips::VsuVue
- Yuno::Chips::Wonderswan
- Yuno::Chips::X1_010
- Yuno::Chips::Y8950
- Yuno::Chips::YM2151
- Yuno::Chips::YM2203
- Yuno::Chips::YM2413
- Yuno::Chips::YM2608
- Yuno::Chips::YM2610
- Yuno::Chips::YM2612
- Yuno::Chips::YM3526
- Yuno::Chips::YM3812
- Yuno::Chips::YMF262
- Yuno::Chips::YMZ280B
Defined in:
yunosynth/abstract-chips.crConstructors
-
.new(chipNum : Int32, absChipCount : Int32, vgm : VgmFile, playbackSampleRate : UInt32, newSamplingMode : UInt8, newPlayerSampleRate : UInt32, *, emuCore : Symbol | Nil = nil, flags : ChipFlags | Nil = nil)
Creates a new instance of this chip.
Class Method Summary
-
.defaultEmuCore : Symbol
Returns a symbol representing the default emulation core that this chip is set up to use.
Instance Method Summary
-
#baseVolume : UInt16
Returns the base volume for this chip.
-
#emuCore : Symbol
Returns a symbol representing the emulation core that this chip is set up to use.
-
#getClock : UInt32
Gets the correct clock value for this chip using the given
VgmFile
. -
#getStartFlags(vgm : VgmFile) : ChipFlags | Nil
Gets a set of flags, if any, that are needed to call the
#start
method. -
#getVolModifier : UInt32
Gets a volume modification value for this chip.
-
#id : UInt32
A numeric ID that is used to identify the chip.
-
#name : String
Returns the human-readable name for this chip.
-
#playerSampleRate : UInt32
The sample rate of the VGM player that will use this chip.
-
#read(chipIndex : UInt8, offset : Int) : UInt8 | UInt16 | UInt32
Reads a value from the chip at the given memory offset.
-
#resamplerType : Resampler::ResamplerType
What kind of resampling should be used for this chip.
-
#resamplerType=(resamplerType : Resampler::ResamplerType)
What kind of resampling should be used for this chip.
-
#reset(chipIndex : UInt8) : Nil
Resets this chip to its initial state.
-
#sampleRate : UInt32
The sample rate for this chip.
-
#sampleRate=(sampleRate : UInt32)
The sample rate for this chip.
-
#setMuteMask(chipIndex : UInt8, mask : UInt32) : Nil
Sets the mute mask for this chip.
-
#setStereoMask(chipIndex : UInt8, mask : UInt32) : Nil
Sets the stereo mask for this chip.
-
#shortName : String
Returns a short version of the human-readable name for this chip.
-
#start(chipIndex : UInt8, clock : UInt32, flags : ChipFlags | Nil = nil) : UInt32
Starts this chip, setting the clock rate to the given value.
-
#type : ChipType
Returns the
ChipType
for this chip. -
#update(outputs : Array(Slice(Int32)), samples : Int) : Nil
Updates the chip's internal state, then writes the new audio data to
outputs
. -
#updatePaired(outputs : OutputBuffers, samples : UInt32) : Nil
Renders PCM data from the paired chip to
outputs
. -
#volume : UInt16
The output volume of the chip.
-
#volume=(volume : UInt16)
The output volume of the chip.
-
#write(chipIndex : UInt8, offset : Int, data : Int, port : UInt8 = 0) : Nil
Writes a value to the given memory offset for this chip.
-
#writeDac(port : Int, command : Int, data : Int) : Nil
Writes DAC commands to this chip.
Constructor Detail
Creates a new instance of this chip.
Class Method Detail
Returns a symbol representing the default emulation core that this chip is set up to use.
Instance Method Detail
Returns the base volume for this chip. This is the value used by
VgmFile#getChipVolume
to calculate the appropriate output volume for a
chip.
Returns a symbol representing the emulation core that this chip is set up to use.
Gets the correct clock value for this chip using the given VgmFile
.
Gets a set of flags, if any, that are needed to call the #start
method.
Gets a volume modification value for this chip. This is used because not all emulators output at the same level.
A numeric ID that is used to identify the chip. This is used internally by VGM files.
Reads a value from the chip at the given memory offset.
What kind of resampling should be used for this chip.
What kind of resampling should be used for this chip.
Sets the mute mask for this chip.
Sets the stereo mask for this chip. Not all chips may implement this.
Starts this chip, setting the clock rate to the given value. Not all
chips use the flags
parameter.
Updates the chip's internal state, then writes the new audio data to outputs
.
Renders PCM data from the paired chip to outputs
. samples
is the
number of samples to render.
Writes a value to the given memory offset for this chip. Not all chips
use the port
parameter.