summaryrefslogtreecommitdiff
path: root/emu/emu.c
diff options
context:
space:
mode:
Diffstat (limited to 'emu/emu.c')
-rw-r--r--emu/emu.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/emu/emu.c b/emu/emu.c
index fbd9bb7..7d5c37c 100644
--- a/emu/emu.c
+++ b/emu/emu.c
@@ -6,16 +6,23 @@
int main( int argc, char *argv[] )
{
+ emul_t emul;
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.debug = true;
cpu_6502_reset( &cpu );
- cpu_6502_run( &cpu );
+ emul_init( &emul, &cpu, &memory );
+ emul.gui = true;
+ emul_start( &emul );
+
+ emul_run( &emul );
+
+ emul_free( &emul );
exit( EXIT_SUCCESS );
}