Mercurial > repos > blastem
comparison vdp.h @ 470:541c1ae8abf3
Properly delay 68K on VDP reads. Dummy VDP test port implementation. Initial stab at handling undefined bits of VSRAM and CRAM.
author | Mike Pavone <pavone@retrodev.com> |
---|---|
date | Fri, 13 Sep 2013 19:22:46 -0700 |
parents | 140af5509ce7 |
children | f065769836e8 |
comparison
equal
deleted
inserted
replaced
469:5f3344d0d42f | 470:541c1ae8abf3 |
---|---|
1 /* | 1 /* |
2 Copyright 2013 Michael Pavone | 2 Copyright 2013 Michael Pavone |
3 This file is part of BlastEm. | 3 This file is part of BlastEm. |
4 BlastEm is free software distributed under the terms of the GNU General Public License version 3 or greater. See COPYING for full license text. | 4 BlastEm is free software distributed under the terms of the GNU General Public License version 3 or greater. See COPYING for full license text. |
5 */ | 5 */ |
6 #ifndef VDP_H_ | 6 #ifndef VDP_H_ |
7 #define VDP_H_ | 7 #define VDP_H_ |
8 | 8 |
45 #define FLAG_DMA_RUN 0x40 | 45 #define FLAG_DMA_RUN 0x40 |
46 #define FLAG_DMA_PROG 0x80 | 46 #define FLAG_DMA_PROG 0x80 |
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 | 51 |
51 #define DISPLAY_ENABLE 0x40 | 52 #define DISPLAY_ENABLE 0x40 |
52 | 53 |
53 enum { | 54 enum { |
54 REG_MODE_1=0, | 55 REG_MODE_1=0, |
147 sprite_draw sprite_draw_list[MAX_DRAWS]; | 148 sprite_draw sprite_draw_list[MAX_DRAWS]; |
148 sprite_info sprite_info_list[MAX_SPRITES_LINE]; | 149 sprite_info sprite_info_list[MAX_SPRITES_LINE]; |
149 uint16_t col_1; | 150 uint16_t col_1; |
150 uint16_t col_2; | 151 uint16_t col_2; |
151 uint16_t last_write_val; | 152 uint16_t last_write_val; |
153 uint16_t last_fifo_val; | |
152 uint8_t v_offset; | 154 uint8_t v_offset; |
153 uint8_t dma_cd; | 155 uint8_t dma_cd; |
154 uint8_t hint_counter; | 156 uint8_t hint_counter; |
155 uint8_t flags2; | 157 uint8_t flags2; |
156 uint8_t double_res; | 158 uint8_t double_res; |
170 void vdp_run_dma_done(vdp_context * context, uint32_t target_cycles); | 172 void vdp_run_dma_done(vdp_context * context, uint32_t target_cycles); |
171 uint8_t vdp_load_gst(vdp_context * context, FILE * state_file); | 173 uint8_t vdp_load_gst(vdp_context * context, FILE * state_file); |
172 uint8_t vdp_save_gst(vdp_context * context, FILE * outfile); | 174 uint8_t vdp_save_gst(vdp_context * context, FILE * outfile); |
173 int vdp_control_port_write(vdp_context * context, uint16_t value); | 175 int vdp_control_port_write(vdp_context * context, uint16_t value); |
174 int vdp_data_port_write(vdp_context * context, uint16_t value); | 176 int vdp_data_port_write(vdp_context * context, uint16_t value); |
177 void vdp_test_port_write(vdp_context * context, uint16_t value); | |
175 uint16_t vdp_control_port_read(vdp_context * context); | 178 uint16_t vdp_control_port_read(vdp_context * context); |
176 uint16_t vdp_data_port_read(vdp_context * context); | 179 uint16_t vdp_data_port_read(vdp_context * context); |
177 uint16_t vdp_hv_counter_read(vdp_context * context); | 180 uint16_t vdp_hv_counter_read(vdp_context * context); |
181 uint16_t vdp_test_port_read(vdp_context * context); | |
178 void vdp_adjust_cycles(vdp_context * context, uint32_t deduction); | 182 void vdp_adjust_cycles(vdp_context * context, uint32_t deduction); |
179 uint32_t vdp_next_hint(vdp_context * context); | 183 uint32_t vdp_next_hint(vdp_context * context); |
180 uint32_t vdp_next_vint(vdp_context * context); | 184 uint32_t vdp_next_vint(vdp_context * context); |
181 uint32_t vdp_next_vint_z80(vdp_context * context); | 185 uint32_t vdp_next_vint_z80(vdp_context * context); |
182 void vdp_int_ack(vdp_context * context, uint16_t int_num); | 186 void vdp_int_ack(vdp_context * context, uint16_t int_num); |