Image Map Image Map
Page 6 of 6 FirstFirst ... 23456
Results 51 to 52 of 52

Thread: Little Game Engine for MS DOS.

  1. #51

    Default

    Quote Originally Posted by Trixter View Post
    That is flawed code. It stops waiting if it detects VGA is in vertical retrace, but without first checking to see if it is NOT in vertical retrace, you have no idea where you are in the display cycle. Do not use that code.
    I quoted wrong thing and clicked post too fast, couldnt edit/delete the message
    https://github.com/dos-games/vanilla...raphics.c#L229

    Code:
    void wait_vbi(void) {
    	do {} while ((inportb(0x3da)&8)!=0);
    	do {} while ((inportb(0x3da)&8)==0);
    	};
    there is also example pageflip function just above that

  2. #52

    Default

    Quote Originally Posted by Trixter View Post
    • A CRT is drawn from left to right, top to bottom.
    • The time between hitting the right edge and returning to the left edge to begin drawing again is called horizontal retrace. On the PC family, this is shown via the "display enable" bit -- if the bit is set, the beam is drawing; if it is not set, the beam is in horizontal retrace.
    • The time between hitting the bottom edge and returning to the top edge to begin drawing again is called vertical retrace. This is also a bit you can monitor.

    Is that more understandable, or do you need more explanation?
    Thanks I understand that OK, I was talking about the VGA card itself, it just does not have a "wait until x scanline" function like other systems.

    Quote Originally Posted by Trixter View Post
    I can guarantee you hundreds of DOS games used hardware page flipping.
    Of course, but to do that, they only change HIGH_ADDRESS 0x0C; LOW_ADDRESS 0x0D. That moves the start address by 4 pixels, so it only works for vertical scrolling or page flipping, because a line is 320 pixels (80*4), and that is working OK in my engine. What most games don't use, is the pixel panning register, which moves address 1 pixel to do smooth panning.

    Quote Originally Posted by pearce_jj View Post
    This project is so ridiculously impressive; for one person to do the whole lot and presumably only as a hobby?? Superb.
    Thanks!. I can consider the project nearly finished, It does what I wanted it to do: to make a 8086 scroll a map, draw 3 sprites and a collision detection+logic without slowdowns .

    Quote Originally Posted by rasz_pl View Post
    I quoted wrong thing and clicked post too fast, couldnt edit/delete the message
    https://github.com/dos-games/vanilla...raphics.c#L229

    Code:
    void wait_vbi(void) {
    	do {} while ((inportb(0x3da)&8)!=0);
    	do {} while ((inportb(0x3da)&8)==0);
    	};
    there is also example pageflip function just above that
    That's the function I found in many sources, and again, it works ok until I change the pixel panning value. I don't think Jill of the Jungle uses hardware scrolling, maybe it used the choppy 4 pixel scrolling (HIGH_ADDRESS 0x0C; LOW_ADDRESS 0x0D), and again that works perfect.

    Thanks everybody for the interest in this .

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •