* Tracer: actually made "Symbolic trace" work correctly, albeit it's now going to be etremely slow when there's lots of NL data
This commit is contained in:
parent
4d84101fd0
commit
bffdacf228
|
@ -40,6 +40,10 @@ int recalculateResizedItemCoordinate(int initialValue, int initialBase, int newB
|
|||
{
|
||||
return newBase - (initialBase - initialValue);
|
||||
}
|
||||
case WINDOW_ITEM_RESIZE_TYPE_CENTER_ALIGNED:
|
||||
{
|
||||
return initialValue + (newBase - initialBase) / 2;
|
||||
}
|
||||
case WINDOW_ITEM_RESIZE_TYPE_MULTIPLY:
|
||||
{
|
||||
return (newBase * initialValue) / initialBase;
|
||||
|
|
|
@ -56,6 +56,7 @@ enum WINDOW_ITEM_RESIZE_TYPES
|
|||
{
|
||||
WINDOW_ITEM_RESIZE_TYPE_LEFT_ALIGNED,
|
||||
WINDOW_ITEM_RESIZE_TYPE_RIGHT_ALIGNED,
|
||||
WINDOW_ITEM_RESIZE_TYPE_CENTER_ALIGNED,
|
||||
WINDOW_ITEM_RESIZE_TYPE_MULTIPLY,
|
||||
// ---
|
||||
WINDOW_ITEM_RESIZE_TYPES_TOTAL
|
||||
|
|
|
@ -576,6 +576,7 @@ void setNamesPointerForAddress(uint16 address, Name* newNode)
|
|||
/**
|
||||
* Loads the necessary NL files
|
||||
**/
|
||||
// TODO: instead of loading from disk every time the "loadedBankNames" changes, it's better to cache loaded linkedlists in memory
|
||||
void loadNameFiles()
|
||||
{
|
||||
int cb;
|
||||
|
|
|
@ -116,7 +116,7 @@ void DrawPatternTable(uint8 *bitmap, uint8 *table, uint8 *log, uint8 pal)
|
|||
chr1 = table[index + 8];
|
||||
logs = log[index] & log[index + 8];
|
||||
tmp = 7;
|
||||
if (PPUView_maskUnusedGraphics && cdloggerVideoDataSize && ((bool)(logs & 3) == PPUView_invertTheMask))
|
||||
if (PPUView_maskUnusedGraphics && cdloggerVideoDataSize && (((logs & 3) != 0) == PPUView_invertTheMask))
|
||||
{
|
||||
// draw pixel ~8x darker
|
||||
for (x = 0; x < 8; x++)
|
||||
|
|
|
@ -1179,8 +1179,8 @@ BEGIN
|
|||
SCROLLBAR IDC_SCRL_TRACER_LOG,303,3,11,44,SBS_VERT
|
||||
CONTROL "Log last",IDC_RADIO_LOG_LAST,"Button",BS_AUTORADIOBUTTON | BS_LEFT,9,53,38,10
|
||||
COMBOBOX IDC_TRACER_LOG_SIZE,49,52,46,13,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
||||
LTEXT "lines",IDC_TEXT_LINES_TO_THIS_WINDOW,97,54,17,10
|
||||
DEFPUSHBUTTON "Start Logging",IDC_BTN_START_STOP_LOGGING,135,51,49,15,BS_CENTER | BS_VCENTER
|
||||
LTEXT "lines",IDC_TEXT_LINES_TO_THIS_WINDOW,97,54,20,10
|
||||
DEFPUSHBUTTON "Start Logging",IDC_BTN_START_STOP_LOGGING,126,51,65,15,BS_CENTER | BS_VCENTER
|
||||
CONTROL "Log to File",IDC_RADIO_LOG_TO_FILE,"Button",BS_AUTORADIOBUTTON | BS_LEFT,9,70,46,10
|
||||
PUSHBUTTON "Browse...",IDC_BTN_LOG_BROWSE,56,68,39,14,BS_CENTER | BS_VCENTER
|
||||
CONTROL "Automatically update this window while logging",IDC_CHECK_LOG_UPDATE_WINDOW,
|
||||
|
|
|
@ -97,6 +97,7 @@ struct KnownWindowItemPosData
|
|||
KnownWindowItemPosData tracerKnownWindowItems[] = {
|
||||
IDC_TRACER_LOG, WINDOW_ITEM_RESIZE_TYPE_LEFT_ALIGNED, WINDOW_ITEM_RESIZE_TYPE_LEFT_ALIGNED, WINDOW_ITEM_RESIZE_TYPE_RIGHT_ALIGNED, WINDOW_ITEM_RESIZE_TYPE_RIGHT_ALIGNED,
|
||||
IDC_SCRL_TRACER_LOG, WINDOW_ITEM_RESIZE_TYPE_RIGHT_ALIGNED, WINDOW_ITEM_RESIZE_TYPE_LEFT_ALIGNED, WINDOW_ITEM_RESIZE_TYPE_RIGHT_ALIGNED, WINDOW_ITEM_RESIZE_TYPE_RIGHT_ALIGNED,
|
||||
IDC_BTN_START_STOP_LOGGING, WINDOW_ITEM_RESIZE_TYPE_CENTER_ALIGNED, WINDOW_ITEM_RESIZE_TYPE_RIGHT_ALIGNED, WINDOW_ITEM_RESIZE_TYPE_CENTER_ALIGNED, WINDOW_ITEM_RESIZE_TYPE_RIGHT_ALIGNED,
|
||||
IDC_RADIO_LOG_LAST, WINDOW_ITEM_RESIZE_TYPE_LEFT_ALIGNED, WINDOW_ITEM_RESIZE_TYPE_RIGHT_ALIGNED, WINDOW_ITEM_RESIZE_TYPE_LEFT_ALIGNED, WINDOW_ITEM_RESIZE_TYPE_RIGHT_ALIGNED,
|
||||
IDC_TRACER_LOG_SIZE, WINDOW_ITEM_RESIZE_TYPE_LEFT_ALIGNED, WINDOW_ITEM_RESIZE_TYPE_RIGHT_ALIGNED, WINDOW_ITEM_RESIZE_TYPE_LEFT_ALIGNED, WINDOW_ITEM_RESIZE_TYPE_RIGHT_ALIGNED,
|
||||
IDC_TEXT_LINES_TO_THIS_WINDOW, WINDOW_ITEM_RESIZE_TYPE_LEFT_ALIGNED, WINDOW_ITEM_RESIZE_TYPE_RIGHT_ALIGNED, WINDOW_ITEM_RESIZE_TYPE_LEFT_ALIGNED, WINDOW_ITEM_RESIZE_TYPE_RIGHT_ALIGNED,
|
||||
|
@ -804,6 +805,7 @@ void FCEUD_TraceInstruction(uint8 *opcode, int size)
|
|||
{
|
||||
if (logging_options & LOG_SYMBOLIC)
|
||||
{
|
||||
loadNameFiles();
|
||||
tempAddressesLog.resize(0);
|
||||
// Insert Name and Comment lines if needed
|
||||
Name* node = findNode(getNamesPointerForAddress(addr), addr);
|
||||
|
@ -998,7 +1000,6 @@ void ClearTraceLogBuf(void)
|
|||
|
||||
void EndLoggingSequence()
|
||||
{
|
||||
int j, i;
|
||||
if (logtofile)
|
||||
{
|
||||
fclose(LOG_FP);
|
||||
|
@ -1032,12 +1033,7 @@ void UpdateLogWindow(void)
|
|||
log_old_emu_paused = emu_paused;
|
||||
|
||||
ScrollLogWindowToLastLine();
|
||||
|
||||
if (logging_options & LOG_SYMBOLIC)
|
||||
loadNameFiles();
|
||||
|
||||
UpdateLogText();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue