From c1597a8f0a63adbf7018a05a35d0c77d7bccd0c3 Mon Sep 17 00:00:00 2001 From: Michael Pavone Date: Sun, 24 Mar 2019 19:59:41 -0700 Subject: Optionally emulate the offset around zero in the imperfect DAC of a discrete YM2612 --- ym2612.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'ym2612.h') diff --git a/ym2612.h b/ym2612.h index 2781c94..1f34558 100644 --- a/ym2612.h +++ b/ym2612.h @@ -70,9 +70,11 @@ typedef struct { //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 @@ enum { 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); -- cgit v1.2.3