From 01656e605277bc3428092b662856f992bf6777a9 Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Sun, 29 Dec 2019 16:42:10 -0800 Subject: [PATCH] GBA I/O: Stop logging several harmless invalid register reads --- CHANGES | 1 + src/gba/io.c | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/CHANGES b/CHANGES index 014b15fef..6daaac328 100644 --- a/CHANGES +++ b/CHANGES @@ -107,6 +107,7 @@ Other fixes: - Qt: Fix sprite view using wrong base address (fixes mgba.io/i/1603) Misc: - GB Memory: Support manual SRAM editing (fixes mgba.io/i/1580) + - GBA I/O: Stop logging several harmless invalid register reads - Debugger: Separate aliases from main commands - Debugger: Print break-/watchpoint ID when breaking in CLI - SDL: Use controller GUID instead of name diff --git a/src/gba/io.c b/src/gba/io.c index c5a5a7c71..579afacec 100644 --- a/src/gba/io.c +++ b/src/gba/io.c @@ -826,8 +826,10 @@ uint16_t GBAIORead(struct GBA* gba, uint32_t address) { case REG_DMA1CNT_LO: case REG_DMA2CNT_LO: case REG_DMA3CNT_LO: - // Write-only register - mLOG(GBA_IO, GAME_ERROR, "Read from write-only I/O register: %03X", address); + // Many, many things read from the DMA register + case REG_MAX: + // Some bad interrupt libraries will read from this + // (Silent) write-only register return 0; case REG_JOY_RECV_LO: @@ -900,8 +902,6 @@ uint16_t GBAIORead(struct GBA* gba, uint32_t address) { case REG_IME: // Handled transparently by registers break; - case REG_MAX: - // Some bad interrupt libraries will read from this case 0x066: case 0x06E: case 0x076: