attempted to patch up certain vga functionality to work in real hardware, still no luck. also, moved some functions to a separate code file.