 SU.HARDW.OTHER (2:5020/299)  SU.HARDW.OTHER 
 From : Gleb Gadiacki                       2:5012/1.125    Tue 03 Dec 96 01:26 
 Subj : ⨪                                                                

                         ࠢ Slava!

 GG>>  ?  ⠪   १ ( ண 祬 ᨫ쭥 
 GG>> , ⥬ ॥ ன )
 SS> ⥫   ⮣  p㣮 !

  祭    SUBJ.
 ----------------------------------------------------------------
                            JoyStick IBM PC
                            ---------------
        2  ""  1990   ⠫  ",
    ਭ  ࠤ"    ᪮    JoyStick.  
     ⮫쪮  㯮    ᯮ짮    IBM
    PC,   ஡ ᠫ  祭    8-ࠧ來  譨
    ࠬ.    ⮫㫮      ஡ 
    ᢮ ᨫ.

       JoyStick ਢ  ⥬,  , -,  祭   
    ⥭  饭 (ᮡ  窮  ୮  :
    㤠 , 㤠   ""), -,   ன⢮,
     ॡ饥  ࠡ⪨ 設     饥 㦥 饬.
    ਭ樯 㪠 ࠢ  ⠫     ࠧ
    㭪権  ࠤ樮 ""  ("" - 㪠뢠   롨ࠥ,
    JoyStick - ࠢ  ६頥).

       ࢮ,  祬   ⮫ -   㤭   ࠧ
    ଠ樨    GAME-      JoyStick-. ⮬,  ⮩
        ⠫  ᮡ         ଠ
      祭  ⨭   ⮩ .  
    뫮 ,  ࠫ 㪠  筨 ଠ樨.

         ஭  ࠢ筨  "ࠩ  Help    Flambeaux
    Software    1.2"    ௭  ᠭ  ⮢ JoyStick.
    ᠭ    뫮  筮  㬠      ஢
      饭   ன⢮.



       Port 201H is designated as the Game Adapter Port or  Joystick
    Port.  It is not supported by the PC/XT ROM-BIOS, but the AT
    BIOS service INT 15H SubFn 84H provides an easy-to-use interface
    for the adapter.

       It is  an analog-to-digital  converter which  can be  used by
    scientific measuring  tools and  other devices  which present an
    analog (resistive)  input to  the interface.   It accepts  up to
    four digital inputs (on/off data such as the press of a  button)
    and up  to four  resistive inputs  (such as  an X-ordinate  of a
    Joystick or a temperature value from an electronic thermometer).

        The value obtained by an IN from 201H is as diagrammed:

     76543210
     B2B1A2A1ByBxAyAx
     Ľ
      ͼ > Coordinates (resistive, time-dependent inputs)
           > Buttons/Triggers (digital inputs)

           You can read the buttons (digital inputs)  with:

          mov   dx,201H
          out   dx,al      ;initiate transaction; AL=anything
          in    al,dx      ;read bits 4-7 for buttons: 0=pressed, 1=open

       The joysticks, paddles, measuring devices (resistive  inputs)
    are read by tracking the time that an X or Y bit stays high  (1)
    after an  OUT 201,xxx.   To read  an individual  resistive input
    (eg, joystick A, X ordinate):

           mov   dx,201H
           out   dx,al      ;initiate transaction  AL=anything
           mov   cx,-1      ;set resistance counter for first loop
     gain: in    al,dx      ;read the settings
           inc   cx         ;bump counter
           test  al,1       ;has X-ordinate for joystick A gone low?
           jnz   again      ;loop until it does (when bit=0, we're done)

       The  delay  value  accumulated   in  CX  will  indicate   the
    X-ordinate  position  of  joystick  A.  The  resulting  value is
    CPU-dependent.  To ensure accuracy, it would be better to use  a
    hardware timer, rather than a loop counter.



       ,   䥩 AT  INT 15  諠 㭪 㦨
    JoyStick,  뫠 筠 ᭠  㤮.

 
84H ᯥ祭 ⨪.
     室: DX =  㭪樨:
           DX = 0:  ⥪騥 ४⥫
                   : AL = 祭 ४⥫ ( 7-4)
           DX = 1:  室 X,Y ⨪
                   : AX = ⨪ 'A', 祭 X (ਧ⠫)
                            AX = ⨪ 'A', 祭 Y (⨪)
                            AX = ⨪ 'B', 祭 X (ਧ⠫)
                            AX = ⨪ 'B', 祭 Y (⨪)
 

         ⠪  ଠ樥    ,     JoyStick 㤥
    筮      ணࠬ஢      㤮 ᯮ짮.
    ⠫  ; 㯨 JoyStick    設.

          ⠫ ।  㤨⥫ 䠪⮬,   JoyStick- 
     墠⠥,    業   筮  ਥ, 
     ᮢᥬ .    ଠ樨 ࠪ᪨ 뫮,  
    ࠢ      (,   祬,      ࠧ     ࠧꥬ)
    ᪠뢠,         JoyStick-   ⭮      ⠪
      IBM PC  .

       砫  ᪨   ⥫쭮  ଠ樨     䨧᪮
    ਭ樯  ஥ JoyStick-  GAME-.   ଠ
      襫  孨᪮ 㬥樨  IBM XT.

                             

       ஢  ᪠ 祭  ⥬  4-  祪
    ࠢ  2- JOY STICK.   ⠭  
       -   ⥬     ७.
    䥩   ஢   ᮥ   
      .   ஬  ⮣,   ᯥ稢  4   室  
    祭  ४⥫.     窨     ⨪
    ।  稭 ᮯ⨢, ।饣 
    .        ⥬ ணࠬ ᯥ祭
    ८ࠧ    稭  ᮯ⨢   ⭮⥫쭮
     窨  ⨪.  祭 室  ᨣ,
    稭 ࠡ 4-  ६ 奬.   ᮯ⨢
      ।  ⥬ ७ 稭  ⠩- 奬
    (   㭪樥 ᮯ⨢).     
      ᯮ짮    奬  /뢮  饣 祭 
     묨(१⨢묨) 室    ஢묨
    室묨 ᨣ.

                          

               Ŀ                  Ŀ
        A9-A0         >          
      10>                         ८ࠧ-
      AEN                          ⥫  
      >                   ᮯ⨢-   ⨢ 室
      IOW                                   <4
      >                         ஢  
      IOR                      ͳ   
      >       Ŀ                       
                               
                                
               Ŀ        
                 <         - 833 
      D7-D0     設           
      <ͳ          
                      <4ͼ
                                                       ஢ 室
                      <4
               



                         

                             

       롮  ஢      2-  74LS138,   
    ࠬ .   樨 롮    ⠭
    16-  201   AEN     ⨢.  롮 
       ᪠ ஢      祭
    祭 室 ஢  室 ਣ .

                     ᨫ⥫ 設 

           ਧ  ஬-ᨫ⥫  74LS244.  
      16-  201, ஢  㤥 ࠢ 設
    ;   㣮 ६  ⠥  3- ﭨ.

                           ਣ 

       室 ਣ     IN  16-  
    201.    ⨪   窥   ਣୠ .
     祭   設   ࠧ鸞  7  4.  
    饭 ﭨ    1. ᫨   ,
        ਭ    0.  ணࠬ  ᯥ祭 
    뢠,          ⭮  ࠭
    ॡ.

                           ⨪

         ⨪  㪠뢠  ⥭樮஬    
    न.   ⥭樮    ।   0 
    100  ,      ﭭ  ६       4-
    ஢.  ⠭ ࠧ 稭   ﭭ
    ६ 㤥   ⥫쭮 室   
    .

        4-   ᪠ ६   OUT
      16-    201.  ᫥    ᪠  室   
    ஢ ⠭  1     ⮬  ﭨ
    ࠧ  ६,    ᨬ     ⮣,       
    ⠭  ⥭樮.

        4- 室 ஢    IN   16-
     201    ࠧ鸞  3  0  設 .

                     ᠭ  /뢮

         9-0   9-0;ᯮ  樨 ஢ 

         D7-D0   7-0;ࠧ 設 

         IOR,IOW ⥭ /뢮   /뢮;ᯮ 
             ⥭       IN,OUT.

         AEN ᫨  ᨣ  ⨢ ﭨ ,   ࠩ
             設     ⨢묨.

         +5vdc ⠭ ஢ 

         GND 騩 뢮


                           

       ஢      8  室  ,  4-    
      ஢묨  室,    4- 室 ᮯ⨢. 
    室   ⠭  IN   201.

         4- ஢ 室  १  +5 稭
    1.  ᫨      室  祣    ,       
     1.   ⮣  ⮡   0,   室 
     ஢  騩 뢮.

        室  १ ६ १  +5  
      ८ࠧ    ⥫쭮  ய樮쭮  稭
    १஢,  ᮮ⢥⢨  ᫥騬 ᮮ⭮襭:

                     =24.2  + 0.011(R) 

       짮⥫   ᭠砫   , 뤠  
    OUT      201.     IN       201  
    ᫥,   室 ஢  諨   ﭨ 1 
       ⮬ ﭨ   祭  ६, ᮮ⢥饣
    稭  ᮯ⨢.   祭     4-  ⮢   (0-3)
    ,  ᥣ ६ 室  1   뢠
    ᨬ         㣠,      ᮮ⢥⢨    稭
    ᮯ⨢  室.

             Ŀ
             7  6  5  4  3  2  1  0
             Ĵ
                   ஢ 室           १ 室    

        室  ன⢮   ஢   
    joy stick  ஢ 窨.  JOI STICK 筮 2-,  
         2-    ६  १
    稭  0   100 .  ६  ᮯ⨢ 㤥
    㪠뢠  न  X,    㣮  न  Y.   
    ᮥ  祭 ᫥ :

          Ŀ
            7   6   5   4   3   2   1   0 
           -#2   -#1   -#2   -#1    B-Y    B-X    A-Y    A-X  
              नननन
          

       ஢ 窨 뢠    2- (A, B)  4- (A, B, C,
    D) 祪.              ६
    ᮯ⨢ 稭 100  .    ᮥ 
    祭 ᫥  :

          Ŀ
            7   6   5   4   3   2   1   0 
             D      C      B      A      D      C      B      A   
              नननन
          

           ᮥ ஢ ஫஢ ᬮ 奬 JOI STICK.

       :   ⥭樮      ᥩ   X      Y 
    ᮯ⨢        0   100 .  ଠ쭮
    ࠧ,  몠  ⨨.

                      
              Ŀ
                         ᨣ     
               ⠪⮢                  
              ĳ
                   1         +5          
                   2          4     
                   3          0  
                   4         騩        
                   5         騩        
                   6          1  
                   7          5     
                   8         +5          
                   9         +5          
                  10          6     
                  11          2  
                  12         騩        
                  13          3  
                  14          7     
                  15         +5          
              

        ࠧ  ,  ॡ㥬  JoyStick  
     १⨢  ᭮,      몠,    ।
    .

       ᫥   ⮣,         ௭      奬 ࠧ
    GAME-   "Baby AT  I/O CARD  GW211 User's  manual" (
      﫠        設),   訫 -⠪ ᪭ 
    । ⠭ () JoyStick  ᯮ짮 
    IBM PC.

               JoyStick 2                         JoyStick 1
                 Ŀ                        
                                    /         +5V
          Ŀ       /          Ŀ   
                             /                  X     \ 
           \   X       +5V  /      1    > /    
            / <Ŀ ĳ 9   2 ĳĿ      \ 
           \        10  3      SW1     
             SW4    ĳ 11  4 ĳ        
                    12  5  Ŀ           
           \   SW3    ĳ 13  6 ĳĿ    SW2   
          /   Y      14  7      Y   \   
           \ <        15  8        > /
                           \                             \   
                                \         
                       \                   
                                        

                       15 Pin Male "D" connector

       ࢮ,    室  뫮  ᤥ,     १⨢
    न    ࢠ    0    100  .   JoyStick 
    ᮡࠫ  ᯮ짮    㪠  ࠢ,     訫
     ⭮  १⨢   ६ ண:  0, 50  
    100,    0  -  ᮮ⢥  ᨬ쭮  न,  50  -
    । ,  100 - 쭮.

                          Ŀ
                     0            ۳    8 - ࠢ,
                        Y    \   /      ---  ।塞
                    50     <-->  ۳        
                            /   \           JoyStick-
                   100            ۳
                          
                             X ->
                           0   50   100

             㯫 ஢   "⨪"
    ந⢥ । "" . ⮢--.   ,
      ⨨,    ᪠  奬    몠 
    न⠬.

                        X1
                  /  Y1
                      
                  /     /  X2
                              
                  /  Y2
                          騩
                         /  ५

       ᫥ ⠭    100  १஢   ॢ饭
       몠   ⠪⮢      न    ࠧ몠騥
    稫 ᫥ 奬:

          <100 >Ŀ
          <100 >Ŀ                  
                      Ŀ 
                        /    
          <100 >                    
          <100 >/     /  X
                                            
                                /  Y
                                     
           +5V
                                  騩
                                 /   
                                 /  ࠢ 

          室   ⬥,         몠 
    ᨣ ,  न -   +5  ( 室  奬
     諨    ). ஢  ⮣  ਢ  
    몠  (      﫮  ⠭  
    ⨨    JoyStick-).

       ஥,  室 뫮 ,  ࠧ  JoyStick-.
     , ᮡ⢥  JoyStick-  ⪨,  筮
    ⢥  ᮤঠ 室  6 ஢,    ࠧ㬭
    뫮 ⠢,  ᮥ ந   ⠯:

                                        2a
         Ŀ      1     Ŀ <-------< JoyStick 1
          IBM PC   <=========>      2b
                      <-------< JoyStick 2
                Game port


         JoyStick- ⠥  ᢮ ࠧꥬ,    
    設 稢   ,   ,  -,
      ࠧ    JoyStick-,    -,  ᢮  
    ४.

       ஢  JoyStick     祭   㤮  ணࠬ
    CheckIt.

 CheckIt 3.0 ͻ
  Ŀ  
      SysInfo    _Tests_    Benchmarks     Tools     Setup      Exit      
  Ŀ  
                    Test Everything                                       
                    Memory                                                
                    Hard Disk                                             
                    Floppy Disk                                           
                    System Board                                          
                    Real-Time Clock                                       
                    Serial Ports                                          
                    Parallel Ports                                        
                    Printers                                              
                    Video         Ŀ                             
                   _Input Devices_ Keyboard                              
                    Select Batch.. Mouse                                 
                   ĳ_Joystick_                             
                                                                
                                                                            
  
 Tests up to two joysticks connected to the game port.                      
                                                                            
  
      Use Arrows to Point  Return to Select  F1 - Help  ESC - Cancel     
ͼ
 Joystick Test ͻ
                                                                            
  Joystick #1 ͻ     Joystick #2 ͻ 
                   X       Y                            X       Y       
    Min Value        9       9           Min Value                      
    Cur Value      657     666           Cur Value   *NO JOYSTICK*      
    Max Value     1319    1319           Max Value                      
                                                                        
                Ŀ                                  Ŀ                
                ۳                                                   
                                                                  
              Center                               Center               
                                                                        
       SWITCH A     SWITCH B                SWITCH C     SWITCH D       
       Released     Released                Released     Released       
                                                                        
 ͼ    ͼ 
                                                                            
  
 At the end of the test, each joystick cursor should be in the center box.  
                                                                            
  
 Press each joystick switch and move each joystick as far as it will go to  
 the top, bottom, left, and right.  Press any key to end the test.          
ͼ

         室        CheckIt  뢠 Game-,
    ⮬      JoyStick-   砩묨 
    ࠢ塞묨,  १  ᥪ㭤   ਤ  .

        ,   JoyStick  ᮡ࠭. ࢮ ⫥ 
    ᯮ짮 JoyStick-   稫 ⨢   "PRINCE OF
    PERSIA"    ०  ࠢ  JoyStick-  (Ctrl+J).  祭
    ࠢ.

       㯨    ࣠樨  ⢨      
    ன⢮  ணࠬ.

       㭪樨 祭 ଠ樨  ﭨ   न
    JoyStick- 뫨 ᠭ  ਢ,   ࠡ⠫ ⮫쪮  
    ⮬  砥,  ᫨  祭      JoyStick , ,
     Game-.  १  ᠫ ᫥ 楤
    ஢ન  Game-  祭 JoyStick-:

        . . .

    ; --- 樠 JoiStick ---

       ; --- 㥬 GAME 
       mov  dx,201h    ; Game port
       out  dx,al      ; ᨫ   Game
       mov  bx,3       ; 3  横
       mov  cx,-1
 ask_joistick:
       in   al,dx      ; ⠥  Game
       mov  bx,bx
       loop ask_joistick
       cmp  al,0fch    ; ஢ઠ ⠭ 
       jz   Yes_Game
       mov  cx,-1
       dec  bx
       jnz  ask_Joistick

       jmp  _Game   ;  ᥩ  Game Adapter 


       ; --- ⠥  JoiStik-
 Yes_Game:
       mov ah,84h ! mov dx,0 ! int 15h   ;  ﭨ  JoyStick-
       test al,0f0h ! jz _Game        ; ࠢ ﭨ
                                         ; 砥 ⢨ Game-

       ; --- ⠥ न JoiStik

       mov ah,84h ! mov dx,1 ! int 15h
       cmp ax,40h ! jb _Joi1 ! cmp ax,70h ! ja _Joi1
       cmp bx,40h ! jb _Joi1 ! cmp bx,70h ! ja _Joi1

       or  @Joi1,84h   ; JoyStick 1 - ⨢ !
       mov @Joi1_time,10
 _Joi1:
       cmp cx,40h ! jb _Joi2 ! cmp cx,70h ! ja _Joi2
       cmp dx,40h ! jb _Joi2 ! cmp dx,70h ! ja _Joi2

       or  @Joi2,84h   ; JoyStick 2 - ⨢ !
       mov @Joi2_time,10
 _Joi2:
 _Game:
       ; ---  樠樨 ---

         . . .

       稫 ᫥  न JoyStick-. (X,Y)

                             (88,9)
                          Ŀ
                     (9,9)        ۳(175,9)
                             \   /   
                    (9,88) (88,88) ۳(175,88)
                             /   \   
                   (9,175)        ۳(175,175)
                          
                            (88,175)

        ࠧ,   稫   ன⢮  ⢨ 
    ணࠬ    ⢮.

       ,    ਣ -  ࠭  
      "  ⥭"    ࣠樨  IBM  PC     ஥
      饥 짮⥫᪨ 䥩ᮢ.


    ᯥ客 !
                                      30.10.92
                                   祭 ਩.
                                   (C) DVA-System, 1992
 ----------------------------------------------------------------
                                                  Bye, Gleb.

--- GoldEd2.42.G0214+
 * Origin: -= Goh =- (2:5012/1.125)



