From 6f47f9d67ceb11fa55603e720c60cd75c70bf894 Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Thu, 26 Nov 2020 16:15:40 -0500 Subject: [PATCH] Corrects placement of address bits. --- Machines/Apple/AppleIIgs/Sound.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Machines/Apple/AppleIIgs/Sound.cpp b/Machines/Apple/AppleIIgs/Sound.cpp index 9c50291b5..cdd92e13b 100644 --- a/Machines/Apple/AppleIIgs/Sound.cpp +++ b/Machines/Apple/AppleIIgs/Sound.cpp @@ -271,7 +271,7 @@ uint8_t GLU::EnsoniqState::Oscillator::sample(uint8_t *ram) { // The full pointer is composed of the bits of the programmed address not touched by // the table pointer, plus the table pointer. - const uint16_t sample_address = (address & ~table_size_mask) | (table_pointer & table_size_mask); + const uint16_t sample_address = ((address << 8) & ~table_size_mask) | (table_pointer & table_size_mask); // Ignored here: bit 6 should select between RAM banks. But for now this is IIgs-centric, // and that has only one bank of RAM.