Which function handles copying into the video ram?
Hi,
I have an old DOS programm that runs fine with dosemu, but the output of a few characters is strange due to some reasons that aren't important to the problem.
I assume that the program does its video output by copying directly into the vga graphics memory (text mode), because it is (and always was) very speedy.
What I'd like to do now: If the programs is going to copy some certain characters with some certain color attribute to the screen, I want to change the character, e. g. I need to hook into the dosemu function that is called for 'copying into the video ram'.
Could someone please tell me where I can find this function and what its name is?
Thank you very much.
2009/5/28 Ingo Brueckl <[email protected]>:
Quoted 10 lines
I assume that the program does its video output by copying directly into the vga graphics memory (text mode), because it is (and always was) very speedy.
What I'd like to do now: If the programs is going to copy some certain characters with some certain color attribute to the screen, I want to change the character, e. g. I need to hook into the dosemu function that is called for 'copying into the video ram'.
Could someone please tell me where I can find this function and what its name is?
Perhaps you are looking forsrc/env/video/text.c
static void draw_string(int x, int y, char *text, int len, Bit8u attr)
In this file are the routines that read the video ram. But DOS programs just write into the video ram directly, there is no DOSEMU routine involved there, it's just a chunk of memory that DOSEMU reads at intervals to update the screen.
Bart
Quoted 3 lines · Bart Oldeman
But DOS programs just write into the video ram directly, there is no DOSEMU routine involved there, it's just a chunk of memory that DOSEMU reads at intervals to update the screen.
I see. Now I understand why I couldn't find a routine to hook in.
Quoted 3 lines
Perhaps you are looking for
src/env/video/text.c
static voiddraw_string(int x, int y, char *text, int len, Bit8u attr)
This is exactly what I was looking for!
Thank you so very much for your kind help.
I could now make the desired screen output manipulation making my old dos editor to run with dosemu under Linux as if it were written for Linux.
Again, thanks a lot.
Ingo