6 ms·
- To plot a pixel in VGA Mode 13 it was quicker to do memaddress = (y<<6) + (y<<8) + x rather than (y * 320) + x to index into the frame buffer. Bitshifts are
by throwmeaway32 10y ago
- To plot a pixel in VGA Mode 13 it was quicker to do memaddress = (y<<6) + (y<<8) + x rather than (y * 320) + x to index into the frame buffer. Bitshifts are nicer than muls.
- Precompute your sin table into an array of 255 entries and then access it using index&255 to wrap around to avoid those pesky floating point calculations.