aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dcpu16.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/dcpu16.h b/dcpu16.h
index 8e7b936..4f3522a 100644
--- a/dcpu16.h
+++ b/dcpu16.h
@@ -44,6 +44,21 @@ enum { NOP, JSR, BRK,
#define KEYB 0x9000
#define KEYP 0x9010
+struct device {
+ unsigned int id;
+ unsigned int version;
+ unsigned int manufacturer;
+ void (*cb)(unsigned short *);
+ struct device *next;
+};
+
+struct context {
+ unsigned short mem[MEMSZ];
+ unsigned short reg[nReg];
+ struct device *dev;
+ int ndev;
+};
+
/* display: 32x12 (128x96) + 16 pixel boarder, font 8x4 */
unsigned short *compile(FILE *, size_t);