# ラスタオペレーションコード

BitBltとかの引数のオペレーションコードを逆解析したもの。

```0	S
1	P
2	(dummy?)
3	?
4	SPDS... / SSP?DS
5	PDSP... / SP?DS
6	DSPD... / ?
7	?
8	SDPS... / SSP?PD
9	DPSD... / SP?PD
A	PSDP... / ?
B	?
C	?       / SSD?PD
D	?       / SD?PD
E	?
F	?

A operator enters in the midway case, xor 10.
Even number case, xor 20.

xor	40
or	80
and	C0

**** 1 ****

S 20
P 21
D 29

Sn 8 = 28 xor 20
Pn 1 = 21 xor 20
Dn 9 = 29 xor 20

[0] 42 = 2 or 40(x)
[1] 62 = 2 or 60(x) xor 20(n)

**** 2 ****

DSx 46 = 6 or 40
DPx 49 = 9 or 40
PSx 4A
DSo 86
DPo 89
PSo 8A
DSa C6
DPa C9
PSa CA

PDxn 65	= 5 or 40 xor 20
PSxn 6A = A or 40 xor 20
DSan E6 = 6 or C0 xor 20
PSan EA = A or C0 xor 20
DSon A6 = 6 or 80 xor 20

SPna 324 = 4 xor 20 or C0 << 4
PDna 325 = 5 xor 20 or C0 << 4
DSna 326 = 6 xor 20 or C0 << 4
SDna 328 = 8 xor 20 or C0 << 4
DPna 329 = 9 xor 20 or C0 << 4
PSna 32A = A xor 20 or C0 << 4
SPno 224 = 4 xor 20 or 80 << 4
PDno 225 = 5 xor 20 or 80 << 4

**** 3 ****

DPSxx 169 = 29 + 40 or 40 << 4
DPSoo 2A9 = 29 + 80 or 80 << 4
DPSaa 3E9 = 29 + C0 or C0 << 4

DPSxxn 145 = 25 or 40 or 40 << 4 xor 20
DPSoon 289 = 29 or 80 or 80 << 4 xor 20
DPSaan 3C9 = 29 or C0 or C0 << 4 xor 20

DPSox 1A9 = 29 or 80(o) or 40(x) << 4
PDSxa 365 = 25 or 40(x) or C0(a) << 4

DSPnox 606 = 26 xor 20(n) or 80(o) << 4 or 40(x) << 8
SDPnox 608 = 28 xor 20(n) or 80(o) << 4 or 40(x) << 8

SDPxna C48 = 28 or 40(x) xor 20(n) or C0(a) << 8

PDSxan 345 = 25 or 40(x) or C0(a) << 4 xor 20(n)

PDSanan CE5 = 25 or C0(a) xor 20 or C0(a) << 8 xor 20

**** 4 ****

PSDPxax 74A = A or 40 or C0 << 4 or 40 << 8
SPDSxax 744 = 4 or 40 or C0 << 4 or 40 << 8
DPSDxax 749 = 9 or 40 or C0 << 4 or 40 << 8

SPxDSxa D55 = 15 or 40 or 40 << 4 or C0 << 8
SPxPDxa D59 = 19 or 40 or 40 << 4 or C0 << 8

SDxPDxan D7D = 1D or 40 or 40 << 4 or C0 << 8 xor 20

***** 5 *****

DSPDSoaxx 17A6 = 26 or 80(o) or C0(a) << 4 or 40 << 8 or 40 << 10
DPSDPoaxx 17A9 = 29 or 80(o) or C0(a) << 4 or 40 << 8 or 40 << 10
PSDPSoaxx 17AA = 2A or 80(o) or C0(a) << 4 or 40 << 8 or 40 << 10
DSPDSaoxx 16E6 = 26 or C0(a) or 80(o) << 4 or 40 << 8 or 40 << 10

PSDPSanaxx 5CCA = 2A or C0 xor 20 or C0 << 8 or 40 << 10 or 40 << 12
DSPDSoaxxn 1786 = 26 or 80 or C0 << 4 or 40 << 8 or 40 << 10 xor 20

DSPDSanaxxn 5CE6 = 26 or C0 xor 20 or C0 << 8 or 40 << 10 or 40 << 12 xor 20

SSPxDSxox 1974 = 34 or 40 or 40 << 4 or 80 << 8 or 40 << 10
SSPxPDxax 1D78 = 38 or 40 or 40 << 4 or C0 << 8 or 40 << 10

SSPxDSxaxn 1D54 = 34 or 40 or 40 << 4 or C0 << 8 or 40 << 10 xor 20
SSPxDSxoxn 1954 = 34 or 40 or 40 << 4 or 80 << 8 or 40 << 10 xor 20
SSDxPDxaxn 1D5C = 3C or 40 or 40 << 4 or C0 << 8 or 40 << 10 xor 20
```