GBA BIOS: Prevent CpuSet and CpuFastSet from using BIOS addresses as a source (fixes #184)
Jeffrey Pfau jeffrey@endrift.com
Tue, 27 Jan 2015 21:43:28 -0800
2 files changed,
5 insertions(+),
0 deletions(-)
M
CHANGES
→
CHANGES
@@ -32,6 +32,7 @@ - GBA Thread: Fix possible hang when loading an archive
- Perf: Fix crash when the GBA thread fails to start - SDL: Properly clean up if a game doesn't launch - Debugger: Disassembly now lists PSR bitmasks (fixes #191) + - GBA BIOS: Prevent CpuSet and CpuFastSet from using BIOS addresses as a source (fixes #184) Misc: - GBA Audio: Change internal audio sample buffer from 32-bit to 16-bit samples - GBA Memory: Simplify memory API and use fixed bus width
M
src/gba/gba-bios.c
→
src/gba/gba-bios.c
@@ -212,6 +212,10 @@ cpu->gprs[0] = atan2f(cpu->gprs[1] / 16384.f, cpu->gprs[0] / 16384.f) / (2 * M_PI) * 0x10000;
break; case 0xB: case 0xC: + if (cpu->gprs[0] >> BASE_OFFSET == REGION_BIOS) { + GBALog(gba, GBA_LOG_GAME_ERROR, "Cannot CpuSet from BIOS"); + return; + } ARMRaiseSWI(cpu); break; case 0xD: