Mercurial > repos > blastem
comparison psg.h @ 1427:4e5797b3935a
WIP - New savestate format
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Sun, 06 Aug 2017 00:06:36 -0700 |
parents | 8d032a368dd5 |
children | ce1f93be0104 |
comparison
equal
deleted
inserted
replaced
1426:957325c990d5 | 1427:4e5797b3935a |
---|---|
5 */ | 5 */ |
6 #ifndef PSG_CONTEXT_H_ | 6 #ifndef PSG_CONTEXT_H_ |
7 #define PSG_CONTEXT_H_ | 7 #define PSG_CONTEXT_H_ |
8 | 8 |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 #include "serialize.h" | |
10 | 11 |
11 typedef struct { | 12 typedef struct { |
12 int16_t *audio_buffer; | 13 int16_t *audio_buffer; |
13 int16_t *back_buffer; | 14 int16_t *back_buffer; |
14 uint64_t buffer_fraction; | 15 uint64_t buffer_fraction; |
36 void psg_init(psg_context * context, uint32_t sample_rate, uint32_t master_clock, uint32_t clock_div, uint32_t samples_frame, uint32_t lowpass_cutoff); | 37 void psg_init(psg_context * context, uint32_t sample_rate, uint32_t master_clock, uint32_t clock_div, uint32_t samples_frame, uint32_t lowpass_cutoff); |
37 void psg_free(psg_context *context); | 38 void psg_free(psg_context *context); |
38 void psg_adjust_master_clock(psg_context * context, uint32_t master_clock); | 39 void psg_adjust_master_clock(psg_context * context, uint32_t master_clock); |
39 void psg_write(psg_context * context, uint8_t value); | 40 void psg_write(psg_context * context, uint8_t value); |
40 void psg_run(psg_context * context, uint32_t cycles); | 41 void psg_run(psg_context * context, uint32_t cycles); |
42 void psg_serialize(psg_context *context, serialize_buffer *buf); | |
43 void psg_deserialize(deserialize_buffer *buf, void *vcontext); | |
41 | 44 |
42 #endif //PSG_CONTEXT_H_ | 45 #endif //PSG_CONTEXT_H_ |
43 | 46 |