modify code for ppu regs read & write.