Add OPQ, OPX(Partial), and OPZ chips
This commit is contained in:
@@ -39,9 +39,14 @@ enum fm_type {
|
||||
FM_YM3438 = 18, /* OPN2C */
|
||||
FM_YMF276 = 19, /* OPN2L */
|
||||
FM_YM2164 = 20, /* OPP */
|
||||
FM_ESFM = 21, /* ESFM */
|
||||
FM_OPL2BOARD = 22, /* OPL2Board (External Device) */
|
||||
FM_MAX = 23
|
||||
FM_YM3806 = 21, /* OPQ */
|
||||
#if 0
|
||||
FM_YMF271 = 22, /* OPX */
|
||||
#endif
|
||||
FM_YM2414 = 23, /* OPZ */
|
||||
FM_ESFM = 24, /* ESFM */
|
||||
FM_OPL2BOARD = 25, /* OPL2Board (External Device) */
|
||||
FM_MAX = 26
|
||||
};
|
||||
|
||||
enum fm_driver {
|
||||
@@ -101,6 +106,17 @@ extern const device_t ymf276_ymfm_device;
|
||||
/* OPP Series */
|
||||
extern const device_t ym2164_ymfm_device;
|
||||
|
||||
/* OPQ Series */
|
||||
extern const device_t ym3806_ymfm_device;
|
||||
|
||||
/* OPX Series */
|
||||
#if 0
|
||||
extern const device_t ymf271_ymfm_device;
|
||||
#endif
|
||||
|
||||
/* OPZ Series */
|
||||
extern const device_t ym2414_ymfm_device;
|
||||
|
||||
extern const device_t esfm_esfmu_device;
|
||||
|
||||
#ifdef USE_LIBSERIALPORT
|
||||
|
||||
@@ -153,6 +153,23 @@ fm_driver_get(int chip_id, fm_drv_t *drv)
|
||||
*drv = ymfm_drv;
|
||||
drv->priv = device_add_inst(&ym2164_ymfm_device, fm_dev_inst[fm_driver][chip_id]++);
|
||||
break;
|
||||
|
||||
case FM_YM3806: /* OPQ */
|
||||
*drv = ymfm_drv;
|
||||
drv->priv = device_add_inst(&ym3806_ymfm_device, fm_dev_inst[fm_driver][chip_id]++);
|
||||
break;
|
||||
|
||||
#if 0
|
||||
case FM_YMF271: /* OPX */
|
||||
*drv = ymfm_drv;
|
||||
drv->priv = device_add_inst(&ymf271_ymfm_device, fm_dev_inst[fm_driver][chip_id]++);
|
||||
break;
|
||||
#endif
|
||||
|
||||
case FM_YM2414: /* OPZ */
|
||||
*drv = ymfm_drv;
|
||||
drv->priv = device_add_inst(&ym2414_ymfm_device, fm_dev_inst[fm_driver][chip_id]++);
|
||||
break;
|
||||
|
||||
case FM_ESFM:
|
||||
*drv = esfmu_opl_drv;
|
||||
|
||||
@@ -24,7 +24,9 @@
|
||||
#include "ymfm/ymfm_opm.h"
|
||||
#include "ymfm/ymfm_opn.h"
|
||||
#include "ymfm/ymfm_opq.h"
|
||||
#if 0
|
||||
#include "ymfm/ymfm_opx.h"
|
||||
#endif
|
||||
#include "ymfm/ymfm_opz.h"
|
||||
|
||||
extern "C" {
|
||||
@@ -429,6 +431,23 @@ ymfm_drv_init(const device_t *info)
|
||||
// TODO: Check rates and frequency
|
||||
fm = (YMFMChipBase *) new YMFMChip<ymfm::ym2164>(14318181, FM_YM2164, FREQ_49716);
|
||||
break;
|
||||
|
||||
case FM_YM3806: /* OPQ */
|
||||
// TODO: Check rates and frequency
|
||||
fm = (YMFMChipBase *) new YMFMChip<ymfm::ym3806>(14318181, FM_YM3806, FREQ_49716);
|
||||
break;
|
||||
|
||||
#if 0
|
||||
case FM_YMF271: /* OPX */
|
||||
// TODO: Check rates and frequency
|
||||
fm = (YMFMChipBase *) new YMFMChip<ymfm::ymf271>(14318181, FM_YMF271, FREQ_49716);
|
||||
break;
|
||||
#endif
|
||||
|
||||
case FM_YM2414: /* OPZ */
|
||||
// TODO: Check rates and frequency
|
||||
fm = (YMFMChipBase *) new YMFMChip<ymfm::ym2414>(14318181, FM_YM2414, FREQ_49716);
|
||||
break;
|
||||
}
|
||||
|
||||
fm->set_do_cycles(1);
|
||||
@@ -803,6 +822,51 @@ const device_t ym2164_ymfm_device = {
|
||||
.config = NULL
|
||||
};
|
||||
|
||||
const device_t ym3806_ymfm_device = {
|
||||
.name = "Yamaha YM3806 OPQ (YMFM)",
|
||||
.internal_name = "ym3806_ymfm",
|
||||
.flags = 0,
|
||||
.local = FM_YM3806,
|
||||
.init = ymfm_drv_init,
|
||||
.close = ymfm_drv_close,
|
||||
.reset = NULL,
|
||||
.available = NULL,
|
||||
.speed_changed = NULL,
|
||||
.force_redraw = NULL,
|
||||
.config = NULL
|
||||
};
|
||||
|
||||
#if 0
|
||||
const device_t ymf271_ymfm_device = {
|
||||
.name = "Yamaha YMF271 OPX (YMFM)",
|
||||
.internal_name = "ym271_ymfm",
|
||||
.flags = 0,
|
||||
.local = FM_YMF271,
|
||||
.init = ymfm_drv_init,
|
||||
.close = ymfm_drv_close,
|
||||
.reset = NULL,
|
||||
.available = NULL,
|
||||
.speed_changed = NULL,
|
||||
.force_redraw = NULL,
|
||||
.config = NULL
|
||||
};
|
||||
#endif
|
||||
|
||||
const device_t ym2414_ymfm_device = {
|
||||
.name = "Yamaha YM2414 OPZ (YMFM)",
|
||||
.internal_name = "ym2414_ymfm",
|
||||
.flags = 0,
|
||||
.local = FM_YM2414,
|
||||
.init = ymfm_drv_init,
|
||||
.close = ymfm_drv_close,
|
||||
.reset = NULL,
|
||||
.available = NULL,
|
||||
.speed_changed = NULL,
|
||||
.force_redraw = NULL,
|
||||
.config = NULL
|
||||
};
|
||||
|
||||
|
||||
const fm_drv_t ymfm_drv {
|
||||
.read = &ymfm_drv_read,
|
||||
.write = &ymfm_drv_write,
|
||||
|
||||
Reference in New Issue
Block a user