Open 42plamusse opened 2 years ago
https://github.com/mohanson/gameboy/blob/87865c1b7317e631ef375476311cc5c5ae9e95c8/src/apu.rs#L998 n should not be incremented by 1. Otherwise, by example, if n = 1 you will get a divisor value of 32 instead of the 16 expected.
n
n = 1
You can also use this operation instead:
n => u32::from(n) << 4
https://github.com/mohanson/gameboy/blob/87865c1b7317e631ef375476311cc5c5ae9e95c8/src/apu.rs#L998
n
should not be incremented by 1. Otherwise, by example, ifn = 1
you will get a divisor value of 32 instead of the 16 expected.You can also use this operation instead: