modify code for ppu palette mirrors.