class GBA::Channel1
- GBA::Channel1
- GBA::VolumeEnvelopeChannel
- GBA::SoundChannel
- Reference
- Object
Defined in:
crab/gba/apu/channel1.crConstant Summary
-
RANGE =
96..103
-
WAVE_DUTY =
Slice[[-8, -8, -8, -8, -8, -8, -8, +8], [+8, -8, -8, -8, -8, -8, -8, +8], [+8, -8, -8, -8, -8, +8, +8, +8], [-8, +8, +8, +8, +8, +8, +8, -8]]
Instance Method Summary
-
#===(other) : Bool
Used so that channels can be matched with case..when statements
- #[](address : UInt32) : UInt8
- #[]=(address : UInt32, value : UInt8) : Nil
-
#frequency_calculation : UInt16
Calculate the new shadow frequency, disable channel if overflow 11 bits https://gist.github.com/drhelius/3652407#file-game-boy-sound-operation-L243-L250
-
#frequency_timer : UInt32
Calculate the frequency timer
-
#get_amplitude : Int16
Outputs a value -0x80..0x80
- #schedule_reload(frequency_timer : UInt32) : Nil
-
#step_wave_generation : Nil
Called when @period reaches 0
- #sweep_step : Nil
Instance methods inherited from class GBA::VolumeEnvelopeChannel
init_volume_envelope : Nil
init_volume_envelope,
read_NRx2 : UInt8
read_NRx2,
volume_step : Nil
volume_step,
write_NRx2(value : UInt8) : Nil
write_NRx2
Instance methods inherited from class GBA::SoundChannel
===(other)
===,
[](address : UInt32) : UInt8
[],
[]=(address : UInt32, value : UInt8) : Nil
[]=,
enabled : Bool
enabled,
enabled=(enabled : Bool)
enabled=,
frequency_timer : UInt32
frequency_timer,
get_amplitude : Int16
get_amplitude,
length_counter : Int32
length_counter,
length_counter=(length_counter : Int32)
length_counter=,
length_step : Nil
length_step,
schedule_reload(frequency_timer : UInt32) : Nil
schedule_reload,
step : Nil
step,
step_wave_generation : Nil
step_wave_generation
Constructor methods inherited from class GBA::SoundChannel
new(gba : GBA)
new
Instance Method Detail
def ===(other) : Bool
#
Description copied from class GBA::SoundChannel
Used so that channels can be matched with case..when statements
def frequency_calculation : UInt16
#
Calculate the new shadow frequency, disable channel if overflow 11 bits https://gist.github.com/drhelius/3652407#file-game-boy-sound-operation-L243-L250
def frequency_timer : UInt32
#
Description copied from class GBA::SoundChannel
Calculate the frequency timer
def step_wave_generation : Nil
#
Description copied from class GBA::SoundChannel
Called when @period reaches 0