PDA

View Full Version : Prince of Persia malfunction on IBM AT



romanon
November 2nd, 2017, 06:27 AM
Hello, i have strange problem with Prince of Persia game on my IBM AT model 099. Prince after start game (without intro - why?) react very strange move without any user asistence. Here is video.

https://youtu.be/v5iCLrAV5as

My first suspicion was keyboard but its work fine out of game. There is OS PC-DOS 3.00, but i tried 3.30 also. Second suspicion was virus, but aj scanned it with F-prot '98 and there is not any virus.
So i recorded on modern PC that game to floppy disk and set it to "write protect" to protect any viruses. No change... When i tried this floppy disk on my IBM XT-286, works completely normally.

Some ideas? Thanks

R.

Scali
November 2nd, 2017, 06:30 AM
Does your system have a joystick card by any chance?
Might be that Prince of Persia detects a joystick, and this is why it is moving?

romanon
November 2nd, 2017, 06:47 AM
Good idea, but i dont have any. I have there only IBM CGA, IBM 128k memory board, IBM serial/parallel card and IBM FDD and HDD controller.

krebizfan
November 2nd, 2017, 07:02 AM
Swap the keyboards between the AT and the XT-286. If the problem continues on the AT, check around the keyboard controller and the keyboard connector for broken traces or whiskered short.

Xacalite
November 2nd, 2017, 08:38 AM
I support the game port theory.
Joystick position is measured via resistance, and with old circuits resistance may be wrong, making the game react incorrectly.

Edit: but if you don't have a game port, then there must be something wrong with the keyboard, indeed.
Anyway, try switching between joystick and keyboard modes - Ctrl-J, Ctrl-K.

romanon
November 2nd, 2017, 08:47 AM
I support the game port theory.
Joystick position is measured via resistance, and with old circuits resistance may be wrong, making the game react incorrectly.

but i dont have any game port card

Xacalite
November 2nd, 2017, 08:51 AM
OK, does Ctrl-J / Ctrl-K change anything?

SomeGuy
November 2nd, 2017, 09:06 AM
I seem to recall a few odd instances where a game would detect "phantom" input devices. If that version of Prince of Persia has some way to manually disable devices, you might try that. For example, I recall in Commander Keen it had the option -nojoy that would disable a joystick.

There doesn't even have to be a joystick controller in the system, just some noise returned by an I/O bus, conflicting device, or a crappy multi-IO card that has hidden/disabled joystick controller logic, combined with bad detection code.

If it is the keyboard, it could be a stuck key that is being ignored by the rest of the system. Try running something like AMI Diagnostics to test every single key on the keyboard to make sure they all respond properly.

romanon
November 2nd, 2017, 09:25 AM
I seem to recall a few odd instances where a game would detect "phantom" input devices. If that version of Prince of Persia has some way to manually disable devices, you might try that. For example, I recall in Commander Keen it had the option -nojoy that would disable a joystick.

There doesn't even have to be a joystick controller in the system, just some noise returned by an I/O bus, conflicting device, or a crappy multi-IO card that has hidden/disabled joystick controller logic, combined with bad detection code.

If it is the keyboard, it could be a stuck key that is being ignored by the rest of the system. Try running something like AMI Diagnostics to test every single key on the keyboard to make sure they all respond properly.

i checked keyboard with CheckIt utility, all keys work normally, i must try different keyboard...

Trixter
November 2nd, 2017, 10:52 AM
If that version of Prince of Persia has some way to manually disable devices, you might try that.

I believe it does. Later versions had a SETUP.EXE, earlier versions did not. The OP should try a few versions and/or try to track down the command-line reference.

...actually, looking into PRINCE.EXE, I believe hitting CTRL-K will force keyboard control, and/or CTRL-J will toggle joystick control. Try that.

romanon
November 2nd, 2017, 11:16 PM
ok sooo, i tried another keyboard, no change. I pressed Ctrl-K and whoaa, prince works normaly. But why is defaultly on IBM AT joystick ON and on XT-286 not?

Scali
November 3rd, 2017, 01:20 AM
ok sooo, i tried another keyboard, no change. I pressed Ctrl-K and whoaa, prince works normaly. But why is defaultly on IBM AT joystick ON and on XT-286 not?

I suppose only reverse-engineering the game's code could possibly answer that.
But if I were to theorize... Perhaps the game uses the int 15h functionality to detect a joystick, and for some reason it responds differently to the AT BIOS than to the XT-286 (and most clones, since I never heard of this problem before).
See here: http://www.ctyme.com/intr/rb-1514.htm

Trixter
November 3rd, 2017, 06:13 AM
It's also possible there is simply a bug in the joystick code. Some developers never got the hang of reading the joystick properly and released patches to fix joystick reading on faster systems (Silpheed v2.1 comes to mind).

Despite the AT and the XT-286 being extremely similar, they do run at slightly different speeds due to the XT-286 using 0-wait-state RAM.

Xacalite
November 3rd, 2017, 06:41 AM
The problem may be in the hardware.
Run DEBUG, and try reading the joystick port and other unused I/O locations, also dump the unused memory address space.
With most PCs, you should get all "FF" values.
But with some you get random values, which may cause hardware detection routines to misbehave.
I don't know what's the cause of such behavior - it may be normal for some designs, but it may be noisy due to aging capacitors...