Skip to content

Commit

Permalink
Extended mode toggle
Browse files Browse the repository at this point in the history
  • Loading branch information
Cacodemon345 committed Mar 2, 2024
1 parent d15706c commit 4e9b40a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/include/86box/snd_sb_dsp.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
7 changes: 7 additions & 0 deletions src/sound/snd_sb_dsp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 4e9b40a

Please sign in to comment.