diff --git a/trunk/src/drivers/win/log.cpp b/trunk/src/drivers/win/log.cpp index d7692b39..a7305209 100644 --- a/trunk/src/drivers/win/log.cpp +++ b/trunk/src/drivers/win/log.cpp @@ -148,6 +148,10 @@ void ClearLog() **/ void AddLogText(const char *text, unsigned int add_newline) { + // pass log to debugger as well + OutputDebugString(text); + if (add_newline) OutputDebugString("\n"); + // Used to count the number of new line characters in text int number_of_newlines; diff --git a/trunk/src/drivers/win/ntview.cpp b/trunk/src/drivers/win/ntview.cpp index 4ba8362c..25e5f563 100644 --- a/trunk/src/drivers/win/ntview.cpp +++ b/trunk/src/drivers/win/ntview.cpp @@ -372,7 +372,7 @@ void KillNTView() { BOOL CALLBACK NTViewCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) { RECT wrect; char str[50]; - int TileID, TileX, TileY, NameTable, PPUAddress; + int TileID, TileX, TileY, NameTable, PPUAddress, AttAddress, Attrib; switch(uMsg) { case WM_INITDIALOG: @@ -471,6 +471,11 @@ BOOL CALLBACK NTViewCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) TileID = vnapage[(PPUAddress>>10)&0x3][PPUAddress&0x3FF]; sprintf(str,"Tile ID: %02X",TileID); SetDlgItemText(hwndDlg,IDC_NTVIEW_PROPERTIES_LINE_1,str); + AttAddress = 0x23C0 | (PPUAddress & 0x0C00) | ((PPUAddress >> 4) & 0x38) | ((PPUAddress >> 2) & 0x07); + Attrib = vnapage[(AttAddress>>10)&0x3][AttAddress&0x3FF]; + Attrib = (Attrib >> ((PPUAddress&2) | ((PPUAddress&64)>>4))) & 0x3; + sprintf(str,"Attribute: %1X (%04X)",Attrib,AttAddress); + SetDlgItemText(hwndDlg,IDC_NTVIEW_PROPERTIES_LINE_4,str); } /* if (((mouse_x >= PATTERNDESTX) && (mouse_x < (PATTERNDESTX+(PATTERNWIDTH*ZOOM)))) && (mouse_y >= PATTERNDESTY) && (mouse_y < (PATTERNDESTY+(PATTERNHEIGHT*ZOOM)))) { diff --git a/trunk/src/drivers/win/res.rc b/trunk/src/drivers/win/res.rc index cdda7234..b942a800 100644 --- a/trunk/src/drivers/win/res.rc +++ b/trunk/src/drivers/win/res.rc @@ -862,13 +862,11 @@ CAPTION "Name Table Viewer" FONT 8, "MS Sans Serif", 0, 0, 0x0 BEGIN GROUPBOX "Name Tables",IDC_NTVIEW_TABLE_BOX,0,0,354,310,WS_TABSTOP - LTEXT "Tile ID:",IDC_NTVIEW_PROPERTIES_LINE_1,237,346,93,10 CONTROL "",IDC_NTVIEW_REFRESH_TRACKBAR,"msctls_trackbar32",WS_TABSTOP,227,318,106,11 LTEXT "Refresh: More",-1,177,318,50,10 LTEXT "Less",65534,333,318,18,10 LTEXT "Display on scanline:",65533,7,318,65,10 EDITTEXT IDC_NTVIEW_SCANLINE,73,315,24,12 - LTEXT "X / Y:",IDC_NTVIEW_PROPERTIES_LINE_2,238,355,75,8 CONTROL "Vertical",IDC_NTVIEW_MIRROR_VERTICAL,"Button",BS_AUTORADIOBUTTON,15,355,39,10 CONTROL "Four Screen",IDC_NTVIEW_MIRROR_FOUR_SCREEN,"Button",BS_AUTORADIOBUTTON,15,367,55,10 CONTROL "Single Screen (Table 0)",IDC_NTVIEW_MIRROR_SS_TABLE_0, @@ -883,8 +881,10 @@ BEGIN CONTROL "Show Scroll Lines",IDC_NTVIEW_SHOW_SCROLL_LINES,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,101,319,69,10 CONTROL "Horizontal",IDC_NTVIEW_MIRROR_HORIZONTAL,"Button",BS_AUTORADIOBUTTON,15,344,47,10 GROUPBOX "Properties",65531,227,336,122,60 - LTEXT "PPU Address:",IDC_NTVIEW_PROPERTIES_LINE_3,237,363,75,8 - LTEXT "Mirror:",IDC_NTVIEW_PROPERTIES_LINE_4,237,372,75,8 + LTEXT "Tile ID:", IDC_NTVIEW_PROPERTIES_LINE_1,237,346,110,10 + LTEXT "X / Y:", IDC_NTVIEW_PROPERTIES_LINE_2,238,356,110,10 + LTEXT "PPU Address:",IDC_NTVIEW_PROPERTIES_LINE_3,237,366,110,10 + LTEXT "Attribute:", IDC_NTVIEW_PROPERTIES_LINE_4,237,376,110,10 END ROMPATCHER DIALOGEX 84, 67, 304, 135