mirror of https://github.com/mgba-emu/mgba.git
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
|
- SDL: Allow GBASDLAudio to be used without a thread context
|
||||||
- All: Improved PowerPC support
|
- All: Improved PowerPC support
|
||||||
- All: Fix some undefined behavior warnings
|
- All: Fix some undefined behavior warnings
|
||||||
|
- GBA Audio: Implement missing flags on SOUNDCNT_X register
|
||||||
|
|
||||||
0.3.1: (2015-10-24)
|
0.3.1: (2015-10-24)
|
||||||
Bugfixes:
|
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;
|
audio->nextSample -= audio->eventDiff;
|
||||||
|
|
|
@ -351,6 +351,8 @@ void GBAIOWrite(struct GBA* gba, uint32_t address, uint16_t value) {
|
||||||
break;
|
break;
|
||||||
case REG_SOUNDCNT_X:
|
case REG_SOUNDCNT_X:
|
||||||
GBAAudioWriteSOUNDCNT_X(&gba->audio, value);
|
GBAAudioWriteSOUNDCNT_X(&gba->audio, value);
|
||||||
|
value &= 0xFFFF;
|
||||||
|
value |= gba->memory.io[REG_SOUNDCNT_X >> 1] & 0xF;
|
||||||
break;
|
break;
|
||||||
case REG_SOUNDBIAS:
|
case REG_SOUNDBIAS:
|
||||||
GBAAudioWriteSOUNDBIAS(&gba->audio, value);
|
GBAAudioWriteSOUNDBIAS(&gba->audio, value);
|
||||||
|
|
Loading…
Reference in New Issue