Run clang-format on all my new code

This commit is contained in:
RichardG867 2022-03-16 14:12:45 -03:00
parent 66e565000f
commit fd6646f21b
7 changed files with 1877 additions and 1857 deletions

File diff suppressed because it is too large Load diff

View file

@ -15,12 +15,12 @@
* Copyright 2022 RichardG. * Copyright 2022 RichardG.
*/ */
#ifndef EMU_GDBSTUB_H #ifndef EMU_GDBSTUB_H
# define EMU_GDBSTUB_H #define EMU_GDBSTUB_H
#include <86box/mem.h> #include <86box/mem.h>
#define GDBSTUB_MEM_READ 0 #define GDBSTUB_MEM_READ 0
#define GDBSTUB_MEM_WRITE 16 #define GDBSTUB_MEM_WRITE 16
#define GDBSTUB_MEM_AWATCH 32 #define GDBSTUB_MEM_AWATCH 32
enum { enum {
GDBSTUB_EXEC = 0, GDBSTUB_EXEC = 0,
@ -35,21 +35,21 @@ enum {
#ifdef USE_GDBSTUB #ifdef USE_GDBSTUB
#define GDBSTUB_MEM_ACCESS(addr, access, width) \ # define GDBSTUB_MEM_ACCESS(addr, access, width) \
uint32_t gdbstub_page = addr >> MEM_GRANULARITY_BITS; \ uint32_t gdbstub_page = addr >> MEM_GRANULARITY_BITS; \
if (gdbstub_watch_pages[gdbstub_page >> 6] & (1 << (gdbstub_page & 63)) || (addr == 0xb8dd4)) { \ if (gdbstub_watch_pages[gdbstub_page >> 6] & (1 << (gdbstub_page & 63))) { \
uint32_t gdbstub_addrs[width]; \ uint32_t gdbstub_addrs[width]; \
for (int gdbstub_i = 0; gdbstub_i < width; gdbstub_i++) \ for (int gdbstub_i = 0; gdbstub_i < width; gdbstub_i++) \
gdbstub_addrs[gdbstub_i] = addr + gdbstub_i; \ gdbstub_addrs[gdbstub_i] = addr + gdbstub_i; \
gdbstub_mem_access(gdbstub_addrs, access | width); \ gdbstub_mem_access(gdbstub_addrs, access | width); \
} }
#define GDBSTUB_MEM_ACCESS_FAST(addrs, access, width) \ # define GDBSTUB_MEM_ACCESS_FAST(addrs, access, width) \
uint32_t gdbstub_page = addr >> MEM_GRANULARITY_BITS; \ uint32_t gdbstub_page = addr >> MEM_GRANULARITY_BITS; \
if (gdbstub_watch_pages[gdbstub_page >> 6] & (1 << (gdbstub_page & 63)) || (addr == 0xb8dd4)) \ if (gdbstub_watch_pages[gdbstub_page >> 6] & (1 << (gdbstub_page & 63))) \
gdbstub_mem_access(addrs, access | width); gdbstub_mem_access(addrs, access | width);
extern int gdbstub_step, gdbstub_next_asap; extern int gdbstub_step, gdbstub_next_asap;
extern uint64_t gdbstub_watch_pages[(((uint32_t) -1) >> (MEM_GRANULARITY_BITS + 6)) + 1]; extern uint64_t gdbstub_watch_pages[(((uint32_t) -1) >> (MEM_GRANULARITY_BITS + 6)) + 1];
extern void gdbstub_cpu_init(); extern void gdbstub_cpu_init();
@ -61,17 +61,17 @@ extern void gdbstub_close();
#else #else
#define GDBSTUB_MEM_ACCESS(addr, access, width) # define GDBSTUB_MEM_ACCESS(addr, access, width)
#define GDBSTUB_MEM_ACCESS_FAST(addrs, access, width) # define GDBSTUB_MEM_ACCESS_FAST(addrs, access, width)
#define gdbstub_step 0 # define gdbstub_step 0
#define gdbstub_next_asap 0 # define gdbstub_next_asap 0
#define gdbstub_cpu_init() # define gdbstub_cpu_init()
#define gdbstub_instruction() 0 # define gdbstub_instruction() 0
#define gdbstub_int3() 0 # define gdbstub_int3() 0
#define gdbstub_init() # define gdbstub_init()
#define gdbstub_close() # define gdbstub_close()
#endif #endif

View file

@ -423,7 +423,7 @@ ad1848_update(ad1848_t *ad1848)
static int16_t static int16_t
ad1848_process_mulaw(uint8_t byte) ad1848_process_mulaw(uint8_t byte)
{ {
byte = ~byte; byte = ~byte;
int16_t dec = ((byte & 0x0f) << 3) + 0x84; int16_t dec = ((byte & 0x0f) << 3) + 0x84;
dec <<= (byte & 0x70) >> 4; dec <<= (byte & 0x70) >> 4;
return (byte & 0x80) ? (0x84 - dec) : (dec - 0x84); return (byte & 0x80) ? (0x84 - dec) : (dec - 0x84);
@ -434,18 +434,18 @@ ad1848_process_alaw(uint8_t byte)
{ {
byte ^= 0x55; byte ^= 0x55;
int16_t dec = (byte & 0x0f) << 4; int16_t dec = (byte & 0x0f) << 4;
int seg = (byte & 0x70) >> 4; int seg = (byte & 0x70) >> 4;
switch (seg) { switch (seg) {
case 0: case 0:
dec += 0x8; dec |= 0x8;
break; break;
case 1: case 1:
dec += 0x108; dec |= 0x108;
break; break;
default: default:
dec += 0x108; dec |= 0x108;
dec <<= seg - 1; dec <<= seg - 1;
break; break;
} }
@ -460,7 +460,7 @@ ad1848_process_adpcm(ad1848_t *ad1848)
temp = (ad1848->adpcm_data & 0x0f) + ad1848->adpcm_step; temp = (ad1848->adpcm_data & 0x0f) + ad1848->adpcm_step;
} else { } else {
ad1848->adpcm_data = dma_channel_read(ad1848->dma); ad1848->adpcm_data = dma_channel_read(ad1848->dma);
temp = (ad1848->adpcm_data >> 4) + ad1848->adpcm_step; temp = (ad1848->adpcm_data >> 4) + ad1848->adpcm_step;
} }
if (temp < 0) if (temp < 0)
temp = 0; temp = 0;
@ -533,7 +533,7 @@ ad1848_poll(void *priv)
ad1848->out_r = ad1848_process_alaw(dma_channel_read(ad1848->dma)); ad1848->out_r = ad1848_process_alaw(dma_channel_read(ad1848->dma));
break; break;
/* 0x80 and 0x90 reserved */ /* 0x80 and 0x90 reserved */
case 0xa0: /* Mono, 4-bit ADPCM */ case 0xa0: /* Mono, 4-bit ADPCM */
ad1848->out_l = ad1848->out_r = ad1848_process_adpcm(ad1848); ad1848->out_l = ad1848->out_r = ad1848_process_adpcm(ad1848);
@ -556,7 +556,7 @@ ad1848_poll(void *priv)
ad1848->out_r = dma_channel_read(ad1848->dma) | (temp << 8); ad1848->out_r = dma_channel_read(ad1848->dma) | (temp << 8);
break; break;
/* 0xe0 and 0xf0 reserved */ /* 0xe0 and 0xf0 reserved */
} }
if (ad1848->regs[6] & 0x80) if (ad1848->regs[6] & 0x80)
@ -581,7 +581,7 @@ ad1848_poll(void *priv)
} }
if (!(ad1848->adpcm_pos & 7)) /* ADPCM counts down every 4 bytes */ if (!(ad1848->adpcm_pos & 7)) /* ADPCM counts down every 4 bytes */
ad1848->count--; ad1848->count--;
} else { } else {
ad1848->out_l = ad1848->out_r = 0; ad1848->out_l = ad1848->out_r = 0;
ad1848->cd_vol_l = ad1848->cd_vol_r = 0; ad1848->cd_vol_l = ad1848->cd_vol_r = 0;

File diff suppressed because it is too large Load diff

View file

@ -827,71 +827,71 @@ cs423x_speed_changed(void *priv)
} }
const device_t cs4235_device = { const device_t cs4235_device = {
.name = "Crystal CS4235", .name = "Crystal CS4235",
.internal_name = "cs4235", .internal_name = "cs4235",
.flags = DEVICE_ISA | DEVICE_AT, .flags = DEVICE_ISA | DEVICE_AT,
.local = CRYSTAL_CS4235, .local = CRYSTAL_CS4235,
.init = cs423x_init, .init = cs423x_init,
.close = cs423x_close, .close = cs423x_close,
.reset = cs423x_reset, .reset = cs423x_reset,
{ .available = NULL }, { .available = NULL },
.speed_changed = cs423x_speed_changed, .speed_changed = cs423x_speed_changed,
.force_redraw = NULL, .force_redraw = NULL,
.config = NULL .config = NULL
}; };
const device_t cs4235_onboard_device = { const device_t cs4235_onboard_device = {
.name = "Crystal CS4235 (On-Board)", .name = "Crystal CS4235 (On-Board)",
.internal_name = "cs4235_onboard", .internal_name = "cs4235_onboard",
.flags = DEVICE_ISA | DEVICE_AT, .flags = DEVICE_ISA | DEVICE_AT,
.local = CRYSTAL_CS4235 | CRYSTAL_NOEEPROM, .local = CRYSTAL_CS4235 | CRYSTAL_NOEEPROM,
.init = cs423x_init, .init = cs423x_init,
.close = cs423x_close, .close = cs423x_close,
.reset = cs423x_reset, .reset = cs423x_reset,
{ .available = NULL }, { .available = NULL },
.speed_changed = cs423x_speed_changed, .speed_changed = cs423x_speed_changed,
.force_redraw = NULL, .force_redraw = NULL,
.config = NULL .config = NULL
}; };
const device_t cs4236b_device = { const device_t cs4236b_device = {
.name = "Crystal CS4236B", .name = "Crystal CS4236B",
.internal_name = "cs4236b", .internal_name = "cs4236b",
.flags = DEVICE_ISA | DEVICE_AT, .flags = DEVICE_ISA | DEVICE_AT,
.local = CRYSTAL_CS4236B, .local = CRYSTAL_CS4236B,
.init = cs423x_init, .init = cs423x_init,
.close = cs423x_close, .close = cs423x_close,
.reset = cs423x_reset, .reset = cs423x_reset,
{ .available = NULL }, { .available = NULL },
.speed_changed = cs423x_speed_changed, .speed_changed = cs423x_speed_changed,
.force_redraw = NULL, .force_redraw = NULL,
.config = NULL .config = NULL
}; };
const device_t cs4237b_device = { const device_t cs4237b_device = {
.name = "Crystal CS4237B", .name = "Crystal CS4237B",
.internal_name = "cs4237b", .internal_name = "cs4237b",
.flags = DEVICE_ISA | DEVICE_AT, .flags = DEVICE_ISA | DEVICE_AT,
.local = CRYSTAL_CS4237B, .local = CRYSTAL_CS4237B,
.init = cs423x_init, .init = cs423x_init,
.close = cs423x_close, .close = cs423x_close,
.reset = cs423x_reset, .reset = cs423x_reset,
{ .available = NULL }, { .available = NULL },
.speed_changed = cs423x_speed_changed, .speed_changed = cs423x_speed_changed,
.force_redraw = NULL, .force_redraw = NULL,
.config = NULL .config = NULL
}; };
const device_t cs4238b_device = { const device_t cs4238b_device = {
.name = "Crystal CS4238B", .name = "Crystal CS4238B",
.internal_name = "cs4238b", .internal_name = "cs4238b",
.flags = DEVICE_ISA | DEVICE_AT, .flags = DEVICE_ISA | DEVICE_AT,
.local = CRYSTAL_CS4238B, .local = CRYSTAL_CS4238B,
.init = cs423x_init, .init = cs423x_init,
.close = cs423x_close, .close = cs423x_close,
.reset = cs423x_reset, .reset = cs423x_reset,
{ .available = NULL }, { .available = NULL },
.speed_changed = cs423x_speed_changed, .speed_changed = cs423x_speed_changed,
.force_redraw = NULL, .force_redraw = NULL,
.config = NULL .config = NULL
}; };

View file

@ -377,12 +377,12 @@ sb_get_buffer_sb16_awe32(int32_t *buffer, int len, void *p)
: 0; : 0;
if (mixer->output_filter) { if (mixer->output_filter) {
/* We divide by 3 to get the volume down to normal. */ /* We divide by 3 to get the volume down to normal. */
out_l += (low_fir_sb16(0, 0, (double) sb->dsp.buffer[c]) * mixer->voice_l) / 3.0; out_l += (low_fir_sb16(0, 0, (double) sb->dsp.buffer[c]) * mixer->voice_l) / 3.0;
out_r += (low_fir_sb16(0, 1, (double) sb->dsp.buffer[c + 1]) * mixer->voice_r) / 3.0; out_r += (low_fir_sb16(0, 1, (double) sb->dsp.buffer[c + 1]) * mixer->voice_r) / 3.0;
} else { } else {
out_l += (((double) sb->dsp.buffer[c]) * mixer->voice_l) / 3.0; out_l += (((double) sb->dsp.buffer[c]) * mixer->voice_l) / 3.0;
out_r += (((double) sb->dsp.buffer[c + 1]) * mixer->voice_r) / 3.0; out_r += (((double) sb->dsp.buffer[c + 1]) * mixer->voice_r) / 3.0;
} }
out_l *= mixer->master_l; out_l *= mixer->master_l;
@ -1764,10 +1764,10 @@ sb_16_init(const device_t *info)
&sb->opl); &sb->opl);
} }
sb->mixer_enabled = 1; sb->mixer_enabled = 1;
sb->mixer_sb16.output_filter = 1; sb->mixer_sb16.output_filter = 1;
io_sethandler(addr + 4, 0x0002, sb_ct1745_mixer_read, NULL, NULL, io_sethandler(addr + 4, 0x0002, sb_ct1745_mixer_read, NULL, NULL,
sb_ct1745_mixer_write, NULL, NULL, sb); sb_ct1745_mixer_write, NULL, NULL, sb);
sound_add_handler(sb_get_buffer_sb16_awe32, sb); sound_add_handler(sb_get_buffer_sb16_awe32, sb);
sound_set_cd_audio_filter(sb16_awe32_filter_cd_audio, sb); sound_set_cd_audio_filter(sb16_awe32_filter_cd_audio, sb);
@ -1797,7 +1797,7 @@ sb_16_pnp_init(const device_t *info)
sb_dsp_init(&sb->dsp, SB16, SB_SUBTYPE_DEFAULT, sb); sb_dsp_init(&sb->dsp, SB16, SB_SUBTYPE_DEFAULT, sb);
sb_ct1745_mixer_reset(sb); sb_ct1745_mixer_reset(sb);
sb->mixer_enabled = 1; sb->mixer_enabled = 1;
sb->mixer_sb16.output_filter = 1; sb->mixer_sb16.output_filter = 1;
sound_add_handler(sb_get_buffer_sb16_awe32, sb); sound_add_handler(sb_get_buffer_sb16_awe32, sb);
sound_set_cd_audio_filter(sb16_awe32_filter_cd_audio, sb); sound_set_cd_audio_filter(sb16_awe32_filter_cd_audio, sb);
@ -1841,7 +1841,6 @@ sb_16_compat_init(const device_t *info)
return sb; return sb;
} }
static int static int
sb_awe32_available() sb_awe32_available()
{ {
@ -1915,10 +1914,10 @@ sb_awe32_init(const device_t *info)
&sb->opl); &sb->opl);
} }
sb->mixer_enabled = 1; sb->mixer_enabled = 1;
sb->mixer_sb16.output_filter = 1; sb->mixer_sb16.output_filter = 1;
io_sethandler(addr + 4, 0x0002, sb_ct1745_mixer_read, NULL, NULL, io_sethandler(addr + 4, 0x0002, sb_ct1745_mixer_read, NULL, NULL,
sb_ct1745_mixer_write, NULL, NULL, sb); sb_ct1745_mixer_write, NULL, NULL, sb);
sound_add_handler(sb_get_buffer_sb16_awe32, sb); sound_add_handler(sb_get_buffer_sb16_awe32, sb);
sound_set_cd_audio_filter(sb16_awe32_filter_cd_audio, sb); sound_set_cd_audio_filter(sb16_awe32_filter_cd_audio, sb);
@ -1952,7 +1951,7 @@ sb_awe32_pnp_init(const device_t *info)
sb_dsp_init(&sb->dsp, ((info->local == 2) || (info->local == 3) || (info->local == 4)) ? SBAWE64 : SBAWE32, SB_SUBTYPE_DEFAULT, sb); sb_dsp_init(&sb->dsp, ((info->local == 2) || (info->local == 3) || (info->local == 4)) ? SBAWE64 : SBAWE32, SB_SUBTYPE_DEFAULT, sb);
sb_ct1745_mixer_reset(sb); sb_ct1745_mixer_reset(sb);
sb->mixer_enabled = 1; sb->mixer_enabled = 1;
sb->mixer_sb16.output_filter = 1; sb->mixer_sb16.output_filter = 1;
sound_add_handler(sb_get_buffer_sb16_awe32, sb); sound_add_handler(sb_get_buffer_sb16_awe32, sb);
sound_set_cd_audio_filter(sb16_awe32_filter_cd_audio, sb); sound_set_cd_audio_filter(sb16_awe32_filter_cd_audio, sb);
@ -2425,255 +2424,253 @@ static const device_config_t sb_awe64_gold_config[] = {
// clang-format on // clang-format on
const device_t sb_1_device = { const device_t sb_1_device = {
.name = "Sound Blaster v1.0", .name = "Sound Blaster v1.0",
.internal_name = "sb", .internal_name = "sb",
.flags = DEVICE_ISA, .flags = DEVICE_ISA,
.local = 0, .local = 0,
.init = sb_1_init, .init = sb_1_init,
.close = sb_close, .close = sb_close,
.reset = NULL, .reset = NULL,
{ .available = NULL }, { .available = NULL },
.speed_changed = sb_speed_changed, .speed_changed = sb_speed_changed,
.force_redraw = NULL, .force_redraw = NULL,
.config = sb_config .config = sb_config
}; };
const device_t sb_15_device = { const device_t sb_15_device = {
.name = "Sound Blaster v1.5", .name = "Sound Blaster v1.5",
.internal_name = "sb1.5", .internal_name = "sb1.5",
.flags = DEVICE_ISA, .flags = DEVICE_ISA,
.local = 0, .local = 0,
.init = sb_15_init, .init = sb_15_init,
.close = sb_close, .close = sb_close,
.reset = NULL, .reset = NULL,
{ .available = NULL }, { .available = NULL },
.speed_changed = sb_speed_changed, .speed_changed = sb_speed_changed,
.force_redraw = NULL, .force_redraw = NULL,
.config = sb15_config .config = sb15_config
}; };
const device_t sb_mcv_device = { const device_t sb_mcv_device = {
.name = "Sound Blaster MCV", .name = "Sound Blaster MCV",
.internal_name = "sbmcv", .internal_name = "sbmcv",
.flags = DEVICE_MCA, .flags = DEVICE_MCA,
.local = 0, .local = 0,
.init = sb_mcv_init, .init = sb_mcv_init,
.close = sb_close, .close = sb_close,
.reset = NULL, .reset = NULL,
{ .available = NULL }, { .available = NULL },
.speed_changed = sb_speed_changed, .speed_changed = sb_speed_changed,
.force_redraw = NULL, .force_redraw = NULL,
.config = sb_mcv_config .config = sb_mcv_config
}; };
const device_t sb_2_device = { const device_t sb_2_device = {
.name = "Sound Blaster v2.0", .name = "Sound Blaster v2.0",
.internal_name = "sb2.0", .internal_name = "sb2.0",
.flags = DEVICE_ISA, .flags = DEVICE_ISA,
.local = 0, .local = 0,
.init = sb_2_init, .init = sb_2_init,
.close = sb_close, .close = sb_close,
.reset = NULL, .reset = NULL,
{ .available = NULL }, { .available = NULL },
.speed_changed = sb_speed_changed, .speed_changed = sb_speed_changed,
.force_redraw = NULL, .force_redraw = NULL,
.config = sb2_config .config = sb2_config
}; };
const device_t sb_pro_v1_device = { const device_t sb_pro_v1_device = {
.name = "Sound Blaster Pro v1", .name = "Sound Blaster Pro v1",
.internal_name = "sbprov1", .internal_name = "sbprov1",
.flags = DEVICE_ISA, .flags = DEVICE_ISA,
.local = 0, .local = 0,
.init = sb_pro_v1_init, .init = sb_pro_v1_init,
.close = sb_close, .close = sb_close,
.reset = NULL, .reset = NULL,
{ .available = NULL }, { .available = NULL },
.speed_changed = sb_speed_changed, .speed_changed = sb_speed_changed,
.force_redraw = NULL, .force_redraw = NULL,
.config = sb_pro_config .config = sb_pro_config
}; };
const device_t sb_pro_v2_device = { const device_t sb_pro_v2_device = {
.name = "Sound Blaster Pro v2", .name = "Sound Blaster Pro v2",
.internal_name = "sbprov2", .internal_name = "sbprov2",
.flags = DEVICE_ISA, .flags = DEVICE_ISA,
.local = 0, .local = 0,
.init = sb_pro_v2_init, .init = sb_pro_v2_init,
.close = sb_close, .close = sb_close,
.reset = NULL, .reset = NULL,
{ .available = NULL }, { .available = NULL },
.speed_changed = sb_speed_changed, .speed_changed = sb_speed_changed,
.force_redraw = NULL, .force_redraw = NULL,
.config = sb_pro_config .config = sb_pro_config
}; };
const device_t sb_pro_mcv_device = { const device_t sb_pro_mcv_device = {
.name = "Sound Blaster Pro MCV", .name = "Sound Blaster Pro MCV",
.internal_name = "sbpromcv", .internal_name = "sbpromcv",
.flags = DEVICE_MCA, .flags = DEVICE_MCA,
.local = 0, .local = 0,
.init = sb_pro_mcv_init, .init = sb_pro_mcv_init,
.close = sb_close, .close = sb_close,
.reset = NULL, .reset = NULL,
{ .available = NULL }, { .available = NULL },
.speed_changed = sb_speed_changed, .speed_changed = sb_speed_changed,
.force_redraw = NULL, .force_redraw = NULL,
.config = NULL .config = NULL
}; };
const device_t sb_pro_compat_device = { const device_t sb_pro_compat_device = {
.name = "Sound Blaster Pro (Compatibility)", .name = "Sound Blaster Pro (Compatibility)",
.internal_name = "sbpro_compat", .internal_name = "sbpro_compat",
.flags = DEVICE_ISA | DEVICE_AT, .flags = DEVICE_ISA | DEVICE_AT,
.local = 0, .local = 0,
.init = sb_pro_compat_init, .init = sb_pro_compat_init,
.close = sb_close, .close = sb_close,
.reset = NULL, .reset = NULL,
{ .available = NULL }, { .available = NULL },
.speed_changed = sb_speed_changed, .speed_changed = sb_speed_changed,
.force_redraw = NULL, .force_redraw = NULL,
.config = NULL .config = NULL
}; };
const device_t sb_16_device = { const device_t sb_16_device = {
.name = "Sound Blaster 16", .name = "Sound Blaster 16",
.internal_name = "sb16", .internal_name = "sb16",
.flags = DEVICE_ISA | DEVICE_AT, .flags = DEVICE_ISA | DEVICE_AT,
.local = 0, .local = 0,
.init = sb_16_init, .init = sb_16_init,
.close = sb_close, .close = sb_close,
.reset = NULL, .reset = NULL,
{ .available = NULL }, { .available = NULL },
.speed_changed = sb_speed_changed, .speed_changed = sb_speed_changed,
.force_redraw = NULL, .force_redraw = NULL,
.config = sb_16_config .config = sb_16_config
}; };
const device_t sb_16_pnp_device = { const device_t sb_16_pnp_device = {
.name = "Sound Blaster 16 PnP", .name = "Sound Blaster 16 PnP",
.internal_name = "sb16_pnp", .internal_name = "sb16_pnp",
.flags = DEVICE_ISA | DEVICE_AT, .flags = DEVICE_ISA | DEVICE_AT,
.local = 0, .local = 0,
.init = sb_16_pnp_init, .init = sb_16_pnp_init,
.close = sb_close, .close = sb_close,
.reset = NULL, .reset = NULL,
{ .available = NULL }, { .available = NULL },
.speed_changed = sb_speed_changed, .speed_changed = sb_speed_changed,
.force_redraw = NULL, .force_redraw = NULL,
.config = sb_16_pnp_config .config = sb_16_pnp_config
}; };
const device_t sb_16_compat_device = const device_t sb_16_compat_device = {
{ .name = "Sound Blaster 16 (Compatibility)",
.name = "Sound Blaster 16 (Compatibility)",
.internal_name = "sb16_compat", .internal_name = "sb16_compat",
.flags = DEVICE_ISA | DEVICE_AT, .flags = DEVICE_ISA | DEVICE_AT,
.local = 1, .local = 1,
.init = sb_16_compat_init, .init = sb_16_compat_init,
.close = sb_close, .close = sb_close,
.reset = NULL, .reset = NULL,
{ .available = NULL }, { .available = NULL },
.speed_changed = sb_speed_changed, .speed_changed = sb_speed_changed,
.force_redraw = NULL, .force_redraw = NULL,
.config = NULL .config = NULL
}; };
const device_t sb_16_compat_nompu_device = const device_t sb_16_compat_nompu_device = {
{ .name = "Sound Blaster 16 (Compatibility - MPU-401 Off)",
.name = "Sound Blaster 16 (Compatibility - MPU-401 Off)",
.internal_name = "sb16_compat", .internal_name = "sb16_compat",
.flags = DEVICE_ISA | DEVICE_AT, .flags = DEVICE_ISA | DEVICE_AT,
.local = 0, .local = 0,
.init = sb_16_compat_init, .init = sb_16_compat_init,
.close = sb_close, .close = sb_close,
.reset = NULL, .reset = NULL,
{ .available = NULL }, { .available = NULL },
.speed_changed =sb_speed_changed, .speed_changed = sb_speed_changed,
.force_redraw = NULL, .force_redraw = NULL,
.config = NULL .config = NULL
}; };
const device_t sb_32_pnp_device = { const device_t sb_32_pnp_device = {
.name = "Sound Blaster 32 PnP", .name = "Sound Blaster 32 PnP",
.internal_name = "sb32_pnp", .internal_name = "sb32_pnp",
.flags = DEVICE_ISA | DEVICE_AT, .flags = DEVICE_ISA | DEVICE_AT,
.local = 0, .local = 0,
.init = sb_awe32_pnp_init, .init = sb_awe32_pnp_init,
.close = sb_awe32_close, .close = sb_awe32_close,
.reset = NULL, .reset = NULL,
{ .available = sb_32_pnp_available }, { .available = sb_32_pnp_available },
.speed_changed = sb_speed_changed, .speed_changed = sb_speed_changed,
.force_redraw = NULL, .force_redraw = NULL,
.config = sb_32_pnp_config .config = sb_32_pnp_config
}; };
const device_t sb_awe32_device = { const device_t sb_awe32_device = {
.name = "Sound Blaster AWE32", .name = "Sound Blaster AWE32",
.internal_name = "sbawe32", .internal_name = "sbawe32",
.flags = DEVICE_ISA | DEVICE_AT, .flags = DEVICE_ISA | DEVICE_AT,
.local = 0, .local = 0,
.init = sb_awe32_init, .init = sb_awe32_init,
.close = sb_awe32_close, .close = sb_awe32_close,
.reset = NULL, .reset = NULL,
{ .available = sb_awe32_available }, { .available = sb_awe32_available },
.speed_changed = sb_speed_changed, .speed_changed = sb_speed_changed,
.force_redraw = NULL, .force_redraw = NULL,
.config = sb_awe32_config .config = sb_awe32_config
}; };
const device_t sb_awe32_pnp_device = { const device_t sb_awe32_pnp_device = {
.name = "Sound Blaster AWE32 PnP", .name = "Sound Blaster AWE32 PnP",
.internal_name = "sbawe32_pnp", .internal_name = "sbawe32_pnp",
.flags = DEVICE_ISA | DEVICE_AT, .flags = DEVICE_ISA | DEVICE_AT,
.local = 1, .local = 1,
.init = sb_awe32_pnp_init, .init = sb_awe32_pnp_init,
.close = sb_awe32_close, .close = sb_awe32_close,
.reset = NULL, .reset = NULL,
{ .available = sb_awe32_pnp_available }, { .available = sb_awe32_pnp_available },
.speed_changed = sb_speed_changed, .speed_changed = sb_speed_changed,
.force_redraw = NULL, .force_redraw = NULL,
.config = sb_awe32_pnp_config .config = sb_awe32_pnp_config
}; };
const device_t sb_awe64_value_device = { const device_t sb_awe64_value_device = {
.name = "Sound Blaster AWE64 Value", .name = "Sound Blaster AWE64 Value",
.internal_name = "sbawe64_value", .internal_name = "sbawe64_value",
.flags = DEVICE_ISA | DEVICE_AT, .flags = DEVICE_ISA | DEVICE_AT,
.local = 2, .local = 2,
.init = sb_awe32_pnp_init, .init = sb_awe32_pnp_init,
.close = sb_awe32_close, .close = sb_awe32_close,
.reset = NULL, .reset = NULL,
{ .available = sb_awe64_value_available }, { .available = sb_awe64_value_available },
.speed_changed = sb_speed_changed, .speed_changed = sb_speed_changed,
.force_redraw = NULL, .force_redraw = NULL,
.config = sb_awe64_value_config .config = sb_awe64_value_config
}; };
const device_t sb_awe64_device = { const device_t sb_awe64_device = {
.name = "Sound Blaster AWE64", .name = "Sound Blaster AWE64",
.internal_name = "sbawe64", .internal_name = "sbawe64",
.flags = DEVICE_ISA | DEVICE_AT, .flags = DEVICE_ISA | DEVICE_AT,
.local = 3, .local = 3,
.init = sb_awe32_pnp_init, .init = sb_awe32_pnp_init,
.close = sb_awe32_close, .close = sb_awe32_close,
.reset = NULL, .reset = NULL,
{ .available = sb_awe64_available }, { .available = sb_awe64_available },
.speed_changed = sb_speed_changed, .speed_changed = sb_speed_changed,
.force_redraw = NULL, .force_redraw = NULL,
.config = sb_awe64_config .config = sb_awe64_config
}; };
const device_t sb_awe64_gold_device = { const device_t sb_awe64_gold_device = {
.name = "Sound Blaster AWE64 Gold", .name = "Sound Blaster AWE64 Gold",
.internal_name = "sbawe64_gold", .internal_name = "sbawe64_gold",
.flags = DEVICE_ISA | DEVICE_AT, .flags = DEVICE_ISA | DEVICE_AT,
.local = 4, .local = 4,
.init = sb_awe32_pnp_init, .init = sb_awe32_pnp_init,
.close = sb_awe32_close, .close = sb_awe32_close,
.reset = NULL, .reset = NULL,
{ .available = sb_awe64_gold_available }, { .available = sb_awe64_gold_available },
.speed_changed = sb_speed_changed, .speed_changed = sb_speed_changed,
.force_redraw = NULL, .force_redraw = NULL,
.config = sb_awe64_gold_config .config = sb_awe64_gold_config
}; };

View file

@ -174,9 +174,9 @@ sb_irq_update_pic(void *priv, int set)
{ {
sb_dsp_t *dsp = (sb_dsp_t *) priv; sb_dsp_t *dsp = (sb_dsp_t *) priv;
if (set) if (set)
picint(1 << dsp->sb_irqnum); picint(1 << dsp->sb_irqnum);
else else
picintc(1 << dsp->sb_irqnum); picintc(1 << dsp->sb_irqnum);
} }
void void