Loading ...
Sorry, an error occurred while loading the content.

Re: Graphics modes other than mode 13H

Expand Messages
  • spottts
    ... Hi there! I don t have time to write a tutorial on the subject, but here s the things you can DO with 13h: (I have only tried this in DOS real mode) -Set
    Message 1 of 8 , Mar 1, 2002
    • 0 Attachment
      Regarding Mode 13h:

      > Please, please write us all a big, fat, juicy, agonizingly detailed
      > tutorial on the subject. I'm looking to learn 13h and its linux
      > equivalent, and I would be more than delighted to have a tutorial,
      > preferably one in excess of ten pages that I can reread and reread
      > and memorize.

      Hi there!
      I don't have time to write a tutorial on the subject, but here's the
      things you can DO with 13h: (I have only tried this in DOS real mode)

      -Set the video mode to 13h (clears screen)
      MOV AX, 13h ; or AL to 13h and AH to 0
      INT 10h ; Video function

      The mode will now be 320x200 256 color indexed.
      Note: Setting AX to 3 in the above code goes back to text mode

      -Set the 256 colors to what YOU want them to be
      Table: ; label at the start of the table
      ; For as many colors as you want to set, you need:
      byte red
      byte green
      byte blue
      With each byte holding a value from 0 to 63 decimal. (63 is the
      most amount of that color, 0 is black. 63, 30, 30, would be a nice
      bright red)
      PUSH DS
      POP ES ; So ES points at your data segment
      MOV AX, 1012h ; Set DAC registers (colors) function
      MOV BX, 0 ; Starting register (0 to 255)
      MOV CX, 256 ; How many registers to set (entries in table)
      MOV DX, Table ; Where Table is the start of RGB color table
      INT 10h ; Video function

      -Use ES to point to the screen!
      MOV AX, 0A000h ; Segment the screen is in (64000 bytes)
      MOV ES, AX ; Put this in ES

      -Draw something! (A small horizontal line in color #4)
      MOV DI, 32180 ; Exact center of screen (DI often used to index
      pixels)
      MOV AL, 4 ; Color # you want to draw (0-255 as in table)
      MOV CX, 100 ; For the REP instruction
      REP STOSB ; Puts byte in AL at pixel DI 100 times,
      incrementing DI

      From there, I'm sure you can construct loops to copy an image to the
      screen, etc. (hint: MOVSD) Have fun discovering how to build a
      blended palette. (Remember: 3 bytes per color) Let me know if this
      works in Linux! (sgpotts@...) I don't have an assembler set up
      yet on my Linux box.

      It IS possible to display 256-color bitmaps and probably lots of
      other indexed graphics in this mode. Drawing programs that give you
      a palette and nice raw data are hard to find though!

      For a preliminary look at a Mode 13 game that I am working on, see
      www.sfu.ca/~sgpotts (Spud Base)

      Hope you found this informative! I'm not responsible for bugs in the
      code, it's mostly recited from memory. You may use all the contents
      of this message freely!

      -Simeon Potts (aka Pottsware)

      P.S. There are TONS of web pages on this subject (search carefully,
      like for A000, 13h, etc :)
      P.P.S. God loves you!
    • saltmeister_one
      Assuming that nobody remembers, I myself was the person who first started this chain of posted messages. I fear that the messages are deviating from the actual
      Message 2 of 8 , Mar 6, 2002
      • 0 Attachment
        Assuming that nobody remembers, I myself was the person who first
        started this chain of posted messages. I fear that the messages are
        deviating from the actual topic itself.

        I'm not looking for information on mode 13h. The information below is
        extremely useful; I encourage you to continue supplying message on
        that topic, except that I would prefer that you put "Re: Graphic mode
        13h" in the subject field instead of "Re: Graphic modes other than
        mode 13h." It makes it easier for me to distinguish between the two.

        Anyway, this was first part of the last message. I'd like to see more
        of this subject, but with a different Subject Field.

        --- In assemblyassist@y..., spottts <no_reply@y...> wrote:
        > Regarding Mode 13h:

        > Hi there!
        > I don't have time to write a tutorial on the subject, but here's
        > the things you can DO with 13h: (I have only tried this in DOS real
        > mode)
        >
        > -Set the video mode to 13h (clears screen)
        > MOV AX, 13h ; or AL to 13h and AH to 0
        > INT 10h ; Video function
        >
        > The mode will now be 320x200 256 color indexed.
        > Note: Setting AX to 3 in the above code goes back to text mode
        >
        > -Set the 256 colors to what YOU want them to be
        > Table: ; label at the start of the table
        > ; For as many colors as you want to set, you need:
        >
        etc., etc., etc.

        Getting back to my aim and purpose, I am looking for information
        regarding graphic modes other than 320 x 200 x 256. Here are some
        examples.

        640 x 350 x 16 colours (EGA)
        640 x 480 x 16 colours (VGA)
        640 x 400 x 256 colours (what I am looking for, but I want to know
        about the other modes nevertheless)
        640 x 480 x 256 colours (SVGA)
        800 x 600 x 256 colours (SVGA)

        At the moment I am interested in 640 x 400 x 256, but I would like to
        know about the others as soon as I have understood this mode. (This
        is not mode 13h! Read the Subject Field!) The first two modes are
        somewhat primitive, but I am curious about them anyway.

        Make sure that future replies don't deviate from the original
        subject. Gratitude has often turned to disappointment when I find
        that messages don't contain what I think they contain.

        Thanks for any help.

        Saltmeister.
      • saltmeister_one
        Does anybody know how to get into any of these video modes? 640 x 350 x 16 colours (EGA) 640 x 480 x 16 colours (VGA) 640 x 400 x 256 colours 640 x 480 x 256
        Message 3 of 8 , Apr 10, 2002
        • 0 Attachment
          Does anybody know how to get into any of these video modes?

          640 x 350 x 16 colours (EGA)
          640 x 480 x 16 colours (VGA)
          640 x 400 x 256 colours
          640 x 480 x 256 colours (SVGA)
          800 x 600 x 256 colours (SVGA)

          Thanks for any help.

          Saltmeister.
        • joearellano2000
          ... I also have question about this topic the following reference comes from a publication written in 92 and I know that computers today are much different
          Message 4 of 8 , May 11, 2002
          • 0 Attachment
            --- In assemblyassist@y..., saltmeister_one <no_reply@y...> wrote:
            > Does anybody know how to get into any of these video modes?
            >
            > 640 x 350 x 16 colours (EGA)
            > 640 x 480 x 16 colours (VGA)
            > 640 x 400 x 256 colours
            > 640 x 480 x 256 colours (SVGA)
            > 800 x 600 x 256 colours (SVGA)
            >
            > Thanks for any help.
            >
            > Saltmeister.

            I also have question about this topic the following reference comes
            from a publication written in 92 and I know that computers today are
            much different then they were back then, but can any of this info be
            useful in learning graphics programming .


            VGA VIDIO MODES
            MODES NUMBER OF TYPE TEXT TEXT SCREEN BUFFER SCREEN
            COLORS ROWS PIXEL BOX PAGES ADDRESS PIXELS
            0,1 16 alpha 40x25 8x8 8 B8000H 320x200
            8x14* 320x350
            9x16+ 360x400
            2,3 16 alpha 80x25 8x8 8 B8000H 320x200
            8x14* 320x350
            9x16+ 360x400
            4,5 4 gra 40x25 8x8 1 A0000H 320x200
            6 2 gra 80x25 8x8 1 A0000H 640x200
            7 - alpha 80x28 9x14 8 B0000H 720x350
            9x16+ 720x400
            13 16 gra 40x25 8x8 8 A0000H 320x200
            14 16 gra 80x25 8x8 4 A0000H 640x200
            15 - gra 80x25 8x14 2 A0000H 640x350
            16 16 gra 80x25 8x14 2 A0000H 640x350
            17 2 gra 80x30 8x16 1 A0000H 640x480
            18 16 gra 80x30 8x16 1 A0000H 320x200

            legend:
            alpha=alphanumeric modes (text)
            gra=grapics modes
            *=ega enhanced modes
            +=vga enhanced modes

            also does the DAC still provide a set of 256 color registers, or the
            three color drivers for an analog display?
          • md1210us
            ive got upto vga 640x320 in b/w by going into the mode with int 10 and the writing a some abertray byte value to vidio memery in seqence.and noteing what addr
            Message 5 of 8 , May 27, 2002
            • 0 Attachment
              ive got upto vga 640x320 in b/w
              by going into the mode with int 10
              and the writing a some abertray byte value
              to vidio memery in seqence.and noteing what addr started
              displaying a pixel ect
              but i noted the byte value affected the hor size of the pixal
              not the color"pixal is always white" as it is in the lower
              vidio modes cga,ect.
              i then read a book that explained trhat in 640x320
              you use the output to port ie: "out ax,dl"
              and dl is a byte value that changes the color of the pixels
              untill you change it again.i dont remember the port addr
              but the addr number out of the book worked on my sx386
              so it must be a standerd addr.as for all the higher modes
              ie: greater then basic "screen9" good luck cuz i looked and havent
              found any infomation.if you find any please post it as im sure there
              are many who have looked and couldnt find any data above the 640x320
              vga level.
            Your message has been successfully submitted and would be delivered to recipients shortly.