From 830e52fa67803d3d4506948d4c8888e1e8eea586 Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Sun, 17 Feb 2019 22:13:40 -0800 Subject: [PATCH] GBA SIO: Prevent writing read-only multiplayer bits --- CHANGES | 1 + src/gba/sio.c | 1 + 2 files changed, 2 insertions(+) diff --git a/CHANGES b/CHANGES index 8aa727d57..62ca075d1 100644 --- a/CHANGES +++ b/CHANGES @@ -7,6 +7,7 @@ Bugfixes: - GB Serialize: Fix loading states with negative pixel x (fixes mgba.io/i/1293) - Qt: Fix audio context holding onto closed game controller - Switch: Fix gyroscope orientation (fixes mgba.io/i/1300) + - GBA SIO: Prevent writing read-only multiplayer bits Misc: - GBA Video: Improve sprite cycle counting (fixes mgba.io/i/1274) diff --git a/src/gba/sio.c b/src/gba/sio.c index d620be5a7..800af8aea 100644 --- a/src/gba/sio.c +++ b/src/gba/sio.c @@ -164,6 +164,7 @@ void GBASIOWriteSIOCNT(struct GBASIO* sio, uint16_t value) { } break; case SIO_MULTI: + value &= 0xFF83; value |= 0xC; break; default: