added PC to unknown opcode error messages
authorslack <slack@Blackbird.(none)>
Wed, 1 Oct 2008 10:11:12 +0000 (12:11 +0200)
committerslack <slack@Blackbird.(none)>
Wed, 1 Oct 2008 10:11:12 +0000 (12:11 +0200)
gbcore.cc

index d93f2de2b21e9d47d52bb2c53f43940e449b0a6b..92b2d0cd65f9938fa0ac6b636530182a50ff4b48 100644 (file)
--- a/gbcore.cc
+++ b/gbcore.cc
@@ -431,7 +431,7 @@ GameBoy::run_status GameBoy::run_cycle()
                                                } else {
                                                        logger.critical("Unknown sub-opcode ", 
                                                                std::hex, std::setw(2), std::setfill('0'),
-                                                               sub_opcode, " after 0x10");
+                                                               sub_opcode, " after 0x10. PC=0x",regs.PC-2);
                                                }
                                                cycles_until_next_instruction = 4; 
                                                break;
@@ -1136,7 +1136,7 @@ GameBoy::run_status GameBoy::run_cycle()
                                                                                break;
                                                                        
                                                                        default:
-                                                                               logger.critical("Unknown sub-opcode after 0xCB");
+                                                                               logger.critical("Unknown sub-opcode after 0xCB. PC=0x",std::hex, regs.PC-2);
                                                                                break;
                                                                }
                                                        }