Mercurial > repos > blastem
comparison ym2612.h @ 288:a8ee7934a1f8
Add a YM2612 stub implementation with just timers and status registers so that games that depend on it can run.
author | Mike Pavone <pavone@retrodev.com> |
---|---|
date | Sun, 05 May 2013 22:56:42 -0700 |
parents | |
children | cc39629e8d06 |
comparison
equal
deleted
inserted
replaced
287:fb840e0a48cd | 288:a8ee7934a1f8 |
---|---|
1 #ifndef YM2612_H_ | |
2 #define YM2612_H_ | |
3 | |
4 #include <stdint.h> | |
5 | |
6 #define NUM_SHARED_REGS (0x30-0x21) | |
7 #define NUM_PART_REGS (0xB7-0x30) | |
8 | |
9 typedef struct { | |
10 uint32_t current_cycle; | |
11 uint32_t write_cycle; | |
12 uint8_t *selected_reg; | |
13 uint16_t timer_a; | |
14 uint8_t timer_b; | |
15 uint8_t reg_num; | |
16 uint8_t status; | |
17 uint8_t part1_regs[NUM_SHARED_REGS+NUM_PART_REGS]; | |
18 uint8_t part2_regs[NUM_PART_REGS]; | |
19 } ym2612_context; | |
20 | |
21 void ym_init(ym2612_context * context); | |
22 void ym_run(ym2612_context * context, uint32_t to_cycle); | |
23 void ym_address_write_part1(ym2612_context * context, uint8_t address); | |
24 void ym_address_write_part2(ym2612_context * context, uint8_t address); | |
25 void ym_data_write(ym2612_context * context, uint8_t value); | |
26 uint8_t ym_read_status(ym2612_context * context); | |
27 | |
28 #endif //YM2612_H_ | |
29 |