class Yuno::Chips::YM2612

Overview

YM2612 sound chip emulator.

Defined in:

yunosynth/chips/chip-ym2612.cr
yunosynth/chips/emu-opn-mame/ym2612-mame.cr

Constant Summary

CHIP_ID = 2_u32

Constructors

Class Method Summary

Instance Method Summary

Instance methods inherited from class Yuno::AbstractChip

baseVolume : UInt16 baseVolume, emuCore : Symbol emuCore, getClock : UInt32 getClock, getStartFlags(vgm : VgmFile) : ChipFlags | Nil getStartFlags, getVolModifier : UInt32 getVolModifier, id : UInt32 id, name : String name, playerSampleRate : UInt32 playerSampleRate, read(chipIndex : UInt8, offset : Int) : UInt8 | UInt16 | UInt32 read, resamplerType : Resampler::ResamplerType resamplerType, resamplerType=(resamplerType : Resampler::ResamplerType) resamplerType=, reset(chipIndex : UInt8) : Nil reset, sampleRate : UInt32 sampleRate, sampleRate=(sampleRate : UInt32) sampleRate=, setMuteMask(chipIndex : UInt8, mask : UInt32) : Nil setMuteMask, setStereoMask(chipIndex : UInt8, mask : UInt32) : Nil setStereoMask, shortName : String shortName, start(chipIndex : UInt8, clock : UInt32, flags : ChipFlags | Nil = nil) : UInt32 start, type : ChipType type, update(outputs : Array(Slice(Int32)), samples : Int) : Nil update, updatePaired(outputs : OutputBuffers, samples : UInt32) : Nil updatePaired, volume : UInt16 volume, volume=(volume : UInt16) volume=, write(chipIndex : UInt8, offset : Int, data : Int, port : UInt8 = 0) : Nil write, writeDac(port : Int, command : Int, data : Int) : Nil writeDac

Constructor methods inherited from class Yuno::AbstractChip

new(chipNum : Int32, absChipCount : Int32, vgm : VgmFile, playbackSampleRate : UInt32, newSamplingMode : UInt8, newPlayerSampleRate : UInt32, *, emuCore : Symbol | Nil = nil, flags : ChipFlags | Nil = nil) new

Class methods inherited from class Yuno::AbstractChip

defaultEmuCore : Symbol defaultEmuCore

Constructor Detail

def self.new(chipNum : Int32, absChipCount : Int32, vgm : VgmFile, playbackSampleRate : UInt32, newSamplingMode : UInt8, newPlayerSampleRate : UInt32, *, emuCore : Symbol | Nil = nil, flags : ChipFlags | Nil = nil) #

[View source]

Class Method Detail

def self.defaultEmuCore : Symbol #

[View source]

Instance Method Detail

def baseVolume : UInt16 #
Description copied from class Yuno::AbstractChip

Returns the base volume for this chip. This is the value used by VgmFile#getChipVolume to calculate the appropriate output volume for a chip.


[View source]
def chip : AbstractEmulator #

The internal interface for the chip.


[View source]
def controlPortAWrite(chipIndex : UInt8, offset : Int, data : Int) : Nil #

[View source]
def controlPortBWrite(chipIndex : UInt8, offset : Int, data : Int) : Nil #

[View source]
def dataPortAWrite(chipIndex : UInt8, offset : Int, data : Int) : Nil #

[View source]
def dataPortBWrite(chipIndex : UInt8, offset : Int, data : Int) : Nil #

[View source]
def emuCore : Symbol #
Description copied from class Yuno::AbstractChip

Returns a symbol representing the emulation core that this chip is set up to use.


[View source]
def getClock : UInt32 #
Description copied from class Yuno::AbstractChip

Gets the correct clock value for this chip using the given VgmFile.


[View source]
def getStartFlags(vgm : VgmFile) : ChipFlags | Nil #
Description copied from class Yuno::AbstractChip

Gets a set of flags, if any, that are needed to call the #start method.


[View source]
def getVolModifier : UInt32 #
Description copied from class Yuno::AbstractChip

Gets a volume modification value for this chip. This is used because not all emulators output at the same level.


[View source]
def id : UInt32 #
Description copied from class Yuno::AbstractChip

A numeric ID that is used to identify the chip. This is used internally by VGM files.


[View source]
def isVgmInit=(value : Bool) : Nil #

Used as a workaround for some VGMs (e.g. YM2612 files trimmed with VGMTool). When this is set to true, then the internal emulator behaves slightly differently. This is meant to be used only during initialization, such as in Yuno::VgmPlayer#play.


[View source]
def name : String #
Description copied from class Yuno::AbstractChip

Returns the human-readable name for this chip.


[View source]
def read(chipIndex : UInt8, offset : Int) : UInt8 | UInt16 | UInt32 #
Description copied from class Yuno::AbstractChip

Reads a value from the chip at the given memory offset.


[View source]
def reset(chipIndex : UInt8) : Nil #
Description copied from class Yuno::AbstractChip

Resets this chip to its initial state.


[View source]
def setMuteMask(chipIndex : UInt8, mask : UInt32, maskAY : UInt32) : Nil #

[View source]
def setMuteMask(chipIndex : UInt8, mask : UInt32) : Nil #
Description copied from class Yuno::AbstractChip

Sets the mute mask for this chip.


[View source]
def shortName : String #
Description copied from class Yuno::AbstractChip

Returns a short version of the human-readable name for this chip.


[View source]
def start(chipIndex : UInt8, clock : UInt32, flags : ChipFlags | Nil = nil) : UInt32 #
Description copied from class Yuno::AbstractChip

Starts this chip, setting the clock rate to the given value. Not all chips use the flags parameter.


[View source]
def statusPortARead(chipIndex : UInt8, offset : Int) : UInt8 #

[View source]
def statusPortBRead(chipIndex : UInt8, offset : Int) : UInt8 #

[View source]
def type : ChipType #
Description copied from class Yuno::AbstractChip

Returns the ChipType for this chip.


[View source]
def update(outputs : OutputBuffers, samples : Int) : Nil #
Description copied from class Yuno::AbstractChip

Updates the chip's internal state, then writes the new audio data to outputs.


[View source]
def updateRequest : Nil #

[View source]
def write(chipIndex : UInt8, offset : Int, data : Int, port : UInt8 = 0) : Nil #
Description copied from class Yuno::AbstractChip

Writes a value to the given memory offset for this chip. Not all chips use the port parameter.


[View source]
def writeDac(port : Int, command : Int, data : Int) : Nil #
Description copied from class Yuno::AbstractChip

Writes DAC commands to this chip.


[View source]