1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-09-30 22:56:03 +00:00

Corrects placement of address bits.

This commit is contained in:
Thomas Harte 2020-11-26 16:15:40 -05:00
parent 8093f67173
commit 6f47f9d67c

View File

@ -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.