Mercurial > repos > blastem
comparison transz80.c @ 744:fc68992cf18d
Merge windows branch with latest changes
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Thu, 28 May 2015 21:19:55 -0700 |
parents | 759c38bf97f8 |
children |
comparison
equal
deleted
inserted
replaced
743:cf78cb045fa4 | 744:fc68992cf18d |
---|---|
36 | 36 |
37 int main(int argc, char ** argv) | 37 int main(int argc, char ** argv) |
38 { | 38 { |
39 long filesize; | 39 long filesize; |
40 uint8_t *filebuf; | 40 uint8_t *filebuf; |
41 x86_z80_options opts; | 41 z80_options opts; |
42 z80_context context; | 42 z80_context context; |
43 if (argc < 2) { | 43 if (argc < 2) { |
44 fputs("usage: transz80 zrom [cartrom]\n", stderr); | 44 fputs("usage: transz80 zrom [cartrom]\n", stderr); |
45 exit(1); | 45 exit(1); |
46 } | 46 } |
68 for(unsigned short * cur = cart; cur - cart < (filesize/2); ++cur) | 68 for(unsigned short * cur = cart; cur - cart < (filesize/2); ++cur) |
69 { | 69 { |
70 *cur = (*cur >> 8) | (*cur << 8); | 70 *cur = (*cur >> 8) | (*cur << 8); |
71 } | 71 } |
72 } | 72 } |
73 init_x86_z80_opts(&opts); | 73 init_z80_opts(&opts); |
74 init_z80_context(&context, &opts); | 74 init_z80_context(&context, &opts); |
75 //Z80 RAM | 75 //Z80 RAM |
76 context.mem_pointers[0] = z80_ram; | 76 context.mem_pointers[0] = z80_ram; |
77 context.sync_cycle = context.target_cycle = MCLKS_PER_FRAME/MCLKS_PER_Z80; | 77 context.sync_cycle = context.target_cycle = MCLKS_PER_FRAME/MCLKS_PER_Z80; |
78 context.int_cycle = CYCLE_NEVER; | 78 context.int_cycle = CYCLE_NEVER; |