Init:
PROC [] =
BEGIN
xneutral ← CD.NewLayer[cdsil, $xneutral]; -- 00
xred ← CD.NewLayer[cdsil, $xred]; -- 01
xyellow ← CD.NewLayer[cdsil, $xyellow]; -- 02
xgreen ← CD.NewLayer[cdsil, $xgreen]; -- 03
xcyan ← CD.NewLayer[cdsil, $xcyan]; -- 04
xviolet ← CD.NewLayer[cdsil, $xviolet]; -- 05
xmagenta ← CD.NewLayer[cdsil, $xmagenta]; -- 06
xwhite ← CD.NewLayer[cdsil, $xwhite]; -- 07
xbrown ← CD.NewLayer[cdsil, $xbrown]; -- 08
xorange ← CD.NewLayer[cdsil, $xorange]; -- 09
xlime ← CD.NewLayer[cdsil, $xlime]; -- 10
xturquise ← CD.NewLayer[cdsil, $xturquise]; -- 11
xaqua ← CD.NewLayer[cdsil, $xaqua]; -- 12
xultraviolet ← CD.NewLayer[cdsil, $xultraviolet]; -- 13
xpink ← CD.NewLayer[cdsil, $xpink]; -- 14
xsmoke ← CD.NewLayer[cdsil, $xsmoke]; -- 15
CDTipEtc.SetTipTable[cdsil, "Standard"];
the 1 bit pattern are fair but not great
the 4 bit pattern are nice with cmos-chipmonk
the 8 bit pattern don't fit anywhere
CDColors.DefineColor[xneutral,
NEW[CDColors.Brick←[10*1010H, 10*0101H, 10*1010H, 10*0101H]], bit4];
CDColors.DefineColor[xneutral,
NEW[CDColors.Brick←[10*1010H, 10*0101H, 10*1010H, 10*0101H]], bit8];
CDColors.DefineColor[xneutral,
NEW[CDColors.Brick←[05H*1111H, 0AH*1111H, 05H*1111H, 0AH*1111H]], bw]; -- 00
CDColors.DefineColor[xred,
NEW[CDColors.Brick←[10*1111H, 10*1111H, 10*1111H, 10*1111H]], bit4];
CDColors.DefineColor[xred,
NEW[CDColors.Brick←[10*1111H, 10*1111H, 10*1111H, 10*1111H]], bit8];
CDColors.DefineColor[xred,
NEW[CDColors.Brick←[0EH*1111H, 0DH*1111H, 0BH*1111H, 07H*1111H]], bw]; -- 01
CDColors.DefineColor[xyellow,
NEW[CDColors.Brick←[10*1111H, 10*1111H, 10*1111H, 10*1111H]], bit4];
CDColors.DefineColor[xyellow,
NEW[CDColors.Brick←[10*1111H, 10*1111H, 10*1111H, 10*1111H]], bit8];
CDColors.DefineColor[xyellow,
NEW[CDColors.Brick←[0EH*1111H, 0DH*1111H, 0BH*1111H, 07H*1111H]], bw]; -- 02
CDColors.DefineColor[xgreen,
NEW[CDColors.Brick←[10*1111H, 10*1111H, 10*1111H, 10*1111H]], bit4];
CDColors.DefineColor[xgreen,
NEW[CDColors.Brick←[10*1111H, 10*1111H, 10*1111H, 10*1111H]], bit8];
CDColors.DefineColor[xgreen,
NEW[CDColors.Brick←[0EH*1111H, 0DH*1111H, 0BH*1111H, 07H*1111H]], bw]; -- 03
CDColors.DefineColor[xcyan,
NEW[CDColors.Brick←[10*1111H, 10*1111H, 10*1111H, 10*1111H]], bit4];
CDColors.DefineColor[xcyan,
NEW[CDColors.Brick←[10*1111H, 10*1111H, 10*1111H, 10*1111H]], bit8];
CDColors.DefineColor[xcyan,
NEW[CDColors.Brick←[0EH*1111H, 0DH*1111H, 0BH*1111H, 07H*1111H]], bw]; -- 04
CDColors.DefineColor[xviolet,
NEW[CDColors.Brick←[10*1111H, 10*1111H, 10*1111H, 10*1111H]], bit4];
CDColors.DefineColor[xviolet,
NEW[CDColors.Brick←[10*1111H, 10*1111H, 10*1111H, 10*1111H]], bit8];
CDColors.DefineColor[xviolet,
NEW[CDColors.Brick←[0EH*1111H, 0DH*1111H, 0BH*1111H, 07H*1111H]], bw]; -- 05
CDColors.DefineColor[xmagenta,
NEW[CDColors.Brick←[10*1111H, 10*1111H, 10*1111H, 10*1111H]], bit4];
CDColors.DefineColor[xmagenta,
NEW[CDColors.Brick←[10*1111H, 10*1111H, 10*1111H, 10*1111H]], bit8];
CDColors.DefineColor[xmagenta,
NEW[CDColors.Brick←[0EH*1111H, 0DH*1111H, 0BH*1111H, 07H*1111H]], bw]; -- 06
CDColors.DefineColor[xwhite,
NEW[CDColors.Brick←[10*1111H, 10*1111H, 10*1111H, 10*1111H]], bit4];
CDColors.DefineColor[xwhite,
NEW[CDColors.Brick←[10*1111H, 10*1111H, 10*1111H, 10*1111H]], bit8];
CDColors.DefineColor[xwhite,
NEW[CDColors.Brick←[0EH*1111H, 0DH*1111H, 0BH*1111H, 07H*1111H]], bw]; -- 07
CDColors.DefineColor[xbrown,
NEW[CDColors.Brick←[10*1111H, 10*1111H, 10*1111H, 10*1111H]], bit4];
CDColors.DefineColor[xbrown,
NEW[CDColors.Brick←[10*1111H, 10*1111H, 10*1111H, 10*1111H]], bit8];
CDColors.DefineColor[xbrown,
NEW[CDColors.Brick←[0EH*1111H, 0DH*1111H, 0BH*1111H, 07H*1111H]], bw]; -- 08
CDColors.DefineColor[xorange,
NEW[CDColors.Brick←[10*1111H, 10*1111H, 10*1111H, 10*1111H]], bit4];
CDColors.DefineColor[xorange,
NEW[CDColors.Brick←[10*1111H, 10*1111H, 10*1111H, 10*1111H]], bit8];
CDColors.DefineColor[xorange,
NEW[CDColors.Brick←[0EH*1111H, 0DH*1111H, 0BH*1111H, 07H*1111H]], bw]; -- 09
CDColors.DefineColor[xlime,
NEW[CDColors.Brick←[10*1111H, 10*1111H, 10*1111H, 10*1111H]], bit4];
CDColors.DefineColor[xlime,
NEW[CDColors.Brick←[10*1111H, 10*1111H, 10*1111H, 10*1111H]], bit8];
CDColors.DefineColor[xlime,
NEW[CDColors.Brick←[0EH*1111H, 0DH*1111H, 0BH*1111H, 07H*1111H]], bw]; -- 10
CDColors.DefineColor[xturquise,
NEW[CDColors.Brick←[10*1111H, 10*1111H, 10*1111H, 10*1111H]], bit4];
CDColors.DefineColor[xturquise,
NEW[CDColors.Brick←[10*1111H, 10*1111H, 10*1111H, 10*1111H]], bit8];
CDColors.DefineColor[xturquise,
NEW[CDColors.Brick←[0EH*1111H, 0DH*1111H, 0BH*1111H, 07H*1111H]], bw]; -- 11
CDColors.DefineColor[xaqua,
NEW[CDColors.Brick←[10*1111H, 10*1111H, 10*1111H, 10*1111H]], bit4];
CDColors.DefineColor[xaqua,
NEW[CDColors.Brick←[10*1111H, 10*1111H, 10*1111H, 10*1111H]], bit8];
CDColors.DefineColor[xaqua,
NEW[CDColors.Brick←[0EH*1111H, 0DH*1111H, 0BH*1111H, 07H*1111H]], bw]; -- 12
CDColors.DefineColor[xultraviolet,
NEW[CDColors.Brick←[10*1111H, 10*1111H, 10*1111H, 10*1111H]], bit4];
CDColors.DefineColor[xultraviolet,
NEW[CDColors.Brick←[10*1111H, 10*1111H, 10*1111H, 10*1111H]], bit8];
CDColors.DefineColor[xultraviolet,
NEW[CDColors.Brick←[0EH*1111H, 0DH*1111H, 0BH*1111H, 07H*1111H]], bw]; -- 13
CDColors.DefineColor[xpink,
NEW[CDColors.Brick←[10*1111H, 10*1111H, 10*1111H, 10*1111H]], bit4];
CDColors.DefineColor[xpink,
NEW[CDColors.Brick←[10*1111H, 10*1111H, 10*1111H, 10*1111H]], bit8];
CDColors.DefineColor[xpink,
NEW[CDColors.Brick←[0EH*1111H, 0DH*1111H, 0BH*1111H, 07H*1111H]], bw]; -- 14
CDColors.DefineColor[xsmoke,
NEW[CDColors.Brick←[10*1111H, 10*1111H, 10*1111H, 10*1111H]], bit4];
CDColors.DefineColor[xsmoke,
NEW[CDColors.Brick←[10*1111H, 10*1111H, 10*1111H, 10*1111H]], bit8];
CDColors.DefineColor[xsmoke,
NEW[CDColors.Brick←[0EH*1111H, 0DH*1111H, 0BH*1111H, 07H*1111H]], bw]; -- 15
CDPanel.DefineLayerEntry[cdsil, xneutral, "black", 0, CD.lambda];
CDPanel.DefineLayerEntry[cdsil, xcyan, "other", 0, CD.lambda];
CDPanel.DefineIntEntry[cdValueKey: $CDxSelectNewMode, tech: cdsil,
text: "select new:", min: 0, max: 1, default: 1];
CDPanel.DefineNewLine[cdsil];
CDPanel.DefineIntEntry[cdValueKey: $CDxStepValue, tech: cdsil, text: "step moves size:", min: 1, default: 4];
CDPanel.DefineIntEntry[cdValueKey: $CDxStretchyMove, tech: cdsil,
text: "stretchy:", min: 0, max: 1, default: 0];
CDPanel.DefineNewLine[cdsil];
CDValue.StoreInt[boundTo: cdsil, key: $CDxInitScale, value: 9];
CDValue.StoreInt[boundTo: cdsil, key: $CDxInitGrid, value: 8];
Commander.Register[
key: "CDSil",
proc: Load,
doc: "loads ChipNSil"
];
Commander.Register[
key: "cdnewsil",
proc: NewSWorld,
doc: "Creates new chipndale 'sil' design"
];
TerminalIO.WriteRope["ChiPencil impl\n"];
END;