From 67b7c359a5a73f01eeba37af2d5fbae1027b4a7a Mon Sep 17 00:00:00 2001 From: Michael Pavone Date: Wed, 28 Dec 2016 20:39:27 -0800 Subject: Remove memory map assumptions from Z80 core and move a little bit of logic to the generic backend.c so it can be shared between CPU cores --- sms.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'sms.c') diff --git a/sms.c b/sms.c index 79fb78b..11aeeba 100644 --- a/sms.c +++ b/sms.c @@ -212,8 +212,7 @@ sms_context *alloc_configure_sms(void *rom, uint32_t rom_size, void *extra_rom, memcpy(info_out->map, memory_map, sizeof(memory_map)); z80_options *zopts = malloc(sizeof(z80_options)); init_z80_opts(zopts, info_out->map, 2, io_map, 4, 15, 0xFF); - sms->z80 = malloc(sizeof(z80_context)); - init_z80_context(sms->z80, zopts); + sms->z80 = init_z80_context(zopts); sms->z80->system = sms; char * lowpass_cutoff_str = tern_find_path(config, "audio\0lowpass_cutoff\0").ptrval; -- cgit v1.2.3