diff --git a/core/saga-audio-arne/registers.md b/core/saga-audio-arne/registers.md index 82e38a1..01564f4 100644 --- a/core/saga-audio-arne/registers.md +++ b/core/saga-audio-arne/registers.md @@ -4,7 +4,7 @@ type: reference owner: TuKo1982 status: draft origin: ai-assisted -basis: [measured] +basis: [core-developer, measured] components: [saga-audio-arne] applies_to: core: "Core 12841" @@ -16,6 +16,7 @@ related: - core/saga-registers/arne-channels.md sources: - "TuKo1982, 68080 compilation and optimisation guide (2026-10-30), sections 1 and 13" + - "Gunnar (core developer, BigGun), Apollo chat, 2026-11-04 (relayed by WDrijver): Paula clock, 60 kHz max mode, no minimum rate, HDMI resampling, 44.1 kHz for games" --- ## Summary @@ -50,9 +51,15 @@ The channel base addresses are in the official register map: ### Behaviour -- The high-quality rate caps at about 66 kHz: decimate input above 64 kHz. +- Arne runs in a 60 kHz max mode (G, 2026-11-04): decimate input above + that. The guide gave about 66 kHz (decimate above 64 kHz); the core + developer's figure is leading. There is no minimum sample rate, and the + HDMI audio output resamples down for compatibility with all monitors + (G, 2026-11-04). +- For games, use 44.1 kHz (period 80), the CD standard (G, 2026-11-04). - ARNE can DMA from Fast RAM. -- Periods are based on the PAL colour clock of 3546895 Hz, as on Paula. +- Periods are based on the PAL colour clock of 3546895 Hz, as on Paula: + the period coding is Paula-compatible (G, 2026-11-04). ## Differences from AmigaOS / AROS / 68060 @@ -64,6 +71,7 @@ The channel base addresses are in the official register map: ## Do / Don't - DO keep the period at 65 or higher. +- DO use 44.1 kHz for game audio (G). - DO give LEN in sample pairs, not words. - DON'T guess ARNE registers: use the official map in `core/saga-registers/`. diff --git a/core/saga-registers/arne-channels.md b/core/saga-registers/arne-channels.md index 79b3ca5..7a69de9 100644 --- a/core/saga-registers/arne-channels.md +++ b/core/saga-registers/arne-channels.md @@ -81,7 +81,12 @@ Bits 15–8 left volume, bits 7–0 right volume (original). Each side ranges fr The period coding is compatible with Paula: Arne runs at the same clock as Paula (G, 2026-11-04), the PAL colour clock of 3546895 Hz. So period = 3546895 / sample rate (44.1 kHz gives 80), and period 65 gives 3546895 / 65 = 54.6 kHz, not the 56 kHz in the original. -Whether Arne accepts periods below 65 is not documented: core/saga-audio-arne/registers.md states a rate of about 66 kHz, which would need period 54 (see [index.md](index.md)). +### Sample rate (G, 2026-11-04) + +- Arne runs in a 60 kHz max mode (G, 2026-11-04): about 60 kHz is the highest rate; that is about period 59 (3546895 / 60000, calculated here). +- There is no minimum sample rate (G, 2026-11-04). +- The HDMI audio output resamples down, for compatibility with all monitors (G, 2026-11-04). +- For games, use 44.1 kHz (period 80), the CD standard (G, 2026-11-04). ## Differences from AmigaOS / AROS / 68060 @@ -91,7 +96,8 @@ Whether Arne accepts periods below 65 is not documented: core/saga-audio-arne/re ## Do / Don't - DO prefer the library calls (ApolloLib) to direct access to these registers: a best practice, not a forced rule (see [prefer-library-calls-for-saga-chips.md](../best-practices/prefer-library-calls-for-saga-chips.md)). -- DO keep the period at 65 or higher. +- DO use 44.1 kHz (period 80) for game audio (G). +- DO keep the period at 65 or higher, as the original says; above about 60 kHz nothing is gained (G). - DO give AUDxLEN in sample pairs. - DO start channels 0–3 with DMACON and channels 4–15 with DMACON2. - DON'T program channel 0–3 through both register sets at the same time. diff --git a/core/saga-registers/index.md b/core/saga-registers/index.md index 52605fb..d346068 100644 --- a/core/saga-registers/index.md +++ b/core/saga-registers/index.md @@ -180,7 +180,6 @@ Wrong or missing page links in the original: the 32-bit Arne rows link to the cl ### Open questions 1. "IRQ $48" (Ethernet) and "IRQ $50" (Arne channels 4–15): vector offsets or vector numbers, and at which interrupt level. -2. Arne maximum rate: the period counts Paula's clock (G), so period 65 is 54.6 kHz. Is 65 the minimum, and where does the "about 66 kHz" in core/saga-audio-arne/registers.md come from? ## Differences from AmigaOS / AROS / 68060 diff --git a/tools/intake/sagaregs.py b/tools/intake/sagaregs.py index c1df1b4..9e67df8 100644 --- a/tools/intake/sagaregs.py +++ b/tools/intake/sagaregs.py @@ -674,9 +674,13 @@ def arne_channels(rows): f"clock as Paula ({BGS}), the PAL colour clock of 3546895 Hz. So " "period = 3546895 / sample rate (44.1 kHz gives 80), and period 65 gives " "3546895 / 65 = 54.6 kHz, not the 56 kHz in the original.", "", - "Whether Arne accepts periods below 65 is not documented: " - "core/saga-audio-arne/registers.md states a rate of about 66 kHz, which " - "would need period 54 (see [index.md](index.md))."] + "### Sample rate (G, 2026-11-04)", "", + f"- Arne runs in a 60 kHz max mode ({BGS}): about 60 kHz is the highest " + "rate; that is about period 59 (3546895 / 60000, calculated here).", + f"- There is no minimum sample rate ({BGS}).", + f"- The HDMI audio output resamples down, for compatibility with all " + f"monitors ({BGS}).", + f"- For games, use 44.1 kHz (period 80), the CD standard ({BGS})."] return doc("arne-channels.md", "SAGA Arne audio channel registers", ["saga-audio-arne"], ["saga", "arne", "audio", "registers"], "Arne, the SAGA audio unit, has 16 channels of 8- or 16-bit mono or " @@ -688,7 +692,9 @@ def arne_channels(rows): "`$DFF400`.", "- Classic AUDxLEN counts words; Arne AUDxLEN counts sample pairs and " "is 32 bits."], - ["DO keep the period at 65 or higher.", + ["DO use 44.1 kHz (period 80) for game audio (G).", + "DO keep the period at 65 or higher, as the original says; above about " + "60 kHz nothing is gained (G).", "DO give AUDxLEN in sample pairs.", "DO start channels 0–3 with DMACON and channels 4–15 with DMACON2.", "DON'T program channel 0–3 through both register sets at the same time."], @@ -844,9 +850,6 @@ def system(rows): OPEN = [ "\"IRQ $48\" (Ethernet) and \"IRQ $50\" (Arne channels 4–15): vector offsets or " "vector numbers, and at which interrupt level.", - "Arne maximum rate: the period counts Paula's clock (G), so period 65 is 54.6 kHz. " - "Is 65 the minimum, and where does the \"about 66 kHz\" in " - "core/saga-audio-arne/registers.md come from?", ]