Mercurial > repos > blastem
diff ym2612.h @ 364:62177cc39049
Incredibly broken YM2612 support plus a fix to Z80 bus request
author | Mike Pavone <pavone@retrodev.com> |
---|---|
date | Wed, 29 May 2013 00:57:19 -0700 |
parents | b7c3facee762 |
children | 0f8a759f1ff4 |
line wrap: on
line diff
--- a/ym2612.h Wed May 29 00:13:48 2013 -0700 +++ b/ym2612.h Wed May 29 00:57:19 2013 -0700 @@ -35,12 +35,21 @@ } 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 @@ 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);