VOICE Home Page: http://www.os2voice.org
[Newsletter Index]
[Previous Page] [Next Page]
[Features Index]

May 2000
editor@os2voice.org

RealPlayer7 and Odin

By: Mark Dodel madodel@ptd.net


It seems it was such a long time ago that I first heard about the win32-OS/2 Project. The very first release was 0.01 in February 1998. At the time I couldn't see much use for it, since I had everything I needed that ran under OS/2 natively. You also needed a copy of windows installed somewhere to convert system DLL's and to install the application. Times have changed. I still don't really need any windoze programs, but I wanted to give this project a try. I have a few win32 CD's lying around that came with hardware or other things I have bought over the years, but nothing that I have any interest in running. The one thing I had heard about that was remotely interesting, was the free version of RealPlayer7 which plays streaming video and sound over the internet. The developers at Real have made it known they would never allow an OS/2 version of their product, nor would they open the file format so someone could construct a clone. There is a 16bit version available that runs under win-OS/2, but it is now outdated and doesn't play the latest Realplayer Format G2.

What is Odin?

Odin is the successor/continuation of the win32-OS/2 project which began with the goal to run Quake and other 32bit windows only games/applications on OS/2. This is done by adding the win32 API calls to OS/2 by way of the Odin API. Running win32 programs under OS/2 can take either of two methods. Either permanently convert the windows executables and DLL's to the OS/2 format, which is what the early win32-OS/2 project did by way of the PE2LX conversion program. PE stands for Portable Executable (win32 binary program) and LX stands for Linear Executable (OS/2's executable format). This method requires that before you can run a win32 program under OS/2 all executables and any dependent resources such as application DLL's or required system DLL's, have to be converted first.

The Holy Grail of Odin, is on-the-fly conversion. Here Odin fakes out the windows program into thinking it is running on it's native windows9x/NT/2000 ad infinitum flavor of the moment. Actually according to Sander van Leeuwen "Odin pretends to be Windows NT 4 at this time. This might change to Windows 2000 in the future. The reason for not choosing Windows 95/98 is that those windows versions accept more dirty tricks from applications.". In this case the actual win32 programs are not changed, just transformed in memory so OS/2 can run them. Odin does this currently via a program named PE.EXE. From the Odin About Project page: "the code is executed directly by CPU with all rights, privileges and limitations of normal 32-bit OS/2 programs.". A special driver (WIN32K.SYS) is also under development as well, which when loaded in your CONFIG.SYS, will take care of the whole process without any further enduser involvement.

The final use for Odin is in porting windows programs to OS/2. By using the Odin API, a programmer can more easily modify the source code so that it runs natively under OS/2, and then add OS/2 only features as required. I have heard that this is the plan for porting the Opera web browser to OS/2, though I haven't heard anything about this project of late.

Under the Netlabs organization, there are several teams of talented individuals working hard to make all this a reality. http://odin.netlabs.org/ProjectAbout.phtml The main task of this group is to reproduce the win32 API under Odin. The closer they get to covering all win32 program functions, the more windows programs will be able to run successfully under OS/2. It amazes me that this slight of hand actually works today, and is not the pipe dream that some thought it would be when it was first made public.

Installing RealPlayer7 and Odin

So to start I downloaded the RealPlayer7 Basic from real.com. http://scopes.real.com/real/player/player.html?src=000501realhome_2,000420choice&dc=535251

If you are just starting to use Odin for the first time, download the latest WarpIn distribution package from ftp://ftp.os2.org/odin/daily/. Some builds are still released as ZIP file archives, some in the WarpIn format. The advantage of the WarpIn versions is that all directories are created(even empty ones) and the CONFIG.SYS will be correctly modified. So use the WarpIn installer for at least the initial install, and if you feel like it use the ZIP archives to update your install, though you can do this as well with the WarpIn version. But if you use the zip files, make sure the DLL files are installed to the system32 directory under your Odin directory. That is the the defacto windows directory where win32 applications will put there own system files as well. Leave it to windoze to have apps update the operating system directories.

There are both "Release" and "Debug" versions of the ZIP archives. All the archives run about 3.5 Meg with the Debug versions about 200K larger then the release versions. According to a post on the Odin User List generally the debug versions work better, but create large log files(.5-2meg). You can view a Daily Build Change Log at ftp://ftp.os2.org/odin/daily/ChangeLog .

UnZip the Odin daily build/or if you download the .wpi version use Warpin (This is new, and requires the Warpin Installer from ftp://ftp.os2.org/xworkplace-pub/warpin-0-9-2.zip) Remember these are windoze programs you want to run. They seem to expect the OS on C:. I install Odin to C:\ODIN on an HPFS drive though any file system driver (IFS) that supports long filenames should work. Installed, Odin takes up about 11 meg of drive space.

Under the Odin directory, a bunch of subdirectories are created. I assume they mimic the ones found in a normal windoze installation. Most of the subdirectories are empty. From my rather limited experience with windoze, it appears that windoze applications like to stick things in operating system directories and munge around with the main system registry. The Odin install will create a text file called ODIN.INI in the \ODIN directory, which has a few entries which I have not touched. One section that may be useful is the [Font Mapping] section. I suppose one can enter the name of a window's only font that a particular app may want to use but is unavailable on OS/2. You can then set an OS/2 equivalent here. Only one listed is MS Sans Serif=WarpSans. You may also be able to modify some of Odin's characteristics by creating a WIN.INI file in the \ODIN root directory as well. According to a post by Sander van Leeuwen:
"There aren't many customizable settings yet, but I've added two for the menu:

(win.ini in the Windows directory; [Desktop] section)
MenuFont=fontname (default 'MS Sans Serif' which is converted to WarpSans by Odin)
MenuFontSize=height (default 12)"

In the original win32-OS/2 project you had to convert the win32 binaries and DLL's to run natively under OS/2 using something called PE2LX. That process still exists, but is considered obsolete and is no longer supported/developed. In fact PE2LX has been removed from the WarpIn install distribution. For now, DON'T INSTALL the Odin win32k.sys driver. It works but still needs some development. And if it is installed, the command line executable PE.EXE may not work either. For now I'd advise to just use the PE.EXE command line version of running win32 executables. The ultimate goal is to just load the driver and then you won't have to do anything other then run a win32 app, but they are not there yet. Instead just modify CONFIG.SYS by adding C:\ODIN to your PATH= and LIBPATH= lines. If you use a Batch Command file to start win32 programs you don't even have to do this.

You don't need any windows operating system installed anywhere anymore to run Odin. Unfortunately as of now not all install routines will run under Odin. It seems the installs are a hybrid of win16 and win32. I tried running the QuickBooks 6 install. Odin reported it was a 16bit windows program. win-OS/2 reported it as a 32bit windows program. So neither would install it. I haven't tried QuickBooks2000 to see if that is able to be installed using Odin.

Next go to an OS/2 command prompt and type:

PE rp7u2-complete.exe
(or whatever the name of the realplayer 7 version you downloaded is)


Above image is of the RealPlayer7 Basic install routine running on a Warp4, FP13 desktop.

Here is the final screen of the RealPlayer7 Basic install process using Odin.

I installed Realplayer to C:\REAL I tried installing it to another drive a while back but it still kept putting files on C: so I gave up and put it on C:. windoze is as windoze does.

The windoze app thinks that Odin is the windoze system directory and puts some of it's files there. it also uses the system registry to store it's preferences. You can view this For some reason it doesn't always put them where it's supposed to. For some reason I always have to go hunting for pncrt.dll and move it to C:\ODIN. Other people never seem to have this problem.

Running RealPlayer7 under OS/2

I created a batch file called C:\real\RealPlayer\rp.cmd. This file was posted originally on the Odin user mail list by Joachim Benjamins of Mensys.

REM this will start RealPlayer7 under Odin */
SET WIN32LOG_ENABLED=0
set beginlibpath=C:\Odin;
set oldpath=%path%
set path=C:\Odin;C:\Real\RealPlayer;C:\Real\Common;C:\OS2\SYSTEM;C:\OS2\Mdos\Winos2\System;C:\OS2;
PE C:\Real\RealPlayer\realplay.exe %1
set path=%oldpath%
set oldpath=

By using a batch command file to start the program, you can have different Odin versions in use based on the PATH and LIBPATH in the the script. This is important since this development is still early on. Some daily builds work better then others, so if you find one that works well, keep that in one directory and create a new one to test newer builds.

I then created a program object for rp.cmd. I can then start it up and use the File-OpenFile dialog to open a local file or the channel buttons to go to one of the web sites. So far I have been unable to set up a helper application to use Realplayer for embedded HTML links.


Above shows RealPlayer7 Basic playing a video clip at the CNN channel using Odin.

RealPlayer runs in a seamless window on the desktop. When a video begins to play, the window automatically resizes. Some videos play in the main window. others will pop up a new player window.


Above is another screen capture showing RealPlayer7 on Warp playing a video on the discovery Channel Online.

It is slow, on my Pentium Pro 200 with 128Meg RAM, and an Elsa Winner/Office 2000 display card with some occasional clock pointers popping up and RealPlayer tends to close down with any problems, and the sound on this machine with a Crystal chipset on the motherboard sounds like it was recorded under water (this is a known problem with Crystal chipsets), but it works. I found that eventually the sound straightens itself out if I let it play for a couple of minutes. I was advised that this is related to Crystal drivers requiring a small DMA buffer (1k) to work well with rp7. I installed the latest Crystal driver for my CS4236, and added /DMASIZE:1024 to BASEDEV=CWCONFIG.SYS in my CONFIG.SYS file, which seemed to help the sound problem. It still starts out a bit rough, but then seems to more quickly straighten out to a normal sound stream.

Initially I couldn't click on any of the channel buttons without it crashing, but after I changed the connection setting in View-Preferences from 500kbs (I have a cable modem), down to 56k modem speed, this works now most of the time, though I get a some "Connection to server" errors. I have no idea if that is less common or more common in running under windoze. I is real cool to watch it run under OS/2 though. :-)

Once you have it installed, first try running the sample files in the C:\real\RealPlayer directory; firstrun.swf and firstrun.rm. I have never been able to get firstrun.smi to run without crashing realplayer. Also it has a background "notification window" which seems to hang on exit a lot, which I have to kill with the WarpCenter task list killfeature. By letting the developers know about this problem on the Odin User Mail List, I learned this was caused because I never disabled the RealPlayer7 StartCenter feature. Once I went into preferences and disabled that option, that problem went away.

While typing the original draft of this article, I had to C-A-D twice while I was playing around with RP7, so it's still far from perfect, but it does run. It works better with local files then internet files. Some daily builds work better then others. Also installing Fixpack 13 on Warp 4 caused a problem with winsock so I could no longer connect to web channels. That problem was fixed by the May 4th build. Now I can connect to the web channels again, but the videos are upside down and mirror imaged. :-P This problem is again related to Fixpack13, since I installed the same daily build on my laptop which is running Warp4, FP10 and the video is correct.


Some builds work better then others, Some break things, it's all part of the development cycle. I'm sure the Odin team will have this latest problem fixed in short order. They are getting a lot closer to production quality, or at least beta level, with every new build of Odin, at least on RealPlayer. In the beginning I couldn't get the thing to run at all. :-) My hearty thanks to the Odin developers and keep up the good work.

Odin is freeware, so there is nothing to buy. If you'd like to help, then bop on over to the Odin web page at netlabs - http://odin.netlabs.org. You can join the mailing list for Odin Users at http://www.egroups.com/group/odinusers. Besides testing Odin, if you can program I'm sure they could use your help. If you'd like to help in a monetary way, you can make a contribution to the Netlabs project on the web at http://shop.mensys.nl/cgi-bnin/db2www/mns_art2.d2w/report?catname=NETLABS&username=&i1=&o=&x=16:30:33. Besides Odin, Netlabs has many other ongoing projects, including Gimp/2, EverBlue, Shockwave/2, CadyBarz, M.A.M.E., MySQL and others. They are truly helping keep OS/2 a viable platform.


API - Application Programming Interface, this is the code that allows the application program to communicate with the operating system and request operating system level services.

DLL - Dynamically Linked Library, This is source code which is linked into a program at the time it is run, rather then at the time it is compiled. This allows the same block of code to be reused by other executable programs.


Features
editor@os2voice.org
[Previous Page ] [ Index] [Next Page ]
VOICE Home Page: http://www.os2voice.org