mirror of https://github.com/mgba-emu/mgba.git
GBA Audio: Fix initial channel 3 wave RAM (fixes #2947)
This commit is contained in:
parent
870c2f8bab
commit
125db5bbe7
1
CHANGES
1
CHANGES
|
@ -12,6 +12,7 @@ Emulation fixes:
|
||||||
- GB SIO: Disabling SIO should cancel pending transfers (fixes mgba.io/i/2537)
|
- GB SIO: Disabling SIO should cancel pending transfers (fixes mgba.io/i/2537)
|
||||||
- GB Video: Implement DMG-style sprite ordering
|
- GB Video: Implement DMG-style sprite ordering
|
||||||
- GBA Audio: Fix sample timing drifting when changing sample interval
|
- GBA Audio: Fix sample timing drifting when changing sample interval
|
||||||
|
- GBA Audio: Fix initial channel 3 wave RAM (fixes mgba.io/i/2947)
|
||||||
- GBA BIOS: Fix clobbering registers with word-sized CpuSet
|
- GBA BIOS: Fix clobbering registers with word-sized CpuSet
|
||||||
- GBA Video: Disable BG target 1 blending when OBJ blending (fixes mgba.io/i/2722)
|
- GBA Video: Disable BG target 1 blending when OBJ blending (fixes mgba.io/i/2722)
|
||||||
Other fixes:
|
Other fixes:
|
||||||
|
|
|
@ -100,22 +100,24 @@ void GBAudioReset(struct GBAudio* audio) {
|
||||||
audio->ch3 = (struct GBAudioWaveChannel) { .bank = 0 };
|
audio->ch3 = (struct GBAudioWaveChannel) { .bank = 0 };
|
||||||
audio->ch4 = (struct GBAudioNoiseChannel) { .nSamples = 0 };
|
audio->ch4 = (struct GBAudioNoiseChannel) { .nSamples = 0 };
|
||||||
// TODO: DMG randomness
|
// TODO: DMG randomness
|
||||||
audio->ch3.wavedata8[0] = 0x00;
|
if (audio->style != GB_AUDIO_GBA) {
|
||||||
audio->ch3.wavedata8[1] = 0xFF;
|
audio->ch3.wavedata8[0] = 0x00;
|
||||||
audio->ch3.wavedata8[2] = 0x00;
|
audio->ch3.wavedata8[1] = 0xFF;
|
||||||
audio->ch3.wavedata8[3] = 0xFF;
|
audio->ch3.wavedata8[2] = 0x00;
|
||||||
audio->ch3.wavedata8[4] = 0x00;
|
audio->ch3.wavedata8[3] = 0xFF;
|
||||||
audio->ch3.wavedata8[5] = 0xFF;
|
audio->ch3.wavedata8[4] = 0x00;
|
||||||
audio->ch3.wavedata8[6] = 0x00;
|
audio->ch3.wavedata8[5] = 0xFF;
|
||||||
audio->ch3.wavedata8[7] = 0xFF;
|
audio->ch3.wavedata8[6] = 0x00;
|
||||||
audio->ch3.wavedata8[8] = 0x00;
|
audio->ch3.wavedata8[7] = 0xFF;
|
||||||
audio->ch3.wavedata8[9] = 0xFF;
|
audio->ch3.wavedata8[8] = 0x00;
|
||||||
audio->ch3.wavedata8[10] = 0x00;
|
audio->ch3.wavedata8[9] = 0xFF;
|
||||||
audio->ch3.wavedata8[11] = 0xFF;
|
audio->ch3.wavedata8[10] = 0x00;
|
||||||
audio->ch3.wavedata8[12] = 0x00;
|
audio->ch3.wavedata8[11] = 0xFF;
|
||||||
audio->ch3.wavedata8[13] = 0xFF;
|
audio->ch3.wavedata8[12] = 0x00;
|
||||||
audio->ch3.wavedata8[14] = 0x00;
|
audio->ch3.wavedata8[13] = 0xFF;
|
||||||
audio->ch3.wavedata8[15] = 0xFF;
|
audio->ch3.wavedata8[14] = 0x00;
|
||||||
|
audio->ch3.wavedata8[15] = 0xFF;
|
||||||
|
}
|
||||||
audio->ch4 = (struct GBAudioNoiseChannel) { .envelope = { .dead = 2 } };
|
audio->ch4 = (struct GBAudioNoiseChannel) { .envelope = { .dead = 2 } };
|
||||||
audio->frame = 0;
|
audio->frame = 0;
|
||||||
audio->sampleInterval = SAMPLE_INTERVAL * GB_MAX_SAMPLES;
|
audio->sampleInterval = SAMPLE_INTERVAL * GB_MAX_SAMPLES;
|
||||||
|
|
Loading…
Reference in New Issue