home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.lang.pascal.borland      Borland Pascal was actually pretty neat      2,978 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 1,954 of 2,978   
   Jyrki Lahtonen to All   
   modeX & mouse vs. XP   
   21 Dec 05 13:12:14   
   
   From: lahtonen@utu.fi   
      
   Hi folks,   
      
   My question is slightly OT in the sense that it is more about   
   interfacing with PC hardware than necessarily specific to   
   Borland Pascal, but BP is my native language, so here goes...   
      
   A few years back I wrote a unit for doing graphics in the (in)famous   
   modeX (a non-standard 320*240 video mode for a vanilla VGA with 256   
   colors). I later added basic mouse functionality. Unfortunately   
   (but not at all unexpectedly) the mouse driver couldn't handle   
   the drawing of the mouse cursor in such a non-standard video mode.   
   No problem, I decided to write a mouse library myself. Relatively   
   straight forward stuff: I keep the "actual" mouse cursor disabled   
   all the time, access the mouse driver for all the positional   
   data and clicks of the buttons, used a couple of control variables to   
   check whether it was necessary to erase/redraw the mouse cursor   
   (set aside some memory to store whatever was under the cursor etc.).   
   The only problem was (kids, don't do this at home) that I couldn't   
   think of any other way "to make the motion of the cursor independent   
   from the main loop" but to chain my redraw routine with the timer   
   interrupt. As a bonus I got 256 color mouse cursors (instead of the   
   usual B&W), so after the usual rounds of debugging I was feeling   
   pretty good about myself.   
      
   Alas, running these programs in the command prompt window (full-screen)   
   of winXP immediately hangs the system. The programs that only use   
   my modeX graphics unit run ok - it is the ones that use my mouse unit   
   that won't run. Consultation with a local guru gave me the impression   
   that meddling with the timer interrupt is a no-no under XP. A lengthy   
   lecture on interrupt tables under protected mode ensued (over my head,   
   I'm afraid)...   
      
   Any ideas? Should I just redraw the mouse cursor by callinig a   
   refresh routine within the loop from the module that wants to   
   get some input from the mouse? That would be ugly, but if it works...   
   Will updated mouose drivers handle modeX?   
      
   I'm still running this stuff at home on an original 60Mhz Pentium   
   (a real collector's item, FDIV bug and everything:), but the countdown   
   to a hardware upgrade will begin any time (missus permitting). At work   
   I get to try things out with a newer PC with winXP that won't let   
   me do anything (why do they want to take "Personal" out of "PC"?)   
      
   Cheers,   
      
   Jyrki Lahtonen, Turku, Finland   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca