Mercurial > repos > blastem
comparison 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 |
comparison
equal
deleted
inserted
replaced
243:2f069a0b487e | 244:df8a36bf5e1d |
---|---|
20 fclose(f); | 20 fclose(f); |
21 init_x86_z80_opts(&opts); | 21 init_x86_z80_opts(&opts); |
22 init_z80_context(&context, &opts); | 22 init_z80_context(&context, &opts); |
23 //cartridge ROM | 23 //cartridge ROM |
24 context.mem_pointers[0] = z80_ram; | 24 context.mem_pointers[0] = z80_ram; |
25 context.target_cycle = 0x7FFFFFFF; | 25 context.sync_cycle = context.target_cycle = 0x7FFFFFFF; |
26 //work RAM | 26 //work RAM |
27 context.mem_pointers[1] = context.mem_pointers[2] = NULL; | 27 context.mem_pointers[1] = context.mem_pointers[2] = NULL; |
28 z80_reset(&context); | 28 z80_reset(&context); |
29 z80_run(&context); | 29 for(;;) |
30 { | |
31 z80_run(&context); | |
32 } | |
30 return 0; | 33 return 0; |
31 } | 34 } |