modify code for mem r/w callback & ppu