Skip to content

tnt: DBDMA channel interrupts are levels held until acknowledged (7500 sound after the boot beep) - #137

Merged
pappadf merged 1 commit into
mainfrom
tnt-dbdma-irq-levels
Sep 5, 2026
Merged

tnt: DBDMA channel interrupts are levels held until acknowledged (7500 sound after the boot beep)#137
pappadf merged 1 commit into
mainfrom
tnt-dbdma-irq-levels

Conversation

@pappadf

@pappadf pappadf commented Sep 5, 2026

Copy link
Copy Markdown
Owner

Summary

The 7500 (and its 8500/9500 siblings) played Open Firmware's boot beep and then went silent for good: no startup chime, no alert beeps, nothing from the Sound control panel, no game audio.

  • Cause: a DBDMA channel completion was raised as a one-shot Grand Central event. Mac OS's NanoKernel (ExtIntHandlerTNT) classifies external interrupts from Levels & Mask and never reads Events, so the Sound Manager's channel-8 completion handler never ran; its two-buffer ring parked on its STOP after the first fill, and every later sound waited on a completion that could not arrive. The driver's own idiom shows the hardware contract: it writes InterruptClear = $100 before starting the channel and again from its handler — the acknowledge of a standing request.
  • Fix: a channel's interrupt command asserts a level on Grand Central source n (tnt_dbdma_irqtnt_gc_set_source); an InterruptClear write of bits 0–10 deasserts it. Mode 0 (MkLinux/Linux) is unchanged — those handlers acknowledge by writing the event bits, which drops the level too.
  • Result: the 68k startup chime, the Finder's alert beeps and Quake's audio all play (3.9 M frames streamed by the in-game mark of the glide row).

Verification

  • tests/unit/suites/tnt_gc: new test_mode1_dbdma_level_ack; suite and dbdma suite pass.
  • tnt-hd-boot now asserts the chime (frames past the beep's 51 928, louder than its peak) and passes.
  • tnt-rom-ladder, tnt-pci-voodoo2-display, tnt-pci-slots, tnt-pci-mach64 pass unchanged.
  • tnt-voodoo2-glide / -sw: the in-game golden was regenerated after visual inspection (same scene a moment further into the attract demo — the guest's timing moved once the game ran with sound); both rows pass.

Also included: a register-level DBDMA trace at log level 4 (every read with the status it answered from) — the instrument that found the driver's acknowledge idiom — and a clutData write trace at level 4. docs/machines/tnt/tnt.md documents the level contract and closes the "chime never plays" open item.

🤖 Generated with Claude Code

…e 7500 has sound again

The 7500 played Open Firmware's boot beep and then nothing, ever: no
startup chime, no alert beeps, no Sound control panel, no Quake audio.
Traced: the Sound Manager starts a two-buffer DBDMA ring on channel 8
with an interrupt per buffer; the model raised each completion as a
one-shot Grand Central EVENT, but the NanoKernel's ExtIntHandlerTNT
classifies from Levels & Mask and never reads Events, so the driver's
completion handler never ran and the ring parked on its STOP forever.
The driver's own idiom states the hardware contract from its end — it
writes InterruptClear = $100 (bit 8, no mode bit) before starting the
channel and again from its handler: the acknowledge of a STANDING
request.

tnt_dbdma_irq now asserts a level on source n (tnt_gc_set_source),
and an InterruptClear write of bits 0-10 deasserts it — in mode 1 the
change the kernel needs to lower the posted IPL.  Mode 0 (MkLinux/
Linux) is unchanged: their handlers acknowledge by writing the event
bits, which drops the level too.  With this the 68k startup chime,
the Finder's alert beeps and Quake's audio all play; tnt-hd-boot
asserts the chime (frames past the beep's 51 928, louder than its
peak), tests/unit/suites/tnt_gc gains test_mode1_dbdma_level_ack.

Also: a register-level DBDMA trace at log level 4 (every read with the
status it answered from, every write) — the instrument that found the
driver's Clear=$100 idiom; and a clutData write trace at level 4 for the
gamma question (the ROM's early cmdptr write on the parked beep channel
was a red herring: nothing ever starts that program).

tnt-voodoo2-glide's in-game golden regenerated after inspection: the
same scene a moment further into the attract demo — the guest's timing
moved once the game ran with sound; the -sw twin shares the frame and
passes.  tnt-rom-ladder, tnt-hd-boot, tnt-pci-voodoo2-display,
tnt-pci-slots, tnt-pci-mach64 pass unchanged.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@pappadf
pappadf merged commit 7178331 into main Sep 5, 2026
3 checks passed
@pappadf
pappadf deleted the tnt-dbdma-irq-levels branch September 5, 2026 23:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant