diff options
author | Mike Pavone <pavone@retrodev.com> | 2013-09-15 22:20:43 -0700 |
---|---|---|
committer | Mike Pavone <pavone@retrodev.com> | 2013-09-15 22:20:43 -0700 |
commit | e154139fdaa57c8c805167641b9ac0c30bb9d115 (patch) | |
tree | f01827a565458ba1ecb0f707a7e605ed0c764ce9 /vdp.h | |
parent | 0f6f021093e9b54ca2379fd7d9359648cca03734 (diff) |
Implement FIFO as a ring buffer so the behavior of reads from invalid CRAM and VSRAM bits can be implemented properly
Diffstat (limited to 'vdp.h')
-rw-r--r-- | vdp.h | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -110,6 +110,8 @@ typedef struct { int16_t y; } sprite_info; +#define FIFO_SIZE 4 + typedef struct { uint32_t cycle; uint16_t address; @@ -119,8 +121,9 @@ typedef struct { } 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; |