summaryrefslogtreecommitdiff
path: root/ym2612.h
diff options
context:
space:
mode:
authorMichael Pavone <pavone@retrodev.com>2019-03-24 19:59:41 -0700
committerMichael Pavone <pavone@retrodev.com>2019-03-24 19:59:41 -0700
commitc1597a8f0a63adbf7018a05a35d0c77d7bccd0c3 (patch)
tree6a69339c03f4eac70575b246b9e68083190cbd15 /ym2612.h
parenta4a8b07d31dbeb9780352e332a5a4451866550c5 (diff)
Optionally emulate the offset around zero in the imperfect DAC of a discrete YM2612
Diffstat (limited to 'ym2612.h')
-rw-r--r--ym2612.h5
1 files changed, 4 insertions, 1 deletions
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);