All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stas Sergeev <stssppnn@yahoo.com>
To: linux-msdos@vger.kernel.org
Subject: Re: bug in pic_prot.diff (was Re: Bootfile)
Date: Thu, 06 Feb 2003 10:24:22 +0300	[thread overview]
Message-ID: <3E420DA6.5050004@yahoo.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 1653 bytes --]

Hello.

Bart Oldeman wrote:
>> BTW, release 1.1.4.5 was the last where snake.com is working under 
>> xdos/xdosemu.
>  after some binary searches I found out that Stas' pic_prot.diff is 
>  guilty for doing this.
There might be something wrong here.
The report states that this game
stopped working under "xdos/xdosemu",
and I am sure my patch have nothing
to do with an X code (that's why I
haven't even tried the game - I was
sure I couldn't break the X code).
Now I tried, and indeed it doesn't
work. However it misses the Eric A's
userfont patch, so I think it never
worked under xdosemu unless someone
applied a userfont patch manually.

> Stas, can you figure out why?
I can only figure out why it doesn't work
under console, but that's an entirely
different story. Anyway, it seems to
me that the watchdog patch was flawed:
if I set the $_pic_watchdog=(1) or 2
or 3, the game works perfectly (under
console of course), but if I set it to
10 and more - it locks up. That looks
like a problem.
The attached patch fixes it: now
setting $_pic_watchdog to any reasonable
value (within a range of 1-100 approx)
will work for that game.
However I have found my test-case
for that problem screwed up by an
XMS changes of 1.1.4.1. For now I just
reverted an XMS changes to test the
attached patch. I'll return to that
problem when I'll have more time.

Background: this game works inside a
keyboard interrupt handler (probably
many pop-up progs do so if they use
a hot-key), so essentially it needs a
reentrancy, which was restricted due
to the timer jerkiness discussed recently
around the Cosmo problem. That's why
we need (sometimes) a $_pic_watchdog.

[-- Attachment #2: pic_wc.diff --]
[-- Type: text/plain, Size: 752 bytes --]

--- src/base/dev/pic/pic.c	Wed Feb  5 07:13:57 2003
+++ src/base/dev/pic/pic.c	Thu Feb  6 08:53:07 2003
@@ -733,7 +733,6 @@
      if (test_bit(ilevel, &pic_irqall)) {
        pic_push(ilevel);
        set_bit(ilevel, &pic_irqs_active);
-       pic_wcount = 0;
      }
 
      if (!in_dpmi || in_dpmi_dos_int) {
@@ -838,7 +837,8 @@
         pic_wirr&=~pic_newirr;        /* clear watchdog timer */
 	pic_activate();
     }
-    pic_wcount = 0;
+    if (!pic_icount)
+      pic_wcount = 0;
 }
 
 /* DANG_BEGIN_FUNCTION pic_request
@@ -1031,9 +1031,8 @@
       if(++pic_wcount >= config.pic_watchdog) {
         error("PIC: force reschedule\n");
         pic_resched();
+	pic_wcount = 0;
       }
-    } else {
-      pic_wcount = 0;
     }
   }
 }      

             reply	other threads:[~2003-02-06  7:24 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-02-06  7:24 Stas Sergeev [this message]
2003-02-06  8:03 ` bug in pic_prot.diff (was Re: Bootfile) Bart Oldeman
  -- strict thread matches above, loose matches on Subject: below --
2003-02-06 10:03 Stas Sergeev
2003-02-06 17:23 ` Bart Oldeman
2003-02-05 12:50 Bootfile Witold Filipczyk
2003-02-06  3:57 ` bug in pic_prot.diff (was Re: Bootfile) Bart Oldeman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3E420DA6.5050004@yahoo.com \
    --to=stssppnn@yahoo.com \
    --cc=linux-msdos@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.