EGA Monkey Island

Getting old software/games running on older hardware.

EGA Monkey Island

Postby fleedar » 2019-9-09 @ 16:09

From what I’ve read here, I may be out of luck with this, but I’m trying to play Monkey Island 1 on an old system, and I’m getting the infamous “integer divide by zero” error when launching.

The system is a Pentium 166 with a Sound Blaster 16, and I’m specifically trying to play the 16 color version of the game with Sound Blaster music. The game launches just fine with PC speaker music or with sound disabled, so I know the issue is some combination of the speed of the CPU and compatibility with the SB16. I also know LucasArts has a patch for the issue, but it only works with the VGA version, which doesn’t help me. I’ve tried using Setmul to disable L1 cache as well as every other Pentium feature it can shut off, but this either has no effect or doesn’t slow things down enough.

Has anyone had luck with a similar setup? Is my only solution to buy a 386?

And yes, I realize I can easily play this in DOSBox or ScummVM, which I’ve done countless times, but this time around I really want to play the first version I played as a kid, and on “real” hardware similar to what I had at the time.
fleedar
Newbie
 
Posts: 8
Joined: 2019-1-20 @ 17:24

Re: EGA Monkey Island

Postby derSammler » 2019-9-09 @ 16:14

Try MoSlo or any other slow-down utility:
http://www.sierrahelp.com/Utilities/Slo ... ities.html

MoSlo worked for me most of the time.
derSammler
l33t
 
Posts: 2202
Joined: 2017-4-14 @ 11:30
Location: Germany

Re: EGA Monkey Island

Postby Jo22 » 2019-9-09 @ 21:15

The system is a Pentium 166 with a Sound Blaster 16, and I’m specifically trying to play the 16 color version of the game with Sound Blaster music.

Any chance the mainboard has a connection for a turbo button (or rather turbo "brake" button in most systems) ?
There used to be so many tricks to slown down an AT class PC in hardware (halfing bus/chipset/cpu speeds, adding waitstates, disabling caches etc).

Edit: Another idea. Install a "slow" ISA graphics card. Since some games use VGA for their timing, it might work.
"Time, it seems, doesn't flow. For some it's fast, for some it's slow.
In what to one race is no time at all, another race can rise and fall..." - The Minstrel

//My video channel//
User avatar
Jo22
l33t
 
Posts: 3778
Joined: 2009-12-13 @ 07:06
Location: Europe

Re: EGA Monkey Island

Postby cyclone3d » 2019-9-09 @ 22:17

Here is what is says to do on the Wiki of speed sensitive games:
https://www.vogonswiki.com/index.php/List_of_CPU_speed_sensitive_games
For 16 color EGA version, on older CPUs with integrated L1 cache you can turn off the L1 cache to avoid the problem.


I see that you have already tried that though.

What about disabling stuff through the BIOS.. such as L1 and L2 cache?

You should also be able to drop the multiplier of the CPU as well as the bus speed via jumpers on your motherboard.

What brand/model is your motherboard?

Is is a P166 or a P166 with MMX?

You may be able to go down to 50x1.5 (75Mhz) or if you are really lucky 40x1.5 (60Mhz).

If it is a Pentium Overdrive, you are supposed to be able to force it to 1x multiplier by removing the included fan although I have not tried that yet.
User avatar
cyclone3d
l33t
 
Posts: 3212
Joined: 2015-4-08 @ 06:06
Location: Huntsville, AL USA

Re: EGA Monkey Island

Postby K1n9_Duk3 » 2019-9-10 @ 20:30

I think I fixed that divide by zero error myself in the VGA floppy versions of Mokey1 and Indy3 by hacking the executable. If you can send me the executable, I'll see if I can use a similar fix for your version.
User avatar
K1n9_Duk3
Member
 
Posts: 114
Joined: 2016-9-30 @ 11:07

Re: EGA Monkey Island

Postby fleedar » 2019-9-10 @ 21:04

derSammler wrote:Try MoSlo or any other slow-down utility:
http://www.sierrahelp.com/Utilities/Slo ... ities.html

MoSlo worked for me most of the time.


No luck here :(

cyclone3d wrote:What about disabling stuff through the BIOS.. such as L1 and L2 cache?

You should also be able to drop the multiplier of the CPU as well as the bus speed via jumpers on your motherboard.

What brand/model is your motherboard?

Is is a P166 or a P166 with MMX?

You may be able to go down to 50x1.5 (75Mhz) or if you are really lucky 40x1.5 (60Mhz).

If it is a Pentium Overdrive, you are supposed to be able to force it to 1x multiplier by removing the included fan although I have not tried that yet.


I tried disabling the L1 cache with Setmul, but it's not able to disable the L2 cache. It's a P166 with MMX, and the motherboard is an FIC PT-2003, which doesn't have a turbo brake, any kind of speed adjustment jumpers, or any speed or cache settings in the BIOS, unfortunately.

K1n9_Duk3 wrote:I think I fixed that divide by zero error myself in the VGA floppy versions of Mokey1 and Indy3 by hacking the executable. If you can send me the executable, I'll see if I can use a similar fix for your version.


This would be amazing! Where can I send it?
fleedar
Newbie
 
Posts: 8
Joined: 2019-1-20 @ 17:24

Re: EGA Monkey Island

Postby K1n9_Duk3 » 2019-9-10 @ 23:27

I think I found a working solution for fleedar's version of Monkey1 EGA. Here is the patch script that will fix the issue in the executable:

Code: Select all
%exefile monkey.exe 116209

#avoid the divide error (this may cause timing issues with AdLib music):
%patch $125F7
   $B1 $03      #   mov   cl, 3
   $D3 $E8      #   shr   ax, cl
   $90 $90      #   nop nop

#avoid timing issues with the AdLib music:
%patch $12DAE
   $50      #   push   ax
   $86 $E0      #   xchg   al, ah
   $BA $0388w   #   mov   dx, 388h
   $EE      #   out   dx, al
   $B9 6w      #   mov   cx, 6
   $EC      #l1:   in   dx, al
   $E2 $FD      #   loop   l1
   $86 $E0      #   xchg   al, ah
   $42      #   inc   dx
   $EE      #   out   dx, al
   $4A      #   dec   dx
   $B9 35w      #   mov   cx, 35
   $EC      #l2:   in   al, dx
   $E2 $FD      #   loop   l2
   $58      #   pop   ax
   $90      #   nop

%end


You will need my patching utility (I tested the script with version 1.4 of the utility). You need to copy the patch script into a plain text file, save it and open the text file with the patching utility. Then follow the instructions.

I tested the patched version on a Pentium MMX 266 MHz laptop. I had to start the game with the "a" parameter to force AdLib music, but I guess the game's auto-detection doesn't like the sound chip in that laptop. Other Scumm games have similar issues on that system.
User avatar
K1n9_Duk3
Member
 
Posts: 114
Joined: 2016-9-30 @ 11:07

Re: EGA Monkey Island

Postby fleedar » 2019-9-11 @ 01:01

K1n9_Duk3 wrote:I think I found a working solution for fleedar's version of Monkey1 EGA. Here is the patch script that will fix the issue in the executable:

Code: Select all
%exefile monkey.exe 116209

#avoid the divide error (this may cause timing issues with AdLib music):
%patch $125F7
   $B1 $03      #   mov   cl, 3
   $D3 $E8      #   shr   ax, cl
   $90 $90      #   nop nop

#avoid timing issues with the AdLib music:
%patch $12DAE
   $50      #   push   ax
   $86 $E0      #   xchg   al, ah
   $BA $0388w   #   mov   dx, 388h
   $EE      #   out   dx, al
   $B9 6w      #   mov   cx, 6
   $EC      #l1:   in   dx, al
   $E2 $FD      #   loop   l1
   $86 $E0      #   xchg   al, ah
   $42      #   inc   dx
   $EE      #   out   dx, al
   $4A      #   dec   dx
   $B9 35w      #   mov   cx, 35
   $EC      #l2:   in   al, dx
   $E2 $FD      #   loop   l2
   $58      #   pop   ax
   $90      #   nop

%end


You will need my patching utility (I tested the script with version 1.4 of the utility). You need to copy the patch script into a plain text file, save it and open the text file with the patching utility. Then follow the instructions.

I tested the patched version on a Pentium MMX 266 MHz laptop. I had to start the game with the "a" parameter to force AdLib music, but I guess the game's auto-detection doesn't like the sound chip in that laptop. Other Scumm games have similar issues on that system.


It totally works. This is why I love this forum. You're amazing, thank you!
fleedar
Newbie
 
Posts: 8
Joined: 2019-1-20 @ 17:24

Re: EGA Monkey Island

Postby cyclone3d » 2019-9-11 @ 01:25

fleedar wrote:I tried disabling the L1 cache with Setmul, but it's not able to disable the L2 cache. It's a P166 with MMX, and the motherboard is an FIC PT-2003, which doesn't have a turbo brake, any kind of speed adjustment jumpers, or any speed or cache settings in the BIOS, unfortunately.


I see that you got it working with a patch.

But, even if the manual doesn't document the FSB settings, it does in fact have jumpers for FSB settings.

The manual supports anything from a Pentium 75 to a Pentium 200 and some AMD and Cyrix chips as well.
75 (50x1.5)
90 (60x1.5)
100 (66x1.5) so really only 99Mhz IF the fsb is exactly 66Mhz.
120 (60x2)
133 (66x2) [132]
150 (60x2.5)
166 (66x2.5) [165]
200 (66x3) [198]

Extrapolating the known values for those CPUs with how the jumpers are set for those CPUs, we can easily deduce that these are the
fsb settings below.

JCK1 JCK2
closed closed 50Mhz
open open 55Mhz
closed open 60Mhz
open closed 66Mhz

So at a minimum you have support for 50, 60, and 66Mhz fsb.

Edit: The multiplier settings are as follows:
JC1 JC2
Open Open - 1.5x
Closed Open - 2x
Closed Closed - 2.5x
Open Closed - 3x

J6 is the Bus Clock selector. Guessing this is for the PCI/ISA bus divider.
2-3 for the 50 and 55Mhz fsb and 1-2 for 60 and 66Mhz fsb.

Statson has this backwards according to the jumper settings documents below.

Here are the jumper settings for this board for setting up the CPU directly from the FIC ftp site:
pt-2003_cpu_jumper_settings.zip
(87.57 KiB) Not downloaded yet


ftp://ftp.fic.com.tw/motherboard/manual/socket7/pt-2003/
User avatar
cyclone3d
l33t
 
Posts: 3212
Joined: 2015-4-08 @ 06:06
Location: Huntsville, AL USA


Return to Software

Who is online

Users browsing this forum: Caluser2000 and 2 guests