Discussion:
Runtime error 200 => How to slow down dosemu?
Felix E. Klee
2006-04-22 20:29:30 UTC
Permalink
When I try to execute a program named "retrieve.exe" in Freedos under
Dosemu 1.2.2, then I get the error message "runtime error 200 at
tppatch retrieve.exe
TPPatch v1 - written by Andreas Bauer <***@hit.handshake.de>

=DCberpr=FCfe die Datei ...Datei ist ok.
DieDatei wird jetzt gepatcht...retrieve.exe kann nicht gepatcht werde=
n.

The error message indicates that the file is already patched, but - as
said before - "retrieve.exe" simply doesn't work. Also in the director=
y
tppatch rtm.exe
TPPatch v1 - written by Andreas Bauer <***@hit.handshake.de>

=DCberpr=FCfe die Datei ...rtm.exe ist keine von TP7/BP7 erzeugte Dat=
ei.

I tried uncompressing "rtm.exe" with "unp" but it doesn't seem to be a
compressed file.

Well, since the runtime error is most likely due to a processor which i=
s
too fast, the only solution left seems to be throttling of Dosemu. So:

How can I slow down Dosemu to the speed of about a 233MHz PII?

The machine Dosemu is running on has a Pentium M running at varying
speeds, between 800MHz and 1.8GHz.

--=20
=46elix E. Klee
-
To unsubscribe from this list: send the line "unsubscribe linux-msdos" =
in
the body of a message to ***@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
John Coppens
2006-04-25 05:09:07 UTC
Permalink
On Sat, 22 Apr 2006 22:29:30 +0200
Post by Felix E. Klee
The error message indicates that the file is already patched, but - as
said before - "retrieve.exe" simply doesn't work. Also in the directory
I seem to recall this problem occurs if the .exe was compressed with
lzexe. I'm not completely sure, but I seem to remember you can detect
that by checking the binary - at about 20-30 bytes from the beginning,
there is a text 'LZ90'

John

BTW: there is an unlzexe somewhere on the 'net...
-
To unsubscribe from this list: send the line "unsubscribe linux-msdos" in
the body of a message to ***@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Felix E. Klee
2006-04-25 20:13:54 UTC
Permalink
At Tue, 25 Apr 2006 02:09:07 -0300,
Post by John Coppens
I seem to recall this problem occurs if the .exe was compressed with
lzexe. I'm not completely sure, but I seem to remember you can detect
that by checking the binary - at about 20-30 bytes from the beginning,
there is a text 'LZ90'
Nothing there. Thanks for the hint, though.
Post by John Coppens
BTW: there is an unlzexe somewhere on the 'net...
I already tried decompression with "unp", as described in my original
posting.
--
Felix E. Klee
-
To unsubscribe from this list: send the line "unsubscribe linux-msdos" in
the body of a message to ***@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Jonas Eckerman
2006-04-25 15:09:24 UTC
Permalink
Post by Felix E. Klee
When I try to execute a program named "retrieve.exe" in Freedos under
Dosemu 1.2.2, then I get the error message "runtime error 200 at
001D:233A.".
That error means "Division by zero".

It is *sometimes* caused by a bad piece of timer initialisation combine=
d with fast processors.
Post by Felix E. Klee
tppatch retrieve.exe
IIRC that patch is only for programs compiled with Turbo/Borland Pascal=
AFAIK. It's possible that it only handles code using Borlands CRT unit=
as well.

Also, IIRC some patches for this problem simply replaced a value with a=
higher value rather than actually replace the bad code. The result was=
that the code worked for another couple of years, but eventually start=
ed failing again when CPUs became a lot faster.

Not sure if that was TPPatch or some other patcher.
Post by Felix E. Klee
Well, since the runtime error is most likely due to a processor which=
is

I could be becuase of that, but it is entirely possible that the code t=
ries to divide something by zero for some other reason as well.
Post by Felix E. Klee
too fast, the only solution left seems to be throttling of Dosemu.
You don't need to slow down Dosemu, you need to slow down the buggy pro=
gram.

I've got a small piece of code I call Bx200Fix.exe that usually works f=
or this.
I don't know if attaches are ok on this list, so I just put it up for d=
ownload from
<http://mmm.truls.org/j/>

Simply run it with the program you want to run as parameter. Like this:
bx200fix retrieve.exe
bx200fix retrieve.exe someparameter

If that doesn=E4t work, run it like this instead:
bx200fix ?retrieve.exe
bx200fix ?retrieve.exe someparameter

Without the '?' it just tries to hide the problem when the app is start=
ing, with the '?' it keeps doing it til the app exits.

It's just a quick hack and has at least one possible problem:
It does not copy the parameter data *exactly* to the program it calls.
Usually this doesn't matter though.

Use it if you like it. And you may distribute it anyway you like as wel=
l.

Regards
/Jonas


--=20
Jonas Eckerman, FSDB & Frukttr=E4det
http://whatever.frukt.org/
http://www.fsdb.org/
http://www.frukt.org/

-
To unsubscribe from this list: send the line "unsubscribe linux-msdos" =
in
the body of a message to ***@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Felix E. Klee
2006-04-25 20:09:07 UTC
Permalink
At Tue, 25 Apr 2006 17:09:24 +0200,
Post by Jonas Eckerman
bx200fix retrieve.exe
bx200fix retrieve.exe someparameter
Thanks very much for your help. However, this didn't work, neither with
"?" nor without "?". IIRC, when calling "bx200fix ?retrieve.exe" or
"bx200fix retrieve.exe" just nothing happened, i.e. I was returned right
to the prompt.
--
Felix E. Klee
-
To unsubscribe from this list: send the line "unsubscribe linux-msdos" in
the body of a message to ***@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Felix E. Klee
2006-04-26 18:43:21 UTC
Permalink
At Wed, 26 Apr 2006 11:30:47 +0200,
Were you in the same directory as "retrieve.exe" when doing this?
If not: Did you try with the full path to retrieve.exe?
That's what I tried, and, contrary to what I said before, I get the
runtime error message, i.e. I don't get just nothing.

However: I just tried it again with the version of "Retrieve.exe"
patched with "CTBPPAT.EXE" and "mpatch2.exe" (see my message with
Message-ID <87psj5whnm.wl%***@inka.de>). And: This time it
works, even at 1.8GHz!

Thanks a lot for this nice tool! Hopefully, the error message won't
resurface.
--
Felix E. Klee
-
To unsubscribe from this list: send the line "unsubscribe linux-msdos" in
the body of a message to ***@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Felix E. Klee
2006-04-26 19:42:27 UTC
Permalink
At Wed, 26 Apr 2006 20:43:21 +0200,
Hopefully, the error message won't resurface.
It just did. :-(
--
Felix E. Klee
-
To unsubscribe from this list: send the line "unsubscribe linux-msdos" in
the body of a message to ***@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Mike McCarty
2006-04-27 15:24:13 UTC
Permalink
Post by Felix E. Klee
At Wed, 26 Apr 2006 20:43:21 +0200,
Hopefully, the error message won't resurface.
It just did. :-(
How big is this program? Would it violate your license to send
me a copy?

"Runtime error 200" is a report, AFAIK originating only with
Borland's Turbo Pascal, reporting division by 0. When the error
occurs, the instruction pointer (IP) gets reported. Is it always
the same? There is a common cause of that report occurring which
is in the initialization of the counter used in the delay()
procedure for creating millisecond resolution delays during
execution. But this is not the only possible cause. Your program
may have other causes for division by zero. Some or all of these
may be related to the speed of execution.

Mike
--
p="p=%c%s%c;main(){printf(p,34,p,34);}";main(){printf(p,34,p,34);}
This message made from 100% recycled bits.
You have found the bank of Larn.
I can explain it for you, but I can't understand it for you.
I speak only for myself, and I am unanimous in that!
-
To unsubscribe from this list: send the line "unsubscribe linux-msdos" in
the body of a message to ***@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Felix E. Klee
2006-04-25 19:59:25 UTC
Permalink
At Sat, 22 Apr 2006 22:29:30 +0200,
Post by Felix E. Klee
When I try to execute a program named "retrieve.exe" in Freedos under
Dosemu 1.2.2, then I get the error message "runtime error 200 at
001D:233A.".
I finally got it to work. :-) First, I applied CTBPPAT.EXE with default
Post by Felix E. Klee
ctbppat.exe retrieve.exe
mpatch2.exe retrieve.exe
Both programs actually modified the file, though the first modification
was, I guess, superfluous. BTW, in the directory containing
"retrieve.exe" there were also the files "dpmi16bi.ovl" and "rtm.exe".
I doubt that they are of any relevance, and I don't think that any of
the patch programs touched them.

Further info:

* Overview about another program having the same problem and how to fix
it (in German):

<URL:http://www.muenster.de/~matthias/aladin/fehler.htm>

* Source for mpatch2.exe:

<URL:http://www.muenster.de/~matthias/aladin/mpatch2.zip>

* Source for ctbppat.exe:

<URL:http://www.heise.de/ct/ftp/result.xhtml?url=/ct/ftp/ctsi.shtml&wo
rds=ctbppat%20zip>
--
Felix E. Klee
-
To unsubscribe from this list: send the line "unsubscribe linux-msdos" in
the body of a message to ***@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Felix E. Klee
2006-04-25 21:14:11 UTC
Permalink
At Tue, 25 Apr 2006 21:59:25 +0200,
Post by Felix E. Klee
Post by Felix E. Klee
When I try to execute a program named "retrieve.exe" in Freedos under
Dosemu 1.2.2, then I get the error message "runtime error 200 at
001D:233A.".
I finally got it to work. :-)
I have to take that back: It's working when the machine is throttled to
800MHz, but not when it's running at full speed. This is driving me
nuts. :-(

I guess, the only reliable solution is DosBox where one can, to my
knowledge, adjust what speed the emulated processor should have. Of
course, it requires a lot more resources, but this should not be too
much of an issue.
--
Felix E. Klee
-
To unsubscribe from this list: send the line "unsubscribe linux-msdos" in
the body of a message to ***@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Felix E. Klee
2006-04-26 06:32:35 UTC
Permalink
At Tue, 25 Apr 2006 21:25:54 +0000,
(Or alternatively, start the program "slowly", and then after that
check has run, increase speed to full throttle.)
It doesn't even have to run at full throttle, running it slowly all the
time would be fine.
--
Felix E. Klee
-
To unsubscribe from this list: send the line "unsubscribe linux-msdos" in
the body of a message to ***@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Loading...