class APU

Defined in:

cryboy/apu.cr

Constant Summary

BUFFER_SIZE = 1024
CHANNELS = 2
FRAME_SEQUENCER_PERIOD = CPU::CLOCK_SPEED // FRAME_SEQUENCER_RATE
FRAME_SEQUENCER_RATE = 512
SAMPLE_PERIOD = CPU::CLOCK_SPEED // SAMPLE_RATE
SAMPLE_RATE = 65536

Constructors

Instance Method Summary

Constructor Detail

def self.new(gb : Motherboard, headless : Bool, sync : Bool) #

[View source]

Instance Method Detail

def [](index : Int) : UInt8 #

read from apu memory


[View source]
def []=(index : Int, value : UInt8) : Nil #

write to apu memory


[View source]
def first_half_of_length_period : Bool #

[View source]
def get_sample : Nil #

[View source]
def sync=(sync : Bool) #

[View source]
def tick_frame_sequencer : Nil #

[View source]