Init:
PROC [] =
BEGIN
xblack ← CD.NewLevel[cdsil, $xblack];
xgrey1 ← CD.NewLevel[cdsil, $xgrey1];
xred ← CD.NewLevel[cdsil, $xred];
xblue ← CD.NewLevel[cdsil, $xblue];
xyellow ← CD.NewLevel[cdsil, $xyellow];
xgreen ← CD.NewLevel[cdsil, $xgreen];
UserProfile.CallWhenProfileChanges[NoteProfileChange];
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[xblack,
NEW[CDColors.Brick←[10*1111H, 10*1111H, 10*1111H, 10*1111H]], bit4];
CDColors.DefineColor[xblack,
NEW[CDColors.Brick←[10*1111H, 10*1111H, 10*1111H, 10*1111H]], bit8];
CDColors.DefineColor[xblack,
NEW[CDColors.Brick←[0EH*1111H, 0DH*1111H, 0BH*1111H, 07H*1111H]], bw];
CDColors.DefineColor[xgrey1,
NEW[CDColors.Brick←[10*1010H, 10*0101H, 10*1010H, 10*0101H]], bit4];
CDColors.DefineColor[xgrey1,
NEW[CDColors.Brick←[10*1010H, 10*0101H, 10*1010H, 10*0101H]], bit8];
CDColors.DefineColor[xgrey1,
NEW[CDColors.Brick←[05H*1111H, 0AH*1111H, 05H*1111H, 0AH*1111H]], bw];
CDPanel.DefineLevelEntry[cdsil, xblack, "black", 0, 2*CD.lambda];
CDPanel.DefineLevelEntry[cdsil, xgrey1, "grey", 0, 2*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: 10];
CDValue.StoreInt[boundTo: cdsil, key: $CDxInitGrid, value: 16];
Commander.Register[
key: "cdnewsil",
proc: NewSWorld,
doc: "Creates new chipndale 'sil' design"
];
TerminalIO.WriteRope["ChiPencil impl\n"];
END;