diff transz80.c @ 244:df8a36bf5e1d

Implement cycle limit in Z80 core.
author Mike Pavone <pavone@retrodev.com>
date Sun, 28 Apr 2013 18:53:43 -0700
parents d9bf8e61c33c
children ea3899e3e7ec
line wrap: on
line diff
--- a/transz80.c	Sun Apr 28 14:32:45 2013 -0700
+++ b/transz80.c	Sun Apr 28 18:53:43 2013 -0700
@@ -22,10 +22,13 @@
 	init_z80_context(&context, &opts);
 	//cartridge ROM
 	context.mem_pointers[0] = z80_ram;
-	context.target_cycle = 0x7FFFFFFF;
+	context.sync_cycle = context.target_cycle = 0x7FFFFFFF;
 	//work RAM
 	context.mem_pointers[1] = context.mem_pointers[2] = NULL;
 	z80_reset(&context);
-	z80_run(&context);
+	for(;;)
+	{
+		z80_run(&context);
+	}
 	return 0;
 }