CMS(Section* configuration):Module_base(configuration) { Section_prop * section = static_cast<Section_prop *>(configuration); Bitu sample_rate_temp = section->Get_int("oplrate"); sample_rate = static_cast<double>(sample_rate_temp); base_port = section->Get_hex("sbbase"); WriteHandler.Install(base_port, write_cms, IO_MB,4); // A standalone Gameblaster has a magic chip on it which is // sometimes used for detection. const char * sbtype=section->Get_string("sbtype"); if (!strcasecmp(sbtype,"gb")) { DetWriteHandler.Install(base_port+4,write_cms_detect,IO_MB,12); DetReadHandler.Install(base_port,read_cms_detect,IO_MB,16); } /* Register the Mixer CallBack */ cms_chan = MixerChan.Install(CMS_CallBack,sample_rate_temp,"CMS"); last_command = PIC_Ticks; for (int s=0;s<2;s++) { struct SAA1099 *saa = &saa1099[s]; memset(saa, 0, sizeof(struct SAA1099)); } }
/* * Get a property string */ const char *FIRMWARE::propString(const char *prop) { Section_prop *section = static_cast<Section_prop *>(m_configuration); return section->Get_string(prop); }