Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns Arcade1Up Try the site in https mode Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

  

Author Topic: Gameport gamepads under DOS  (Read 5316 times)

0 Members and 1 Guest are viewing this topic.

captainpotato

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 259
  • Last login:November 11, 2016, 06:10:59 am
  • I'm a tapir!
    • Tapir Design
Gameport gamepads under DOS
« on: January 21, 2005, 10:36:44 am »
Hello everyone,

I'm planning to make a second controller for my WIP bartop using an old gamepad hooked up to the sound card's gameport. However, so far I've been only able to get two buttons registering. I'm assuming it's a driver issue that I need to address (I recall from the depths of my memory that only two buttons are supported by default). Any ideas about how to address this? I'd like at least three (Gauntlet - incl. coin insert - and HyperSports/Track and Field).

Thenasty

  • Trade Count: (+17)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4420
  • Last login:Today at 10:14:35 am
    • Thenasty's Arcademania Horizontal/Vertical monitor setup.
Re: Gameport gamepads under DOS
« Reply #1 on: January 21, 2005, 11:40:38 am »
I think it was 2 buttons if using 2 gamepads. But if its only one gamepad, then its 4 buttons.

If you need more buttons, find a MS Sidewinder Gamepad, I think it supported 8 buttons.
Thenasty's Arcademania Horizontal/Vertical setup.
http://forum.arcadecontrols.com/index.php?topic=26696.0

Free VGA Breakout Cable
http://forum.arcadecontrols.com/index.php?topic=38228.0

Ultimate All in One Coin Mech write up (Make your own)
http://forum.arcadecontrols.com/index.php?topic=19200.0

Grasshopper

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2380
  • Last login:March 04, 2025, 07:13:36 pm
  • life, don't talk to me about life
Re: Gameport gamepads under DOS
« Reply #2 on: January 21, 2005, 02:26:54 pm »
The gameport has four analogue and four digital inputs.

The analogue inputs are normally used for the joysticks.

However, if you connect a single pad then two of the analogue inputs can be used for buttons. So for a single pad you can use up to six buttons.
"Patriotism is the last refuge of the scoundrel." - Samuel Johnson

u_rebelscum

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 3633
  • Last login:April 21, 2010, 03:06:26 pm
  • You rebel scum
    • Mame:Analog+
Re: Gameport gamepads under DOS
« Reply #3 on: January 21, 2005, 04:36:47 pm »
The gameport has four analogue and four digital inputs.

<wrench action=throw> ;)

Unless, of course, the gamepad used the MIDI part of the gameport. 

Many digital "game port" gamepads did this to get more than four buttons, at the cost of only having digital (aka 8-way) joystick(s) instead of analog.  In fact, almost all of the later "gameport" digital gamepads used the MIDI (part instead of the game) port, just before USB came around.

The joystick/gamepad driver determined how the MIDI port was used (ie: the protocal), and thus set the max number buttons; different manufactures had different protocals, so different sticks had different max number buttons.
Robin
Knowledge is Power

JB

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 376
  • Last login:October 21, 2005, 10:56:01 pm
  • I want to build my own arcade controls!
Re: Gameport gamepads under DOS
« Reply #4 on: January 24, 2005, 01:25:06 pm »
The gameport has four analogue and four digital inputs.

<wrench action=throw> ;)

Unless, of course, the gamepad used the MIDI part of the gameport. 

Many digital "game port" gamepads did this to get more than four buttons, at the cost of only having digital (aka 8-way) joystick(s) instead of analog.  In fact, almost all of the later "gameport" digital gamepads used the MIDI (part instead of the game) port, just before USB came around.

The joystick/gamepad driver determined how the MIDI port was used (ie: the protocal), and thus set the max number buttons; different manufactures had different protocals, so different sticks had different max number buttons.
Actually, they just used the gameport input lines for serial data. 

This is immediatly and painfully obvious if you use them in an app that doesn't support them. It goes crazy and starts making random actions as it tries to interpret the serial data flowing in as real gameport data.
It's MOST obvious if oyu have a joystick test program that shows the controsl it's seeing depressed.

Pity, as using the MIDI Recieve line would've been a far more logical way to transfer serial data, and not broken compatibility with "standard" gamepads.
 I suspect it was ignored because it could upset some games/soundcards that expect the 2 MIDI lines to be used for, well, MIDI.

captainpotato

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 259
  • Last login:November 11, 2016, 06:10:59 am
  • I'm a tapir!
    • Tapir Design
Re: Gameport gamepads under DOS
« Reply #5 on: January 26, 2005, 08:51:28 am »
Thanks for your tips guys. Upshot of this is that I need to find the appropriate DOS drivers for my gamepad, correct?

Chris

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4574
  • Last login:September 21, 2019, 04:59:49 pm
    • Chris's MAME Cabinet
Re: Gameport gamepads under DOS
« Reply #6 on: January 27, 2005, 03:07:31 pm »
Thanks for your tips guys. Upshot of this is that I need to find the appropriate DOS drivers for my gamepad, correct?
Which I doubt exist.  Joysticks and gamepads didn't have drivers in DOS; the games read the ports directly.  By the time manufacturers were playing these kinds of games the days of DOS games were in the past.  Since there was no standard for reading more than four buttons, each individual game would have to be written for specific joysticks.  If you knew how the controller was being accessed, you would theoretically have to modify the MAME source directly.

Now, I know MAME uses Allegro for some things; if it uses Allegro to read the game port, you would have a shot as Allegro does have code to support extra buttons on some sticks in DOS.  You could try creating an allegro.cfg file in your AME directory that contains:

Code: [Select]
[joystick]
joytype = xxx

Your options for xxx would be:

JOY_TYPE_AUTODETECT
Attempts to autodetect your joystick hardware. It isn't possible to reliably distinguish between all the possible input setups, so this routine can only ever choose the standard joystick, Sidewider, GamePad Pro, or GrIP drivers, but it will use information from the configuration file if one is available (this can be created using the setup utility or by calling the save_joystick_data() function).
JOY_TYPE_STANDARD
A normal two button stick.
JOY_TYPE_2PADS
Dual joystick mode (two sticks, each with two buttons).
JOY_TYPE_4BUTTON
Enable the extra buttons on a 4-button joystick.
JOY_TYPE_6BUTTON
Enable the extra buttons on a 6-button joystick.
JOY_TYPE_8BUTTON
Enable the extra buttons on an 8-button joystick.
JOY_TYPE_FSPRO
CH Flightstick Pro or compatible stick, which provides four buttons, an analogue throttle control, and a 4-direction coolie hat.
JOY_TYPE_WINGEX
A Logitech Wingman Extreme, which should also work with any Thrustmaster Mk.I compatible joystick. It provides support for four buttons and a coolie hat. This also works with the Wingman Warrior, if you plug in the 15 pin plug (remember to unplug the 9-pin plug!) and set the tiny switch in front to the "H" position (you will not be able to use the throttle or the spinner though).
JOY_TYPE_SIDEWINDER
The Microsoft Sidewinder digital pad (supports up to four controllers, each with ten buttons and a digital direction control).
JOY_TYPE_SIDEWINDER_AG
An alternative driver to JOY_TYPE_SIDEWINDER. Try this if your Sidewinder isn't recognized with JOY_TYPE_SIDEWINDER.
JOY_TYPE_GAMEPAD_PRO
The Gravis GamePad Pro (supports up to two controllers, each with ten buttons and a digital direction control).
JOY_TYPE_GRIP
Gravis GrIP driver, using the grip.gll driver file.
JOY_TYPE_GRIP4
Version of the Gravis GrIP driver that is constrained to only move along the four main axis.
JOY_TYPE_SNESPAD_LPT1
JOY_TYPE_SNESPAD_LPT2
JOY_TYPE_SNESPAD_LPT3
SNES joypads connected to LPT1, LPT2, and LPT3 respectively.
JOY_TYPE_PSXPAD_LPT1
JOY_TYPE_PSXPAD_LPT2
JOY_TYPE_PSXPAD_LPT3
PSX joypads connected to LPT1, LPT2, and LPT3 respectively. See http://www.ziplabel.com/dpadpro/index.html for information about the parallel cable required. The driver automagically detects which types of PSX pads are connected out of digital, analog (red or green mode), NegCon, multi taps, Namco light guns, Jogcons (force feedback steering wheel) and the mouse. If the controller isn't recognised it is treated as an analog controller, meaning the driver should work with just about anything. You can connect controllers in any way you see fit, but only the first 8 will be used. The Sony Dual Shock or Namco Jogcon will reset themselves (to digital mode) after not being polled for 5 seconds. This is normal, the same thing happens on a Playstation, it's designed to stop any vibration in case the host machine crashes. Other mode switching controllers may have similar quirks. However, if this happens to a Jogcon controller the mode button is disabled. To reenable the mode button on the Jogcon you need to hold down the Start and Select buttons at the same time. The G-con45 needs to be connected to (and pointed at) a TV type monitor connected to your computer. The composite video out on my video card works fine for this (a Hercules Stingray 128/3D 8Mb). The TV video modes in Mame should work too.
JOY_TYPE_N64PAD_LPT1
JOY_TYPE_N64PAD_LPT2
JOY_TYPE_N64PAD_LPT3
N64 joypads connected to LPT1, LPT2, and LPT3 respectively. See http://www.st-hans.de/N64.htm for information about the necessary hardware adaptor. It supports up to four controllers on a single parallel port. There is no need to calibrate the analog stick, as this is done by the controller itself when powered up. This means that the stick has to be centred when the controller is initialised. One possible issue people may have with this driver is that it is physically impossible to move the analog stick fully diagonal, but I can't see this causing any major problems. This is because of the shape of the rim that the analog stick rests against. Like the Gravis Game Pad Pro, this driver briefly needs to disable hardware interrupts while polling. This causes a noticable performance hit on my machine in both drivers, but there is no way around it. At a (very) rough guess I'd say it slows down Mame 5% - 10%.
JOY_TYPE_DB9_LPT1
JOY_TYPE_DB9_LPT2
JOY_TYPE_DB9_LPT3
A pair of two-button joysticks connected to LPT1, LPT2, and LPT3 respectively. Port 1 is compatible with Linux joy-db9 driver (multisystem 2-button), and port 2 is compatible with Atari interface for DirectPad Pro. See the source file (src/dos/multijoy.c) for pinout information.
JOY_TYPE_TURBOGRAFIX_LPT1
JOY_TYPE_TURBOGRAFIX_LPT2
JOY_TYPE_TURBOGRAFIX_LPT3
These drivers support up to 7 joysticks, each one with up to 5 buttons, connected to LPT1, LPT2, and LPT3 respectively. They use the TurboGraFX interface by Steffen Schwenke: see http://www.burg-halle.de/~schwenke/parport.html for details on how to build this.
JOY_TYPE_WINGWARRIOR
A Wingman Warrior joystick.
JOY_TYPE_IFSEGA_ISA
JOY_TYPE_IFSEGA_PCI
JOY_TYPE_IFSEGA_PCI_FAST
Drivers for the IF-SEGA joystick interface cards by the IO-DATA company (these come in PCI, PCI2, and ISA variants).


--Chris
DOSCab/WinCab Jukebox: http://www.dwjukebox.com

captainpotato

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 259
  • Last login:November 11, 2016, 06:10:59 am
  • I'm a tapir!
    • Tapir Design
Re: Gameport gamepads under DOS
« Reply #7 on: January 28, 2005, 11:32:09 am »
Chris, thanks for the suggestion. I'll give it a shot over the weekend (although if the weather holds off, I may paint the cabinet instead). I'm using AdvanceMAME, so I'll see how I go.