I recently learned how Doom was ported to the SNES. It's quite impressive. The SNES hardware was nowhere near fast enough to do all the trig calculations needed for the game but cartridge based games had a trick up their sleeve: they could include actual hardware <i>inside the cart</i> that the game code could make use of. It was more expensive but if you expected to sell a boatload of copies, it could be worth it. However, even using extra hardware wasn't enough in this case. So they pre-calculated lookup tables for sine, cosine, tangent etc. for every angle at the necessary precision. They were helped by the fact that the game resolution in this case was fairly low.<p>If you're interested, you can peruse the C code that was used to generate the tables. Here's the file for sine/cosine:<p><a href="https://github.com/RandalLinden/DOOM-FX/blob/master/source/mksin.c">https://github.com/RandalLinden/DOOM-FX/blob/master/source/m...</a>