Large changes to configuration files again (the old ones might break, be careful);

Applied the mainline PCem slight CPU emulation speedup commit;
Added emulation of removable SCSI hard disks;
CD-ROM image handler now uses C FILE's (with the 64-bit size calls) instead of C++ iostreams, ISO images bigger than 2 GB should work properly again;
Split RLL/ESDI and XT IDE disks to their own bus types;
Turned status bar pane meaning and hard disks and CD-ROM BUS numbers to #define's;
Other miscellaneous cleanups.
This commit is contained in:
OBattler
2017-05-27 03:53:32 +02:00
parent 94680da416
commit a36720f174
56 changed files with 4736 additions and 2682 deletions

View File

@@ -547,7 +547,7 @@ gus->curx[gus->voice]=(gus->curx[gus->voice]&0xFFF8000)|((val&0x7F)<<8);
uint8_t readgus(uint16_t addr, void *p)
{
gus_t *gus = (gus_t *)p;
uint8_t val;
uint8_t val = 0xff;
switch (addr)
{
case 0x340: /*MIDI status*/

View File

@@ -322,10 +322,10 @@ uint8_t sb_16_mixer_read(uint16_t addr, void *p)
case 0x80:
switch (sb->dsp.sb_irqnum)
{
case 2: return 1; /*IRQ 7*/
case 5: return 2; /*IRQ 7*/
case 2: return 1; /*IRQ 2*/
case 5: return 2; /*IRQ 5*/
case 7: return 4; /*IRQ 7*/
case 10: return 8; /*IRQ 7*/
case 10: return 8; /*IRQ 10*/
}
break;
case 0x81:
@@ -465,7 +465,7 @@ void sb_pro_mcv_write(int port, uint8_t val, void *p)
void *sb_1_init()
{
sb_t *sb = malloc(sizeof(sb_t));
uint16_t addr = device_get_config_int("addr");
uint16_t addr = device_get_config_hex16("base");
memset(sb, 0, sizeof(sb_t));
opl2_init(&sb->opl);
@@ -482,7 +482,7 @@ void *sb_1_init()
void *sb_15_init()
{
sb_t *sb = malloc(sizeof(sb_t));
uint16_t addr = device_get_config_int("addr");
uint16_t addr = device_get_config_hex16("base");
memset(sb, 0, sizeof(sb_t));
opl2_init(&sb->opl);
@@ -517,7 +517,7 @@ void *sb_mcv_init()
void *sb_2_init()
{
sb_t *sb = malloc(sizeof(sb_t));
uint16_t addr = device_get_config_int("addr");
uint16_t addr = device_get_config_hex16("base");
memset(sb, 0, sizeof(sb_t));
opl2_init(&sb->opl);
@@ -535,7 +535,7 @@ void *sb_2_init()
void *sb_pro_v1_init()
{
sb_t *sb = malloc(sizeof(sb_t));
uint16_t addr = device_get_config_int("addr");
uint16_t addr = device_get_config_hex16("base");
memset(sb, 0, sizeof(sb_t));
opl2_init(&sb->opl);
@@ -563,7 +563,7 @@ void *sb_pro_v1_init()
void *sb_pro_v2_init()
{
sb_t *sb = malloc(sizeof(sb_t));
uint16_t addr = device_get_config_int("addr");
uint16_t addr = device_get_config_hex16("base");
memset(sb, 0, sizeof(sb_t));
opl3_init(&sb->opl);
@@ -594,9 +594,6 @@ void *sb_pro_mcv_init()
opl3_init(&sb->opl);
sb_dsp_init(&sb->dsp, SBPRO2);
/*sb_dsp_setaddr(&sb->dsp, addr);
sb_dsp_setirq(&sb->dsp, device_get_config_int("irq"));
sb_dsp_setdma8(&sb->dsp, device_get_config_int("dma"));*/
sb_mixer_init(&sb->mixer);
io_sethandler(0x0388, 0x0004, opl3_read, NULL, NULL, opl3_write, NULL, NULL, &sb->opl);
sound_add_handler(sb_get_buffer_opl3, sb);
@@ -616,7 +613,7 @@ void *sb_pro_mcv_init()
void *sb_16_init()
{
sb_t *sb = malloc(sizeof(sb_t));
uint16_t addr = device_get_config_int("addr");
uint16_t addr = device_get_config_hex16("base");
memset(sb, 0, sizeof(sb_t));
opl3_init(&sb->opl);
@@ -631,7 +628,7 @@ void *sb_16_init()
io_sethandler(0x0388, 0x0004, opl3_read, NULL, NULL, opl3_write, NULL, NULL, &sb->opl);
io_sethandler(addr + 4, 0x0002, sb_16_mixer_read, NULL, NULL, sb_16_mixer_write, NULL, NULL, sb);
sound_add_handler(sb_get_buffer_opl3, sb);
mpu401_init(&sb->mpu, device_get_config_int("addr401"), device_get_config_int("irq401"), device_get_config_int("mode401"));
mpu401_init(&sb->mpu, device_get_config_hex16("base401"), device_get_config_int("irq401"), device_get_config_int("mode401"));
sb->mixer.regs[0x30] = 31 << 3;
sb->mixer.regs[0x31] = 31 << 3;
@@ -661,7 +658,7 @@ int sb_awe32_available()
void *sb_awe32_init()
{
sb_t *sb = malloc(sizeof(sb_t));
uint16_t addr = device_get_config_int("addr");
uint16_t addr = device_get_config_hex16("base");
int onboard_ram = device_get_config_int("onboard_ram");
memset(sb, 0, sizeof(sb_t));
@@ -677,7 +674,7 @@ void *sb_awe32_init()
io_sethandler(0x0388, 0x0004, opl3_read, NULL, NULL, opl3_write, NULL, NULL, &sb->opl);
io_sethandler(addr + 4, 0x0002, sb_16_mixer_read, NULL, NULL, sb_16_mixer_write, NULL, NULL, sb);
sound_add_handler(sb_get_buffer_emu8k, sb);
mpu401_init(&sb->mpu, device_get_config_int("addr401"), device_get_config_int("irq401"), device_get_config_int("mode401"));
mpu401_init(&sb->mpu, device_get_config_hex16("base401"), device_get_config_int("irq401"), device_get_config_int("mode401"));
emu8k_init(&sb->emu8k, onboard_ram);
sb->mixer.regs[0x30] = 31 << 3;
@@ -733,7 +730,7 @@ void sb_add_status_info(char *s, int max_len, void *p)
static device_config_t sb_config[] =
{
{
"addr", "Address", CONFIG_SELECTION, "", 0x220,
"base", "Address", CONFIG_HEX16, "", 0x220,
{
{
"0x220", 0x220
@@ -826,7 +823,7 @@ static device_config_t sb_mcv_config[] =
static device_config_t sb_pro_config[] =
{
{
"addr", "Address", CONFIG_SELECTION, "", 0x220,
"base", "Address", CONFIG_HEX16, "", 0x220,
{
{
"0x220", 0x220
@@ -881,7 +878,7 @@ static device_config_t sb_pro_config[] =
static device_config_t sb_16_config[] =
{
{
"addr", "Address", CONFIG_SELECTION, "", 0x220,
"base", "Address", CONFIG_HEX16, "", 0x220,
{
{
"0x220", 0x220
@@ -901,7 +898,7 @@ static device_config_t sb_16_config[] =
}
},
{
"addr401", "MPU-401 Address", CONFIG_SELECTION, "", 0x330,
"base401", "MPU-401 Address", CONFIG_HEX16, "", 0x330,
{
{
"0x300", 0x300
@@ -1016,7 +1013,7 @@ static device_config_t sb_16_config[] =
static device_config_t sb_awe32_config[] =
{
{
"addr", "Address", CONFIG_SELECTION, "", 0x220,
"base", "Address", CONFIG_HEX16, "", 0x220,
{
{
"0x220", 0x220
@@ -1036,7 +1033,7 @@ static device_config_t sb_awe32_config[] =
}
},
{
"addr401", "MPU-401 Address", CONFIG_SELECTION, "", 0x330,
"base401", "MPU-401 Address", CONFIG_HEX16, "", 0x330,
{
{
"0x300", 0x300