summaryrefslogtreecommitdiff
path: root/emu/emu.c
diff options
context:
space:
mode:
Diffstat (limited to 'emu/emu.c')
-rw-r--r--emu/emu.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/emu/emu.c b/emu/emu.c
new file mode 100644
index 0000000..fbd9bb7
--- /dev/null
+++ b/emu/emu.c
@@ -0,0 +1,21 @@
+#include "emul.h"
+#include "6502.h"
+#include "memory.h"
+
+#include <stdlib.h>
+
+int main( int argc, char *argv[] )
+{
+ cpu_6502_t cpu;
+ memory_t memory;
+
+ memory_init( &memory );
+ memory_load( &memory, ROM_START, ROM_SIZE, "./rom.bin" );
+
+ cpu_6502_init( &cpu, &memory );
+ cpu.debug = true;
+ cpu_6502_reset( &cpu );
+ cpu_6502_run( &cpu );
+
+ exit( EXIT_SUCCESS );
+}