This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Appnote 154 SetWatchOnMemory

I'm using Appnote 154 and accompanying sample code to output memory access trace information.

I've placed the following in DefineAllWatches in AGSI.cpp:

=================================
// internal memory
ret &= Agsi.SetWatchOnMemory(((amIDATA<<24) | (0x00)), ((amIDATA<<24) | (0xFF)), memRead, AGSIREAD);

ret &= Agsi.SetWatchOnMemory(((amDATA<<24) | (0x00)), ((amDATA<<24) | (0xFF)), memRead, AGSIREAD);

// xdata memory
ret &= Agsi.SetWatchOnMemory(((amXDATA<<24) | (0x0000)), ((amXDATA<<24) | (0xFFFF)), memRead, AGSIREAD);

// code memory
ret &= Agsi.SetWatchOnMemory(((amCODE<<24) | (0x0000)), ((amCODE<<24) | (0xFFFF)), memRead, AGSIREAD);
=====================================

The memRead callback simply gets the last accessed address (GetLastMemoryAddress), and the byte stored at that location (ReadMemory) and prints it out.

The problem I'm having is that xdata accesses are working just fine, but idata, data, and code accesses are not tripping the callback function. Anyone have any idea what I'm doing wrong?

Thanks,
Greg

0