Mercurial > repos > blastem
comparison sms.c @ 1130:8f14767661fa
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
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Wed, 28 Dec 2016 20:39:27 -0800 |
parents | 6b5c92b6205c |
children | 7e199bebde2f |
comparison
equal
deleted
inserted
replaced
1129:6b5c92b6205c | 1130:8f14767661fa |
---|---|
210 }; | 210 }; |
211 info_out->map = malloc(sizeof(memory_map)); | 211 info_out->map = malloc(sizeof(memory_map)); |
212 memcpy(info_out->map, memory_map, sizeof(memory_map)); | 212 memcpy(info_out->map, memory_map, sizeof(memory_map)); |
213 z80_options *zopts = malloc(sizeof(z80_options)); | 213 z80_options *zopts = malloc(sizeof(z80_options)); |
214 init_z80_opts(zopts, info_out->map, 2, io_map, 4, 15, 0xFF); | 214 init_z80_opts(zopts, info_out->map, 2, io_map, 4, 15, 0xFF); |
215 sms->z80 = malloc(sizeof(z80_context)); | 215 sms->z80 = init_z80_context(zopts); |
216 init_z80_context(sms->z80, zopts); | |
217 sms->z80->system = sms; | 216 sms->z80->system = sms; |
218 | 217 |
219 char * lowpass_cutoff_str = tern_find_path(config, "audio\0lowpass_cutoff\0").ptrval; | 218 char * lowpass_cutoff_str = tern_find_path(config, "audio\0lowpass_cutoff\0").ptrval; |
220 uint32_t lowpass_cutoff = lowpass_cutoff_str ? atoi(lowpass_cutoff_str) : 3390; | 219 uint32_t lowpass_cutoff = lowpass_cutoff_str ? atoi(lowpass_cutoff_str) : 3390; |
221 | 220 |