🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: alt.msdos.programmer
Article #68

Re: HELP! My TSR won't activate in many games!

#68
From: Ron Dippold
Date: Fri, 07 Aug 1992 23:29
36 lines
2598 bytes
Charlie_Hutchins@mindlink.bc.ca (Charlie Hutchins) writes:
>The subject line says it all...  Right now I'm writing a small TSR
>program that hooks interrupt 9 for activation.  Whenever you press
>a key, my program checks to see if it should activate...if so, it
>does...or so I thought.  The program works fine in DOS and most
>text mode programs but it won't work in all games. (It does work in
>some, however)  I suppose the games it won't work with completely
>take over INT 9 but does any one have an idea for a solution to
>this??  There must be some way to allow it to activate in every (or
>a least most) games...  And, No, my program does not write anything

Give it a delayed activation option.  Use one of the timing interrupts
to count how long it's been since you activated the program - say the
18.2 times a second interrupt - games usually chain that.  Then after
the given amount of time, _then_ have it substitute it's own interrupt
handler for interrupt 9 (chaining to the old one, of course).  If you
give it enough time, you have time to load the game and have the game
install its own interrupt first.  You might want to beep the speaker
when it actually installs.  If you _really_ want to get tricky, and
the game doesn't keep the timer interrupt, you could take over INT13h
and activate after x number of accesses there. 

The only problem with this is that when the game quits it will restore
the vector that it found, so your TSR will be stranded - just doing
nothing but taking up space.  This may not be a problem.  If it is,
you can do the following:  when your program first starts, save the
current int9 vector.  Wait x seconds.  Replace the new int9 vector
with your routine.  When the game quits, the interrupt vector will be
changed by the game back to the original int9 vector.  You can see
this and shut down your TSR.

I imagine there are still games that are so antisocial that they
resist almost all methods, but getting rid of the int9 replacement
should fix most of them.
-- 
Hospitality:  Making your guests feel at home, even though you wish they were.
Technical Details
Message-ID: <rdippold.713230172@cancun>
Path: arc1-ca.pugleaf.net!sparky!uunet!cs.utexas.edu!swrinde!network.ucsd.edu!qualcom.qualcomm.com!cancun!rdippold
References: <14081@mindlink.bc.ca>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!cs.utexas.edu!swrinde!network.ucsd.edu!qualcom.qualcomm.com!cancun!rdippold
From: rdippold@cancun.qualcomm.com (Ron Dippold)
Newsgroups: alt.msdos.programmer
Subject: Re: HELP! My TSR won't activate in many games!
Message-ID: <rdippold.713230172@cancun>
Date: 7 Aug 92 23:29:32 GMT
References: <14081@mindlink.bc.ca>
Sender: news@qualcomm.com
Organization: Qualcomm, Inc., San Diego, CA
Lines: 36
Nntp-Posting-Host: cancun.qualcomm.com