From 9c4a07e1e04310480313e9b963d5ee49421a319b Mon Sep 17 00:00:00 2001 From: Mike Pavone Date: Sun, 28 Apr 2013 18:53:43 -0700 Subject: Implement cycle limit in Z80 core. --- transz80.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'transz80.c') diff --git a/transz80.c b/transz80.c index 3465efb..680a520 100644 --- a/transz80.c +++ b/transz80.c @@ -22,10 +22,13 @@ int main(int argc, char ** argv) 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; } -- cgit v1.2.3