• Please review our updated Terms and Rules here

VGA (mode X) Video Ram viewer/dumper

Mills32

Experienced Member
Joined
Sep 25, 2018
Messages
149
Location
Spain
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.
 
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.

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...
 
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? :oops: It does nothing :confused:. All tsr samples I see, use 0x1C, so I just don't know how to do it.
 
Back
Top