A true gem is hidden down at the end of the first page:
https://github.com/fabiensanglard/chocolate_duke3D
[...] a port of the Vanilla source code with two goals in mind:
Education: Easy to read/understand and very portable.
Fidelity: The gaming experience should be similar to what ran in 1996 on our 486s.
And from the README: Aimed at education: A lot of comments and documentation has been added in order to help programmers to understand and learn.