Mercurial > repos > blastem
diff vdp.h @ 471:f065769836e8
Implement FIFO as a ring buffer so the behavior of reads from invalid CRAM and VSRAM bits can be implemented properly
author | Mike Pavone <pavone@retrodev.com> |
---|---|
date | Sun, 15 Sep 2013 22:20:43 -0700 |
parents | 541c1ae8abf3 |
children | 2e4a4188cfb0 |
line wrap: on
line diff
--- a/vdp.h Fri Sep 13 19:22:46 2013 -0700 +++ b/vdp.h Sun Sep 15 22:20:43 2013 -0700 @@ -110,6 +110,8 @@ int16_t y; } sprite_info; +#define FIFO_SIZE 4 + typedef struct { uint32_t cycle; uint16_t address; @@ -119,8 +121,9 @@ } fifo_entry; typedef struct { - fifo_entry *fifo_cur; - fifo_entry *fifo_end; + fifo_entry fifo[FIFO_SIZE]; + int32_t fifo_write; + int32_t fifo_read; uint16_t address; uint8_t cd; uint8_t flags;