comparison ym2612.h @ 359:cc39629e8d06

YM2612 WIP snapshot before register refactor
author Mike Pavone <pavone@retrodev.com>
date Mon, 27 May 2013 09:54:58 -0700
parents a8ee7934a1f8
children b7c3facee762
comparison
equal deleted inserted replaced
358:9498cfa7f7c8 359:cc39629e8d06
3 3
4 #include <stdint.h> 4 #include <stdint.h>
5 5
6 #define NUM_SHARED_REGS (0x30-0x21) 6 #define NUM_SHARED_REGS (0x30-0x21)
7 #define NUM_PART_REGS (0xB7-0x30) 7 #define NUM_PART_REGS (0xB7-0x30)
8 #define NUM_OPERATORS (4*6)
8 9
9 typedef struct { 10 typedef struct {
10 uint32_t current_cycle; 11 uint32_t current_cycle;
11 uint32_t write_cycle; 12 uint32_t write_cycle;
12 uint8_t *selected_reg; 13 uint8_t *selected_reg;
14 uint32_t phase_inc[NUM_OPERATORS];
15 uint32_t phase_counter[NUM_OPERATORS];
16 uint16_t envelope[NUM_OPERATORS];
17 uint16_t op_out[NUM_OPERATORS];
18 uint16_t channel_out[6];
13 uint16_t timer_a; 19 uint16_t timer_a;
20 uint8_t env_phase[NUM_OPERATORS];
21 uint8_t keycode[NUM_OPERATORS];
14 uint8_t timer_b; 22 uint8_t timer_b;
15 uint8_t reg_num; 23 uint8_t reg_num;
16 uint8_t status; 24 uint8_t status;
17 uint8_t part1_regs[NUM_SHARED_REGS+NUM_PART_REGS]; 25 uint8_t part1_regs[NUM_SHARED_REGS+NUM_PART_REGS];
18 uint8_t part2_regs[NUM_PART_REGS]; 26 uint8_t part2_regs[NUM_PART_REGS];