mirror of
https://github.com/LIJI32/SameBoy.git
synced 2026-10-12 02:06:38 +00:00
Accurate PCM12 read for channel 2 on CGB-0 double speed
This commit is contained in:
+2
-2
@@ -541,7 +541,7 @@ static void tick_square_envelope(GB_gameboy_t *gb, GB_channel_t index)
|
||||
gb->apu.pcm_mask[0] &= gb->apu.square_channels[GB_SQUARE_1].current_volume | 0xF1;
|
||||
}
|
||||
else {
|
||||
gb->apu.pcm_mask[0] &= (gb->apu.square_channels[GB_SQUARE_2].current_volume << 4) | 0x1F;
|
||||
gb->apu.pcm_mask[0] &= (gb->apu.square_channels[GB_SQUARE_2].current_volume << 4) | (gb->model == GB_MODEL_CGB_0? 0x3F : 0x1F);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -568,7 +568,7 @@ static void tick_noise_envelope(GB_gameboy_t *gb)
|
||||
if (!(nr42 & 7)) return;
|
||||
|
||||
if (gb->cgb_double_speed) {
|
||||
gb->apu.pcm_mask[0] &= (gb->apu.noise_channel.current_volume << 4) | 0x1F;
|
||||
gb->apu.pcm_mask[0] &= (gb->apu.noise_channel.current_volume << 4) | (gb->model == GB_MODEL_CGB_0? 0x3F : 0x1F);
|
||||
}
|
||||
|
||||
if (nr42 & 8) {
|
||||
|
||||
Reference in New Issue
Block a user