diff options
| author | 2026-05-09 14:52:07 +0200 | |
|---|---|---|
| committer | 2026-05-09 16:24:54 +0200 | |
| commit | 15af2f9c5962df3a0a98270f105d2f8782517816 (patch) | |
| tree | 35d6bbd3ebb6118b516de35c0ad4dba1c14adf56 /src/devices | |
| parent | 8687c53a46d5cf0ffe95557e0f62e2cc6b7d43e1 (diff) | |
sound/ac97_stac9704.cpp: preliminary status/command hookup
* enough to make misc/voyager.cpp happy during Linux boot
Diffstat (limited to 'src/devices')
| -rw-r--r-- | src/devices/bus/pci/trident_4dwavedx.cpp | 4 | ||||
| -rw-r--r-- | src/devices/sound/ac97_stac9704.cpp | 27 | ||||
| -rw-r--r-- | src/devices/sound/ac97_stac9704.h | 2 |
3 files changed, 31 insertions, 2 deletions
diff --git a/src/devices/bus/pci/trident_4dwavedx.cpp b/src/devices/bus/pci/trident_4dwavedx.cpp index f388e9fb2a0..3425466a4a1 100644 --- a/src/devices/bus/pci/trident_4dwavedx.cpp +++ b/src/devices/bus/pci/trident_4dwavedx.cpp @@ -217,13 +217,13 @@ void trident_4dwavedx_device::io_map(address_map &map) // map(0x20, 0x23) Legacy MPU-401 -// map(0x30, 0x31) Legacy Game Port +// map(0x30, 0x31) Legacy Game Port (used by Linux boot in misc/voyager.cpp) // map(0x34, 0x37) Enhanced Game Port 1 // map(0x38, 0x3b) Enhanced Game Port 2 map(0x40, 0x43).rw(m_ac97, FUNC(ac97_stac9704_device::codec_write_r), FUNC(ac97_stac9704_device::codec_write_w)); map(0x44, 0x47).rw(m_ac97, FUNC(ac97_stac9704_device::codec_read_r), FUNC(ac97_stac9704_device::codec_read_w)); -// map(0x48, 0x4b) AC'97 Command/Status + map(0x48, 0x4b).rw(m_ac97, FUNC(ac97_stac9704_device::codec_status_r), FUNC(ac97_stac9704_device::codec_command_w)); // map(0x50, 0x50) 4DWAVE-DX Status (r/o) // map(0x54, 0x55) Legacy SB Frequency (r/o) diff --git a/src/devices/sound/ac97_stac9704.cpp b/src/devices/sound/ac97_stac9704.cpp index ba05b224c20..3d4e5bca28c 100644 --- a/src/devices/sound/ac97_stac9704.cpp +++ b/src/devices/sound/ac97_stac9704.cpp @@ -116,6 +116,33 @@ void ac97_stac9704_device::codec_read_w(offs_t offset, u32 data, u32 mem_mask) } } +/* + * -x-- ---- SoundBlaster Control (0) generate irq at block length done + * --x- ---- (0) 48kHz signal always routed to sound engine (1) 48kHz signal only if there's an active channel + * ---x ---- AC'97 is ready (r/o) + * ---- x--- Record is valid (r/o) + * ---- --x- Digital Audio Data is valid (playback) + * ---- ---x Warm reset + */ +u32 ac97_stac9704_device::codec_status_r(offs_t offset, u32 mem_mask) +{ + if (!machine().side_effects_disabled()) + LOG("%s: codec_status_r\n", machine().describe_context()); + // put codec in a ready state, for misc/voyager.cpp Linux boot + // TODO: needs improvements, and status timings from the attached sound engine. + return 0x12; +} + +void ac97_stac9704_device::codec_command_w(offs_t offset, u32 data, u32 mem_mask) +{ + if (ACCESSING_BITS_0_7) + { + LOG("%s: codec_command_w %02x\n", machine().describe_context(), data); + if (BIT(data, 0)) + this->reset(); + // TODO: other bits + } +} void ac97_stac9704_device::mixer_map(address_map &map) { diff --git a/src/devices/sound/ac97_stac9704.h b/src/devices/sound/ac97_stac9704.h index 248d0205138..9fd05a5e1bc 100644 --- a/src/devices/sound/ac97_stac9704.h +++ b/src/devices/sound/ac97_stac9704.h @@ -18,6 +18,8 @@ public: u32 codec_write_r(offs_t offset, u32 mem_mask = ~0); void codec_read_w(offs_t offset, u32 data, u32 mem_mask = ~0); u32 codec_read_r(offs_t offset, u32 mem_mask = ~0); + void codec_command_w(offs_t offset, u32 data, u32 mem_mask = ~0); + u32 codec_status_r(offs_t offset, u32 mem_mask = ~0); protected: ac97_stac9704_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); |
