Mercurial > repos > blastem
comparison z80_to_x86.c @ 592:4ff7bbb3943b
Get rest of emulator compiling again with Z80 core enabled
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Wed, 17 Dec 2014 23:03:19 -0800 |
parents | 966b46c68942 |
children | 5ef3fe516da9 |
comparison
equal
deleted
inserted
replaced
591:966b46c68942 | 592:4ff7bbb3943b |
---|---|
1895 encoded = NULL; | 1895 encoded = NULL; |
1896 } | 1896 } |
1897 } | 1897 } |
1898 } | 1898 } |
1899 | 1899 |
1900 void init_x86_z80_opts(z80_options * options, memmap_chunk * chunks, uint32_t num_chunks) | 1900 void init_x86_z80_opts(z80_options * options, memmap_chunk const * chunks, uint32_t num_chunks) |
1901 { | 1901 { |
1902 memset(options, 0, sizeof(*options)); | 1902 memset(options, 0, sizeof(*options)); |
1903 | 1903 |
1904 options->gen.address_size = SZ_W; | 1904 options->gen.address_size = SZ_W; |
1905 options->gen.address_mask = 0xFFFF; | 1905 options->gen.address_mask = 0xFFFF; |
2067 mov_ir(code, 0x38, options->gen.scratch1, SZ_W); | 2067 mov_ir(code, 0x38, options->gen.scratch1, SZ_W); |
2068 call(code, (code_ptr)z80_native_addr); | 2068 call(code, (code_ptr)z80_native_addr); |
2069 jmp_r(code, options->gen.scratch1); | 2069 jmp_r(code, options->gen.scratch1); |
2070 } | 2070 } |
2071 | 2071 |
2072 void * z80_gen_bank_write(uint32_t start_address, void * voptions) | |
2073 { | |
2074 z80_options * options = voptions; | |
2075 //TODO: Handle writes to bank register | |
2076 return options; | |
2077 } | |
2078 | |
2072 void init_z80_context(z80_context * context, z80_options * options) | 2079 void init_z80_context(z80_context * context, z80_options * options) |
2073 { | 2080 { |
2074 memset(context, 0, sizeof(*context)); | 2081 memset(context, 0, sizeof(*context)); |
2075 context->static_code_map = malloc(sizeof(*context->static_code_map)); | 2082 context->static_code_map = malloc(sizeof(*context->static_code_map)); |
2076 context->static_code_map->base = NULL; | 2083 context->static_code_map->base = NULL; |