tnt: DBDMA channel interrupts are levels held until acknowledged (7500 sound after the boot beep) - #137
Merged
Merged
Conversation
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.
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 writesInterruptClear = $100before starting the channel and again from its handler — the acknowledge of a standing request.tnt_dbdma_irq→tnt_gc_set_source); anInterruptClearwrite 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.Verification
tests/unit/suites/tnt_gc: newtest_mode1_dbdma_level_ack; suite anddbdmasuite pass.tnt-hd-bootnow 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-mach64pass 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
clutDatawrite trace at level 4.docs/machines/tnt/tnt.mddocuments the level contract and closes the "chime never plays" open item.🤖 Generated with Claude Code