Add Roland MT-32 2.x device

This commit is contained in:
Jasmine Iwanek
2022-08-30 17:08:02 -04:00
parent 1e201dce09
commit 4a759e5f98
3 changed files with 32 additions and 0 deletions

View File

@@ -97,6 +97,7 @@ extern const device_t fluidsynth_device;
# endif # endif
# ifdef USE_MUNT # ifdef USE_MUNT
extern const device_t mt32_old_device; extern const device_t mt32_old_device;
extern const device_t mt32_new_device;
extern const device_t cm32l_device; extern const device_t cm32l_device;
extern const device_t cm32ln_device; extern const device_t cm32ln_device;
# endif # endif

View File

@@ -93,6 +93,7 @@ static const MIDI_OUT_DEVICE devices[] = {
#endif #endif
#ifdef USE_MUNT #ifdef USE_MUNT
{ &mt32_old_device }, { &mt32_old_device },
{ &mt32_new_device },
{ &cm32l_device }, { &cm32l_device },
{ &cm32ln_device }, { &cm32ln_device },
#endif #endif

View File

@@ -17,6 +17,8 @@
#define MT32_OLD_CTRL_ROM "roms/sound/mt32/MT32_CONTROL.ROM" #define MT32_OLD_CTRL_ROM "roms/sound/mt32/MT32_CONTROL.ROM"
#define MT32_OLD_PCM_ROM "roms/sound/mt32/MT32_PCM.ROM" #define MT32_OLD_PCM_ROM "roms/sound/mt32/MT32_PCM.ROM"
#define MT32_NEW_CTRL_ROM "roms/sound/mt32_new/MT32_CONTROL.ROM"
#define MT32_NEW_PCM_ROM "roms/sound/mt32_new/MT32_PCM.ROM"
#define CM32L_CTRL_ROM "roms/sound/cm32l/CM32L_CONTROL.ROM" #define CM32L_CTRL_ROM "roms/sound/cm32l/CM32L_CONTROL.ROM"
#define CM32L_PCM_ROM "roms/sound/cm32l/CM32L_PCM.ROM" #define CM32L_PCM_ROM "roms/sound/cm32l/CM32L_PCM.ROM"
#define CM32LN_CTRL_ROM "roms/sound/cm32ln/CM32LN_CONTROL.ROM" #define CM32LN_CTRL_ROM "roms/sound/cm32ln/CM32LN_CONTROL.ROM"
@@ -125,6 +127,14 @@ mt32_old_available()
return roms_present[0]; return roms_present[0];
} }
int
mt32_new_available()
{
if (roms_present[0] < 0)
roms_present[0] = (rom_present(MT32_NEW_CTRL_ROM) && rom_present(MT32_NEW_PCM_ROM));
return roms_present[0];
}
int int
cm32l_available() cm32l_available()
{ {
@@ -317,6 +327,12 @@ mt32_old_init(const device_t *info)
return mt32emu_init(MT32_OLD_CTRL_ROM, MT32_OLD_PCM_ROM); return mt32emu_init(MT32_OLD_CTRL_ROM, MT32_OLD_PCM_ROM);
} }
void *
mt32_new_init(const device_t *info)
{
return mt32emu_init(MT32_NEW_CTRL_ROM, MT32_NEW_PCM_ROM);
}
void * void *
cm32l_init(const device_t *info) cm32l_init(const device_t *info)
{ {
@@ -418,6 +434,20 @@ const device_t mt32_old_device = {
.config = mt32_config .config = mt32_config
}; };
const device_t mt32_new_device = {
.name = "Roland MT-32 (New) Emulation",
.internal_name = "mt32",
.flags = 0,
.local = 0,
.init = mt32_new_init,
.close = mt32_close,
.reset = NULL,
{ .available = mt32_new_available },
.speed_changed = NULL,
.force_redraw = NULL,
.config = mt32_config
};
const device_t cm32l_device = { const device_t cm32l_device = {
.name = "Roland CM-32L Emulation", .name = "Roland CM-32L Emulation",
.internal_name = "cm32l", .internal_name = "cm32l",