Mercurial > repos > blastem
comparison genesis.c @ 1565:61fafcbc2c38
Audio DRC now sounds good in both NTSC and PAL, just need to adjust constants to minimize latency without leading to dropouts
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Sat, 14 Apr 2018 23:08:08 -0700 |
parents | a0fbb1e90533 |
children | 2b132d894d76 |
comparison
equal
deleted
inserted
replaced
1564:48b08986bf8f | 1565:61fafcbc2c38 |
---|---|
1070 | 1070 |
1071 static void start_genesis(system_header *system, char *statefile) | 1071 static void start_genesis(system_header *system, char *statefile) |
1072 { | 1072 { |
1073 genesis_context *gen = (genesis_context *)system; | 1073 genesis_context *gen = (genesis_context *)system; |
1074 set_keybindings(&gen->io); | 1074 set_keybindings(&gen->io); |
1075 render_set_video_standard((gen->version_reg & HZ50) ? VID_PAL : VID_NTSC); | |
1076 if (statefile) { | 1075 if (statefile) { |
1077 //first try loading as a native format savestate | 1076 //first try loading as a native format savestate |
1078 deserialize_buffer state; | 1077 deserialize_buffer state; |
1079 uint32_t pc; | 1078 uint32_t pc; |
1080 if (load_from_file(&state, statefile)) { | 1079 if (load_from_file(&state, statefile)) { |
1235 char * config_cycles = tern_find_path(config, "clocks\0max_cycles\0", TVAL_PTR).ptrval; | 1234 char * config_cycles = tern_find_path(config, "clocks\0max_cycles\0", TVAL_PTR).ptrval; |
1236 gen->max_cycles = config_cycles ? atoi(config_cycles) : DEFAULT_SYNC_INTERVAL; | 1235 gen->max_cycles = config_cycles ? atoi(config_cycles) : DEFAULT_SYNC_INTERVAL; |
1237 gen->int_latency_prev1 = MCLKS_PER_68K * 32; | 1236 gen->int_latency_prev1 = MCLKS_PER_68K * 32; |
1238 gen->int_latency_prev2 = MCLKS_PER_68K * 16; | 1237 gen->int_latency_prev2 = MCLKS_PER_68K * 16; |
1239 | 1238 |
1239 render_set_video_standard((gen->version_reg & HZ50) ? VID_PAL : VID_NTSC); | |
1240 | |
1240 gen->ym = malloc(sizeof(ym2612_context)); | 1241 gen->ym = malloc(sizeof(ym2612_context)); |
1241 ym_init(gen->ym, gen->master_clock, MCLKS_PER_YM, system_opts); | 1242 ym_init(gen->ym, gen->master_clock, MCLKS_PER_YM, system_opts); |
1242 | 1243 |
1243 gen->psg = malloc(sizeof(psg_context)); | 1244 gen->psg = malloc(sizeof(psg_context)); |
1244 psg_init(gen->psg, gen->master_clock, MCLKS_PER_PSG); | 1245 psg_init(gen->psg, gen->master_clock, MCLKS_PER_PSG); |