all repos — mgba @ 0883dc08150e44dbb3f7d66948e2fa5f0046c4fd

mGBA Game Boy Advance Emulator

GB I/O: Improve accuracy of SGB MLT_REG polling (fixes #839)
Vicki Pfau vi@endrift.com
Thu, 03 Aug 2017 14:33:51 -0700
commit

0883dc08150e44dbb3f7d66948e2fa5f0046c4fd

parent

48cf8448c161b51f49d7ee0aa87303c329487d57

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

jump to
M src/gb/io.csrc/gb/io.c

@@ -485,7 +485,7 @@ uint8_t keys = *gb->keySource;

switch (gb->memory.io[REG_JOYP] & 0x30) { case 0x30: // TODO: Increment - keys = gb->model == GB_MODEL_SGB ? 0xF : 0; + keys = (gb->video.sgbCommandHeader >> 3) == SGB_MLT_REG ? 0xF : 0; break; case 0x20: keys >>= 4;