/// <summary> /// Writes the pixel. /// </summary> /// <param name="colorIndex">Index of the color.</param> /// <param name="x">The x.</param> /// <param name="y">The y.</param> public void WritePixel(byte colorIndex, ushort x, ushort y) { if (writeMethod == WriteMethod.Pixel8) { memory.Write8((uint)(y * 320 + x), colorIndex); } if (writeMethod == WriteMethod.Pixel2) { // ??? uint address = (uint)(y * 320 + x / 2); colorIndex = (byte)(colorIndex & 0xF); if ((x & 0x01) == 0) { memory.Write8(address & 0xF, (byte)(colorIndex << 4)); } else { memory.Write8(address & 0x0F, colorIndex); } } // TODO: Support more video modes }