summaryrefslogtreecommitdiff
path: root/vdp.h
diff options
context:
space:
mode:
authorMike Pavone <pavone@retrodev.com>2013-05-10 22:57:56 -0700
committerMike Pavone <pavone@retrodev.com>2013-05-10 22:57:56 -0700
commit4e397aba753736184ba07cb5d19a67b8e572745b (patch)
tree85198baf66e33235141d621d159634aef112bbac /vdp.h
parent4e3c7dd311f1babc8aa1993c4b10fe1d1f092744 (diff)
Initial stab at horizontal interrupts and improving accuracy of vertical interrupts. Also added the VINT pending flag to status port.
Diffstat (limited to 'vdp.h')
-rw-r--r--vdp.h24
1 files changed, 16 insertions, 8 deletions
diff --git a/vdp.h b/vdp.h
index 650c372..435ccf0 100644
--- a/vdp.h
+++ b/vdp.h
@@ -30,14 +30,17 @@
#define MCLKS_LINE 3420
-#define FLAG_DOT_OFLOW 0x1
-#define FLAG_CAN_MASK 0x2
-#define FLAG_MASKED 0x4
-#define FLAG_WINDOW 0x8
-#define FLAG_PENDING 0x10
-#define FLAG_UNUSED_SLOT 0x20
-#define FLAG_DMA_RUN 0x40
-#define FLAG_DMA_PROG 0x80
+#define FLAG_DOT_OFLOW 0x01
+#define FLAG_CAN_MASK 0x02
+#define FLAG_MASKED 0x04
+#define FLAG_WINDOW 0x08
+#define FLAG_PENDING 0x10
+#define FLAG_UNUSED_SLOT 0x20
+#define FLAG_DMA_RUN 0x40
+#define FLAG_DMA_PROG 0x80
+
+#define FLAG2_VINT_PENDING 0x01
+#define FLAG2_HINT_PENDING 0x02
#define DISPLAY_ENABLE 0x40
@@ -115,6 +118,8 @@ typedef struct {
uint16_t dma_val;
uint8_t v_offset;
uint8_t dma_cd;
+ uint8_t hint_counter;
+ uint8_t flags2;
uint8_t *tmp_buf_a;
uint8_t *tmp_buf_b;
} vdp_context;
@@ -133,5 +138,8 @@ uint16_t vdp_control_port_read(vdp_context * context);
uint16_t vdp_data_port_read(vdp_context * context);
uint16_t vdp_hv_counter_read(vdp_context * context);
void vdp_adjust_cycles(vdp_context * context, uint32_t deduction);
+uint32_t vdp_next_hint(vdp_context * context);
+uint32_t vdp_next_vint(vdp_context * context);
+void vdp_int_ack(vdp_context * context, uint16_t int_num);
#endif //VDP_H_