comparison genesis.c @ 1640:3602f3b20072

Small cleanup of vdp_context struct layout and removal of separately allocated buffers
author Michael Pavone <pavone@retrodev.com>
date Fri, 16 Nov 2018 19:56:24 -0800
parents d2775a242dc6
children 6909c5d0bbb5
comparison
equal deleted inserted replaced
1639:93518786f882 1640:3602f3b20072
1300 gen->header.config_updated = config_updated; 1300 gen->header.config_updated = config_updated;
1301 gen->header.type = SYSTEM_GENESIS; 1301 gen->header.type = SYSTEM_GENESIS;
1302 gen->header.info = *rom; 1302 gen->header.info = *rom;
1303 set_region(gen, rom, force_region); 1303 set_region(gen, rom, force_region);
1304 1304
1305 gen->vdp = malloc(sizeof(vdp_context)); 1305 gen->vdp = init_vdp_context(gen->version_reg & 0x40);
1306 init_vdp_context(gen->vdp, gen->version_reg & 0x40);
1307 gen->vdp->system = &gen->header; 1306 gen->vdp->system = &gen->header;
1308 gen->frame_end = vdp_cycles_to_frame_end(gen->vdp); 1307 gen->frame_end = vdp_cycles_to_frame_end(gen->vdp);
1309 char * config_cycles = tern_find_path(config, "clocks\0max_cycles\0", TVAL_PTR).ptrval; 1308 char * config_cycles = tern_find_path(config, "clocks\0max_cycles\0", TVAL_PTR).ptrval;
1310 gen->max_cycles = config_cycles ? atoi(config_cycles) : DEFAULT_SYNC_INTERVAL; 1309 gen->max_cycles = config_cycles ? atoi(config_cycles) : DEFAULT_SYNC_INTERVAL;
1311 gen->int_latency_prev1 = MCLKS_PER_68K * 32; 1310 gen->int_latency_prev1 = MCLKS_PER_68K * 32;