Basic CGA graphics mode emulation.