diff --git a/src/include/86box/snd_sb_dsp.h b/src/include/86box/snd_sb_dsp.h index 6f94a98019..f04734ebb0 100644 --- a/src/include/86box/snd_sb_dsp.h +++ b/src/include/86box/snd_sb_dsp.h @@ -142,6 +142,7 @@ typedef struct sb_dsp_t { uint8_t ess_regs[256]; /* ESS registers. */ uint8_t ess_playback_mode; + uint8_t ess_extended_mode; mpu_t *mpu; } sb_dsp_t; diff --git a/src/sound/snd_sb_dsp.c b/src/sound/snd_sb_dsp.c index 12b04a008e..08a69ec825 100644 --- a/src/sound/snd_sb_dsp.c +++ b/src/sound/snd_sb_dsp.c @@ -610,6 +610,13 @@ sb_exec_command(sb_dsp_t *dsp) if (dsp->sb_type >= SB16) dsp->sb_8051_ram[0x20] = dsp->sb_command; + if (IS_ESS(dsp)) { + if (dsp->sb_command == 0xC6 || dsp->sb_command == 0xC7){ + dsp->ess_extended_mode = !!(dsp->sb_command == 0xC6); + return; + } + } + switch (dsp->sb_command) { case 0x01: /* ???? */ if (dsp->sb_type >= SB16)