VESA Hi-res

I am new to SVGA video modes. I am calling VESA mode

100h (640x400x256) from a function within C++. I am

also using the pokeb function to poke bytes into the

video memory. However, when I poke bytes into the vidoe

memory (segment A000h), it plots two points onto the

screen: one where it should be, and one to the right

about 100 pixels (this is in bank 0). It is as if there

is two separate screens I am ploting to at the same time.

Does anyone know why this happens and how to fix it?

Some sample source code would be helpful.


Thank you,

177C177


Comments

  • : I am new to SVGA video modes. I am calling VESA mode

    : 100h (640x400x256) from a function within C++. I am

    : also using the pokeb function to poke bytes into the

    : video memory. However, when I poke bytes into the vidoe

    : memory (segment A000h), it plots two points onto the

    : screen: one where it should be, and one to the right

    : about 100 pixels (this is in bank 0). It is as if there

    : is two separate screens I am ploting to at the same time.

    : Does anyone know why this happens and how to fix it?

    : Some sample source code would be helpful.


    : Thank you,

    : 177C177

    Hi There,

    You're using pokeb to write to video memory????!!!

    Thats an EXTREMELY slow way to do it. You should

    use a pointer to access video memory directly,

    like so:


    char far *vmem;

    vmem = (char far *)(0xA0000000);

    .

    .

    .

    vmem[x] = byte;







  • : I am new to SVGA video modes. I am calling VESA mode

    : 100h (640x400x256) from a function within C++. I am

    : also using the pokeb function to poke bytes into the

    : video memory. However, when I poke bytes into the vidoe

    : memory (segment A000h), it plots two points onto the

    : screen: one where it should be, and one to the right

    : about 100 pixels (this is in bank 0). It is as if there

    : is two separate screens I am ploting to at the same time.

    : Does anyone know why this happens and how to fix it?

    : Some sample source code would be helpful.


    : Thank you,

    : 177C177




    - Why don't u rather use LFB? What C++ are u using? With LFB in DJGPP C++ u can use video[(width*y)+x] = c; where (width*y)+x is the formula to the address of the pixel u are "poking"


    - mail me for more info.


    URL:http://www.delorie.com/djgpp/

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories