From 60267d1f22fd2ff3197c6c829640f66304c89283 Mon Sep 17 00:00:00 2001
From: Ilari Liusvaara <ilari.liusvaara@elisanet.fi>
Date: Sun, 16 Mar 2014 16:40:55 +0200
Subject: [PATCH 16/21] Fix tracelog of controller registers

---
 snes/cpu/core/disassembler/disassembler.cpp | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/snes/cpu/core/disassembler/disassembler.cpp b/snes/cpu/core/disassembler/disassembler.cpp
index ab8dde2..624a80c 100755
--- a/snes/cpu/core/disassembler/disassembler.cpp
+++ b/snes/cpu/core/disassembler/disassembler.cpp
@@ -1,6 +1,8 @@
 #ifdef CPUCORE_CPP
 
 uint8 CPUcore::dreadb(uint32 addr) {
+  if((addr & 0x40fff8) == 0x4218)
+    return bus.read(addr, false);  //Controller registers are safe to read.
   if((addr & 0x40ffff) >= 0x2000 && (addr & 0x40ffff) <= 0x5fff) {
     //$[00-3f|80-bf]:[2000-5fff]
     //do not read MMIO registers within debugger
-- 
2.0.0

