OS2 World Community Forum

OS/2, eCS & ArcaOS - Technical => Applications => Topic started by: jerome ibanes on October 20, 2020, 05:51:47 pm

Title: Installing win16 applications
Post by: jerome ibanes on October 20, 2020, 05:51:47 pm
I have a laptop with ArcaOS 5.0.5; installing any win16 application led to an "Invalid path ..." popup error. I'm not sure if this is due to HPFS, or anything else I should do. Does this sound familiar? Thanks for reading!
Title: Re: Installing win16 applications
Post by: Dave Yeo on October 20, 2020, 06:04:33 pm
DOS programs, including WinOS2 are limited to 8.3 names so if there is a directory etc with a long name, it is invisible to the DOS/WinOS2 application and you get that error. So make sure the whole PATH has short names.
Title: Re: Installing win16 applications
Post by: jerome ibanes on October 20, 2020, 07:21:27 pm
That could be it, do you recommend creating a new path for "legacy" applications, i.e. c:\apps or such or creating a new FAT filesystem for those?
Title: Re: Installing win16 applications
Post by: jerome ibanes on October 20, 2020, 07:47:44 pm
Thanks, I will try tonight, is there a way to check the API bindings, to "validate" that the application has all the libraries/objects/api compatibility to run under Arca (without launching it)? A bit like you would do objdump -R on linux.
Title: Re: Installing win16 applications
Post by: jerome ibanes on October 20, 2020, 08:28:34 pm
Correction, this is ArcaOS 5.0.2 not 5.0.5 as aforementioned.
He wants me to port one of my apps so he can run it on his ArcaOS, so I'm trying to help him.
Title: Re: Installing win16 applications
Post by: Joop on October 20, 2020, 10:24:32 pm
I have separate disks(partitions) for 8:3, just make a small partition and format it with 8:3. Be aware that lots of programs can't handle disks in the right way if on the disk is something not 8:3. Programs can hang or do other strange things. This is not a problem for OS/2 (eCS and probably ArcaOS). Also lots of Windows 3.x programs can't handle large volumes.
Title: Re: Installing win16 applications
Post by: Dave Yeo on October 21, 2020, 01:22:33 am
That could be it, do you recommend creating a new path for "legacy" applications, i.e. c:\apps or such or creating a new FAT filesystem for those?

I'd just create the c:\apps as HPFS/JFS is much better then FAT, it's one of the reasons that DOS and Windows was faster on OS/2.
FAT32 does do the long/shortname thing but our driver is not the best and slow. You'd also want the newest one rather then what came with 5.0.2
Title: Re: Installing win16 applications
Post by: Dave Yeo on October 21, 2020, 01:26:33 am
Thanks, I will try tonight, is there a way to check the API bindings, to "validate" that the application has all the libraries/objects/api compatibility to run under Arca (without launching it)? A bit like you would do objdump -R on linux.

I don't know of any for DOS/Windows. For OS/2 there are programs like PMDLL, https://hobbes.nmsu.edu/download/pub/os2/util/system/pmdll-2.12.zip (https://hobbes.nmsu.edu/download/pub/os2/util/system/pmdll-2.12.zip) which will generally show if all DLLs are loadable. Exceptions include DLLs that are dynamically loaded. There hasn't really been any API changes besides a few added to OS/2 since v2.
Title: Re: Installing win16 applications
Post by: Dave Yeo on October 21, 2020, 01:30:20 am
Correction, this is ArcaOS 5.0.2 not 5.0.5 as aforementioned.
He wants me to port one of my apps so he can run it on his ArcaOS, so I'm trying to help him.

Are you porting it to OS/2 from Windows? If it is a plain Win3.1 program, it should just work under WinOS2 which is basically Win3.1 with bug fixes such as for Y2K and handling large drives (not applications, which often get confused if over 2GB of free space is available due to signed long).
Title: Re: Installing win16 applications
Post by: jerome ibanes on October 21, 2020, 05:42:56 am
Okay, I've tried again, on ArcaOS 5.0.2.

For "Dosbox" win16-compatible apps, the entire screen becomes gray then comes a popup: "Application Execution Error: Unexpected DOS error: 23".
There is ~10GB of disk space available.
ArcaOS runs in virtualbox.
I checked the PATH it was longer than 100, so I trimmed it, same issue.
Please note that I launch the executables from a 4OS/2 window.
All the executables are in C:\Home .
I've transferred the executables over http from firefox, so I don't expect any data loss or conversion issues.

Does this application work for you?
http://www.nsl.com/k/k2/k295/

For comparison, this win16 app worked well:
https://archive.org/details/MANDLB_ZIP

And this one also worked well in full-screen mode:
https://archive.org/details/msdos_FRAINT18_shareware

Extra points:

* I tried the famous "speedcom.exe" ( https://archive.org/download/msdos_SPEED20_shareware , in the SPEED20.zip archive ), it doesn't display anything past the logo when ran in "window" mode, it runs fine when in full-screen.

* is 4OS/2 very much identical to 4NT?

* on 4OS/2 how to switch from windowed to full-screen?

* can 32-bit extended applications (i.e dos4gw) run on ArcaOS or OS/2?

Thank you for reading.
Title: Re: Installing win16 applications
Post by: Dave Yeo on October 21, 2020, 07:34:21 am
Okay, I've tried again, on ArcaOS 5.0.2.

For "Dosbox" win16-compatible apps, the entire screen becomes gray then comes a popup: "Application Execution Error: Unexpected DOS error: 23".

This is a common error which I thought was usually PATH related, but perhaps there are other reasons

Quote
There is ~10GB of disk space available.
ArcaOS runs in virtualbox.
I checked the PATH it was longer than 100, so I trimmed it, same issue.
Please note that I launch the executables from a 4OS/2 window.

Not the best way to launch them.

Quote
All the executables are in C:\Home .
I've transferred the executables over http from firefox, so I don't expect any data loss or conversion issues.

For comparison, this win16 app worked well:
https://archive.org/details/MANDLB_ZIP

And this one also worked well in full-screen mode:
https://archive.org/details/msdos_FRAINT18_shareware

Extra points:

* I tried the famous "speedcom.exe" ( https://archive.org/download/msdos_SPEED20_shareware , in the SPEED20.zip archive ), it doesn't display anything past the logo when ran in "window" mode, it runs fine when in full-screen.

I tested this, full screen as this video card doesn't support DOS windows very well. It ran for a bit before giving a divide by zero error, common for some old apps running on a fast computer. Something to do with loops IIRC.

Quote
* is 4OS/2 very much identical to 4NT?

Likely 4NT has had more development.

Quote
* on 4OS/2 how to switch from windowed to full-screen?

You can't switch a windowed OS/2 session to full screen. To launch a DOS program full screen, use start /f prog.exe. To switch DOS from windowed to full screen and back, CTRL-HOME.
Sometimes it is better to launch the program from a DOS session or WinOS2 session using FileManger. If nothing else, you might get a more informative error message.

Quote
* can 32-bit extended applications (i.e dos4gw) run on ArcaOS or OS/2?

Usually. At that OS/2 could run some games that Win95 couldn't.
There are a lot of DOS properties that can be adjusted. Many older games used to be in a database that would set things up, forget if it is still available (believe so) and how to use it. I remember games like SC2000 that would only run if you let the system set them up.
Open the properties on a DOS session by right clicking, selecting properties and then on page 2, click the DOS properties button. Then choose all "All DOS Settings" and see how much you can adjust. If a program needs lots of EMS memory for example, this is the place to set it. Dos4gw needs DPMI memory, which should have a reasonable default.
Similar with WinOS2, do want standard or enhanced mode? Default is standard.
Best is to create a program object for your program, then you can try adjusting various DOS settings and/or WinOS2 settings.
There are other things that can help like https://hobbes.nmsu.edu/download/pub/dos/vcompatv032b.zip (https://hobbes.nmsu.edu/download/pub/dos/vcompatv032b.zip) and something that helped with the settings (properties) whose name escapes me. Hopefully someone else will chip in.
While I used to play a lot of DOS games, that was over 20 years back. Once ISA slots went away it became harder to do things like use a sound card or joystick.

Title: Re: Installing win16 applications
Post by: Tom on October 21, 2020, 01:02:12 pm
You can't switch a windowed OS/2 session to full screen. To launch a DOS program full screen, use start /f prog.exe. To switch DOS from windowed to full screen and back, CTRL-HOME.

Small detail: the key combination is <Alt> + <Home>, not <Ctrl> + <Home>
Title: Re: Installing win16 applications
Post by: jerome ibanes on October 21, 2020, 02:33:35 pm
Thank you, very helpful, is there a reasonably good implementation of a ssh server for ArcaOS?
Title: Re: Installing win16 applications
Post by: Pete2 on October 21, 2020, 05:03:33 pm
Openssh: see http://www.altsan.org/os2/utils/ This requires security/2 and some other stuff. Or use ANPM if possible to make sure you pick up all prerequisites.
Title: Re: Installing win16 applications
Post by: jerome ibanes on October 21, 2020, 05:21:05 pm
Thanks again, this is great.

Finally, and most importantly, I still get this "Unexpected DOS error: 23" when running this:

http://www.nsl.com/k/k2/k295/

I would greatly appreciate if someone would help me run it.
Title: Re: Installing win16 applications
Post by: Dave Yeo on October 21, 2020, 06:15:40 pm
Trying to run it here also gives the 23 error. Attempting to run it with Odin gives, 'Failure to load "H:\tmp\k.exe" due to bad or missing MSVCRT.DLL'
Is it a Win32s binary? Or just missing the dll?
Title: Re: Installing win16 applications
Post by: Dave Yeo on October 21, 2020, 06:29:21 pm
With the 32 bit msvcrt.dll, Odin runs it in console mode. Not sure what it is supposed to do. Odin is sorta like WINE.
Code: [Select]
H:\tmp>pec k.exe
K 2.95 2004-02-11 Copyright (C) 1993-2004 Kx Systems
Evaluation. Not for commercial use.
\ for help. \\ to exit.

  \
\0       data
\+       verbs
\'       adverbs
\_       system verbs and nouns
\.       assign, define, control and debug
\:       i/o, dynamic load and client/server
\`       os commands, dialog boxes
\a       attributes, dependencies and triggers
\g       gui attributes
\l f     load script f.k
\s f     step script f.k
\w       workspace used, allocated, mapped
\c [0|1] console [off|on]
\e [0|1] error flag [off|on]
\b [t|s] break flag [trace|stop|none]
\d [d|^] k directory [go to]
\v [d|^] variables [directory]
\i [v]   invalid [antecedents/dependents]
\p [n]   print precision [digits]
\t [x]   time [x] milliseconds
\r [s]   random seed
\cd [d]  O/S directory [go to]
\[other] O/S execute
\\       exit    \(escape)    ctrl-c(stop)

I doubt that it'll run under WinOS2 though you could try installing WIN32s 1.25 and test. I think Lewis recently did a writeup on using Win32s, should be on the Arca Noae web site. I got to go to work otherwise I'd find it.
Title: Re: Installing win16 applications
Post by: jerome ibanes on October 21, 2020, 07:41:12 pm
I'm about to install win32s, I couldn't find how to start win-os2 in "enhanced" mode, would you let me know how?
I assumed it started in enhanced by default, I installed win32s (I hope I did this right) it installed freecell as well.
Now starting k.exe I get:

Win32s - Error
Windows is running in standard mode.
Win32s can run only in 386 enhanced mode.

When I am in the Program Manager I clicked on Help and it says:
386 Enhanced Mode
Memory: 64,882 KB Free
System Resources: 78% Free
Title: Re: Installing win16 applications
Post by: Tom on October 21, 2020, 07:59:19 pm
I'm about to install win32s, I couldn't find how to start win-os2 in "enhanced" mode, would you let me know how?

Use the Properties notebook for your Win-OS/2 session.
On its Session page you press the button Win-OS/2 properties.
That opens a window "Win-OS/2 Settings - Properties", where you select the radio button WIN-OS/2 settings and press OK.
Then on the left you select the setting WIN_RUN_MODE and on the right you choose the value "3.1 Enhanced Compatibility" and finally press Save.
Title: Re: Installing win16 applications
Post by: jerome ibanes on October 21, 2020, 08:05:26 pm
Yes, that's what it was by default.


Win32s - Error
Windows is running in standard mode.
Win32s can run only in 386 enhanced mode.

I've installed the win32s package from https://hobbes.nmsu.edu/?dir=%2F&stype=all&sort=type_name&search=win32s (precisely the last one on the table)
Title: Re: Installing win16 applications
Post by: jerome ibanes on October 21, 2020, 08:12:11 pm
and with win-os2 in full screen in the background, I start a 4OS2 window, and type "start k", it then says:
Win32s - Error
C:\WIN32APP\K\K.EXE: Invalid format

Hope this helps
Title: Re: Installing win16 applications
Post by: jerome ibanes on October 21, 2020, 08:28:05 pm
maybe I got the wrong msvcrt.dll? do you have a link to one that's known to work? (or please attach it?)
Title: Re: Installing win16 applications
Post by: jerome ibanes on October 21, 2020, 09:06:03 pm
I found what I hope is a working msvcrt.dll there:
http://ftp.math.utah.edu/pub/tex/historic/systems/texlive/1998/TeXLive3/bin/win32/

still getting the same error:

"Win32s - Error
Windows is running in standard mode.
Win32s can run only in 386 enhanced mode"

I've checked the settings and os2-win is configured to run in enhanced mode.

If I do the same from the file manager, I get K.EXE invalid format.
Title: Re: Installing win16 applications
Post by: jerome ibanes on October 21, 2020, 09:42:47 pm
I mean since it works with pec should I bother with win32s? What's a more reasonable approach here? is odin fairly stable and complete? (wine is... kinda, but not always).
What's your take on that?
Title: Re: Installing win16 applications
Post by: Dave Yeo on October 22, 2020, 12:12:52 am
Hi, it's a WIN32 console application and further thought says it won't run run under WIN32s.
Install Odin, "yum install odin" or use ANPM, put the Msvcrt.dll in the same directory as k.exe and k20.dll and in your 4os2 window, run pec k.exe and it should work. Odin is no where as capable as WINE but should run many older Win32 programs. Pec is for console, pe is for windowed.
Title: Re: Installing win16 applications
Post by: jerome ibanes on October 22, 2020, 12:26:15 am
Many thanks!
Title: Re: Installing win16 applications
Post by: jerome ibanes on October 22, 2020, 12:48:50 am
Dave, do you mean "yum install odin-exe-tools" ?
Title: Re: Installing win16 applications
Post by: Dave Yeo on October 22, 2020, 01:30:10 am
Dave, do you mean "yum install odin-exe-tools" ?

Yes, shouldn't have gone by memory :)
Title: Re: Installing win16 applications
Post by: Roderick Klein on October 23, 2020, 12:19:41 am
Thanks again, this is great.

Finally, and most importantly, I still get this "Unexpected DOS error: 23" when running this:

http://www.nsl.com/k/k2/k295/

I would greatly appreciate if someone would help me run it.

This is a 32 bti Windows applications.  It might load with win32s but it does not work here with win32s.

Roderick