diff options
| author | 2026-05-09 14:52:07 +0200 | |
|---|---|---|
| committer | 2026-05-09 16:24:54 +0200 | |
| commit | 15af2f9c5962df3a0a98270f105d2f8782517816 (patch) | |
| tree | 35d6bbd3ebb6118b516de35c0ad4dba1c14adf56 /src | |
| 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')
| -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 | ||||
| -rw-r--r-- | src/mame/misc/voyager.cpp | 5 |
4 files changed, 35 insertions, 3 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); diff --git a/src/mame/misc/voyager.cpp b/src/mame/misc/voyager.cpp index 5a479d8eb59..83a7dcd9fd5 100644 --- a/src/mame/misc/voyager.cpp +++ b/src/mame/misc/voyager.cpp @@ -12,6 +12,7 @@ All of these games run Linux. Motherboard is FIC AZ11EA with AMD Duron processor of unknown speed Chipset: VIA KT133a with VT8363A Northbridge and VT82C686B Southbridge Video: Jaton 3DForce2MX-32, based on nVidia GeForce 2MX chipset w/32 MB of VRAM +Sound: Trident 4DWave, unknown if -DX or -NX I/O: JAMMA adapter board connects to parallel port, VGA out, audio out. Labelled "MEGAJAMMA 101 REV A2" for the stand-up Voyager @@ -21,7 +22,9 @@ Upright Voyager runs at 15 kHz standard res, sit-down at 24 kHz medium res. TODO: - VIA KT133a chipset support, GeForce 2MX video support, lots of things ;-) -- Run this under shutms11 will report an AC'97 error for a Trident 4DWave PCI card. +- In ga6vx: errors on a few things (mostly on AGP mounting, and "SIOCADDRT: Network is unreachable"), + eventually black screen when entering in X11 video mode due of DDC. + If bypassed (test eax,eax on a tight loop) it will start dialoguing with the LPT1 *************************************************************************************/ |
