From 86f71cb3d740bd49d7dbb48a8d68883d02cb96d1 Mon Sep 17 00:00:00 2001 From: michaelangel007 Date: Sun, 26 Mar 2023 11:13:11 -0700 Subject: [PATCH] Debugger cleanup --- source/Debugger/Debugger_Assembler.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/source/Debugger/Debugger_Assembler.cpp b/source/Debugger/Debugger_Assembler.cpp index a7045c31..b111d566 100644 --- a/source/Debugger/Debugger_Assembler.cpp +++ b/source/Debugger/Debugger_Assembler.cpp @@ -430,9 +430,9 @@ Fx BEQ r SBC (d),Y sbc (z) --- --- SBC d,X INC z,X --- SED SBC a,Y //=========================================================================== -bool _6502_CalcRelativeOffset( int nOpcode, int nBaseAddress, int nTargetAddress, WORD * pTargetOffset_ ) +bool _6502_CalcRelativeOffset ( int nOpcode, int nBaseAddress, int nTargetAddress, WORD * pTargetOffset_ ) { - if (_6502_IsOpcodeBranch( nOpcode)) + if (_6502_IsOpcodeBranch(nOpcode)) { // Branch is // a) relative to address+2 @@ -450,7 +450,7 @@ bool _6502_CalcRelativeOffset( int nOpcode, int nBaseAddress, int nTargetAddress // BaseAddress int nDistance = nTargetAddress - nBaseAddress; if (pTargetOffset_) - *pTargetOffset_ = (BYTE)(nDistance - 2); + *pTargetOffset_ = (BYTE)(nDistance - 2); if ((nDistance - 2) > _6502_BRANCH_POS) m_iAsmAddressMode = NUM_OPMODES; // signal bad @@ -473,7 +473,7 @@ int _6502_GetOpmodeOpbyte ( const int nBaseAddress, int & iOpmode_, int & nOpby { GetFrame().FrameMessageBox("Debugger not properly initialized", "ERROR", MB_OK ); - g_aOpcodes = & g_aOpcodes65C02[ 0 ]; // Enhanced Apple //e + g_aOpcodes = &g_aOpcodes65C02[ 0 ]; // Enhanced Apple //e g_aOpmodes[ AM_2 ].m_nBytes = 2; g_aOpmodes[ AM_3 ].m_nBytes = 3; } @@ -498,8 +498,8 @@ int _6502_GetOpmodeOpbyte ( const int nBaseAddress, int & iOpmode_, int & nOpby if ( pData_ ) *pData_ = pData; - const DWORD nEndAddress = pData->nEndAddress; - const int nDisplayLen = nEndAddress - nBaseAddress + 1; // *inclusive* KEEP IN SYNC: _CmdDefineByteRange() CmdDisasmDataList() _6502_GetOpmodeOpbyte() FormatNopcodeBytes() + const DWORD nEndAddress = pData->nEndAddress; + const int nDisplayLen = nEndAddress - nBaseAddress + 1; // *inclusive* KEEP IN SYNC: _CmdDefineByteRange() CmdDisasmDataList() _6502_GetOpmodeOpbyte() FormatNopcodeBytes() nSlack = nDisplayLen; // Data Disassembler @@ -561,13 +561,13 @@ int _6502_GetOpmodeOpbyte ( const int nBaseAddress, int & iOpmode_, int & nOpby //=========================================================================== -void _6502_GetOpcodeOpmodeOpbyte ( int & iOpcode_, int & iOpmode_, int & nOpbyte_ ) +void _6502_GetOpcodeOpmodeOpbyte (int & iOpcode_, int & iOpmode_, int & nOpbyte_) { iOpcode_ = _6502_GetOpmodeOpbyte( regs.pc, iOpmode_, nOpbyte_ ); } //=========================================================================== -bool _6502_GetStackReturnAddress ( WORD & nAddress_ ) +bool _6502_GetStackReturnAddress (WORD & nAddress_) { unsigned nStack = regs.sp; nStack++; @@ -586,7 +586,7 @@ bool _6502_GetStackReturnAddress ( WORD & nAddress_ ) //=========================================================================== -bool _6502_GetTargets ( WORD nAddress, int *pTargetPartial_, int *pTargetPartial2_, int *pTargetPointer_, int * pTargetBytes_, +bool _6502_GetTargets (WORD nAddress, int *pTargetPartial_, int *pTargetPartial2_, int *pTargetPointer_, int * pTargetBytes_, bool bIgnoreBranch /*= true*/, bool bIncludeNextOpcodeAddress /*= true*/ ) { if (! pTargetPartial_)