[comp.sys.ibm.pc] graphicss video memory screen save

tomj@hpccc.HP.COM (Tom Johnson) (01/17/90)

    I know this has been discussed before, but I can't seem to find it.
    I'm trying to write a program that saves the currently displayed screen
    IN GRAPHICS MODE to a file.  I then want to restore the file directly
    back into video memory.

    I've tried reading from video memory starting from segment A000 or
    whatever the start of graphics memory is, and saving x number of bytes.
    However, when I try to write this back to video memory, the color is
    not displayed.

    Isn't there some way to do this?  Maybe I have to switch bit planes to
    get to the color planes in order to save them.  Anyone got any ideas?

    Tom Johnson
    tomj@hpccc.hp.com

kmont@hpindda.HP.COM (Kevin Montgomery) (01/18/90)

> I've tried reading from video memory starting from segment A000 or
> whatever the start of graphics memory is, and saving x number of bytes.
> However, when I try to write this back to video memory, the color is
> not displayed.

I think you're pretty much set, with the one exception that you didn't
set up the color lookup table.  I've recently done something like this
to display frame-grabbed images quickly.  If you're using Microsoft C,
then you:

	1) get into graphics mode via _setvideomode()
	2) set the color lookup table to the correct values via _remappalette()
	3) write to memory

						-kevbop

grs@hpcvca.CV.HP.COM (Gordon Stevenson) (01/19/90)

Although I have forgotten the program names, there are at least two
programs on "freebb" that do exactly what you are trying to do.
If you are not familiar with freebb, try contacting Dave Wooldridge
at Telnet 857-4776.