Previous Next Table of Contents

4. The Video group of Modules

All of the Video handling code is in the "video" subdirectory.

There is one file for each video card or chipset and the master file. To Add a new card, it needs a set of save & restore routines putting in a file here.

4.1 env/video/vc.c Information

4.2 env/video/video.c Information

Functions in env/video/video.c

These are the functions defined in env/video/video.c.

video_init

Set pointer to correct structure of functions to initialize, close, etc... video routines.

Remarks in env/video/video.c

Here the sleeping lion will be awoken and eat much of CPU time !!!

The result of setting VM86_SCREEN_BITMAP (at state of Linux 1.1.56): Each vm86 call will set 32 pages of video mem RD-only (there may be 1000000 per second) Write access to RD-only page results in page-fault (mm/memory.c), which will set a bit in current->screen_bitmap and calls do_wp_page() which does __get_free_page(GFP_KERNEL) but frees it immediatly, because copy-on-write is not neccessary and sets RD/WR for the page. (this could happen 32000000 per second, if the CPU were fast enough) It would be better to get the DIRTY-bit directly from the page table, isn't it? A special syscall in emumodule could do this.

-----

reserve_video_memory()

This procedure is trying to eke out all the UMB blocks possible to maximize your memory under DOSEMU. If you know about dual monitor setups, you can contribute by putting in the correct graphics page address values.

4.3 env/video/X.c Information

Functions in env/video/X.c

These are the functions defined in env/video/X.c.

get_vga256_colors

Allocates a colormap for 256 color modes and initializes it.

X_close

Destroys the window, unloads font, pixmap and colormap.

X_setmode

Resizes the window, also the graphical sizes/video modes. remember the dos videomodi

X_change_mouse_cursor

This function seems to be called each screen_update :( It is called in base/mouse/mouse.c:mouse_cursor(int) a lot for show and hide.

X_redraw_screen

Redraws the entire screen, also in graphics mode Used for expose events etc. returns: nothing

Arguments are:

X_update_screen

Updates, also in graphics mode Graphics in X has to be smarter and improved returns: 0 - nothing updated 2 - partly updated 1 - whole update

Arguments are:

set_mouse_position

places the mouse on the right position Not tested in X with graphics returns: nothing

Arguments are:

4.4 env/video/console.c Information

4.5 env/video/dualmon.c Information

Functions in env/video/dualmon.c

These are the functions defined in env/video/dualmon.c.

MDA_init

Initializes the monochrome card. First detects which monochrome card is used, because the Hercules RamFont and the Hercules InColor need one more register to be initialized. If there is no monochrome card at all, we just think there is one and poke an peek in the void. After the detection the card is initialized. returns: nothing

Arguments are:

Remarks in env/video/dualmon.c

After MDA_init() the VGA is configured, something in video.c or console.c "reprograms" the monochrome card again in such a way that I always have to run hgc.com before I can use any program that uses the monochrome card. I've spent a day trying to find it, but I can't figure out. Something is writing to one of the following ports: 0x3b4, 0x3b5, 0x3b8, 0x3b9, 0x3ba, 0x3bb, 0x3bf. The problem occurs at (at least) the following 2 systems:

- AMD 386DX40, Trident 9000/512Kb ISA, Hercules Graphics Card Plus - Intel 486DX2/66, Cirrus Logic 5426/1Mb VLB, Hercules clone

The problem doesn't occur when I start dosemu from a telnet connection or from a VT100 terminal. (Erik Mouw, jakmouw@et.tudelft.nl)

4.6 env/video/et4000.c Information

4.7 env/video/hgc.c Information

4.8 base/bios/int10.c Information

4.9 env/video/s3.c Information

4.10 env/video/terminal.c Information

4.11 env/video/trident.c Information

4.12 env/video/vga.c Information


Previous Next Table of Contents