From d5dad279c4e9a7bb12286ef35a38e98e4fe546fa Mon Sep 17 00:00:00 2001 From: Cacodemon345 Date: Sat, 2 Mar 2024 16:50:29 +0600 Subject: [PATCH] ESSreg macro --- src/include/86box/snd_sb_dsp.h | 2 ++ src/sound/snd_sb_dsp.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/include/86box/snd_sb_dsp.h b/src/include/86box/snd_sb_dsp.h index 568b02f47..bf9ceab53 100644 --- a/src/include/86box/snd_sb_dsp.h +++ b/src/include/86box/snd_sb_dsp.h @@ -140,6 +140,8 @@ typedef struct sb_dsp_t { uint8_t azt_eeprom[AZTECH_EEPROM_SIZE]; /* the eeprom in the Aztech cards is attached to the DSP */ + uint8_t ess_regs[256]; /* ESS registers. */ + mpu_t *mpu; } sb_dsp_t; diff --git a/src/sound/snd_sb_dsp.c b/src/sound/snd_sb_dsp.c index d94faa29e..79415ac5b 100644 --- a/src/sound/snd_sb_dsp.c +++ b/src/sound/snd_sb_dsp.c @@ -135,6 +135,8 @@ sb_dsp_log(const char *fmt, ...) # define sb_dsp_log(fmt, ...) #endif +#define ESSreg(reg) (dsp)->ess_regs[reg - 0xA0] + static __inline double sinc(double x) {