Image Map Image Map
Results 1 to 4 of 4

Thread: VGA (mode X) Video Ram viewer/dumper

  1. #1

    Default VGA (mode X) Video Ram viewer/dumper

    Hi.

    How can I view or dump the VGA video ram to an image using emulators, or from ms-dos itself?

    Dosbox debugger worked perfect with "MCGA" mode, in which every pixel is a byte in memory. But the results with mode X games were not good. I converted the dump to an indexed 256 colour image, and I (kind of) saw a "screenshot" of the VRAM, but it was distorted because (I think) it only gets bytes from one VGA plane.

    Is there any other way?.

    I thought I could write a little program which could reside in ram, and it would be able to get the bytes from all 4 planes after a key press or something. But I don't know if that's even possible with MS-DOS.

    Thanks.

  2. #2

    Default

    As you say, I guess the problem is the planar nature of mode-x, that asks to change the memory bank (plane) in order to see all the pixels. The dump you get now I think only shows the first of every 4 pixels (default plane 0), that's why it's distorted.

    Quote Originally Posted by Mills32 View Post
    Is there any other way?.

    I thought I could write a little program which could reside in ram, and it would be able to get the bytes from all 4 planes after a key press or something. But I don't know if that's even possible with MS-DOS.
    In my opinion, that would be a good idea. It is theoretically possible. For example, the camera.com utility shipped with Deluxe Paint II can, indeed, make screen captures of the 16 color EGA planar modes. It stores them into semi-raw files named SCREENxx.LBM. Unfortunately I don't know any capture TSR that captures mode-x screens.

    If a new TSR was built to capture mode-x, in order to view the dump without needing to use mode-x, the pixels captured must be ordered to get a viewable image. I.e., pixel 0 = pixel 0 from plane 0; pixel 1 = pixel 0 from plane 1; pixel 2 = pixel 0 from plane 2;pixel 3 = pixel 0 from plane 3; pixel 4 = pixel 1 from plane 0; and so on...

  3. #3

    Default

    Quote Originally Posted by carlos12 View Post
    If a new TSR was built to capture mode-x, in order to view the dump without needing to use mode-x, the pixels captured must be ordered to get a viewable image. I.e., pixel 0 = pixel 0 from plane 0; pixel 1 = pixel 0 from plane 1; pixel 2 = pixel 0 from plane 2;pixel 3 = pixel 0 from plane 3; pixel 4 = pixel 1 from plane 0; and so on...
    So I tried a little tsr which installs itself into 0x1C interrupt, but that interrupt is used for games and programs so it crashes (in dosbox).

    Is there any other interrupt I can use?. I tried different numbers, for example 0x1D? It does nothing . All tsr samples I see, use 0x1C, so I just don't know how to do it.

  4. #4

    Default

    The alternative to Int 1Ch is Int 08h. AFAIK they have an almost identical functionality.

    If Int 08h couldn't be used (because there are games that also use it), you could try Int 28h. I never used this one on any program but, according to documentations, it can be used to manage background tasks and it may be good for TSRs.

    http://www.techhelpmanual.com/567-in..._dos_idle.html

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
  •