From 79517de3178d170b56c9e371a49602f6d4a63b82 Mon Sep 17 00:00:00 2001 From: Ry Date: Mon, 20 Jun 2022 17:13:18 -0700 Subject: [PATCH] fox32: Allow reading back the playing state from the audio IO port --- src/bus.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/bus.rs b/src/bus.rs index 7812500..16a20d0 100644 --- a/src/bus.rs +++ b/src/bus.rs @@ -84,6 +84,10 @@ impl Bus { let mut keyboard_lock = self.keyboard.lock().expect("failed to lock the keyboard mutex"); keyboard_lock.pop() as u32 } + 0x80000600 => { // audio port + let audio_lock = self.audio.lock().unwrap(); + audio_lock.playing as u32 + } 0x80001000..=0x80002003 => { // disk controller port let id = port as u8; let operation = (port & 0x0000F000) >> 8;