mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-25 07:09:48 -06:00
Merge pull request #1211 from skidau/remaining-block-count-zero
Re-added the change to make the dsp remaining block count zero-based.
This commit is contained in:
@ -435,7 +435,10 @@ void RegisterMMIO(MMIO::Mapping* mmio, u32 base)
|
|||||||
// Audio DMA blocks remaining is invalid to write to, and requires logic on
|
// Audio DMA blocks remaining is invalid to write to, and requires logic on
|
||||||
// the read side.
|
// the read side.
|
||||||
mmio->Register(base | AUDIO_DMA_BLOCKS_LEFT,
|
mmio->Register(base | AUDIO_DMA_BLOCKS_LEFT,
|
||||||
MMIO::DirectRead<u16>(&g_audioDMA.remaining_blocks_count),
|
MMIO::ComplexRead<u16>([](u32) {
|
||||||
|
// remaining_blocks_count is zero-based. DreamMix World Fighters will hang if it never reaches zero.
|
||||||
|
return (g_audioDMA.remaining_blocks_count > 0 ? g_audioDMA.remaining_blocks_count - 1 : 0);
|
||||||
|
}),
|
||||||
MMIO::InvalidWrite<u16>()
|
MMIO::InvalidWrite<u16>()
|
||||||
);
|
);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user