austanss wrote:
Often, beginners in OSDEV imagine their OS being compatible with all the major operating systems.
Are you sure they do that? Windows is millions of lines of code - none of it written for fun. Who are these people who think they can replicate that on their own? I doubt many programmers who actually program would make a claim that they could write and debug millions of lines of code on their own.
Quote:
However... wine is the best (not an emulator!) compatibility layer we have in this field so far, and it is still notorious in 2024 for being unreliable. Sure, it's made substantial progress, but many Windows programs that many users find very important (Adobe Creative Cloud, Visual Studio, ROBLOX) still do not work reliably.
What is your scope? I believe WINE runs anything that conforms to published specs. If you choose to run software that goes beyond the actual documented API - whose fault is that?
Quote:
There have been many notable attempts at supporting another operating system's software, to varying degrees of success. The (esoteric) Longene project, the entirety of the 20-year-old ReactOS project, Wine, and even Managarm who aims for source compatibility rather than binary compatibility.
On the surface, it seems relatively simple.
Programming anything substantial is rarely simple. Are you a programmer who thinks it is simple? How much would you charge me to write a C compiler? It will require about 10,000 lines of code. Far less than the number of lines of code in Windows.
Quote:
Support another system's syscall interface (of which, many do not conflict, as Linux uses interrupt 0x80, and Windows uses interrupt 0x2a IIRC, making multi-compat possible), and the rest of the cards should fall in line, right?
Obviously not, but why?
The published API for Windows is to use DLLs, not an interrupt.
Regardless, what's your scope? PDOS/386 runs both Linux programs that use int 0x80, and Windows programs that use kernel32.dll or msvcrt.dll. It has the OS/2 API (also DLLs too). And another interface called PDOS-generic.
The supported API is a subset of what Windows etc supports. A subset that can be achieved by a single programmer. And sufficient to support an entire toolchain to allow self-hosting.
So yes - if you show me the programmer you refer to who wants compatibility, and show me to what extent he wants that compatibility - then yes, it can be done already. And has been done already. WINE is just one example. It already satisfies any reasonable goal. Way above what is reasonable for a single programmer to achieve.