Debugger 2.9.1.24 (#1236)

This commit is contained in:
Michael "Code Poet" Pohoreski 2023-06-03 11:08:16 -07:00 committed by GitHub
parent 928090c756
commit 000ebab3c5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 19 additions and 13 deletions

View File

@ -1,4 +1,5 @@
/* /*
2.9.1.24 Fixed: Disassembly line when at PC for BW mode. GH #1231
2.9.1.23 Fixed: Show floating-point values in scientific notation. 2.9.1.23 Fixed: Show floating-point values in scientific notation.
2.9.1.22 Fixed: `df FAC` was incorrectly getting marked up as `db` 2.9.1.22 Fixed: `df FAC` was incorrectly getting marked up as `db`
2.9.1.21 Fixed: `df` showing zero was displaying 0 instead 0.0 2.9.1.21 Fixed: `df` showing zero was displaying 0 instead 0.0

View File

@ -53,7 +53,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#define MAKE_VERSION(a,b,c,d) ((a<<24) | (b<<16) | (c<<8) | (d)) #define MAKE_VERSION(a,b,c,d) ((a<<24) | (b<<16) | (c<<8) | (d))
// See /docs/Debugger_Changelog.txt for full details // See /docs/Debugger_Changelog.txt for full details
const int DEBUGGER_VERSION = MAKE_VERSION(2,9,1,23); const int DEBUGGER_VERSION = MAKE_VERSION(2,9,1,24);
// Public _________________________________________________________________________________________ // Public _________________________________________________________________________________________

View File

@ -218,7 +218,7 @@ static void _SetupColorRamp(const int iPrimary, int & iColor_)
//=========================================================================== //===========================================================================
void ConfigColorsReset(void) void ConfigColorsReset (void)
{ {
// int iColor = 1; // black only has one level, skip it, since black levels same as white levels // int iColor = 1; // black only has one level, skip it, since black levels same as white levels
// for (int iPrimary = 1; iPrimary < 8; iPrimary++ ) // for (int iPrimary = 1; iPrimary < 8; iPrimary++ )
@ -248,6 +248,20 @@ void ConfigColorsReset(void)
else else
BW = 255; BW = 255;
// GH #1231
// Force contrast between:
// BG_DISASM_PC_X and FG_DISASM_PC_X
if (iColor == FG_DISASM_PC_X)
{
int nIndexBG = iColor - 1;
int nPrevBG = g_aColors[ SCHEME_BW ][ nIndexBG ] & 0xFF;
int nContrast = 0xFF - nPrevBG;
int nDelta = abs(BW - nPrevBG);
if (nDelta < 0x80)
BW = nContrast;
}
COLORREF nMono = RGB(M, M, M); COLORREF nMono = RGB(M, M, M);
COLORREF nBW = RGB(BW, BW, BW); COLORREF nBW = RGB(BW, BW, BW);

View File

@ -1435,7 +1435,7 @@ WORD DrawDisassemblyLine ( int iLine, const WORD nBaseAddress )
int bAddressIsBookmark = Bookmark_Find( nBaseAddress ); int bAddressIsBookmark = Bookmark_Find( nBaseAddress );
DebugColors_e iBackground = BG_DISASM_1; DebugColors_e iBackground = BG_DISASM_1;
DebugColors_e iForeground = FG_DISASM_MNEMONIC; // FG_DISASM_TEXT; DebugColors_e iForeground = FG_DISASM_ADDRESS;
bool bCursorLine = false; bool bCursorLine = false;
if (((! g_bDisasmCurBad) && (iLine == g_nDisasmCurLine)) if (((! g_bDisasmCurBad) && (iLine == g_nDisasmCurLine))
@ -1498,22 +1498,13 @@ WORD DrawDisassemblyLine ( int iLine, const WORD nBaseAddress )
} }
else else
{ {
iForeground = FG_DISASM_MNEMONIC; iForeground = FG_DISASM_ADDRESS;
} }
} }
DebuggerSetColorBG( DebuggerGetColor( iBackground ) ); DebuggerSetColorBG( DebuggerGetColor( iBackground ) );
DebuggerSetColorFG( DebuggerGetColor( iForeground ) ); DebuggerSetColorFG( DebuggerGetColor( iForeground ) );
// Address
if (! bCursorLine)
DebuggerSetColorFG( DebuggerGetColor( FG_DISASM_ADDRESS ) );
// else
// {
// DebuggerSetColorBG( GetDebuggerMemDC(), DebuggerGetColor( FG_DISASM_BOOKMARK ) ); // swapped
// DebuggerSetColorFG( GetDebuggerMemDC(), DebuggerGetColor( BG_DISASM_BOOKMARK ) ); // swapped
// }
if ( g_bConfigDisasmAddressView ) if ( g_bConfigDisasmAddressView )
{ {
PrintTextCursorX( (LPCTSTR) line.sAddress, linerect ); PrintTextCursorX( (LPCTSTR) line.sAddress, linerect );