PDA

View Full Version : IBM 5170 - Mysterious Game Adapter



Erwin-c64
November 9th, 2013, 11:02 AM
As some people here might know I just got a IBM 5170, it has an Everex memory card which gives me a total of 1024 KB.

I used the following configuration to load Commander Keen 4:
VGA card (Headland HT208) + Modern TFT
Sergey Adlib Clone
Western Digital MFM controller
LPT Card
AMI Bios (downloaded from minuszerodegrees (Thnx!))

The result is the game locks up the pc at the loading screen and it detects the presence of Joystick 2. (there is no game adapter or joystick port)

I removed the Everex memory card, Adlib-clone, LPT card, replaced the video card with a MDA type.. but no matter what I change that Game Adapter keeps being detected (see that green MSD screenshot where it states Button1 is pressed on Joystick A).

So I figured that AMI Bios might be the cause of this and I replaced it with the Quadtel 286 bios I originally found in the pc. Issue remains the same.

So the question is.. What is causing a Game Adapter to be detected when there is none? Is this normal behaviour? :confused2:1588015881

RJBJR
November 9th, 2013, 01:59 PM
You can try the IBM 5170 Advanced Diagnostics available at http://www.minuszerodegrees.net/software/5170_advanced_diagnostics_2.07.zip
That program will diagnose the whole machine and might find something.

SomeGuy
November 9th, 2013, 02:31 PM
Try running:
keen4e -nojoys

That should skip detection of the joysticks. If the game continues and loads, then that is what is locking it up.

Erwin-c64
November 9th, 2013, 03:09 PM
Thanks RJBJR, as far as I can see I don't get any errors, also it does not detect a Game Adapter. System board check returns 100.. Just don't know if that means check completed 100%, functioning 100% or error message #100

@SomeGuy, brb :quickexit:
EDIT: Thanks that works fantastic, both for the EGA and CGA version of the game. Completely playable! So that means this machine has some bug, making it look like there is Game Adapter when there is none.

Can anyone with an IBM 5170 and MS-Dos 6.22 run MSD (Microsoft Diagnostics) and look if there is a Game Adapter listed?

modem7
November 9th, 2013, 03:52 PM
My main 5170 has no game port. I ran CheckIt version 2.1 on it, and CheckIt erroneously reported that my 5170 had 2 joysticks.

Doing some research, I can't see any 100% reliable software method of determining the presence/absence of a game port, including whether or not joysticks are attached.

Erwin-c64
November 9th, 2013, 04:33 PM
Thanks for testing, so it seems my IBM 5170 isn't broken. So there's just something in the design that causes several unreliable software testing methods to fail?

Guess the chances of finding the issue and fixing it are near non existent.. so time to find a game adapter :D

SomeGuy
November 9th, 2013, 05:08 PM
Actually, installing something with a joystick port very well might make the problem go away. It could be that the routines are reading in random garbage from the bus since there is nothing at that i/o address.

H-A-L-9000
November 10th, 2013, 02:21 AM
Maybe this machine type is missing pullup resistors on the data bus, or one of them went bad? Usually these are resistor arrays. When you read unused ports (debug command or something) it should usually return 0xff.

Erwin-c64
November 10th, 2013, 04:57 AM
I wrote a small program in qbasic to monitor the " game adapter " and the buttons of the "joystick" are changing from activated to deactivated once in a while. I did some more research and the game adapter should be at hex address 0200-020F and be accessed through the bios at Int 15H, function 84H. According to the Advanced Dos Programming book from Microsoft Press I have here there should be certain values returned by checking Int15h when there is no Game Card.

My guess is that both the AMI and Quadtel bios are not made for this machine and generate errors when they have to pass requests from Int15 to the 0200 hex address.. As I understand it that's how it works.

Any ideas on that? Because the next step would be burning an original IBM bios as I don't have a game adapter.

modem7
November 10th, 2013, 10:18 PM
and be accessed through the bios at Int 15H, function 84H.
Some software will bypass the BIOS.


My guess is that both the AMI and Quadtel bios are not made for this machine and generate errors when they have to pass requests from Int15 to the 0200 hex address.. As I understand it that's how it works.
Any ideas on that? Because the next step would be burning an original IBM bios as I don't have a game adapter.
When I ran CheckIt 2.1 earlier, that was on a 5170 that has its original BIOS.

Trixter
November 11th, 2013, 06:18 PM
Doing some research, I can't see any 100% reliable software method of determining the presence/absence of a game port, including whether or not joysticks are attached.

There absolutely is a way: You write any value to the joystick port at 0x201 and read it back; the axis bits for all joysticks will be high. Then keep reading and they'll go low again at some point when the value for the stick is reached. Typical "joystick not found" is when this behavior is not seen (ie. writing a value and reading it back shows no change, or the bits never go low after a second). It takes actual joystick behavior to be detected as a joystick.

I've never seen a system without joysticks act as if it had them, but if it were going to do that, something would need to be "active" at port 0x201.


I wrote a small program in qbasic to monitor the " game adapter " and the buttons of the "joystick" are changing from activated to deactivated once in a while.

I'd put the original BIOS back.

Erwin-c64
November 12th, 2013, 04:42 AM
When I had the 5170 in the early 90's as a kid I had a game adapter.. I remember never getting the alignment correct of the joystick with the adjustment wheels. It would always have the car (racing game) moving to the right or left. Back then I just thought I had a crappy joystick.
Could it be the 5170 (type 3 board) or WD MFM controller has a bug that would cause noise on that address? Guess the only way to know is more computers to test, with different Hard Disk controllers. I have neither and I can't just remove the MFM Controller because I would need that to boot the computer (both HD and FDDs are connected to that card)

Trixter
November 12th, 2013, 08:23 AM
I can't just remove the MFM Controller because I would need that to boot the computer (both HD and FDDs are connected to that card)

Sure you can -- just let the system boot into ROM BASIC and perform an additional test to see if "joysticks" are still "connected". You'll have to put line numbers back into your quickbasic program ;-) Oh, wait, you don't have the original BIOS in there... well, yet another suggestion for putting the original BIOS back.