Implemented the Pro Audio Spectrum Plus serial mixer, Pro Audio Spectrum 16 parallel mixer, Pro Audio Spectrum Plus/16 SCSI, ESS ES688, all three ESS PnP AudioDrives, made the wavetables use a separate 44.1 kHz source, and made the Sound Blaster 16 PNP use a proper PNP ROM dump.

This commit is contained in:
OBattler
2024-05-03 17:02:13 +02:00
parent 656591d385
commit 2acb11d37c
47 changed files with 4000 additions and 1343 deletions

View File

@@ -149,6 +149,8 @@ extern int confirm_reset; /* (C) enable reset confirmation */
extern int confirm_exit; /* (C) enable exit confirmation */
extern int confirm_save; /* (C) enable save confirmation */
extern int enable_discord; /* (C) enable Discord integration */
extern int other_ide_present; /* IDE controllers from non-IDE cards are present */
extern int other_scsi_present; /* SCSI controllers from non-SCSI cards are present */
extern int fixed_size_x;
extern int fixed_size_y;

View File

@@ -57,6 +57,7 @@
#define CONFIG_MIDI_OUT (3 | CONFIG_TYPE_INT) /* config_get_int() */
#define CONFIG_SPINNER (4 | CONFIG_TYPE_INT) /* config_get_int() */
#define CONFIG_MIDI_IN (5 | CONFIG_TYPE_INT) /* config_get_int() */
#define CONFIG_MEMORY (6 | CONFIG_TYPE_INT) /* config_get_int() */
#define CONFIG_STRING (0 | CONFIG_TYPE_STRING) /* config_get_string() */
#define CONFIG_FNAME (1 | CONFIG_TYPE_STRING) /* config_get_string() */

View File

@@ -197,8 +197,8 @@ low_iir(int c, int i, double NewSample)
0.93726236021404663000
};
static double y[4][2][NCoef + 1]; /* output samples */
static double x[4][2][NCoef + 1]; /* input samples */
static double y[5][2][NCoef + 1]; /* output samples */
static double x[5][2][NCoef + 1]; /* input samples */
int n;
/* shift the old samples */
@@ -232,8 +232,8 @@ low_cut_iir(int c, int i, double NewSample)
0.93726236021916731000
};
static double y[4][2][NCoef + 1]; /* output samples */
static double x[4][2][NCoef + 1]; /* input samples */
static double y[5][2][NCoef + 1]; /* output samples */
static double x[5][2][NCoef + 1]; /* input samples */
int n;
/* shift the old samples */
@@ -266,8 +266,8 @@ high_iir(int c, int i, double NewSample)
-1.36640781670578510000,
0.52352474706139873000
};
static double y[4][2][NCoef + 1]; /* output samples */
static double x[4][2][NCoef + 1]; /* input samples */
static double y[5][2][NCoef + 1]; /* output samples */
static double x[5][2][NCoef + 1]; /* input samples */
int n;
/* shift the old samples */
@@ -300,8 +300,8 @@ high_cut_iir(int c, int i, double NewSample)
-1.36640781666419950000,
0.52352474703279628000
};
static double y[4][2][NCoef + 1]; /* output samples */
static double x[4][2][NCoef + 1]; /* input samples */
static double y[5][2][NCoef + 1]; /* output samples */
static double x[5][2][NCoef + 1]; /* input samples */
int n;
/* shift the old samples */
@@ -334,8 +334,8 @@ deemph_iir(int i, double NewSample)
-1.05429146278569141337,
0.26412280202756849290
};
static double y[4][NCoef + 1]; /* output samples */
static double x[4][NCoef + 1]; /* input samples */
static double y[5][NCoef + 1]; /* output samples */
static double x[5][NCoef + 1]; /* input samples */
int n;
/* shift the old samples */
@@ -372,8 +372,8 @@ sb_iir(int c, int i, double NewSample)
0.55326988968868285000
};
static double y[4][2][NCoef + 1]; /* output samples */
static double x[4][2][NCoef + 1]; /* input samples */
static double y[5][2][NCoef + 1]; /* output samples */
static double x[5][2][NCoef + 1]; /* input samples */
int n;
/* shift the old samples */
@@ -395,7 +395,7 @@ sb_iir(int c, int i, double NewSample)
#define NCoef 1
#define SB16_NCoef 51
extern double low_fir_sb16_coef[4][SB16_NCoef];
extern double low_fir_sb16_coef[5][SB16_NCoef];
static inline double
low_fir_sb16(int c, int i, double NewSample)
@@ -422,28 +422,28 @@ low_fir_sb16(int c, int i, double NewSample)
return out;
}
extern double low_fir_pas16_coef[4][SB16_NCoef];
extern double low_fir_pas16_coef[SB16_NCoef];
static inline double
low_fir_pas16(int c, int i, double NewSample)
low_fir_pas16(const int i, const double NewSample)
{
static double x[4][2][SB16_NCoef + 1]; // input samples
static int pos[4] = { 0, 0, 0, 0 };
double out = 0.0;
static double x[2][SB16_NCoef + 1]; // input samples
static int pos = 0;
double out = 0.0;
int n;
/* Calculate the new output */
x[c][i][pos[c]] = NewSample;
x[i][pos] = NewSample;
for (n = 0; n < ((SB16_NCoef + 1) - pos[c]) && n < SB16_NCoef; n++)
out += low_fir_pas16_coef[c][n] * x[c][i][n + pos[c]];
for (n = 0; n < ((SB16_NCoef + 1) - pos) && n < SB16_NCoef; n++)
out += low_fir_pas16_coef[n] * x[i][n + pos];
for (; n < SB16_NCoef; n++)
out += low_fir_pas16_coef[c][n] * x[c][i][(n + pos[c]) - (SB16_NCoef + 1)];
out += low_fir_pas16_coef[n] * x[i][(n + pos) - (SB16_NCoef + 1)];
if (i == 1) {
pos[c]++;
if (pos[c] > SB16_NCoef)
pos[c] = 0;
pos++;
if (pos > SB16_NCoef)
pos = 0;
}
return out;

View File

@@ -114,6 +114,7 @@ extern double AGPCLK;
extern uint64_t PITCONST;
extern uint64_t PAS16CONST;
extern uint64_t PAS16CONST2;
extern uint64_t PASSCSICONST;
extern uint64_t ISACONST;
extern uint64_t CGACONST;
extern uint64_t MDACONST;

View File

@@ -22,12 +22,14 @@
#define EMU_SCSI_H
/* Configuration. */
#define SCSI_BUS_MAX 4 /* currently we support up to 4 controllers */
#define SCSI_CARD_MAX 4
#define SCSI_BUS_MAX 9 /* currently we support up to 9 controllers:
up to 1 on-board + up to 4x pas plus/16 + up to 4 scsi controllers */
#define SCSI_ID_MAX 16 /* 16 on wide buses */
#define SCSI_LUN_MAX 8 /* always 8 */
#define SCSI_ID_MAX 16 /* 16 on wide buses */
#define SCSI_LUN_MAX 8 /* always 8 */
extern int scsi_card_current[SCSI_BUS_MAX];
extern int scsi_card_current[SCSI_CARD_MAX];
extern int scsi_card_available(int card);
#ifdef EMU_DEVICE_H

View File

@@ -88,6 +88,7 @@ typedef struct ncr_t {
uint8_t target_id;
uint8_t tx_data;
uint8_t msglun;
uint8_t irq_state;
uint8_t command[20];
uint8_t msgout[4];
@@ -108,10 +109,14 @@ typedef struct ncr_t {
int data_pos;
int irq;
int simple_pseudo_dma;
uint32_t block_count;
double period;
void *priv;
void (*dma_init_ext)(void *priv, void *ext_priv, int send);
void (*dma_mode_ext)(void *priv, void *ext_priv);
int (*dma_send_ext)(void *priv, void *ext_priv);
int (*dma_initiator_receive_ext)(void *priv, void *ext_priv);
@@ -121,10 +126,12 @@ typedef struct ncr_t {
extern int ncr5380_cmd_len[8];
extern void ncr5380_irq(ncr_t *ncr, int set_irq);
extern void ncr5380_set_irq(ncr_t *ncr, int irq);
extern uint32_t ncr5380_get_bus_host(ncr_t *ncr);
extern void ncr5380_bus_read(ncr_t *ncr);
extern void ncr5380_bus_update(ncr_t *ncr, int bus);
extern void ncr5380_write(uint16_t port, uint8_t val, ncr_t *ncr);
extern uint8_t ncr5380_drq(ncr_t *ncr);
extern uint8_t ncr5380_read(uint16_t port, ncr_t *ncr);
#ifdef EMU_DEVICE_H
@@ -138,6 +145,7 @@ extern const device_t scsi_ls2000_device;
#if defined(DEV_BRANCH) && defined(USE_SUMO)
extern const device_t scsi_scsiat_device;
#endif
extern const device_t scsi_pas_device;
#endif
#endif /*SCSI_NCR5380_H*/

View File

@@ -0,0 +1,62 @@
/*
* 86Box A hypervisor and IBM PC system emulator that specializes in
* running old operating systems and software designed for IBM
* PC systems and compatibles from 1981 through fairly recent
* system designs based on the PCI bus.
*
* This file is part of the 86Box distribution.
*
* Implementation of the NCR 53c400 series of SCSI Host Adapters
* made by NCR. These controllers were designed for the ISA and MCA bus.
*
* Authors: Sarah Walker, <https://pcem-emulator.co.uk/>
* TheCollector1995, <mariogplayer@gmail.com>
* Fred N. van Kempen, <decwiz@yahoo.com>
*
* Copyright 2017-2018 Sarah Walker.
* Copyright 2017-2018 Fred N. van Kempen.
* Copyright 2017-2024 TheCollector1995.
*/
#ifndef SCSI_NCR53C400_H
#define SCSI_NCR53C400_H
typedef struct ncr53c400_t {
rom_t bios_rom;
mem_mapping_t mapping;
ncr_t ncr;
uint8_t buffer[512];
uint8_t int_ram[0x40];
uint8_t ext_ram[0x600];
uint32_t rom_addr;
uint16_t base;
int8_t type;
uint8_t block_count;
uint8_t status_ctrl;
int simple_ctrl;
int block_count_loaded;
int buffer_pos;
int buffer_host_pos;
int busy;
uint8_t pos_regs[8];
pc_timer_t timer;
} ncr53c400_t;
#define CTRL_DATA_DIR 0x40
#define STATUS_BUFFER_NOT_READY 0x04
#define STATUS_5380_ACCESSIBLE 0x80
extern void ncr53c400_simple_write(uint8_t val, void *priv);
extern void ncr53c400_write(uint32_t addr, uint8_t val, void *priv);
extern uint8_t ncr53c400_simple_read(void *priv);
extern uint8_t ncr53c400_read(uint32_t addr, void *priv);
extern void ncr53c400_callback(void *priv);
#endif /*SCSI_NCR53C400_H*/

View File

@@ -390,12 +390,12 @@ typedef struct emu8k_t {
int16_t out_r;
emu8k_chorus_eng_t chorus_engine;
int32_t chorus_in_buffer[SOUNDBUFLEN];
int32_t chorus_in_buffer[WTBUFLEN];
emu8k_reverb_eng_t reverb_engine;
int32_t reverb_in_buffer[SOUNDBUFLEN];
int32_t reverb_in_buffer[WTBUFLEN];
int pos;
int32_t buffer[SOUNDBUFLEN * 2];
int32_t buffer[WTBUFLEN * 2];
uint16_t addr;
} emu8k_t;

View File

@@ -4,13 +4,16 @@
#include <86box/fifo.h>
/*Sound Blaster Clones, for quirks*/
#define SB_SUBTYPE_DEFAULT 0 /*Handle as a Creative card*/
#define SB_SUBTYPE_CLONE_AZT2316A_0X11 1 /*Aztech Sound Galaxy Pro 16 AB, DSP 3.1 - SBPRO2 clone*/
#define SB_SUBTYPE_CLONE_AZT1605_0X0C 2 /*Aztech Sound Galaxy Nova 16 Extra / Packard Bell Forte 16, DSP 2.1 - SBPRO2 clone*/
#define SB_SUBTYPE_ESS_ES1688 3 /* ESS Technology ES1688 */
#define SB_SUBTYPE_DEFAULT 0 /* Handle as a Creative card */
#define SB_SUBTYPE_CLONE_AZT2316A_0X11 1 /* Aztech Sound Galaxy Pro 16 AB, DSP 3.1 - SBPRO2 clone */
#define SB_SUBTYPE_CLONE_AZT1605_0X0C 2 /* Aztech Sound Galaxy Nova 16 Extra /
Packard Bell Forte 16, DSP 2.1 - SBPRO2 clone */
#define SB_SUBTYPE_ESS_ES688 3 /* ESS Technology ES688 */
#define SB_SUBTYPE_ESS_ES1688 4 /* ESS Technology ES1688 */
/* ESS-related */
#define IS_ESS(dsp) ((dsp)->sb_subtype == SB_SUBTYPE_ESS_ES1688) /* check for future ESS cards here */
#define IS_ESS(dsp) ((dsp)->sb_subtype >= SB_SUBTYPE_ESS_ES688) /* Check for future ESS cards here */
#define IS_NOT_ESS(dsp) ((dsp)->sb_subtype < SB_SUBTYPE_ESS_ES688) /* Check for future ESS cards here */
/* aztech-related */
#define IS_AZTECH(dsp) ((dsp)->sb_subtype == SB_SUBTYPE_CLONE_AZT2316A_0X11 || (dsp)->sb_subtype == SB_SUBTYPE_CLONE_AZT1605_0X0C) /* check for future AZT cards here */
@@ -51,6 +54,10 @@ typedef struct sb_dsp_t {
void *dma_priv;
uint8_t sb_read_data[256];
uint8_t dma_ff;
int dma_data;
int sb_read_wp;
int sb_read_rp;
int sb_speaker;
@@ -116,6 +123,8 @@ typedef struct sb_dsp_t {
int sbenable;
int sb_enable_i;
int state;
pc_timer_t output_timer;
pc_timer_t input_timer;

View File

@@ -39,6 +39,9 @@ extern int sound_gain;
#define CD_FREQ FREQ_44100
#define CD_BUFLEN (CD_FREQ / 10)
#define WT_FREQ FREQ_44100
#define WTBUFLEN (MUSIC_FREQ / 45)
enum {
SOUND_NONE = 0,
SOUND_INTERNAL
@@ -50,7 +53,9 @@ extern int speakval;
extern int speakon;
extern int sound_pos_global;
extern int music_pos_global;
extern int wavetable_pos_global;
extern int sound_card_current[SOUND_CARD_MAX];
@@ -62,6 +67,10 @@ extern void music_add_handler(void (*get_buffer)(int32_t *buffer,
int len, void *priv),
void *priv);
extern void wavetable_add_handler(void (*get_buffer)(int32_t *buffer,
int len, void *priv),
void *priv);
extern void sound_set_cd_audio_filter(void (*filter)(int channel,
double *buffer, void *priv),
void *priv);
@@ -94,9 +103,10 @@ extern void sound_cd_thread_reset(void);
extern void closeal(void);
extern void inital(void);
extern void givealbuffer(void *buf);
extern void givealbuffer_music(void *buf);
extern void givealbuffer_cd(void *buf);
extern void givealbuffer(const void *buf);
extern void givealbuffer_music(const void *buf);
extern void givealbuffer_wt(const void *buf);
extern void givealbuffer_cd(const void *buf);
#define sb_vibra16c_onboard_relocate_base sb_vibra16s_onboard_relocate_base
extern void sb_vibra16s_onboard_relocate_base(uint16_t new_addr, void *priv);
@@ -113,30 +123,16 @@ extern const device_t acermagic_s20_device;
extern const device_t mirosound_pcm10_device;
extern const device_t azt1605_device;
/* Ensoniq AudioPCI */
extern const device_t es1371_device;
extern const device_t es1371_onboard_device;
/* C-Media CMI8x38 */
extern const device_t cmi8338_device;
extern const device_t cmi8338_onboard_device;
extern const device_t cmi8738_device;
extern const device_t cmi8738_onboard_device;
extern const device_t cmi8738_6ch_onboard_device;
/* Creative Labs Game Blaster */
extern const device_t cms_device;
/* Gravis UltraSound and UltraSound Max */
extern const device_t gus_device;
/* Pro Audio Spectrum 16 */
extern const device_t pasplus_device;
extern const device_t pas16_device;
/* IBM PS/1 Audio Card */
extern const device_t ps1snd_device;
/* Tandy PSSJ */
extern const device_t pssj_device;
extern const device_t pssj_isa_device;
/* Tandy PSG */
extern const device_t tndy_device;
/* Creative Labs Sound Blaster */
extern const device_t sb_1_device;
extern const device_t sb_15_device;
@@ -163,13 +159,6 @@ extern const device_t sb_awe64_value_device;
extern const device_t sb_awe64_device;
extern const device_t sb_awe64_gold_device;
/* Innovation SSI-2001 */
extern const device_t ssi2001_device;
/* Windows Sound System */
extern const device_t wss_device;
extern const device_t ncr_business_audio_device;
/* Crystal CS423x */
extern const device_t cs4235_device;
extern const device_t cs4235_onboard_device;
@@ -177,15 +166,43 @@ extern const device_t cs4236b_device;
extern const device_t cs4237b_device;
extern const device_t cs4238b_device;
/* C-Media CMI8x38 */
extern const device_t cmi8338_device;
extern const device_t cmi8338_onboard_device;
extern const device_t cmi8738_device;
extern const device_t cmi8738_onboard_device;
extern const device_t cmi8738_6ch_onboard_device;
/* ESS Technology */
extern const device_t ess_688_device;
extern const device_t ess_ess0100_pnp_device;
extern const device_t ess_1688_device;
extern const device_t ess_ess0102_pnp_device;
extern const device_t ess_ess0968_pnp_device;
extern const device_t ess_soundpiper_16_mca_device;
extern const device_t ess_soundpiper_32_mca_device;
extern const device_t ess_chipchat_16_mca_device;
/* Ensoniq AudioPCI */
extern const device_t es1371_device;
extern const device_t es1371_onboard_device;
/* Gravis UltraSound and UltraSound Max */
extern const device_t gus_device;
/* IBM PS/1 Audio Card */
extern const device_t ps1snd_device;
/* Innovation SSI-2001 */
extern const device_t ssi2001_device;
/* Pro Audio Spectrum 16 */
extern const device_t pasplus_device;
extern const device_t pas16_device;
/* Tandy PSSJ */
extern const device_t pssj_device;
extern const device_t pssj_isa_device;
/* Tandy PSG */
extern const device_t tndy_device;
/* Windows Sound System */
extern const device_t wss_device;
extern const device_t ncr_business_audio_device;
#endif