Mercurial > repos > simple16
diff src/vdp.h @ 11:04d8efe7a1f0
Initial stab at video output and background color rendering. Fixed address decoding in address port write handler.
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Sun, 27 Mar 2016 17:36:02 -0700 |
parents | 5176efdda5ae |
children | 04fc17376999 |
line wrap: on
line diff
--- a/src/vdp.h Sun Mar 27 17:32:09 2016 -0700 +++ b/src/vdp.h Sun Mar 27 17:36:02 2016 -0700 @@ -2,8 +2,12 @@ #define VDP_H_ typedef struct { + uint16_t *framebuffer; + uint8_t *drawbuffer; + uint8_t *readbuffer; uint32_t cycles; uint32_t clock_inc; + int pitch; uint16_t fifo; uint16_t dest_offset; @@ -16,6 +20,7 @@ uint16_t hscroll; uint16_t vram[32*512]; + uint8_t linebuffers[320*2]; uint16_t sram[64*2]; uint16_t cram[64]; @@ -29,9 +34,10 @@ FIFO_DEST_CRAM }; -#define VDP_STATUS_FIFO 1 -#define VDP_STATUS_VRAM 2 -#define VDP_STATUS_SRAM 4 +#define VDP_STATUS_FIFO 1 +#define VDP_STATUS_VRAM 2 +#define VDP_STATUS_SRAM 4 +#define VDP_STATUS_ENABLED 8 void vdp_init(vdp *context, uint32_t clock_div); void vdp_run(vdp *context, uint32_t target);