Implemented proper palette memory mirroring.