For Qt GUI, added code to update debugger window ASM view when RAM or ROM edits are made from the hex editor. Fixes #508.
This commit is contained in:
parent
6b0d1a52ca
commit
eaa5d6f88f
|
@ -322,6 +322,8 @@ static void PalettePoke(uint32 addr, uint8 data)
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
static int writeMem( int mode, unsigned int addr, int value )
|
static int writeMem( int mode, unsigned int addr, int value )
|
||||||
{
|
{
|
||||||
|
bool updateDebugger = false;
|
||||||
|
|
||||||
value = value & 0x000000ff;
|
value = value & 0x000000ff;
|
||||||
|
|
||||||
switch ( mode )
|
switch ( mode )
|
||||||
|
@ -339,6 +341,8 @@ static int writeMem( int mode, unsigned int addr, int value )
|
||||||
{
|
{
|
||||||
wfunc ((uint32) addr,
|
wfunc ((uint32) addr,
|
||||||
(uint8) (value & 0x000000ff));
|
(uint8) (value & 0x000000ff));
|
||||||
|
|
||||||
|
updateDebugger = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -384,23 +388,32 @@ static int writeMem( int mode, unsigned int addr, int value )
|
||||||
{
|
{
|
||||||
*(uint8 *)(GetNesCHRPointer(addr-16-PRGsize[0])) = value;
|
*(uint8 *)(GetNesCHRPointer(addr-16-PRGsize[0])) = value;
|
||||||
}
|
}
|
||||||
|
updateDebugger = true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
hexEditorRequestUpdateAll();
|
hexEditorRequestUpdateAll();
|
||||||
|
|
||||||
return 0;
|
if ( updateDebugger )
|
||||||
|
{
|
||||||
|
if (debuggerWindowIsOpen())
|
||||||
|
{
|
||||||
|
updateAllDebuggerWindows();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
|
|
||||||
static int convToXchar( int i )
|
static int convToXchar( int i )
|
||||||
{
|
{
|
||||||
int c = 0;
|
int c = 0;
|
||||||
|
|
||||||
if ( (i >= 0) && (i < 10) )
|
if ( (i >= 0) && (i < 10) )
|
||||||
{
|
{
|
||||||
c = i + '0';
|
c = i + '0';
|
||||||
}
|
}
|
||||||
else if ( i < 16 )
|
else if ( i < 16 )
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue