https://blog.mikhe.ch/quake2-on-fpga/part4.html