summaryrefslogtreecommitdiff
path: root/vdp.h
diff options
context:
space:
mode:
authorMike Pavone <pavone@retrodev.com>2013-09-15 22:20:43 -0700
committerMike Pavone <pavone@retrodev.com>2013-09-15 22:20:43 -0700
commite154139fdaa57c8c805167641b9ac0c30bb9d115 (patch)
treef01827a565458ba1ecb0f707a7e605ed0c764ce9 /vdp.h
parent0f6f021093e9b54ca2379fd7d9359648cca03734 (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.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/vdp.h b/vdp.h
index 4cb61e2..75a603d 100644
--- a/vdp.h
+++ b/vdp.h
@@ -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;