GBA BIOS: BitUnPack improvements

This commit is contained in:
Vicki Pfau 2019-01-07 22:15:23 -08:00
parent aa90dbbc92
commit 3dc30a13d1
2 changed files with 3 additions and 1 deletions

View File

@ -74,6 +74,7 @@ Bugfixes:
- GB Audio: Fix channel 1, 2 and 4 reset timing
- Util: Fix wrapping edge cases in RingFIFO
- GBA Hardware: Fix RTC handshake transition (fixes mgba.io/i/1134)
- GBA BIOS: Fix BitUnPack narrowing
Misc:
- GBA Timer: Use global cycles for timers
- GBA: Extend oddly-sized ROMs to full address space (fixes mgba.io/i/722)

View File

@ -819,7 +819,6 @@ static void _unBitPack(struct GBA* gba) {
in >>= sourceWidth;
if (scaled || bias & 0x80000000) {
scaled += bias & 0x7FFFFFFF;
scaled &= (1 << destWidth) - 1;
}
bitsRemaining -= sourceWidth;
out |= scaled << bitsEaten;
@ -831,4 +830,6 @@ static void _unBitPack(struct GBA* gba) {
dest += 4;
}
}
cpu->gprs[0] = source;
cpu->gprs[1] = dest;
}