summaryrefslogtreecommitdiff
path: root/emu/emu.c
diff options
context:
space:
mode:
authorAndreas Baumann <mail@andreasbaumann.cc>2020-11-22 20:38:51 +0100
committerAndreas Baumann <mail@andreasbaumann.cc>2020-11-22 20:38:51 +0100
commit6c3401b8a2ce7a2dfe21a253f840f286088b1921 (patch)
treef49b1bba8b10c3b3681927764cd795e7af4ad9e5 /emu/emu.c
parent052899e196c6a2660651b9896ceed3313e7d0bac (diff)
download6502-6c3401b8a2ce7a2dfe21a253f840f286088b1921.tar.gz
6502-6c3401b8a2ce7a2dfe21a253f840f286088b1921.tar.bz2
more work on emulator
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 );
}