all repos — mgba @ 71f39ba1b67bd99a59e2dc5878da6356357e4f98

mGBA Game Boy Advance Emulator

GBA BIOS: Use exp2f instead of powf
Vicki Pfau vi@endrift.com
Mon, 02 Jul 2018 21:28:31 -0700
commit

71f39ba1b67bd99a59e2dc5878da6356357e4f98

parent

e11e5ef9707163895b454fbbdcab9670244e5ae9

1 files changed, 1 insertions(+), 1 deletions(-)

jump to
M src/gba/bios.csrc/gba/bios.c

@@ -251,7 +251,7 @@ 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); + cpu->gprs[0] = key / exp2f((180.f - cpu->gprs[1] - cpu->gprs[2] / 256.f) / 12.f); } static void _Div(struct GBA* gba, int32_t num, int32_t denom) {