fixed previous commit

[[Split portion of a mixed commit.]]
This commit is contained in:
ansstuff 2012-09-28 19:41:12 +00:00
parent 40c9e1b30b
commit cb579fa216
6 changed files with 52 additions and 10 deletions

View File

@ -1,6 +1,6 @@
28-Sep-2012 - AnS - CDLogger: fixed VROM dumping in old ppu mode
28-Sep-2012 - AnS - Hexeditor: Ctrl+F opens Find dialog
28-Sep-2012 - AnS - Hexeditor: display 0x4000-0x5FFF properly
28-Sep-2012 - AnS - Hexeditor: display 0x5000-0x5FFF contents
28-Sep-2012 - AnS - Tracer: fixed crash when logging undefined opcodes
26-Sep-2012 - AnS - Debugger: "Name" button in Bookmarks, total revamp of Bookmarks
26-Sep-2012 - AnS - Debugger: single click on any address copies this address to the "Seek To" field and "Bookmark Add" field

View File

@ -267,8 +267,7 @@ uint8 GetMem(uint16 A) {
case 6: return RefreshAddr&0xFF;
case 7: return VRAMBuffer;
}
}
//else if ((A >= 0x4000) && (A < 0x6000)) return 0xFF; // AnS: removed the dummy
} else if ((A >= 0x4000) && (A < 0x5000)) return 0xFF; // AnS: changed the range, so MMC5 ExRAM can be watched in the Hexeditor
if (GameInfo) return ARead[A](A); //adelikat: 11/17/09: Prevent crash if this is called with no game loaded.
else return 0;
}

Binary file not shown.

View File

@ -169,6 +169,8 @@ int FindAsText;
int FindDirectionUp;
char FindTextBox[60];
uint32 temp_offset;
extern iNES_HEADER head;
//undo structure
@ -584,12 +586,53 @@ void UpdateColorTable(){
if(EditingMode == 0)FCEUI_ListCheats(UpdateCheatColorCallB,0);
if(EditingMode == 2){
if(cdloggerdata) {
for(i = 0;i < DataAmount;i++){
if(((uint32)CurOffset+i >= 16) && ((uint32)CurOffset+i < 16+PRGsize[0])) {
if((cdloggerdata[i+CurOffset-16]&3) == 3)TextColorList[i]=RGB(0,192,0);
if((cdloggerdata[i+CurOffset-16]&3) == 1)TextColorList[i]=RGB(192,192,0);
if((cdloggerdata[i+CurOffset-16]&3) == 2)TextColorList[i]=RGB(0,0,192);
if(cdloggerdata)
{
for(i = 0;i < DataAmount;i++)
{
temp_offset = CurOffset + i - 16; // (minus iNES header)
if (temp_offset >= 0)
{
if (temp_offset < PRGsize[0])
{
// PRG
if ((cdloggerdata[temp_offset] & 3) == 3)
{
// the byte is both Code and Data
TextColorList[i]=RGB(0,190,0);
} else if((cdloggerdata[temp_offset] & 3) == 1)
{
// the byte is Code - dark-yellow
TextColorList[i]=RGB(160,140,0);
} else if((cdloggerdata[temp_offset] & 3) == 2)
{
// the byte is Data - blue/cyan
if (cdloggerdata[temp_offset] & 0x40)
// PCM data - cyan
TextColorList[i]=RGB(0,130,160);
else
// non-PCM data - blue
TextColorList[i]=RGB(0,0,195);
}
} else
{
temp_offset -= PRGsize[0];
if ((temp_offset < CHRsize[0]))
// CHR
if ((cdloggerdata[temp_offset] & 3) == 3)
{
// the byte was both rendered and read programmatically - light-green
TextColorList[i]=RGB(5,255,5);
} else if((cdloggerdata[temp_offset] & 3) == 1)
{
// the byte was rendered - yellow
TextColorList[i]=RGB(210,190,0);
} else if((cdloggerdata[temp_offset] & 3) == 2)
{
// the byte was read programmatically - light-blue
TextColorList[i]=RGB(10,10,255);
}
}
}
}
}

View File

@ -337,7 +337,7 @@ BEGIN
BEGIN
MENUITEM "&NES Memory", MENU_MV_VIEW_RAM, CHECKED
MENUITEM "&PPU Memory", MENU_MV_VIEW_PPU
MENUITEM "&Rom File", MENU_MV_VIEW_ROM
MENUITEM "&ROM File", MENU_MV_VIEW_ROM
END
POPUP "&Bookmarks"
BEGIN

Binary file not shown.