Mercurial > repos > blastem
diff vdp.h @ 1117:928a65750345
Initial support for Genesis/Megadrive PBC mode. VDP still needs Mode 4 to be useful.
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Thu, 22 Dec 2016 19:51:25 -0800 |
parents | c15896605bf2 |
children | e9369d6f0101 |
line wrap: on
line diff
--- a/vdp.h Thu Dec 22 10:51:33 2016 -0800 +++ b/vdp.h Thu Dec 22 19:51:25 2016 -0800 @@ -8,6 +8,7 @@ #include <stdint.h> #include <stdio.h> +#include "system.h" #define VDP_REGS 24 #define CRAM_SIZE 64 @@ -52,6 +53,7 @@ #define FLAG2_SPRITE_COLLIDE 0x08 #define FLAG2_REGION_PAL 0x10 #define FLAG2_EVEN_FIELD 0x20 +#define FLAG2_BYTE_PENDING 0x40 #define DISPLAY_ENABLE 0x40 @@ -141,6 +143,7 @@ uint8_t *linebuf; //pointer to current line in framebuffer uint32_t *output; + system_header *system; uint16_t cram[CRAM_SIZE]; uint32_t colors[CRAM_SIZE*3]; uint32_t debugcolors[1 << (3 + 1 + 1 + 1)];//3 bits for source, 1 bit for priority, 1 bit for shadow, 1 bit for hilight @@ -175,6 +178,7 @@ uint8_t buf_b_off; uint8_t debug; uint8_t debug_pal; + uint8_t pending_byte; uint8_t *tmp_buf_a; uint8_t *tmp_buf_b; } vdp_context; @@ -189,7 +193,9 @@ uint8_t vdp_load_gst(vdp_context * context, FILE * state_file); uint8_t vdp_save_gst(vdp_context * context, FILE * outfile); int vdp_control_port_write(vdp_context * context, uint16_t value); +void vdp_control_port_write_pbc(vdp_context * context, uint8_t value); int vdp_data_port_write(vdp_context * context, uint16_t value); +void vdp_data_port_write_pbc(vdp_context * context, uint8_t value); void vdp_test_port_write(vdp_context * context, uint16_t value); uint16_t vdp_control_port_read(vdp_context * context); uint16_t vdp_data_port_read(vdp_context * context);