Loading ...
Sorry, an error occurred while loading the content.

Hand controllers

Expand Messages
  • Fisher, Joseph
    Morning, all. I was wondering if anyone could shed a little light into how the Inty handles the 8 bit value returned from the hand controller. I understand
    Message 1 of 6 , Apr 1 7:33 AM
    View Source
    • 0 Attachment
      Morning, all. I was wondering if anyone could shed a little light
      into how the Inty handles the 8 bit value returned from the hand controller.
      I understand what all of the bits mean, but how does the exec handle the
      keypad and the disc? I'm having a little trouble parsing out the data such
      that when a single keypad button is pressed, it doesn't get interpreted as a
      disc position as well, and it might help to know how it gets done by games
      and / or the exec.

      Thanks,

      -Joe

      _-_-_-_-_-_-_-_
      Joseph A. Fisher
      Software Engineer
      Intel Corporation
      Telecommunications and Embedded Group
      1515 Route 10
      Parsippany, NJ 07054

      (973)-967-5094
      <mailto:joseph.fisher@...>
    • Kyle Davis
      I don t know if this will help, but here s some source code from Bliss where I m declaring all of the values for each button press and disc direction. The Exec
      Message 2 of 6 , Apr 1 8:09 AM
      View Source
      • 0 Attachment
        I don't know if this will help, but here's some source code from Bliss where
        I'm declaring all of the values for each button press and disc direction.
        The Exec doesn't get mixed up because all of the values for each
        direction/button are different.

        const INT32 HandController::BUTTON_OUTPUT_VALUES[15] = {
        0x81, //OUTPUT_KEYPAD_ONE
        0x41, //OUTPUT_KEYPAD_TWO
        0x21, //OUTPUT_KEYPAD_THREE
        0x82, //OUTPUT_KEYPAD_FOUR
        0x42, //OUTPUT_KEYPAD_FIVE
        0x22, //OUTPUT_KEYPAD_SIX
        0x84, //OUTPUT_KEYPAD_SEVEN
        0x44, //OUTPUT_KEYPAD_EIGHT
        0x24, //OUTPUT_KEYPAD_NINE
        0x88, //OUTPUT_KEYPAD_CLEAR
        0x48, //OUTPUT_KEYPAD_ZERO
        0x28, //OUTPUT_KEYPAD_ENTER
        0xA0, //OUTPUT_ACTION_BUTTON_TOP
        0x60, //OUTPUT_ACTION_BUTTON_BOTTOM_LEFT
        0xC0 //OUTPUT_ACTION_BUTTON_BOTTOM_RIGHT
        };

        const INT32 HandController::DIRECTION_OUTPUT_VALUES[16] = {
        0x04, //OUTPUT_DISC_NORTH
        0x14, //OUTPUT_DISC_NORTH_NORTH_EAST
        0x16, //OUTPUT_DISC_NORTH_EAST
        0x06, //OUTPUT_DISC_EAST_NORTH_EAST
        0x02, //OUTPUT_DISC_EAST
        0x12, //OUTPUT_DISC_EAST_SOUTH_EAST
        0x13, //OUTPUT_DISC_SOUTH_EAST
        0x03, //OUTPUT_DISC_SOUTH_SOUTH_EAST
        0x01, //OUTPUT_DISC_SOUTH
        0x11, //OUTPUT_DISC_SOUTH_SOUTH_WEST
        0x19, //OUTPUT_DISC_SOUTH_WEST
        0x09, //OUTPUT_DISC_WEST_SOUTH_WEST
        0x08, //OUTPUT_DISC_WEST
        0x18, //OUTPUT_DISC_WEST_NORTH_WEST
        0x1C, //OUTPUT_DISC_NORTH_WEST
        0x0C //OUTPUT_DISC_NORTH_NORTH_WEST
        };

        Kyle

        -----Original Message-----
        From: Fisher, Joseph [mailto:joseph.fisher@...]
        Sent: Monday, April 01, 2002 8:33 AM
        To: 'intvprog@yahoogroups.com'
        Subject: [intvprog] Hand controllers



        Morning, all. I was wondering if anyone could shed a little light
        into how the Inty handles the 8 bit value returned from the hand controller.
        I understand what all of the bits mean, but how does the exec handle the
        keypad and the disc? I'm having a little trouble parsing out the data such
        that when a single keypad button is pressed, it doesn't get interpreted as a
        disc position as well, and it might help to know how it gets done by games
        and / or the exec.

        Thanks,

        -Joe
      • Kyle Davis
        More info on this. The controller is laid out such that you can either use the disc and action buttons OR the keypad. If you use both at once, the Exec will
        Message 3 of 6 , Apr 1 8:13 AM
        View Source
        • 0 Attachment
          More info on this. The controller is laid out such that you can either use
          the disc and action buttons OR the keypad. If you use both at once, the
          Exec will definitely get confused. There is no confusion between the disc
          and action buttons because the disc uses the lower 5 bits and the action
          buttons use the top three bits.

          Kyle

          -----Original Message-----
          From: Kyle Davis [mailto:kdavis@...]
          Sent: Monday, April 01, 2002 9:09 AM
          To: 'intvprog@yahoogroups.com'
          Subject: RE: [intvprog] Hand controllers


          I don't know if this will help, but here's some source code from Bliss where
          I'm declaring all of the values for each button press and disc direction.
          The Exec doesn't get mixed up because all of the values for each
          direction/button are different.
        • Fisher, Joseph
          This part I understand. The thing is, my joystick driver is doing the work of the exec...ie, translating these values into joystick inputs so the Inty hand
          Message 4 of 6 , Apr 1 8:24 AM
          View Source
          • 0 Attachment
            This part I understand. The thing is, my joystick driver is doing the work
            of the exec...ie, translating these values into joystick inputs so the Inty
            hand controller looks like a normal joystick to the OS. So, if more than
            one button and the disc are all getting mashed at once, I need to be able to
            translate that into something useful. That's why I was wondering how the
            exec handles this.

            For example, if the user presses keypad 1 and 2, input is 0x31, that looks
            like the ONE and TWO are pressed, but also the disc SOUTH is in there. So
            how does the Inty determine which is which?

            Thanks again,

            -Joe

            -----Original Message-----
            From: Kyle Davis [mailto:kdavis@...]
            Sent: Monday, April 01, 2002 11:09 AM
            To: 'intvprog@yahoogroups.com'
            Subject: RE: [intvprog] Hand controllers


            I don't know if this will help, but here's some source code from Bliss where
            I'm declaring all of the values for each button press and disc direction.
            The Exec doesn't get mixed up because all of the values for each
            direction/button are different.

            const INT32 HandController::BUTTON_OUTPUT_VALUES[15] = {
            0x81, //OUTPUT_KEYPAD_ONE
            0x41, //OUTPUT_KEYPAD_TWO
            0x21, //OUTPUT_KEYPAD_THREE
            0x82, //OUTPUT_KEYPAD_FOUR
            0x42, //OUTPUT_KEYPAD_FIVE
            0x22, //OUTPUT_KEYPAD_SIX
            0x84, //OUTPUT_KEYPAD_SEVEN
            0x44, //OUTPUT_KEYPAD_EIGHT
            0x24, //OUTPUT_KEYPAD_NINE
            0x88, //OUTPUT_KEYPAD_CLEAR
            0x48, //OUTPUT_KEYPAD_ZERO
            0x28, //OUTPUT_KEYPAD_ENTER
            0xA0, //OUTPUT_ACTION_BUTTON_TOP
            0x60, //OUTPUT_ACTION_BUTTON_BOTTOM_LEFT
            0xC0 //OUTPUT_ACTION_BUTTON_BOTTOM_RIGHT
            };

            const INT32 HandController::DIRECTION_OUTPUT_VALUES[16] = {
            0x04, //OUTPUT_DISC_NORTH
            0x14, //OUTPUT_DISC_NORTH_NORTH_EAST
            0x16, //OUTPUT_DISC_NORTH_EAST
            0x06, //OUTPUT_DISC_EAST_NORTH_EAST
            0x02, //OUTPUT_DISC_EAST
            0x12, //OUTPUT_DISC_EAST_SOUTH_EAST
            0x13, //OUTPUT_DISC_SOUTH_EAST
            0x03, //OUTPUT_DISC_SOUTH_SOUTH_EAST
            0x01, //OUTPUT_DISC_SOUTH
            0x11, //OUTPUT_DISC_SOUTH_SOUTH_WEST
            0x19, //OUTPUT_DISC_SOUTH_WEST
            0x09, //OUTPUT_DISC_WEST_SOUTH_WEST
            0x08, //OUTPUT_DISC_WEST
            0x18, //OUTPUT_DISC_WEST_NORTH_WEST
            0x1C, //OUTPUT_DISC_NORTH_WEST
            0x0C //OUTPUT_DISC_NORTH_NORTH_WEST
            };

            Kyle

            -----Original Message-----
            From: Fisher, Joseph [mailto:joseph.fisher@...]
            Sent: Monday, April 01, 2002 8:33 AM
            To: 'intvprog@yahoogroups.com'
            Subject: [intvprog] Hand controllers



            Morning, all. I was wondering if anyone could shed a little light
            into how the Inty handles the 8 bit value returned from the hand controller.
            I understand what all of the bits mean, but how does the exec handle the
            keypad and the disc? I'm having a little trouble parsing out the data such
            that when a single keypad button is pressed, it doesn't get interpreted as a
            disc position as well, and it might help to know how it gets done by games
            and / or the exec.

            Thanks,

            -Joe




            Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
          • Kyle Davis
            Oh, I see what you re asking. Just bitwise OR the values together. Certain combinations of input will indeed confuse the Exec, but that s the Exec s problem.
            Message 5 of 6 , Apr 1 8:28 AM
            View Source
            • 0 Attachment
              Oh, I see what you're asking. Just bitwise OR the values together. Certain
              combinations of input will indeed confuse the Exec, but that's the Exec's
              problem. This confusion is no different than what would be experienced on a
              real Intellivision. Once you bitwise OR the input values together, your job
              is done.

              Kyle

              -----Original Message-----
              From: Fisher, Joseph [mailto:joseph.fisher@...]
              Sent: Monday, April 01, 2002 9:24 AM
              To: 'intvprog@yahoogroups.com'
              Subject: RE: [intvprog] Hand controllers


              This part I understand. The thing is, my joystick driver is doing the work
              of the exec...ie, translating these values into joystick inputs so the Inty
              hand controller looks like a normal joystick to the OS. So, if more than
              one button and the disc are all getting mashed at once, I need to be able to
              translate that into something useful. That's why I was wondering how the
              exec handles this.

              For example, if the user presses keypad 1 and 2, input is 0x31, that looks
              like the ONE and TWO are pressed, but also the disc SOUTH is in there. So
              how does the Inty determine which is which?

              Thanks again,

              -Joe
            • Joseph Zbiciak
              ... Kyle, you have it backwards. He s writing a driver for the PC s OS, and needs to do the same work the EXEC is doing. Joe, Take a look at my Linux kernel
              Message 6 of 6 , Apr 1 12:37 PM
              View Source
              • 0 Attachment
                Kyle Davis [kdavis@...] wrote:
                | Oh, I see what you're asking. Just bitwise OR the values together.

                Kyle, you have it backwards. He's writing a driver for the PC's OS,
                and needs to do the same work the EXEC is doing.

                Joe,

                Take a look at my Linux kernel driver that works with intv2pc:

                http://www.primenet.com/~im14u2c/intv/dl/joy-intv2pc.c

                It's not the best driver in the world, and the giant lookup table
                could/should be replaced.

                The driver offers two output forms:

                -- Raw form, for feeding to an Inty emulator. :-)

                -- Cooked form, which actually decodes buttons and stuff. This is
                what you want.

                The comments in the code state what I try to do. Let me know if
                you have any questions.

                Regards,

                --Joe

                --
                ------------------------------------------------------------------------------
                Joseph Zbiciak http://www.primenet.com/~im14u2c/ Not your average "Joe"
                R$+@$=W <-- sendmail.cf {$/{{.+ <-- modem noise
                !@#!@@! <-- Mr. Dithers swearing Zbiciak <-- Joe's last name
                ---------------------- Member of the Intellivisionaries ----------------------
              Your message has been successfully submitted and would be delivered to recipients shortly.