Initial commit for AC97

This commit is contained in:
RichardG867
2021-07-11 16:58:52 -03:00
parent ee253ad0e9
commit b9c68bf277
13 changed files with 1115 additions and 29 deletions

View File

@@ -65,7 +65,8 @@ enum {
DEVICE_EISA = 0x100, /* requires the EISA bus */
DEVICE_VLB = 0x200, /* requires the PCI bus */
DEVICE_PCI = 0x400, /* requires the VLB bus */
DEVICE_AGP = 0x800 /* requires the AGP bus */
DEVICE_AGP = 0x800, /* requires the AGP bus */
DEVICE_AC97 = 0x1000 /* requires the AC'97 bus */
};

View File

@@ -0,0 +1,49 @@
/*
* 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.
*
* Definitions for AC'97 audio emulation.
*
*
*
* Authors: RichardG, <richardg867@gmail.com>
*
* Copyright 2021 RichardG.
*/
#ifndef EMU_SND_AC97_H
# define EMU_SND_AC97_H
typedef struct {
uint32_t id;
uint8_t regs[128];
} ac97_codec_t;
extern uint8_t ac97_codec_read(ac97_codec_t *dev, uint8_t reg);
extern void ac97_codec_write(ac97_codec_t *dev, uint8_t reg, uint8_t val);
extern void ac97_codec_reset(void *priv);
extern void ac97_via_set_slot(void *priv, int slot, int irq_pin);
extern uint8_t ac97_via_read_status(void *priv, uint8_t modem);
extern void ac97_via_remap_audio_sgd(void *priv, uint16_t new_io_base, uint8_t enable);
extern void ac97_via_remap_modem_sgd(void *priv, uint16_t new_io_base, uint8_t enable);
extern void ac97_via_remap_audio_codec(void *priv, uint16_t new_io_base, uint8_t enable);
extern void ac97_via_remap_modem_codec(void *priv, uint16_t new_io_base, uint8_t enable);
#ifdef EMU_DEVICE_H
extern ac97_codec_t **ac97_codec, **ac97_modem_codec;
extern int ac97_codec_count, ac97_modem_codec_count;
extern const device_t alc100_device;
extern const device_t ac97_via_device;
#endif
#endif