What emulator can log writes to the APU registers?

This is an archive of a topic from NESdev BBS, taken in mid-October 2019 before a server upgrade.
View original topic
What emulator can log writes to the APU registers?
by on (#94755)
I need to get a log of APU writes for the homebrew game Driar so I can tell if the reason some of the songs sound terrible in my emulator is an APU or CPU bug.

I can't use the CPU execution logs for comparison since the bug doesn't occur until 30 seconds into the music track and the logs are over 500mb. FCEUX lets me run LUA code on a write to an APU register, but there is no way to capture the actual value written.
Is there another emulator out there that can do conditional logging of writes?

by on (#94756)
Use FCEUX's debugger.

by on (#94757)
Shouldn't be too difficult to modify FCEUX or some other open source emulator as well and add log for the APU writes.

by on (#94758)
You can use regular expressions to cut away parts of a debug log that you don't need. Make sure NTFS compression is enabled for the directory you are making your debug log in.
Except I don't think text editors do too well on 500MB files. Maybe split it into 50MB files first.
Textpad seems to do better than Notepad++ for these kind of tasks.