class Yuno::Chips::Ay8910

Overview

Ay8910 sound chip emulator.

Defined in:

yunosynth/chips/ay8910-emu2149.cr
yunosynth/chips/ay8910.cr

Constant Summary

CHIP_ID = 18_u32
YM2149_PIN26_HIGH = 0_u8
YM2149_PIN26_LOW = 16_u8

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, toChipTable : ChipTable toChipTable, type : ChipType type, update(chipIndex : UInt8, outputs : Array(Slice(Int32)), samples : Int) : Nil update, updatePaired(chipIndex : UInt8, 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(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(vgm : VgmFile, playbackSampleRate : UInt32, newSamplingMode : UInt8, newPlayerSampleRate : UInt32, *, emuCore : Symbol | Nil = nil, flags : ChipFlags | Nil = nil) #

Class Method Detail

def self.defaultEmuCore : Symbol #

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.


def chip : AbstractEmulator #

The internal interface for the chip.


def clock=(clock : UInt32) : Nil #

def emuCore : Symbol #
Description copied from class Yuno::AbstractChip

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


def getClock : UInt32 #
Description copied from class Yuno::AbstractChip

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


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.


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.


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.


def name : String #
Description copied from class Yuno::AbstractChip

Returns the human-readable name for this chip.


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.


def readIO : UInt8 #

def reset(chipIndex : UInt8) : Nil #
Description copied from class Yuno::AbstractChip

Resets this chip to its initial state.


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

Sets the mute mask for this chip.


def setStereoMask(chipIndex : UInt8, mask : UInt32) : Nil #

Sets the stereo mask for this chip.


def shortName : String #
Description copied from class Yuno::AbstractChip

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


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.


def startYm(clock : UInt32, rate : UInt32, flags : Ay8910Flags | Nil) : UInt32 #

def type : ChipType #
Description copied from class Yuno::AbstractChip

Returns the ChipType for this chip.


def update(chipIndex : UInt8, 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.


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.


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

Writes DAC commands to this chip.


def writeIO(offset : Int, data : Int) : Nil #