summaryrefslogtreecommitdiff
path: root/src/vcpu.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/vcpu.h')
-rw-r--r--src/vcpu.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/vcpu.h b/src/vcpu.h
index fccd397..3da6b37 100644
--- a/src/vcpu.h
+++ b/src/vcpu.h
@@ -1,5 +1,8 @@
#pragma once
+#define VCPU_FREQ 600
+#define DTST_FREQ 60
+#define SCREEN_FREQ 60
#define REG_FLAG 0xF
typedef struct VCPU_State {
@@ -30,11 +33,19 @@ typedef struct VCPU_State {
unsigned char N;
unsigned char NN;
unsigned short NNN;
+
+ // Keypressed
+ int keypress;
+
+ // Count VCPU ticks
+ int dtst_ticks;
+ int screen_ticks;
} VCPU_State;
void VCPUInit();
void VCPUFetch();
void VCPUDecode();
void VCPUExecute();
+void VCPUTick();
void VCPUDoubleDabble(unsigned char x, unsigned char *u, unsigned char *t, unsigned char *h);
void VCPUDump();