Prepare Baked Pastry Shell; set shell aside.
In a large saucepan, combine the sugar, cornstarch, and salt. Gradually stir in milk. Cook and stir over medium-high heat until thickened and bubbly. Cook and stir for 2 minutes more. Remove from heat.
In a medium bowl, slightly beat the egg yolks with a whisk or fork. Gradually stir about 1 cup of the hot mixture into the yolks. Return egg yolk mixture to the hot filling in pan. Bring to a gentle boil. Cook and stir for 2 minutes more. Remove from heat; stir in vanilla.
Place semisweet chocolate pieces in a bowl. Pour 2 cups of the filling over chocolate. Stir until chocolate is melted and well mixed. Spread chocolate mixture evenly over bottom of baked pie shell. Carefully spoon the vanilla filling over the chocolate layer. Cover and chill until serving time.
Top with whipped topping or whipped cream, if desired. Makes 10 servings.