Remove the GUS Max from the Dev branch.
This commit is contained in:
@@ -175,7 +175,6 @@ endif()
|
|||||||
cmake_dependent_option(AMD_K5 "AMD K5" ON "DEV_BRANCH" OFF)
|
cmake_dependent_option(AMD_K5 "AMD K5" ON "DEV_BRANCH" OFF)
|
||||||
cmake_dependent_option(CDROM_MITSUMI "Mitsumi CDROM" ON "DEV_BRANCH" OFF)
|
cmake_dependent_option(CDROM_MITSUMI "Mitsumi CDROM" ON "DEV_BRANCH" OFF)
|
||||||
cmake_dependent_option(G100 "Matrox Productiva G100" ON "DEV_BRANCH" OFF)
|
cmake_dependent_option(G100 "Matrox Productiva G100" ON "DEV_BRANCH" OFF)
|
||||||
cmake_dependent_option(GUSMAX "Gravis UltraSound MAX" ON "DEV_BRANCH" OFF)
|
|
||||||
cmake_dependent_option(ISAMEM_RAMPAGE "AST Rampage" ON "DEV_BRANCH" OFF)
|
cmake_dependent_option(ISAMEM_RAMPAGE "AST Rampage" ON "DEV_BRANCH" OFF)
|
||||||
cmake_dependent_option(ISAMEM_IAB "Intel Above Board" ON "DEV_BRANCH" OFF)
|
cmake_dependent_option(ISAMEM_IAB "Intel Above Board" ON "DEV_BRANCH" OFF)
|
||||||
cmake_dependent_option(ISAMEM_BRAT "BocaRAM/AT" ON "DEV_BRANCH" OFF)
|
cmake_dependent_option(ISAMEM_BRAT "BocaRAM/AT" ON "DEV_BRANCH" OFF)
|
||||||
|
|||||||
@@ -197,6 +197,7 @@ extern const device_t ct5880_onboard_device;
|
|||||||
|
|
||||||
/* Gravis UltraSound and UltraSound Max */
|
/* Gravis UltraSound and UltraSound Max */
|
||||||
extern const device_t gus_device;
|
extern const device_t gus_device;
|
||||||
|
extern const device_t gus_max_device;
|
||||||
|
|
||||||
/* IBM PS/1 Audio Card */
|
/* IBM PS/1 Audio Card */
|
||||||
extern const device_t ps1snd_device;
|
extern const device_t ps1snd_device;
|
||||||
|
|||||||
@@ -185,10 +185,6 @@ target_link_libraries(86Box esfmu)
|
|||||||
add_subdirectory(ymfm)
|
add_subdirectory(ymfm)
|
||||||
target_link_libraries(86Box ymfm)
|
target_link_libraries(86Box ymfm)
|
||||||
|
|
||||||
if(GUSMAX)
|
|
||||||
target_compile_definitions(snd PRIVATE USE_GUSMAX)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(OPL4ML)
|
if(OPL4ML)
|
||||||
target_compile_definitions(snd PRIVATE USE_OPL4ML)
|
target_compile_definitions(snd PRIVATE USE_OPL4ML)
|
||||||
target_sources(snd PRIVATE midi_opl4.c midi_opl4_yrw801.c)
|
target_sources(snd PRIVATE midi_opl4.c midi_opl4_yrw801.c)
|
||||||
|
|||||||
@@ -17,9 +17,7 @@
|
|||||||
#include <86box/sound.h>
|
#include <86box/sound.h>
|
||||||
#include "cpu.h"
|
#include "cpu.h"
|
||||||
#include <86box/timer.h>
|
#include <86box/timer.h>
|
||||||
#ifdef USE_GUSMAX
|
#include <86box/snd_ad1848.h>
|
||||||
# include <86box/snd_ad1848.h>
|
|
||||||
#endif /*USE_GUSMAX */
|
|
||||||
#include <86box/plat_fallthrough.h>
|
#include <86box/plat_fallthrough.h>
|
||||||
#include <86box/plat_unused.h>
|
#include <86box/plat_unused.h>
|
||||||
|
|
||||||
@@ -145,11 +143,9 @@ typedef struct gus_t {
|
|||||||
|
|
||||||
uint8_t usrr;
|
uint8_t usrr;
|
||||||
|
|
||||||
#ifdef USE_GUSMAX
|
|
||||||
uint8_t max_ctrl;
|
uint8_t max_ctrl;
|
||||||
|
|
||||||
ad1848_t ad1848;
|
ad1848_t ad1848;
|
||||||
#endif /*USE_GUSMAX */
|
|
||||||
} gus_t;
|
} gus_t;
|
||||||
|
|
||||||
static int gus_gf1_irqs[8] = { -1, 2, 5, 3, 7, 11, 12, 15 };
|
static int gus_gf1_irqs[8] = { -1, 2, 5, 3, 7, 11, 12, 15 };
|
||||||
@@ -257,9 +253,7 @@ writegus(uint16_t addr, uint8_t val, void *priv)
|
|||||||
int d;
|
int d;
|
||||||
int old;
|
int old;
|
||||||
uint16_t port;
|
uint16_t port;
|
||||||
#ifdef USE_GUSMAX
|
|
||||||
uint16_t csioport;
|
uint16_t csioport;
|
||||||
#endif /*USE_GUSMAX */
|
|
||||||
|
|
||||||
if ((addr == 0x388) || (addr == 0x389))
|
if ((addr == 0x388) || (addr == 0x389))
|
||||||
port = addr;
|
port = addr;
|
||||||
@@ -607,10 +601,9 @@ writegus(uint16_t addr, uint8_t val, void *priv)
|
|||||||
gus->irq_midi = gus->irq;
|
gus->irq_midi = gus->irq;
|
||||||
} else
|
} else
|
||||||
gus->irq_midi = gus_midi_irqs[(val >> 3) & 7];
|
gus->irq_midi = gus_midi_irqs[(val >> 3) & 7];
|
||||||
#ifdef USE_GUSMAX
|
|
||||||
if (gus->type == GUS_MAX)
|
if (gus->type == GUS_MAX)
|
||||||
ad1848_setirq(&gus->ad1848, gus->irq);
|
ad1848_setirq(&gus->ad1848, gus->irq);
|
||||||
#endif /*USE_GUSMAX */
|
|
||||||
|
|
||||||
gus->sb_nmi = val & 0x80;
|
gus->sb_nmi = val & 0x80;
|
||||||
} else {
|
} else {
|
||||||
@@ -623,10 +616,9 @@ writegus(uint16_t addr, uint8_t val, void *priv)
|
|||||||
gus->dma2 = gus->dma;
|
gus->dma2 = gus->dma;
|
||||||
} else
|
} else
|
||||||
gus->dma2 = gus_dmas[(val >> 3) & 7];
|
gus->dma2 = gus_dmas[(val >> 3) & 7];
|
||||||
#ifdef USE_GUSMAX
|
|
||||||
if (gus->type == GUS_MAX)
|
if (gus->type == GUS_MAX)
|
||||||
ad1848_setdma(&gus->ad1848, gus->dma2);
|
ad1848_setdma(&gus->ad1848, gus->dma2);
|
||||||
#endif /*USE_GUSMAX */
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
@@ -684,7 +676,6 @@ writegus(uint16_t addr, uint8_t val, void *priv)
|
|||||||
break;
|
break;
|
||||||
case 0x306:
|
case 0x306:
|
||||||
case 0x706:
|
case 0x706:
|
||||||
#ifdef USE_GUSMAX
|
|
||||||
if (gus->type == GUS_MAX) {
|
if (gus->type == GUS_MAX) {
|
||||||
if (gus->dma >= 4)
|
if (gus->dma >= 4)
|
||||||
val |= 0x10;
|
val |= 0x10;
|
||||||
@@ -704,7 +695,6 @@ writegus(uint16_t addr, uint8_t val, void *priv)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif /*USE_GUSMAX */
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
@@ -756,11 +746,9 @@ readgus(uint16_t addr, void *priv)
|
|||||||
return val;
|
return val;
|
||||||
|
|
||||||
case 0x20F:
|
case 0x20F:
|
||||||
#ifdef USE_GUSMAX
|
|
||||||
if (gus->type == GUS_MAX)
|
if (gus->type == GUS_MAX)
|
||||||
val = 0x02;
|
val = 0x02;
|
||||||
else
|
else
|
||||||
#endif /*USE_GUSMAX */
|
|
||||||
val = 0x00;
|
val = 0x00;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -879,11 +867,9 @@ readgus(uint16_t addr, void *priv)
|
|||||||
break;
|
break;
|
||||||
case 0x306:
|
case 0x306:
|
||||||
case 0x706:
|
case 0x706:
|
||||||
#ifdef USE_GUSMAX
|
|
||||||
if (gus->type == GUS_MAX)
|
if (gus->type == GUS_MAX)
|
||||||
val = 0x0a; /* GUS MAX */
|
val = 0x0a; /* GUS MAX */
|
||||||
else
|
else
|
||||||
#endif /*USE_GUSMAX */
|
|
||||||
val = 0xff; /*Pre 3.7 - no mixer*/
|
val = 0xff; /*Pre 3.7 - no mixer*/
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -1183,24 +1169,20 @@ gus_get_buffer(int32_t *buffer, int len, void *priv)
|
|||||||
{
|
{
|
||||||
gus_t *gus = (gus_t *) priv;
|
gus_t *gus = (gus_t *) priv;
|
||||||
|
|
||||||
#ifdef USE_GUSMAX
|
|
||||||
if ((gus->type == GUS_MAX) && (gus->max_ctrl))
|
if ((gus->type == GUS_MAX) && (gus->max_ctrl))
|
||||||
ad1848_update(&gus->ad1848);
|
ad1848_update(&gus->ad1848);
|
||||||
#endif /*USE_GUSMAX */
|
|
||||||
gus_update(gus);
|
gus_update(gus);
|
||||||
|
|
||||||
for (int c = 0; c < len * 2; c++) {
|
for (int c = 0; c < len * 2; c++) {
|
||||||
#ifdef USE_GUSMAX
|
|
||||||
if ((gus->type == GUS_MAX) && (gus->max_ctrl))
|
if ((gus->type == GUS_MAX) && (gus->max_ctrl))
|
||||||
buffer[c] += (int32_t) (gus->ad1848.buffer[c] / 2);
|
buffer[c] += (int32_t) (gus->ad1848.buffer[c] / 2);
|
||||||
#endif /*USE_GUSMAX */
|
|
||||||
buffer[c] += (int32_t) gus->buffer[c & 1][c >> 1];
|
buffer[c] += (int32_t) gus->buffer[c & 1][c >> 1];
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef USE_GUSMAX
|
|
||||||
if ((gus->type == GUS_MAX) && (gus->max_ctrl))
|
if ((gus->type == GUS_MAX) && (gus->max_ctrl))
|
||||||
gus->ad1848.pos = 0;
|
gus->ad1848.pos = 0;
|
||||||
#endif /*USE_GUSMAX */
|
|
||||||
gus->pos = 0;
|
gus->pos = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1333,9 +1315,7 @@ gus_reset(void *priv)
|
|||||||
|
|
||||||
gus->usrr = 0;
|
gus->usrr = 0;
|
||||||
|
|
||||||
#ifdef USE_GUSMAX
|
|
||||||
gus->max_ctrl = 0;
|
gus->max_ctrl = 0;
|
||||||
#endif /*USE_GUSMAX */
|
|
||||||
|
|
||||||
gus->irq_state = 0;
|
gus->irq_state = 0;
|
||||||
gus->midi_irq_state = 0;
|
gus->midi_irq_state = 0;
|
||||||
@@ -1373,7 +1353,7 @@ gus_init(UNUSED(const device_t *info))
|
|||||||
|
|
||||||
gus->uart_out = 1;
|
gus->uart_out = 1;
|
||||||
|
|
||||||
gus->type = device_get_config_int("type");
|
gus->type = info->local;
|
||||||
|
|
||||||
gus->base = device_get_config_hex16("base");
|
gus->base = device_get_config_hex16("base");
|
||||||
|
|
||||||
@@ -1382,7 +1362,6 @@ gus_init(UNUSED(const device_t *info))
|
|||||||
io_sethandler(0x0506 + gus->base, 0x0001, readgus, NULL, NULL, writegus, NULL, NULL, gus);
|
io_sethandler(0x0506 + gus->base, 0x0001, readgus, NULL, NULL, writegus, NULL, NULL, gus);
|
||||||
io_sethandler(0x0388, 0x0002, readgus, NULL, NULL, writegus, NULL, NULL, gus);
|
io_sethandler(0x0388, 0x0002, readgus, NULL, NULL, writegus, NULL, NULL, gus);
|
||||||
|
|
||||||
#ifdef USE_GUSMAX
|
|
||||||
if (gus->type == GUS_MAX) {
|
if (gus->type == GUS_MAX) {
|
||||||
ad1848_init(&gus->ad1848, AD1848_TYPE_CS4231);
|
ad1848_init(&gus->ad1848, AD1848_TYPE_CS4231);
|
||||||
ad1848_setirq(&gus->ad1848, 5);
|
ad1848_setirq(&gus->ad1848, 5);
|
||||||
@@ -1390,7 +1369,6 @@ gus_init(UNUSED(const device_t *info))
|
|||||||
io_sethandler(0x10C + gus->base, 4,
|
io_sethandler(0x10C + gus->base, 4,
|
||||||
ad1848_read, NULL, NULL, ad1848_write, NULL, NULL, &gus->ad1848);
|
ad1848_read, NULL, NULL, ad1848_write, NULL, NULL, &gus->ad1848);
|
||||||
}
|
}
|
||||||
#endif /*USE_GUSMAX */
|
|
||||||
|
|
||||||
timer_add(&gus->samp_timer, gus_poll_wave, gus, 1);
|
timer_add(&gus->samp_timer, gus_poll_wave, gus, 1);
|
||||||
timer_add(&gus->timer_1, gus_poll_timer_1, gus, 1);
|
timer_add(&gus->timer_1, gus_poll_timer_1, gus, 1);
|
||||||
@@ -1423,31 +1401,12 @@ gus_speed_changed(void *priv)
|
|||||||
else
|
else
|
||||||
gus->samp_latch = (uint64_t) (TIMER_USEC * (1000000.0 / gusfreqs[gus->voices - 14]));
|
gus->samp_latch = (uint64_t) (TIMER_USEC * (1000000.0 / gusfreqs[gus->voices - 14]));
|
||||||
|
|
||||||
#ifdef USE_GUSMAX
|
|
||||||
if ((gus->type == GUS_MAX) && (gus->max_ctrl))
|
if ((gus->type == GUS_MAX) && (gus->max_ctrl))
|
||||||
ad1848_speed_changed(&gus->ad1848);
|
ad1848_speed_changed(&gus->ad1848);
|
||||||
#endif /*USE_GUSMAX */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static const device_config_t gus_config[] = {
|
static const device_config_t gus_config[] = {
|
||||||
// clang-format off
|
// clang-format off
|
||||||
{
|
|
||||||
.name = "type",
|
|
||||||
.description = "GUS type",
|
|
||||||
.type = CONFIG_SELECTION,
|
|
||||||
.default_string = NULL,
|
|
||||||
.default_int = 0,
|
|
||||||
.file_filter = NULL,
|
|
||||||
.spinner = { 0 },
|
|
||||||
.selection = {
|
|
||||||
{ .description = "Classic", .value = GUS_CLASSIC },
|
|
||||||
#ifdef USE_GUSMAX
|
|
||||||
{ .description = "MAX", .value = GUS_MAX },
|
|
||||||
#endif /*USE_GUSMAX */
|
|
||||||
{ NULL }
|
|
||||||
},
|
|
||||||
.bios = { { 0 } }
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
.name = "base",
|
.name = "base",
|
||||||
.description = "Address",
|
.description = "Address",
|
||||||
@@ -1502,7 +1461,21 @@ const device_t gus_device = {
|
|||||||
.name = "Gravis UltraSound",
|
.name = "Gravis UltraSound",
|
||||||
.internal_name = "gus",
|
.internal_name = "gus",
|
||||||
.flags = DEVICE_ISA16,
|
.flags = DEVICE_ISA16,
|
||||||
.local = 0,
|
.local = GUS_CLASSIC,
|
||||||
|
.init = gus_init,
|
||||||
|
.close = gus_close,
|
||||||
|
.reset = gus_reset,
|
||||||
|
.available = NULL,
|
||||||
|
.speed_changed = gus_speed_changed,
|
||||||
|
.force_redraw = NULL,
|
||||||
|
.config = gus_config
|
||||||
|
};
|
||||||
|
|
||||||
|
const device_t gus_max_device = {
|
||||||
|
.name = "Gravis UltraSound MAX",
|
||||||
|
.internal_name = "gus",
|
||||||
|
.flags = DEVICE_ISA16,
|
||||||
|
.local = GUS_MAX,
|
||||||
.init = gus_init,
|
.init = gus_init,
|
||||||
.close = gus_close,
|
.close = gus_close,
|
||||||
.reset = gus_reset,
|
.reset = gus_reset,
|
||||||
|
|||||||
@@ -115,6 +115,7 @@ static const SOUND_CARD sound_cards[] = {
|
|||||||
{ &ess_ess0102_pnp_device },
|
{ &ess_ess0102_pnp_device },
|
||||||
{ &ess_ess0968_pnp_device },
|
{ &ess_ess0968_pnp_device },
|
||||||
{ &gus_device },
|
{ &gus_device },
|
||||||
|
{ &gus_max_device },
|
||||||
{ &sb_1_device },
|
{ &sb_1_device },
|
||||||
{ &sb_15_device },
|
{ &sb_15_device },
|
||||||
{ &sb_2_device },
|
{ &sb_2_device },
|
||||||
|
|||||||
Reference in New Issue
Block a user