comparison vdp.h @ 2361:3350b3c8faa8

Initial implementation of VDP register write breakpoints
author Michael Pavone <pavone@retrodev.com>
date Mon, 30 Oct 2023 00:07:56 -0700
parents 04d29635d238
children efd2242c2c23
comparison
equal deleted inserted replaced
2360:053ba4551c62 2361:3350b3c8faa8
174 VDP_SMS, 174 VDP_SMS,
175 VDP_TMS9918A 175 VDP_TMS9918A
176 }; 176 };
177 177
178 typedef struct vdp_context vdp_context; 178 typedef struct vdp_context vdp_context;
179 typedef void (*vdp_hook_fun)(vdp_context *); 179 typedef void (*vdp_hook)(vdp_context *);
180 180 typedef void (*vdp_reg_hook)(vdp_context *, uint16_t reg, uint16_t value);
181 typedef struct { 181 typedef void (*vdp_data_hook)(vdp_context *, uint16_t value);
182 vdp_hook_fun handler;
183 void *data;
184 } vdp_hook;
185 182
186 struct vdp_context { 183 struct vdp_context {
187 system_header *system; 184 system_header *system;
188 //pointer to current line in framebuffer 185 //pointer to current line in framebuffer
189 uint32_t *output; 186 uint32_t *output;
191 uint32_t *fb; 188 uint32_t *fb;
192 uint8_t *done_composite; 189 uint8_t *done_composite;
193 uint32_t *debug_fbs[NUM_DEBUG_TYPES]; 190 uint32_t *debug_fbs[NUM_DEBUG_TYPES];
194 char *kmod_msg_buffer; 191 char *kmod_msg_buffer;
195 vdp_hook dma_hook; 192 vdp_hook dma_hook;
196 vdp_hook vdpreg_hook; 193 vdp_reg_hook reg_hook;
197 vdp_hook data_hook; 194 vdp_data_hook data_hook;
198 uint32_t kmod_buffer_storage; 195 uint32_t kmod_buffer_storage;
199 uint32_t kmod_buffer_length; 196 uint32_t kmod_buffer_length;
200 uint32_t timer_start_cycle; 197 uint32_t timer_start_cycle;
201 uint32_t output_pitch; 198 uint32_t output_pitch;
202 uint32_t debug_fb_pitch[NUM_DEBUG_TYPES]; 199 uint32_t debug_fb_pitch[NUM_DEBUG_TYPES];