Mercurial > repos > blastem
comparison m68k_core.c @ 1787:0c6d07f91346 mame_interp
Merge from default
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Thu, 14 Mar 2019 23:40:50 -0700 |
parents | 30b5952fd32e eda8df5bc74c |
children | 374a5ae694e8 |
comparison
equal
deleted
inserted
replaced
1778:30b5952fd32e | 1787:0c6d07f91346 |
---|---|
1272 #endif | 1272 #endif |
1273 | 1273 |
1274 m68k_context * init_68k_context(m68k_options * opts, m68k_reset_handler reset_handler) | 1274 m68k_context * init_68k_context(m68k_options * opts, m68k_reset_handler reset_handler) |
1275 { | 1275 { |
1276 #ifdef USE_NATIVE | 1276 #ifdef USE_NATIVE |
1277 size_t ctx_size = sizeof(m68k_context) + ram_size(&opts->gen) / (1 << opts->gen.ram_flags_shift) / 8; | 1277 m68k_context * context = calloc(1, sizeof(m68k_context) + ram_size(&opts->gen) / (1 << opts->gen.ram_flags_shift) / 8); |
1278 m68k_context * context = malloc(ctx_size); | |
1279 memset(context, 0, ctx_size); | |
1280 context->options = opts; | 1278 context->options = opts; |
1281 #else | 1279 #else |
1282 m68000_base_device *device = malloc(sizeof(m68000_base_device));; | 1280 m68000_base_device *device = malloc(sizeof(m68000_base_device));; |
1283 memset(device, 0, sizeof(m68000_base_device)); | 1281 memset(device, 0, sizeof(m68000_base_device)); |
1284 m68k_context *context = &device->c; | 1282 m68k_context *context = &device->c; |