User's Manual

Table Of Contents
2D S3C2450X RISC MICROPROCESSOR
19-12
The third operand can be pattern or foreground color, configurable by the OS bit in the ROP_REG.
Pattern is a user-specified 8x8x16-bpp image; the pattern data should be given in RGB565 format. The following
equation is used to calculate the pattern index of pixel (x, y):
index = ( ((patternOffsetY + y) & 0x7 )<<3 ) + ((patternOffsetX + x)&0x7),
where patternOffsetY and patternOffsetX are the offset value specified in register PATOFF_REG.
Here are some examples on how to use the ROP value to perform the operations:
1. Final Data = Source. Only the Source data matter, so ROP Value = “11110000”.
2. Final Data = Destination. Only the Destination data matter, so ROP Value = “11001100”.
3. Final Data = Pattern. Only the Pattern data matter, so ROP Value = “10101010”.
4. Final Data = Source AND Destination. ROP Value = “11110000” & “11001100” = “11000000”
5. Final Data = Source OR Pattern. ROP Value = “11110000” | “10101010” = “11111010”.
Note that the Raster Operation only applies on R, G, B fields of the color data; the A field will not be affected.
4.5.1 Related Registers
PATTERN_REG[0:31] Pattern data
PATOFF_REG Pattern offset X, Y
ROP_REG ROP configurations and ROP Value