0

For example, I'm using 320x200x256 graphics (VGA)

unsigned char g_320x200x256[] =
{
    /* MISC */
        0x63,
    /* SEQ */
        0x03, 0x01, 0x0F, 0x00, 0x0E,
    /* CRTC */
        0x5F, 0x4F, 0x50, 0x82, 0x54, 0x80, 0xBF, 0x1F,
        0x00, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
        0x9C, 0x0E, 0x8F, 0x28, 0x40, 0x96, 0xB9, 0xA3,
        0xFF,
    /* GC */
        0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x05, 0x0F,
        0xFF,
    /* AC */
        0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
        0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F,
        0x41, 0x00, 0x0F, 0x00, 0x00
};

WriteRegisters(g_320x200x256);

So, how can I use graphics with another size and 16M color??
Help me, please. :((

EDIT
This is WriteRegister function

void VideoGraphicsArray::WriteRegisters(uint8_t* registers)
{
    //  misc
    miscPort.Write(*(registers++));

    // sequencer
    for(uint8_t i = 0; i < 5; i++)
    {
        sequencerIndexPort.Write(i);
        sequencerDataPort.Write(*(registers++));
    }

    // cathode ray tube controller
    crtcIndexPort.Write(0x03);
    crtcDataPort.Write(crtcDataPort.Read() | 0x80);
    crtcIndexPort.Write(0x11);
    crtcDataPort.Write(crtcDataPort.Read() & ~0x80);

    registers[0x03] = registers[0x03] | 0x80;
    registers[0x11] = registers[0x11] & ~0x80;

    for(uint8_t i = 0; i < 25; i++)
    {
        crtcIndexPort.Write(i);
        crtcDataPort.Write(*(registers++));
    }

    // graphics controller
    for(uint8_t i = 0; i < 9; i++)
    {
        graphicsControllerIndexPort.Write(i);
        graphicsControllerDataPort.Write(*(registers++));
    }

    // attribute controller
    for(uint8_t i = 0; i < 21; i++)
    {
        attributeControllerResetPort.Read();
        attributeControllerIndexPort.Write(i);
        attributeControllerWritePort.Write(*(registers++));
    }

    attributeControllerResetPort.Read();
    attributeControllerIndexPort.Write(0x20);

}
Dev4fun
  • 3
  • 2
  • Ehm... 16M colors usually refers to classic RBG. That's 3 bytes per pixel. A byte for red, a byte for blue, and a byte for green. Duh. – ALX23z Jul 12 '20 at 20:56
  • I known. But above, it is a setup for graphics driver(VGA). Do you understand `WriteRegisters`, bruh?? – Dev4fun Jul 13 '20 at 03:17
  • why not use VESA BIOS? to allow higher resolution you most likely need UNIVBE installed but not sure if VESA supports such high resolutions ... VGA does not support resolutions above `640x480x8bpp` those above are called SVGA ... see [list of VGA/SVGA/VESA modes](http://www.columbia.edu/~em36/wpdos/videomodes.txt) UNIVBE might add additional resolutions however. Also see [How do I print SVGA Info on the screen in tasm?](https://stackoverflow.com/a/49025827/2521214) you can use that to check/test each mode of your system – Spektre Jul 13 '20 at 06:39
  • Here link to some older [SciTech Display Doctor UNIVBE 5.1](http://bicbozi.cz/osdos//univbe/univbe.exe) try to find newest version I used 5.3 ages ago... newer versions might support higher resolutions. According to [Wiki](https://en.wikipedia.org/wiki/UniVBE) there might be version `7` out there ... – Spektre Jul 13 '20 at 06:43

1 Answers1

0

The code you are using is a dump of values for the VGA configuration registers. The fastest clock generator VGA has to offer runs at about 28 MHz. So you can't output 1920x1080x60 = 124 416 000 pixels per second but only about 28 000 000 pixels per second. That is why you won't find the desired values for the configuration registers.

Some name
  • 39
  • 6