all repos — mgba @ 7c9b619f7b777bb920bb95ea7c5c02920c882f5b

mGBA Game Boy Advance Emulator

GBA BIOS: Fix Sqrt sign
Jeffrey Pfau jeffrey@endrift.com
Tue, 17 Nov 2015 19:47:05 -0800
commit

7c9b619f7b777bb920bb95ea7c5c02920c882f5b

parent

a27209737b25c84d949ac0e698a5e6e3b814caa6

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

jump to
M CHANGESCHANGES

@@ -29,6 +29,7 @@ - GBA: Fix warnings when creating and loading savestates

- Qt: Add additional checks in CheatModel to prevent crashes - GBA Hardware: Fix Game Boy Player rumble in Pokemon Pinball - OpenGL: Fix fast-forward on some OpenGL drivers where it may block early + - GBA BIOS: Fix Sqrt sign Misc: - Qt: Window size command line options are now supported - Qt: Increase usability of key mapper
M src/gba/bios.csrc/gba/bios.c

@@ -213,7 +213,7 @@ case 0x7:

_Div(gba, cpu->gprs[1], cpu->gprs[0]); break; case 0x8: - cpu->gprs[0] = sqrt(cpu->gprs[0]); + cpu->gprs[0] = sqrt((uint32_t) cpu->gprs[0]); break; case 0xA: cpu->gprs[0] = atan2f(cpu->gprs[1] / 16384.f, cpu->gprs[0] / 16384.f) / (2 * M_PI) * 0x10000;