Mercurial > repos > blastem
comparison ztestrun.c @ 1060:56713dac6a69
Implement INI
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Mon, 01 Aug 2016 09:48:10 -0700 |
parents | ef7ee9919a73 |
children | fe8c79f82c22 |
comparison
equal
deleted
inserted
replaced
1059:8da967779710 | 1060:56713dac6a69 |
---|---|
34 } | 34 } |
35 | 35 |
36 const memmap_chunk z80_map[] = { | 36 const memmap_chunk z80_map[] = { |
37 { 0x0000, 0x4000, 0x1FFF, 0, MMAP_READ | MMAP_WRITE | MMAP_CODE, z80_ram, NULL, NULL, NULL, NULL }, | 37 { 0x0000, 0x4000, 0x1FFF, 0, MMAP_READ | MMAP_WRITE | MMAP_CODE, z80_ram, NULL, NULL, NULL, NULL }, |
38 { 0x4000, 0x10000, 0xFFFF, 0, 0, NULL, NULL, NULL, z80_unmapped_read, z80_unmapped_write} | 38 { 0x4000, 0x10000, 0xFFFF, 0, 0, NULL, NULL, NULL, z80_unmapped_read, z80_unmapped_write} |
39 }; | |
40 | |
41 const memmap_chunk port_map[] = { | |
42 { 0x0000, 0x100, 0xFF, 0, 0, NULL, NULL, NULL, z80_unmapped_read, z80_unmapped_write} | |
39 }; | 43 }; |
40 | 44 |
41 void z80_next_int_pulse(z80_context * context) | 45 void z80_next_int_pulse(z80_context * context) |
42 { | 46 { |
43 context->int_pulse_start = context->int_pulse_end = CYCLE_NEVER; | 47 context->int_pulse_start = context->int_pulse_end = CYCLE_NEVER; |
83 if (fread(z80_ram, 1, filesize, f) != filesize) { | 87 if (fread(z80_ram, 1, filesize, f) != filesize) { |
84 fprintf(stderr, "error reading %s\n",fname); | 88 fprintf(stderr, "error reading %s\n",fname); |
85 exit(1); | 89 exit(1); |
86 } | 90 } |
87 fclose(f); | 91 fclose(f); |
88 init_z80_opts(&opts, z80_map, 2, NULL, 0, 1); | 92 init_z80_opts(&opts, z80_map, 2, port_map, 1, 1); |
89 init_z80_context(&context, &opts); | 93 init_z80_context(&context, &opts); |
90 //Z80 RAM | 94 //Z80 RAM |
91 context.mem_pointers[0] = z80_ram; | 95 context.mem_pointers[0] = z80_ram; |
92 if (retranslate) { | 96 if (retranslate) { |
93 //run core long enough to translate code | 97 //run core long enough to translate code |