Mercurial > repos > blastem
diff segacd.h @ 2280:9ead0fe69d9b
Implement savestate support for Sega CD
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Sun, 08 Jan 2023 14:42:24 -0800 |
parents | 5a21bc0ec583 |
children | b9fed07f19e4 |
line wrap: on
line diff
--- a/segacd.h Sun Jan 08 14:20:43 2023 -0800 +++ b/segacd.h Sun Jan 08 14:42:24 2023 -0800 @@ -4,6 +4,7 @@ #include "genesis.h" #include "cdd_mcu.h" #include "rf5c164.h" +#include "serialize.h" typedef struct { m68k_context *m68k; @@ -14,7 +15,6 @@ uint16_t *rom_mut; //ROM with low 16-bit of HINT vector modified by register write uint16_t *prog_ram; uint16_t *word_ram; - uint8_t *pcm_ram; uint8_t *bram; uint32_t stopwatch_cycle; uint32_t int2_cycle; @@ -23,6 +23,7 @@ uint32_t last_refresh_cycle; uint32_t graphics_cycle; uint32_t base; + uint32_t m68k_pc; uint32_t graphics_x; uint32_t graphics_y; uint32_t graphics_dx; @@ -37,10 +38,6 @@ uint8_t reset; uint8_t need_reset; uint8_t memptr_start_index; - rf5c164 pcm; - lc8951 cdc; - cdd_mcu cdd; - cdd_fader fader; uint8_t cdc_dst_low; uint8_t cdc_int_ack; uint8_t graphics_step; @@ -50,6 +47,10 @@ uint8_t main_swap_request; uint8_t bank_toggle; uint8_t sub_paused_wordram; + rf5c164 pcm; + lc8951 cdc; + cdd_mcu cdd; + cdd_fader fader; } segacd_context; segacd_context *alloc_configure_segacd(system_media *media, uint32_t opts, uint8_t force_region, rom_info *info); @@ -60,5 +61,7 @@ void scd_adjust_cycle(segacd_context *cd, uint32_t deduction); void scd_toggle_graphics_debug(segacd_context *cd); void segacd_set_speed_percent(segacd_context *cd, uint32_t percent); +void segacd_serialize(segacd_context *cd, serialize_buffer *buf, uint8_t all); +void segacd_register_section_handlers(segacd_context *cd, deserialize_buffer *buf); #endif //SEGACD_H_