Mercurial > repos > blastem
comparison vdp.h @ 2194:01ff005b08f6
Very rudimentary support for Game Gear VDP emulation
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Sun, 21 Aug 2022 22:29:47 -0700 |
parents | a61b47d5489e |
children | dc4268a778bc |
comparison
equal
deleted
inserted
replaced
2193:d00fb9c6a6a2 | 2194:01ff005b08f6 |
---|---|
159 VDP_DEBUG_PLANE, | 159 VDP_DEBUG_PLANE, |
160 VDP_DEBUG_VRAM, | 160 VDP_DEBUG_VRAM, |
161 VDP_DEBUG_CRAM, | 161 VDP_DEBUG_CRAM, |
162 VDP_DEBUG_COMPOSITE, | 162 VDP_DEBUG_COMPOSITE, |
163 VDP_NUM_DEBUG_TYPES | 163 VDP_NUM_DEBUG_TYPES |
164 }; | |
165 | |
166 enum { | |
167 VDP_GENESIS, | |
168 VDP_GAMEGEAR, | |
169 VDP_SMS2, | |
170 VDP_SMS, | |
171 VDP_TMS9918A | |
164 }; | 172 }; |
165 | 173 |
166 typedef struct { | 174 typedef struct { |
167 system_header *system; | 175 system_header *system; |
168 //pointer to current line in framebuffer | 176 //pointer to current line in framebuffer |
243 uint8_t tmp_buf_b[SCROLL_BUFFER_SIZE]; | 251 uint8_t tmp_buf_b[SCROLL_BUFFER_SIZE]; |
244 uint8_t enabled_debuggers; | 252 uint8_t enabled_debuggers; |
245 uint8_t debug_fb_indices[VDP_NUM_DEBUG_TYPES]; | 253 uint8_t debug_fb_indices[VDP_NUM_DEBUG_TYPES]; |
246 uint8_t debug_modes[VDP_NUM_DEBUG_TYPES]; | 254 uint8_t debug_modes[VDP_NUM_DEBUG_TYPES]; |
247 uint8_t pushed_frame; | 255 uint8_t pushed_frame; |
256 uint8_t type; | |
257 uint8_t cram_latch; | |
248 uint8_t vdpmem[]; | 258 uint8_t vdpmem[]; |
249 } vdp_context; | 259 } vdp_context; |
250 | 260 |
251 | 261 |
252 | 262 |
253 vdp_context *init_vdp_context(uint8_t region_pal, uint8_t has_max_vsram); | 263 vdp_context *init_vdp_context(uint8_t region_pal, uint8_t has_max_vsram, uint8_t type); |
254 void vdp_free(vdp_context *context); | 264 void vdp_free(vdp_context *context); |
255 void vdp_run_context_full(vdp_context * context, uint32_t target_cycles); | 265 void vdp_run_context_full(vdp_context * context, uint32_t target_cycles); |
256 void vdp_run_context(vdp_context * context, uint32_t target_cycles); | 266 void vdp_run_context(vdp_context * context, uint32_t target_cycles); |
257 //runs from current cycle count to VBLANK for the current mode, returns ending cycle count | 267 //runs from current cycle count to VBLANK for the current mode, returns ending cycle count |
258 uint32_t vdp_run_to_vblank(vdp_context * context); | 268 uint32_t vdp_run_to_vblank(vdp_context * context); |