mirror of https://github.com/mgba-emu/mgba.git
GBA BIOS: Fix ArcTan2 accuracy and boundary conditions
This commit is contained in:
parent
eb6cedde2e
commit
415298ebcd
1
CHANGES
1
CHANGES
|
@ -27,6 +27,7 @@ Bugfixes:
|
||||||
- ARM7: Fix flags on SBC/RSC
|
- ARM7: Fix flags on SBC/RSC
|
||||||
- Util: Fix realloc semantics in utf16to8
|
- Util: Fix realloc semantics in utf16to8
|
||||||
- ARM7: Fix setting spsr privilege bits when spsr is empty
|
- ARM7: Fix setting spsr privilege bits when spsr is empty
|
||||||
|
- GBA BIOS: Fix ArcTan2 accuracy and boundary conditions
|
||||||
Misc:
|
Misc:
|
||||||
- GBA: Slightly optimize GBAProcessEvents
|
- GBA: Slightly optimize GBAProcessEvents
|
||||||
- Qt: Add preset for DualShock 4
|
- Qt: Add preset for DualShock 4
|
||||||
|
|
|
@ -304,7 +304,7 @@ void GBASwi16(struct ARMCore* cpu, int immediate) {
|
||||||
cpu->gprs[0] = sqrt((uint32_t) cpu->gprs[0]);
|
cpu->gprs[0] = sqrt((uint32_t) cpu->gprs[0]);
|
||||||
break;
|
break;
|
||||||
case 0xA:
|
case 0xA:
|
||||||
cpu->gprs[0] = atan2f(cpu->gprs[1] / 16384.f, cpu->gprs[0] / 16384.f) / (2 * M_PI) * 0x10000;
|
cpu->gprs[0] = (uint16_t) (atan2f(cpu->gprs[1] / 16384.f, cpu->gprs[0] / 16384.f) / (2 * M_PI) * 0x10001);
|
||||||
break;
|
break;
|
||||||
case 0xB:
|
case 0xB:
|
||||||
case 0xC:
|
case 0xC:
|
||||||
|
|
Loading…
Reference in New Issue