ESS AudioDrive: Fix some mixer register and DSP command readouts to match the probing of real cards, also fixes Windows 3.1 ES688 drivers.
This commit is contained in:
@@ -1687,6 +1687,10 @@ sb_exec_command(sb_dsp_t *dsp)
|
||||
break;
|
||||
case 0xE1: /* Get DSP version */
|
||||
if (IS_ESS(dsp)) {
|
||||
/*
|
||||
0x03 0x01 (Sound Blaster Pro compatibility) confirmed by both the
|
||||
ES1888 datasheet and the probing of the real ES688 and ES1688 cards.
|
||||
*/
|
||||
sb_add_data(dsp, 0x3);
|
||||
sb_add_data(dsp, 0x1);
|
||||
break;
|
||||
@@ -1722,9 +1726,12 @@ sb_exec_command(sb_dsp_t *dsp)
|
||||
while (sb16_copyright[c])
|
||||
sb_add_data(dsp, sb16_copyright[c++]);
|
||||
sb_add_data(dsp, 0);
|
||||
} else if (IS_ESS(dsp)) {
|
||||
sb_add_data(dsp, 0);
|
||||
}
|
||||
} /* else if (IS_ESS(dsp))
|
||||
sb_add_data(dsp, 0); */
|
||||
/*
|
||||
TODO: What ESS card returns 0x00 here? Probing of the real ES688 and ES1688 cards
|
||||
revealed that they in fact return nothing on this command.
|
||||
*/
|
||||
break;
|
||||
case 0xE4: /* Write test register */
|
||||
dsp->sb_test = dsp->sb_data[0];
|
||||
@@ -1736,12 +1743,26 @@ sb_exec_command(sb_dsp_t *dsp)
|
||||
break;
|
||||
case SB_SUBTYPE_ESS_ES688:
|
||||
sb_add_data(dsp, 0x68);
|
||||
sb_add_data(dsp, 0x80 | 0x04);
|
||||
/*
|
||||
80h: ESSCFG fails to detect the AudioDrive;
|
||||
81h-83h: ES??88, Windows 3.1 driver expects MPU-401 and gives a legacy mixer error;
|
||||
84h: ES688, Windows 3.1 driver expects MPU-401, returned by DOSBox-X;
|
||||
85h-87h: ES688, Windows 3.1 driver does not expect MPU-401:
|
||||
85h: Returned by MSDOS622's real ESS688,
|
||||
86h: Returned by Dizzy's real ES688.
|
||||
We return 86h if MPU is absent, 84h otherwise, who knows what the actual
|
||||
PnP ES688 returns here.
|
||||
*/
|
||||
sb_add_data(dsp, 0x80 | ((dsp->mpu != NULL) ? 0x04 : 0x06));
|
||||
break;
|
||||
case SB_SUBTYPE_ESS_ES1688:
|
||||
// Determined via Windows driver debugging.
|
||||
sb_add_data(dsp, 0x68);
|
||||
sb_add_data(dsp, 0x80 | 0x09);
|
||||
/*
|
||||
89h: ES1688, returned by DOSBox-X, determined via Windows driver
|
||||
debugging;
|
||||
8Bh: ES1688, returned by both MSDOS622's and Dizzy's real ES1688's.
|
||||
*/
|
||||
sb_add_data(dsp, 0x80 | 0x0b);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user