diff --git a/BizHawk.MultiClient/output/dll/libmeteor.dll b/BizHawk.MultiClient/output/dll/libmeteor.dll index 50f57c2b7f..191dd0be89 100644 Binary files a/BizHawk.MultiClient/output/dll/libmeteor.dll and b/BizHawk.MultiClient/output/dll/libmeteor.dll differ diff --git a/libmeteor/include/ameteor/cpu.hpp b/libmeteor/include/ameteor/cpu.hpp index 3f8e820ab5..2259de832d 100644 --- a/libmeteor/include/ameteor/cpu.hpp +++ b/libmeteor/include/ameteor/cpu.hpp @@ -31,16 +31,16 @@ namespace AMeteor uint32_t dw; struct { - unsigned int mode : 5; - bool thumb : 1; - bool fiq_d : 1; - bool irq_d : 1; - unsigned int reserved : 19; - bool s_overflow : 1; - bool f_overflow : 1; - bool f_carry : 1; - bool f_zero : 1; - bool f_sign : 1; + unsigned int mode : 5; + unsigned int thumb : 1; + unsigned int fiq_d : 1; + unsigned int irq_d : 1; + unsigned int reserved : 19; + unsigned int s_overflow : 1; + unsigned int f_overflow : 1; + unsigned int f_carry : 1; + unsigned int f_zero : 1; + unsigned int f_sign : 1; } b; }; struct IPsr diff --git a/libmeteor/libmeteor.vcxproj b/libmeteor/libmeteor.vcxproj index 63035cb960..7a9a1207b5 100644 --- a/libmeteor/libmeteor.vcxproj +++ b/libmeteor/libmeteor.vcxproj @@ -52,7 +52,7 @@ Level3 Disabled WIN32;_DEBUG;_WINDOWS;_USRDLL;LIBMETEOR_EXPORTS;%(PreprocessorDefinitions);METDEBUG;METDEBUGLOG;_ITERATOR_DEBUG_LEVEL=0 - 4800;4396 + 4396;4800 Windows @@ -68,7 +68,7 @@ true true WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBMETEOR_EXPORTS;%(PreprocessorDefinitions) - 4800;4396 + 4396;4800 Windows diff --git a/libmeteor/source/debug.hpp b/libmeteor/source/debug.hpp index fd8f7c5c2f..c47e0813a3 100644 --- a/libmeteor/source/debug.hpp +++ b/libmeteor/source/debug.hpp @@ -85,6 +85,8 @@ void trace_bizhawk(std::string msg); #define IOS_ADD \ "0x" << std::setbase(16) << std::setw(8) << std::setfill('0') \ << std::uppercase +#define IOS_TRACE \ + std::setbase(16) << std::setw(8) << std::setfill('0') << std::uppercase #define IOS_NOR \ std::setbase(10) << std::setw(0) << std::setfill(' ') diff --git a/libmeteor/source/interpreter.cpp b/libmeteor/source/interpreter.cpp index 242b884d82..b5ae37ab1d 100644 --- a/libmeteor/source/interpreter.cpp +++ b/libmeteor/source/interpreter.cpp @@ -74,7 +74,16 @@ namespace AMeteor if (traceenabled) { std::stringstream ss; - ss << IOS_ADD << R(15) << ' ' << Disassembler::Instruction(R(15), (uint16_t)code).ToString(); + ss << IOS_TRACE << R(15) << ':' << std::setw(4) << code << " "; + ss.setf(std::ios::left, std::ios::adjustfield); + ss << std::setw(32) << std::setfill(' ') << Disassembler::Instruction(R(15), (uint16_t)code).ToString(); + ss.setf(std::ios::right, std::ios::adjustfield); + ss << IOS_TRACE; + for (int i = 0; i < 16; i++) + ss << std::setw(8) << R(i) << ' '; + UpdateCpsr(); + ss << std::setw(8) << m_st.cpsr.dw << ' '; + ss << std::setw(8) << m_st.spsr.dw << ' '; trace_bizhawk(ss.str()); } R(15) += 2; @@ -117,7 +126,16 @@ namespace AMeteor if (traceenabled) { std::stringstream ss; - ss << IOS_ADD << R(15) << ' ' << Disassembler::Instruction(R(15), (uint32_t)code).ToString(); + ss << IOS_TRACE << R(15) << ':' << std::setw(8) << code << ' '; + ss.setf(std::ios::left, std::ios::adjustfield); + ss << std::setw(32) << std::setfill(' ') << Disassembler::Instruction(R(15), (uint32_t)code).ToString(); + ss.setf(std::ios::right, std::ios::adjustfield); + ss << IOS_TRACE; + for (int i = 0; i < 16; i++) + ss << std::setw(8) << R(i) << ' '; + UpdateCpsr(); + ss << std::setw(8) << m_st.cpsr.dw << ' '; + ss << std::setw(8) << m_st.spsr.dw << ' '; trace_bizhawk(ss.str()); } R(15) += 4;