14.01.2013 17:35, Bart Oldeman пишет:

> I don't really want to argue about this, it's more productive to fix
> bugs and if we can fix the regressions the devel branch is stable and
> it's fine.

Agreed, except for the broken git and the question about
where to release an rpm from. But I'll let people to handle that
themselves, individually. We can't make a good suggestion at
that point, so why to even try.

> About int21, the other reason I should have mentioned is
> that the sooner the redirector takes over from fatfs the better, and
> now it happens later. I had to apply the attached patch too to get the
> first int21 in the -D+D log. But I don't understand coopthreads_v2 yet
> completely so it may be wrong?

I think its fine, but attached is the simpler (but untested) one,
that just installs the hook earlier. And disables the revectoring.
Does this work?

> no... could you recompile with debug info on?

It was on. Line numbers are all here, but the function args are
mostly <optimized out>, so the only thing I can try is to lower
the optimization.

> As to your gpm fix, "dosemu -S" should work without root at all (which
> is how I've mostly used it), but then it's necessary to set various
> permissions. Here I have
> prw-r--r--. 1 root root 0 jan 14 21:47 /dev/gpmdata

Ah, OK, and I don't have gpmdata because it needs gpm -R.
And SDL probably doesn't support GPM at all, but someone
posted the patch:
http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20050930/75243367/attachment.txt
So the perms were needed likely for /dev/input/mice - I'll check
that and fix the comments I added to the file.
We should also consider taking a look into the aforementioned
patch and submit it properly.
From b66a8f95601a0b9533a0787d52ea06271050d082 Mon Sep 17 00:00:00 2001
From: Stas Sergeev <stsp@users.sourceforge.net>
Date: Tue, 15 Jan 2013 17:53:06 +0400
Subject: [PATCH] install int21 hook earlier, on the first int21 call

---
 src/base/async/int.c | 19 +++++++++++++++++--
 1 file changed, 17 insertions(+), 2 deletions(-)

diff --git a/src/base/async/int.c b/src/base/async/int.c
index 2bc2b15..a5a3a35 100644
--- a/src/base/async/int.c
+++ b/src/base/async/int.c
@@ -72,6 +72,9 @@
 static char win31_title[256];
 
 static void dos_post_boot(void);
+static int post_boot;
+static int int21_hooked;
+
 static int int33(void);
 static void fake_iret(void);
 
@@ -1125,9 +1128,21 @@ static unsigned short int21seg, int21off;
 
 static void int21_post_boot(void)
 {
+  if (!int21_hooked) {
     int21seg = ISEG(0x21);
     int21off = IOFF(0x21);
     SETIVEC(0x21, BIOSSEG, INT_OFF(0x21));
+    int21_hooked = 1;
+    ds_printf("INT21: interrupt hook installed\n");
+  }
+}
+
+static int int21_hook(void)
+{
+  int21_post_boot();
+  interrupt_function[0x21][REVECT] = NULL;
+  reset_revectored(0x21, &vm86s.int_revectored);
+  return 0;
 }
 
 static int int21lfnhook(void)
@@ -1691,11 +1706,10 @@ static int redir_it(void)
   return 0;
 }
 
-static int post_boot = 0;
-
 void dos_post_boot_reset(void)
 {
   post_boot = 0;
+  int21_hooked = 0;
 }
 
 static void dos_post_boot(void)
@@ -2192,6 +2206,7 @@ void setup_interrupts(void) {
   interrupt_function[0x23][REVECT] = int23;
   interrupt_function[0x24][REVECT] = int24;
 
+  interrupt_function[0x21][REVECT] = int21_hook;
   interrupt_function[0x21][NO_REVECT] = int21;
   interrupt_function[0x28][REVECT] = int28;
   interrupt_function[0x29][NO_REVECT] = int29;
-- 
1.7.11.7

------------------------------------------------------------------------------
Master SQL Server Development, Administration, T-SQL, SSAS, SSIS, SSRS
and more. Get SQL Server skills now (including 2012) with LearnDevNow -
200+ hours of step-by-step video tutorials by Microsoft MVPs and experts.
SALE $99.99 this month only - learn more at:
http://p.sf.net/sfu/learnmore_122512
_______________________________________________
Dosemu-devel mailing list
Dosemu-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dosemu-devel

Reply via email to