comparison sms.c @ 1842:49f65d240299 mame_interp

Merge from default
author Michael Pavone <pavone@retrodev.com>
date Sun, 14 Apr 2019 23:38:02 -0700
parents 0a26f3657295 51417bb557b6
children 374a5ae694e8
comparison
equal deleted inserted replaced
1787:0c6d07f91346 1842:49f65d240299
569 569
570 static void keyboard_up(system_header *system, uint8_t scancode) 570 static void keyboard_up(system_header *system, uint8_t scancode)
571 { 571 {
572 sms_context *sms = (sms_context *)system; 572 sms_context *sms = (sms_context *)system;
573 io_keyboard_up(&sms->io, scancode); 573 io_keyboard_up(&sms->io, scancode);
574 }
575
576 static void set_gain_config(sms_context *sms)
577 {
578 char *config_gain;
579 config_gain = tern_find_path(config, "audio\0psg_gain\0", TVAL_PTR).ptrval;
580 render_audio_source_gaindb(sms->psg->audio, config_gain ? atof(config_gain) : 0.0f);
574 } 581 }
575 582
576 static void config_updated(system_header *system) 583 static void config_updated(system_header *system)
577 { 584 {
578 sms_context *sms = (sms_context *)system; 585 sms_context *sms = (sms_context *)system;
622 sms->normal_clock = sms->master_clock = 53693175; 629 sms->normal_clock = sms->master_clock = 53693175;
623 630
624 sms->psg = malloc(sizeof(psg_context)); 631 sms->psg = malloc(sizeof(psg_context));
625 psg_init(sms->psg, sms->master_clock, 15*16); 632 psg_init(sms->psg, sms->master_clock, 15*16);
626 633
634 set_gain_config(sms);
635
627 sms->vdp = init_vdp_context(0); 636 sms->vdp = init_vdp_context(0);
628 sms->vdp->system = &sms->header; 637 sms->vdp->system = &sms->header;
629 638
630 sms->header.info.save_type = SAVE_NONE; 639 sms->header.info.save_type = SAVE_NONE;
631 sms->header.info.name = strdup(media->name); 640 sms->header.info.name = strdup(media->name);