about summary refs log tree commit diff
path: root/emulator.h
diff options
context:
space:
mode:
authorManuel Palenzuela <manuelpalenzuelamerino@gmail.com>2021-07-19 14:20:20 +0100
committerManuel Palenzuela <manuelpalenzuelamerino@gmail.com>2021-07-19 14:20:20 +0100
commit95356a12e955ac8d42e8bb4632075bf13021e201 (patch)
treec97e38a0edf35a7edafdb3a08114902edb050676 /emulator.h
parentAdded Readme (diff)
downloadCHIP8-Emulator-95356a12e955ac8d42e8bb4632075bf13021e201.tar.gz
CHIP8-Emulator-95356a12e955ac8d42e8bb4632075bf13021e201.tar.bz2
CHIP8-Emulator-95356a12e955ac8d42e8bb4632075bf13021e201.zip
Feature: Added basic rom loading
Diffstat (limited to 'emulator.h')
-rw-r--r--emulator.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/emulator.h b/emulator.h
index e69de29..edffa47 100644
--- a/emulator.h
+++ b/emulator.h
@@ -0,0 +1,17 @@
+#ifndef _EMULATOR_H_
+#define _EMULATOR_H_
+
+#include <stdio.h>
+#include  <sys/stat.h>
+
+typedef struct
+{
+    uint8_t is_on;
+    uint16_t pc;
+    uint8_t memory[4096];
+} Emulator;
+
+int emulator_load_rom(Emulator* emulator, char* rom_name);
+int emulator_tick(Emulator* emulator);
+
+#endif