mirror of https://github.com/mgba-emu/mgba.git
GBA BIOS: Fix MidiKey2Freq BIOS reads
This commit is contained in:
parent
cd3e304dd8
commit
6d8dc724c2
1
CHANGES
1
CHANGES
|
@ -1,6 +1,7 @@
|
|||
0.5.2: (Future)
|
||||
Bugfixes:
|
||||
- GBA Memory: Fix misaligned BIOS reads
|
||||
- GBA BIOS: Fix MidiKey2Freq BIOS reads
|
||||
|
||||
0.5.1: (2016-10-05)
|
||||
Bugfixes:
|
||||
|
|
|
@ -244,7 +244,12 @@ static void _ObjAffineSet(struct GBA* gba) {
|
|||
|
||||
static void _MidiKey2Freq(struct GBA* gba) {
|
||||
struct ARMCore* cpu = gba->cpu;
|
||||
|
||||
int oldRegion = gba->memory.activeRegion;
|
||||
gba->memory.activeRegion = REGION_BIOS;
|
||||
uint32_t key = cpu->memory.load32(cpu, cpu->gprs[0] + 4, 0);
|
||||
gba->memory.activeRegion = oldRegion;
|
||||
|
||||
cpu->gprs[0] = key / powf(2, (180.f - cpu->gprs[1] - cpu->gprs[2] / 256.f) / 12.f);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue