Mercurial > repos > blastem
diff ym2612.h @ 1798:5278b6e44fc1
Optionally emulate the offset around zero in the imperfect DAC of a discrete YM2612
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Sun, 24 Mar 2019 19:59:41 -0700 |
parents | 804f13c090b4 |
children | ce6881d64eef |
line wrap: on
line diff
--- a/ym2612.h Sun Mar 24 13:31:22 2019 -0700 +++ b/ym2612.h Sun Mar 24 19:59:41 2019 -0700 @@ -70,9 +70,11 @@ //TODO: Condense the next two fields into one uint32_t write_cycle; uint32_t busy_cycles; - uint32_t lowpass_alpha; + int32_t volume_mult; + int32_t volume_div; ym_operator operators[NUM_OPERATORS]; ym_channel channels[NUM_CHANNELS]; + int16_t zero_offset; uint16_t timer_a; uint16_t timer_a_load; uint16_t env_counter; @@ -128,6 +130,7 @@ void ym_init(ym2612_context * context, uint32_t master_clock, uint32_t clock_div, uint32_t options); void ym_reset(ym2612_context *context); void ym_free(ym2612_context *context); +void ym_enable_zero_offset(ym2612_context *context, uint8_t enabled); void ym_adjust_master_clock(ym2612_context * context, uint32_t master_clock); void ym_run(ym2612_context * context, uint32_t to_cycle); void ym_address_write_part1(ym2612_context * context, uint8_t address);