Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions copperline.example.toml
Original file line number Diff line number Diff line change
Expand Up @@ -339,10 +339,10 @@ video = "PAL"
[audio]

# Synthesized floppy-drive sound effects: motor hum with spin-up/down,
# head-step clicks for seeks (including the classic empty-drive click),
# and a faint hiss while disk DMA is transferring. Generated from
# scratch, not sampled. Mixed into the normal audio output, so they
# need live audio (or --audio-wav) to be heard.
# head-step clacks (including the classic empty-drive poll click) and
# the seek buzz of fast stepping. Generated from scratch, not sampled.
# Mixed into the normal audio output, so they need live audio (or
# --audio-wav) to be heard.
floppy_sounds = true

# Drive sound level, 0-100, relative to Paula's output.
Expand Down
18 changes: 12 additions & 6 deletions docs/guide/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -461,12 +461,18 @@ channel_mode = "stereo" # "stereo" (default) or "mono"
stereo_separation = 100 # 0-100; 100 = hardware panning, 0 = mono
```

The drive sounds are generated from scratch: motor hum with spin-up/down,
head-step clicks for seeks and the empty-drive poll, and faint read/write
hiss during disk DMA. Only step pulses that actually fire the stepper are
audible: like a real 3.5" mechanism, an outward pulse with the head at
track 0 is gated by the /TRK0 sensor, so NoClick-style patches silence
the empty-drive poll just as they do on real hardware.
The drive sounds are generated from scratch: motor hum with spin-up/down
over a rumble that repeats with each platter revolution, and head-step
clacks (an isolated step -- the empty-drive poll, or the track-to-track
advance while loading -- lands with its rebound clatter, and fast
multi-track seeks blur into the characteristic buzz). Reading adds no
noise of its own; the loading sound is the step rhythm over the spinning
motor, as on the real mechanism. The synthesis targets were measured
from recordings of real Amiga drive mechanisms, but no sample data is
used. Only step pulses that actually fire the stepper are audible: like
a real 3.5" mechanism, an outward pulse with the head at track 0 is
gated by the /TRK0 sensor, so NoClick-style patches silence the
empty-drive poll just as they do on real hardware.

`output_device` picks the host output by a case-insensitive substring of the
names `--list-audio-devices` prints (`--audio-device` overrides it); an omitted
Expand Down
12 changes: 5 additions & 7 deletions src/bus.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4522,7 +4522,7 @@ impl Bus {
// drive-sound feed -- on a single cached bool while that holds. The
// cache is cleared by every activation write and recomputed in
// `floppy.tick`, so a newly active drive is serviced from the next
// access. Drive sounds need no feed once idle: the spin/read levels are
// access. Drive sounds need no feed once idle: the spin levels are
// already zeroed and the tails decay in Paula's mixer.
if !self.floppy.is_idle_cached() {
self.floppy.set_adkcon(self.paula.adkcon);
Expand Down Expand Up @@ -4550,22 +4550,21 @@ impl Bus {
self.paula.intreq |= INT_EXTER;
}
}
self.feed_drive_sounds(dmacon);
self.feed_drive_sounds();
}
self.refresh_cia_irq_lines();
self.flush_pending_vbi();
self.arm_irq_recognition_latency();
}

/// Forward floppy mechanism activity (head steps, motor spin
/// levels, read/write DMA) to the synthesized drive sound effects
/// mixed into Paula's host output. State updates here trail the
/// levels) to the synthesized drive sound effects mixed into
/// Paula's host output. State updates here trail the
/// already-flushed audio batch by at most one chipset tick, well
/// under a single host sample.
fn feed_drive_sounds(&mut self, dmacon: u16) {
fn feed_drive_sounds(&mut self) {
let steps = self.floppy.take_sound_steps();
let spins = self.floppy.motor_spin_levels();
let reading = self.floppy.dma_active(dmacon);
let sounds = self.paula.drive_sounds_mut();
if !sounds.enabled() {
return;
Expand All @@ -4576,7 +4575,6 @@ impl Bus {
for (drive, spin) in spins.into_iter().enumerate() {
sounds.set_motor_spin(drive, spin);
}
sounds.set_read_active(reading);
}

fn refresh_cia_irq_lines(&mut self) {
Expand Down
4 changes: 2 additions & 2 deletions src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -660,8 +660,8 @@ pub(crate) fn parse_channel_mode(s: &str) -> Result<ChannelMode> {
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct AudioConfig {
/// Synthesized floppy-drive sound effects: motor hum, head-step
/// clicks for seeks (and the empty-drive change-line poll), and a
/// faint hiss while disk DMA moves data.
/// clacks and seek buzz (and the empty-drive change-line poll
/// click).
pub floppy_sounds: bool,
/// Drive sound level, 0-100, relative to Paula's output.
pub floppy_sounds_volume: u8,
Expand Down
Loading
Loading