In my quest to get helppc running and working in wine, I noticed that it tries to access the text mode buffer directly (b000, I think). This memory doesn't seem to be emulated in dosmem.c and my exploration into how to implement it were in vein. Could anybody please help?
Anyway on another note, to get the program to exectute this far I had to add a hack to vga.c. What the program was doing, was, it waited until the light pen trigger was set, when it read the light pen trigger set (bit 1) from the vga status register (3da) and then it would wait until it was unset again. I've attached a patch to solve this problem, but its definatly not the right way of doing it, anyway see what you think.
Index: vga.c =================================================================== RCS file: /home/wine/wine/msdos/vga.c,v retrieving revision 1.7 diff -u -r1.7 vga.c --- vga.c 2001/06/19 18:14:08 1.7 +++ vga.c 2001/10/04 17:54:02 @@ -31,6 +31,8 @@ typedef HWND WINAPI (*CreateWindowExAProc)(DWORD,LPCSTR,LPCSTR,DWORD,INT,INT, INT,INT,HWND,HMENU,HINSTANCE,LPVOID); static CreateWindowExAProc pCreateWindowExA;
+int pentrigger = 0; + static void VGA_DeinstallTimer(void) { if (poll_timer) { @@ -333,6 +335,15 @@ we need to fake the occurrence of the vertical refresh */ ret=vga_refresh?0x00:0x08; vga_refresh=0; + + /* The light pen trigger is a bit tricky, programs want it set first + and then they wait until its unset agian */ + if(pentrigger == 1) { + pentrigger = 0; + ret += 0x5; + } + else + pentrigger = 1; break; default: ret=0xff;
Nog wrote:
In my quest to get helppc running and working in wine, I noticed that it tries to access the text mode buffer directly (b000, I think). This memory doesn't seem to be emulated in dosmem.c and my exploration into how to implement it were in vein. Could anybody please help?
Anyway on another note, to get the program to exectute this far I had to add a hack to vga.c. What the program was doing, was, it waited until the light pen trigger was set, when it read the light pen trigger set
Err, I mean light pen enable...
(bit 1) from the vga status register (3da) and then it would wait until
and its actually bit 2...
it was unset again. I've attached a patch to solve this problem, but its definatly not the right way of doing it, anyway see what you think.
Index: vga.c
RCS file: /home/wine/wine/msdos/vga.c,v retrieving revision 1.7 diff -u -r1.7 vga.c --- vga.c 2001/06/19 18:14:08 1.7 +++ vga.c 2001/10/04 17:54:02 @@ -31,6 +31,8 @@ typedef HWND WINAPI (*CreateWindowExAProc)(DWORD,LPCSTR,LPCSTR,DWORD,INT,INT, INT,INT,HWND,HMENU,HINSTANCE,LPVOID); static CreateWindowExAProc pCreateWindowExA;
+int pentrigger = 0;
static void VGA_DeinstallTimer(void) { if (poll_timer) { @@ -333,6 +335,15 @@ we need to fake the occurrence of the vertical refresh */ ret=vga_refresh?0x00:0x08; vga_refresh=0;
/* The light pen trigger is a bit tricky, programs want it set first
and then they wait until its unset agian */
if(pentrigger == 1) {
pentrigger = 0;
ret += 0x5;
}
else
pentrigger = 1; break; default: ret=0xff;
On Thu, 4 Oct 2001, Nog wrote:
In my quest to get helppc running and working in wine, I noticed that it tries to access the text mode buffer directly (b000, I think). This memory doesn't seem to be emulated in dosmem.c and my exploration into how to implement it were in vein. Could anybody please help?
I already have code to do that, but it's probably as a part of my DOS support restructure... which I don't have time to work on at the moment. Sorry.
Anyway on another note, to get the program to exectute this far I had to add a hack to vga.c. What the program was doing, was, it waited until the light pen trigger was set, when it read the light pen trigger set (bit 1) from the vga status register (3da) and then it would wait until it was unset again. I've attached a patch to solve this problem, but its definatly not the right way of doing it, anyway see what you think.
Sounds weird... does it really mess with a "light pen"?
Ove Kaaven wrote:
On Thu, 4 Oct 2001, Nog wrote:
In my quest to get helppc running and working in wine, I noticed that it tries to access the text mode buffer directly (b000, I think). This memory doesn't seem to be emulated in dosmem.c and my exploration into how to implement it were in vein. Could anybody please help?
I already have code to do that, but it's probably as a part of my DOS support restructure... which I don't have time to work on at the moment. Sorry.
Anyway on another note, to get the program to exectute this far I had to add a hack to vga.c. What the program was doing, was, it waited until the light pen trigger was set, when it read the light pen trigger set (bit 1) from the vga status register (3da) and then it would wait until it was unset again. I've attached a patch to solve this problem, but its definatly not the right way of doing it, anyway see what you think.
Sounds weird... does it really mess with a "light pen"?
Well, thats what my docs tell me (ie. helppc, it runs under dos). What I know for certain, is that it checks bit 1 of the vga status register. I'm sorry if I'm confusing anyone with my previous two messages, one stating that it was bit 1 and the other bit 2 but the true one is the first one, bit 1 and light pen trigger set. Anyway, what do say to my patch? Is it worthy enough to be submitted to wine-patches?
On Fri, Oct 05, 2001 at 07:26:20PM +0200, Nog wrote:
Ove Kaaven wrote:
Sounds weird... does it really mess with a "light pen"?
Well, thats what my docs tell me (ie. helppc, it runs under dos). What I know for certain, is that it checks bit 1 of the vga status register. I'm sorry if I'm confusing anyone with my previous two messages, one stating that it was bit 1 and the other bit 2 but the true one is the first one, bit 1 and light pen trigger set. Anyway, what do say to my patch? Is it worthy enough to be submitted to wine-patches?
Yep, I'd think so. (provided that it "works around" a real light pen with a reasonable algorithm, which it seems to do on a quick glance)