summaryrefslogtreecommitdiff
path: root/ym2612.h
diff options
context:
space:
mode:
authorMike Pavone <pavone@retrodev.com>2013-05-29 00:57:19 -0700
committerMike Pavone <pavone@retrodev.com>2013-05-29 00:57:19 -0700
commit54f3fab8efc17a607439cb61e82b1e640f36c99a (patch)
treea679ccd977607a939b0ecd734fc9ba5a5e7b3be4 /ym2612.h
parent1d5e794755a615e3627550f8068213e9a23b17e7 (diff)
Incredibly broken YM2612 support plus a fix to Z80 bus request
Diffstat (limited to 'ym2612.h')
-rw-r--r--ym2612.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/ym2612.h b/ym2612.h
index 272322f..a296659 100644
--- a/ym2612.h
+++ b/ym2612.h
@@ -35,12 +35,21 @@ typedef struct {
} ym_channel;
typedef struct {
+ int16_t *audio_buffer;
+ int16_t *back_buffer;
+ double buffer_fraction;
+ double buffer_inc;
+ uint32_t buffer_pos;
+ uint32_t sample_limit;
uint32_t current_cycle;
uint32_t write_cycle;
ym_operator operators[NUM_OPERATORS];
ym_channel channels[NUM_CHANNELS];
uint16_t timer_a;
uint16_t timer_a_load;
+ uint16_t env_counter;
+ uint8_t current_op;
+ uint8_t current_env_op;
uint8_t timer_b;
uint8_t timer_b_load;
uint8_t timer_control;
@@ -50,7 +59,7 @@ typedef struct {
uint8_t selected_part;
} ym2612_context;
-void ym_init(ym2612_context * context);
+void ym_init(ym2612_context * context, uint32_t sample_rate, uint32_t clock_rate, uint32_t sample_limit);
void ym_run(ym2612_context * context, uint32_t to_cycle);
void ym_address_write_part1(ym2612_context * context, uint8_t address);
void ym_address_write_part2(ym2612_context * context, uint8_t address);