Mercurial > repos > blastem
comparison vdp.h @ 623:66cc60215e5c
Fix most of the breakage caused by the vcounter/hcounter changes
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Wed, 18 Jun 2014 16:30:19 -0700 |
parents | b76d2a628ab9 |
children | 4996369f1463 |
comparison
equal
deleted
inserted
replaced
622:b76d2a628ab9 | 623:66cc60215e5c |
---|---|
47 | 47 |
48 #define FLAG2_VINT_PENDING 0x01 | 48 #define FLAG2_VINT_PENDING 0x01 |
49 #define FLAG2_HINT_PENDING 0x02 | 49 #define FLAG2_HINT_PENDING 0x02 |
50 #define FLAG2_READ_PENDING 0x04 | 50 #define FLAG2_READ_PENDING 0x04 |
51 #define FLAG2_SPRITE_COLLIDE 0x08 | 51 #define FLAG2_SPRITE_COLLIDE 0x08 |
52 #define FLAG2_REGION_PAL 0x10 | |
52 | 53 |
53 #define DISPLAY_ENABLE 0x40 | 54 #define DISPLAY_ENABLE 0x40 |
54 | 55 |
55 enum { | 56 enum { |
56 REG_MODE_1=0, | 57 REG_MODE_1=0, |
167 uint8_t debug; | 168 uint8_t debug; |
168 uint8_t *tmp_buf_a; | 169 uint8_t *tmp_buf_a; |
169 uint8_t *tmp_buf_b; | 170 uint8_t *tmp_buf_b; |
170 } vdp_context; | 171 } vdp_context; |
171 | 172 |
172 void init_vdp_context(vdp_context * context); | 173 void init_vdp_context(vdp_context * context, uint8_t region_pal); |
173 void vdp_run_context(vdp_context * context, uint32_t target_cycles); | 174 void vdp_run_context(vdp_context * context, uint32_t target_cycles); |
174 //runs from current cycle count to VBLANK for the current mode, returns ending cycle count | 175 //runs from current cycle count to VBLANK for the current mode, returns ending cycle count |
175 uint32_t vdp_run_to_vblank(vdp_context * context); | 176 uint32_t vdp_run_to_vblank(vdp_context * context); |
176 //runs until the target cycle is reached or the current DMA operation has completed, whicever comes first | 177 //runs until the target cycle is reached or the current DMA operation has completed, whicever comes first |
177 void vdp_run_dma_done(vdp_context * context, uint32_t target_cycles); | 178 void vdp_run_dma_done(vdp_context * context, uint32_t target_cycles); |
190 uint32_t vdp_next_vint_z80(vdp_context * context); | 191 uint32_t vdp_next_vint_z80(vdp_context * context); |
191 void vdp_int_ack(vdp_context * context, uint16_t int_num); | 192 void vdp_int_ack(vdp_context * context, uint16_t int_num); |
192 void vdp_print_sprite_table(vdp_context * context); | 193 void vdp_print_sprite_table(vdp_context * context); |
193 void vdp_print_reg_explain(vdp_context * context); | 194 void vdp_print_reg_explain(vdp_context * context); |
194 void latch_mode(vdp_context * context); | 195 void latch_mode(vdp_context * context); |
196 uint32_t vdp_cycles_to_frame_end(vdp_context * context); | |
195 | 197 |
196 extern int32_t color_map[1 << 12]; | 198 extern int32_t color_map[1 << 12]; |
197 | 199 |
198 #endif //VDP_H_ | 200 #endif //VDP_H_ |