Mercurial > repos > blastem
comparison rf5c164.h @ 2082:485834c0fea7
Forgot to add PCM source files
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Thu, 03 Feb 2022 23:41:40 -0800 |
parents | |
children | 62a53c052d9b |
comparison
equal
deleted
inserted
replaced
2081:cfd53c94fffb | 2082:485834c0fea7 |
---|---|
1 #ifndef RF5C164_H_ | |
2 #define RF5C164_H_ | |
3 #include <stdint.h> | |
4 #include "render_audio.h" | |
5 | |
6 typedef struct { | |
7 uint32_t cur_ptr; | |
8 uint8_t regs[7]; | |
9 uint8_t sample; | |
10 uint8_t state; | |
11 } rf5c164_channel; | |
12 | |
13 typedef struct { | |
14 audio_source *audio; | |
15 uint32_t cycle; | |
16 uint32_t clock_step; | |
17 uint16_t ram[64*1024]; | |
18 uint16_t ram_bank; | |
19 uint16_t pending_address; | |
20 int16_t left; | |
21 int16_t right; | |
22 rf5c164_channel channels[8]; | |
23 uint8_t pending_byte; | |
24 uint8_t channel_enable; | |
25 uint8_t selected_channel; | |
26 uint8_t cur_channel; | |
27 uint8_t step; | |
28 uint8_t flags; | |
29 } rf5c164; | |
30 | |
31 void rf5c164_init(rf5c164* pcm, uint32_t mclks, uint32_t divider); | |
32 void rf5c164_run(rf5c164* pcm, uint32_t cycle); | |
33 void rf5c164_write(rf5c164* pcm, uint16_t address, uint8_t value); | |
34 uint8_t rf5c164_read(rf5c164* pcm, uint16_t address); | |
35 | |
36 #endif //RF5C164_H_ |