Author Topic: 2ine - OS/2 on Linux  (Read 1022 times)

Martin Iturbide

  • OS2World NewsMaster
  • Global Moderator
  • Hero Member
  • *****
  • Thank You
  • -Given: 319
  • -Receive: 60
  • Posts: 2072
  • Your Friend Wil Declares...
    • View Profile
    • Martin's Personal Blog
2ine - OS/2 on Linux
« on: February 23, 2018, 06:54:40 pm »
I can not believe I missed this.

1) On December of 2017.  - December 2017 wrapup

Quote
- 2ine: my OS/2 emulator hit a milestone: it has enough of OS/2 TCP/IP implemented to run FINGER.EXE. And we all learned a very valuable lesson about code segments for 32-bit linear address spaces. I'll explain this in a more technical post after everyone recovers from their New Year parties.

2) Jan 21: Project: 2ine - Jan 21

Quote
You have no idea how much effort went into getting this stupid white square on the screen.

He made an OS/2 white screen app to run also on Linux. Useless but very interesting. This guy recreated 14 OS/2 functions to make that square show up.

Even that is not my desire to run OS/2 apps on Linux, (Joke) I feel that I need to protect this guy from not getting killed by the Illuminati Brotherhood (/Joke). I will have to check more about this project.

I wish Ryan the best !! While everybody says it is impossible, at least he is trying.

Regards
Martin Iturbide
OS2World NewsMaster
... just share the dream.

Valery Sedletski

  • Sr. Member
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 18
  • Posts: 250
    • View Profile
Re: 2ine - OS/2 on Linux
« Reply #1 on: February 23, 2018, 07:09:58 pm »
Yes. I knew about that from OSNews RSS feed. Very interesting. His approaches are very interesting. I can share some thoughts with him. Very interesting his attempts to implement 16-bit segments tiling, with covering only some areas (not the whole first 512 MB). Maybe, his approach is feasible on L4/Fiasco too. (on Fiasco, LDT is limited to cover only 32 MB, because LDT is limited to 4096 byte -- one page). Also, contrary to his case, I have an idea how I could implement TLMA (Thread Local Memory Area) on Fiasco. OS/2 kernel just does memcpy over TLMA from Thread Control Block (TCB) on each thread switch. This could be done from preempter thread on Fiasco, I think. Linux also seems to have something called Thread Context Hooks, it seems (I saw something like this in Linux-specific VBox sources). But on Linux kernel it requires to run in kernel. On Fiasco, it is easily done from userland.

Regarding that it's useless. Yes, it is not the whole OS/2 ecosystem reimplementation on top of Linux kernel, but still, a good progress. Maybe, it will evolve enough with some time. WINE even has it's own Explorer, I heard. So, maybe they could run WPS some time later ;)

PS: I posted some notes in that blog' comments. More comments should follow soon.
« Last Edit: February 23, 2018, 07:14:03 pm by Valery Sedletski »

Roderick Klein

  • Sr. Member
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 9
  • Posts: 274
    • View Profile
Re: 2ine - OS/2 on Linux
« Reply #2 on: February 23, 2018, 08:33:59 pm »
I can not believe I missed this.

1) On December of 2017.  - December 2017 wrapup

Quote
- 2ine: my OS/2 emulator hit a milestone: it has enough of OS/2 TCP/IP implemented to run FINGER.EXE. And we all learned a very valuable lesson about code segments for 32-bit linear address spaces. I'll explain this in a more technical post after everyone recovers from their New Year parties.

2) Jan 21: Project: 2ine - Jan 21

Quote
You have no idea how much effort went into getting this stupid white square on the screen.

He made an OS/2 white screen app to run also on Linux. Useless but very interesting. This guy recreated 14 OS/2 functions to make that square show up.

Even that is not my desire to run OS/2 apps on Linux, (Joke) I feel that I need to protect this guy from not getting killed by the Illuminati Brotherhood (/Joke). I will have to check more about this project.

I wish Ryan the best !! While everybody says it is impossible, at least he is trying.

Regards

This is certainly an achievement, I mean that. But I know IBM tried to do this before...
I heard this at possibly one of the last OS/2 conferences organized by IBM Europe about OS/2.
A large customer had lost the source code for an application they used in a lot of shops in large European country.
IBM from what I understood tried to do the same but then ran into trouble rebuilding the API to run the binaries on Linux with a simuliar approach as this developer is trying todo. Its yeaaars ago since talked to this person. So sorry so more details.

That also note that the developer said implementing this is possibly just as much work as the Linux Wine project.
I think the guys who worked on the Voyager partly got stuck with this as well. Its the graphics library in the PMSHELL not called GPI. Reimplementing this is possibly a very big effort.

Its very interesting but I would not be surprised if he would need some hands to help out on this project.
The first releases of Odin also had a PE to LX converter. I think it was ODIN version 0.0.4.  The very large portion of work is working out all of does API's. Including any potential bugs :-)

Roderick


Valery Sedletski

  • Sr. Member
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 18
  • Posts: 250
    • View Profile
Re: 2ine - OS/2 on Linux
« Reply #3 on: February 23, 2018, 09:18:41 pm »
2 Sergey Posokhov: You seems to confuse something. https://rv8.io/ looks to be like a RISC-V software emulator. RISC-V is a new open source hardware architecture, not a bytecode. There are some development boards manufactured based on this architecture. It is intended as a future opensource replacement for Intel/AMD arch's. At least, I know it being supported by Genode, which is a project I follow too. Note that RISC-V is not yet complete. Genode supports compiling RISC-V binaries for this arch, and running them in another emulator I know, called Spike: https://github.com/riscv/riscv-isa-sim/. https://rv8.io/ is just another RISC-V emulator. I see nothing wrong with it. What is a symptome of illness of software industry?

Also, an author of https://rv8.io/ is Michael J. Clark, whereas 2ine is written by Ryan C. Gordon. I see nothing common between them.

I am a bit sceptical about the idea to run OS/2 binaries on Linux too. But, for example, ReactOS can benefit from WINE. ReactOS has its own kernel, but the user mode DLL's are mostly shared with WINE (though, they need to add some manual modifications to WINE code for porting them to ReactOS. Also, they have an alternative win32 subsystem implementation, called arwinss, which can reuse WINE libraries almost as is).

We also can benefit from 2ine, like ReactOS does from WINE. We can port some code to osFree, and back, so both projects can benefit. ReactOS does contributions back to WINE code, and we can. Also, some ideas exchange would not hurt.
« Last Edit: February 23, 2018, 09:22:36 pm by Valery Sedletski »

Martin Iturbide

  • OS2World NewsMaster
  • Global Moderator
  • Hero Member
  • *****
  • Thank You
  • -Given: 319
  • -Receive: 60
  • Posts: 2072
  • Your Friend Wil Declares...
    • View Profile
    • Martin's Personal Blog
Re: 2ine - OS/2 on Linux
« Reply #4 on: February 23, 2018, 09:35:20 pm »
Hi Valery.

I also support your comments on "We also can can benefit from 2wine, like ReactOS does from WINE."Instead of looking to other projects saying "that is not what I want" or "Its fine but it is missing xyz" it can be more exiting to "add-up" and have two different projects with different goals that benefit together. It can be great to try find some "common ground" when the Linux lovers that wants OS/2 apps on Linux and the OS/2 lovers that want to keep using OS/2 can work together.

Even that I may be dreaming in technicolor and talking without the technical background required, I also think that it may be interesting as a first step to have a full clone of the CPI over a different kernel and "trick" the rest of the components (PM, SOM, WPS) to run on that environment. So, yes, we still will require IBM binaries for PM, SOM, WPS, but it will open the doors to move forward on a long term goal to openness and according to the kernel it runs we may have a benefit of more available drivers and hardware support. But that is still dreaming in technicolor, some will prefer to cut their left arm before changing the kernel :)

At least some of the courseware that I asked IBM permission to republished helped for something :)

Regards

« Last Edit: February 23, 2018, 09:56:24 pm by Martin Iturbide »
Martin Iturbide
OS2World NewsMaster
... just share the dream.

Sergey Posokhov

  • Full Member
  • ***
  • Thank You
  • -Given: 1
  • -Receive: 6
  • Posts: 118
    • View Profile
    • OS/2 API Research
Re: 2ine - OS/2 on Linux
« Reply #5 on: February 24, 2018, 09:12:30 am »
What is a symptome of illness of software industry?
Alongside with discrimination (if he doesn't wrote in language X they will not hire him) the coding monkey should present a masterpiece (showing that he's so experient so he's ready to work for free). I wish him to find a job... but...

Valery Sedletski

  • Sr. Member
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 18
  • Posts: 250
    • View Profile
Re: 2ine - OS/2 on Linux
« Reply #6 on: February 24, 2018, 10:50:29 am »
2Sergey Posokhov: Hmm, where did you took this from? Man tries to write some funny things for fun, and wrote about that in his blog. A masterpiece? Do you mean resume? I don't think he will write about that in his resume. He seems to be experient in game development, mostly based on SDL. So, he took yet another toy project just for fun, just like any retro game simulator. He achieved a good progress with it. He has some good progress, compared to osFree. But looking at his sources at a glance, I now see that he did not advanced significantly, compared to osFree. He has a number of DOSCALLS functions implemented. Some of them are missing in osFree, but some functions we implemented are missing in 2ine. Implemented TCPIP32 API's are just small wrappers around Linux socket functions. VIOCALLS are simply implemented based on NCURSES, so no proper VIO lattice is implemented, yet. PMWIN functions include almost the same set as implemented by FreePM. FreePM has only WinBeginPaint and WinEndPaint missing. Drawing is implemented directly via SDL. No GPI is implemented, yet. Also, on FreePM only a message loop is working, but it does not draw anything on screen. 2ine draws a rectangle on screen, instead of a window. The same simpliest application, creating HAB, message queue, a window and running a message loop. DosExecPgm is implemented via fork(). So, these are only simpliest API's implemented, to almost the same degree as on osFree. The only significant advancement is thunking and 16-bit API wrappers. Also, he successfully runs EMX runtime, and even EMX GCC. osFree can't do that, because we still have no 16-bit functions implemented. But looking how it's implemented in 2ine, we could try implementing the them similar way on L4. Some ideas are very useful to get from 2ine sources. So, ATM these sources can't be directly reused by project like osFree. It directly uses some system functions, and required abstraction layers are missing yet. We hope that it will change in the future. Also, looking at last paragraph of his blog post, I see that he paused the work for another project. It looks like implementing PM API is too complex task for quick progress. But I hope that he will continue the development, so maybe the project will advance much further, who knows. I hope him good luck.

PS: His LX loader looks much cleaner that our LX loader written by Viking. Maybe, we can use it, instead of Viking's one.
« Last Edit: February 24, 2018, 11:15:28 am by Valery Sedletski »

Martin Iturbide

  • OS2World NewsMaster
  • Global Moderator
  • Hero Member
  • *****
  • Thank You
  • -Given: 319
  • -Receive: 60
  • Posts: 2072
  • Your Friend Wil Declares...
    • View Profile
    • Martin's Personal Blog
Re: 2ine - OS/2 on Linux
« Reply #7 on: March 05, 2018, 11:35:02 pm »
Ryan posted a follow up:

- February 2018 wrapup - Mar 4 at 12:52am


Quote
On the 2ine front, I've separated out the API libraries from the OS/2 binary support, which means you can now write native apps that use the OS/2 API. This is roughly equivalent to the split between Wine and Winelib. A side benefit: without concerns about 16-bitness and address space politics, the frameworks are usable on macOS now, too. I don't expect apps to start writing to this API--or even people to migrate OS/2 source code, really--but it will be super-useful for implementing more of the API, since I can just work with the usual 64-bit Linux compiler and not chafe against the debugger anymore, which is easier than trying to copy files off an OS/2 virtual machine.


Regards
Martin Iturbide
OS2World NewsMaster
... just share the dream.