mirror of
https://github.com/libretro/mgba.git
synced 2024-11-30 19:50:34 +00:00
GBA Audio: Implement missing flags on SOUNDCNT_X register
This commit is contained in:
parent
b8b7ec0b12
commit
a93b21e886
1
CHANGES
1
CHANGES
@ -20,6 +20,7 @@ Misc:
|
||||
- SDL: Allow GBASDLAudio to be used without a thread context
|
||||
- All: Improved PowerPC support
|
||||
- All: Fix some undefined behavior warnings
|
||||
- GBA Audio: Implement missing flags on SOUNDCNT_X register
|
||||
|
||||
0.3.1: (2015-10-24)
|
||||
Bugfixes:
|
||||
|
@ -283,6 +283,12 @@ int32_t GBAAudioProcessEvents(struct GBAAudio* audio, int32_t cycles) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
audio->p->memory.io[REG_SOUNDCNT_X >> 1] &= ~0x000F;
|
||||
audio->p->memory.io[REG_SOUNDCNT_X >> 1] |= audio->playingCh1;
|
||||
audio->p->memory.io[REG_SOUNDCNT_X >> 1] |= audio->playingCh2 << 1;
|
||||
audio->p->memory.io[REG_SOUNDCNT_X >> 1] |= audio->playingCh3 << 2;
|
||||
audio->p->memory.io[REG_SOUNDCNT_X >> 1] |= audio->playingCh4 << 2;
|
||||
}
|
||||
|
||||
audio->nextSample -= audio->eventDiff;
|
||||
|
@ -351,6 +351,8 @@ void GBAIOWrite(struct GBA* gba, uint32_t address, uint16_t value) {
|
||||
break;
|
||||
case REG_SOUNDCNT_X:
|
||||
GBAAudioWriteSOUNDCNT_X(&gba->audio, value);
|
||||
value &= 0xFFFF;
|
||||
value |= gba->memory.io[REG_SOUNDCNT_X >> 1] & 0xF;
|
||||
break;
|
||||
case REG_SOUNDBIAS:
|
||||
GBAAudioWriteSOUNDBIAS(&gba->audio, value);
|
||||
|
Loading…
Reference in New Issue
Block a user