Add FM_ESFM type

This commit is contained in:
Cacodemon345
2024-03-01 01:58:48 +06:00
committed by Kagamiin~
parent 12c64ab43d
commit 2341b28c7f
3 changed files with 11 additions and 2 deletions

View File

@@ -22,7 +22,8 @@ enum fm_type {
FM_YMF262 = 1, /* OPL3 */
FM_YMF289B = 2, /* OPL3-L */
FM_YMF278B = 3, /* OPL 4 */
FM_MAX = 4
FM_ESFM = 4, /* ESFM */
FM_MAX = 5
};
enum fm_driver {
@@ -45,6 +46,7 @@ extern uint8_t fm_driver_get(int chip_id, fm_drv_t *drv);
extern const fm_drv_t nuked_opl_drv;
extern const fm_drv_t ymfm_drv;
extern const fm_drv_t esfmu_opl_drv;
#ifdef EMU_DEVICE_H
extern const device_t ym3812_nuked_device;
@@ -54,6 +56,8 @@ extern const device_t ym3812_ymfm_device;
extern const device_t ymf262_ymfm_device;
extern const device_t ymf289b_ymfm_device;
extern const device_t ymf278b_ymfm_device;
extern const device_t esfm_esfmu_device;
#endif
#endif /*SOUND_OPL_H*/

View File

@@ -68,6 +68,11 @@ fm_driver_get(int chip_id, fm_drv_t *drv)
*drv = ymfm_drv;
drv->priv = device_add_inst(&ymf278b_ymfm_device, fm_dev_inst[fm_driver][chip_id]++);
break;
case FM_ESFM:
*drv = esfmu_opl_drv;
drv->priv = device_add_inst(&esfm_esfmu_device, fm_dev_inst[fm_driver][chip_id]++);
break;
default:
return 0;

View File

@@ -202,7 +202,7 @@ const device_t esfm_esfmu_device = {
.name = "ESS Technology ESFM (ESFMu)",
.internal_name = "esfm_esfmu",
.flags = 0,
.local = 0,
.local = FM_ESFM,
.init = esfm_drv_init,
.close = esfm_drv_close,
.reset = NULL,