This paper introduces an improved Viterbi decoder utilizing a window system, achieving a 1 dB performance gain over the classical Viterbi decoder when evaluated over Gaussian channels. It presents the underlying theory of Trellis Coded Modulation (TCM) and compares various decoding algorithms including classical Viterbi, MAP, and their variants. Additionally, a function named rscpoly2trellis for creating the trellis structure of a Recursive Systematic Convolutional encoder is proposed and evaluated.