NexNix and NexOS

This forums is for OS project announcements including project openings, new releases, update notices, test requests, and job openings (both paying and volunteer).
nexos
Member
Member
Posts: 1078
Joined: Tue Feb 18, 2020 3:29 pm
Libera.chat IRC: nexos

NexNix and NexOS

Post by nexos »

I would like to officially announce two OS projects I am working on in parallel. First is NexNix. This is a Unix like operating system. It will be POSIX compliant, and quite far into development. Second, there is NexDOS, which is going to be MS-DOS compatible. It is written in C with Smaller C. Also, as a side project, there is an MFC Windows app named NexSuite, which I am slowly developing. The aim of these projects is to show just how far and successful a hobby project can get.

UPDATE: NexDOS's kernel will be implemented in Assembly instead of C.
Last edited by nexos on Mon Jun 22, 2020 5:07 am, edited 2 times in total.
"How did you do this?"
"It's very simple — you read the protocol and write the code." - Bill Joy
Projects: NexNix | libnex | nnpkg
User avatar
bzt
Member
Member
Posts: 1584
Joined: Thu Oct 13, 2016 4:55 pm
Contact:

Re: NexNix and NexDOS

Post by bzt »

Looks good, well done!

I'm just curious, why do you implement two OSes? Why don't you provide a compatibility layer in NexNix and run NexDOS processes in VM86? That's how OS/2 did run MS-DOS applications, btw. With this scheme you would only have to write device drivers for NexNix, and NexDOS could utilize them right away (through emulated BIOS or DOS interrupts for example).

Cheers,
bzt
nexos
Member
Member
Posts: 1078
Joined: Tue Feb 18, 2020 3:29 pm
Libera.chat IRC: nexos

Re: NexNix and NexDOS

Post by nexos »

I work on NexNix for two days, and then NexDOS for two. I can't use VM86 because NexNix is going to become 64 bit very soon, and I plan on eventually making a Windows 95 emulator to run on top of NexDOS, like how Microsoft did it.
Last edited by nexos on Tue Jun 09, 2020 2:41 pm, edited 1 time in total.
"How did you do this?"
"It's very simple — you read the protocol and write the code." - Bill Joy
Projects: NexNix | libnex | nnpkg
PeterX
Member
Member
Posts: 590
Joined: Fri Nov 22, 2019 5:46 am

Re: NexNix and NexDOS

Post by PeterX »

nexos wrote:...and I plan on eventually making a Windows 95 emulator to run on top of NexDOS.
Woah, Win95 emu is a tough task. Reactos does something similar and it has millions lines of code!
And Win95 on DOS-like OS is like an elephant sitting on a pea. I don't recommend that. But hope is the last thing to die; so go for it if you really want.
PeterX
Member
Member
Posts: 590
Joined: Fri Nov 22, 2019 5:46 am

Re: NexNix and NexDOS

Post by PeterX »

nexos wrote:like how Microsoft did it.
I don't understand what you mean. You mean Windows 3.1?
thewrongchristian
Member
Member
Posts: 424
Joined: Tue Apr 03, 2018 2:44 am

Re: NexNix and NexDOS

Post by thewrongchristian »

PeterX wrote:
nexos wrote:like how Microsoft did it.
I don't understand what you mean. You mean Windows 3.1?
Windows 95 was run atop DOS much in the same way Windows 3.11 was.

Novell even showed a Windows 95 running on top of DR-DOS as part of their suit against Microsoft.

if I understand it correctly, later Windows 3.1 and Win95 hooked in protected mode drivers beneath DOS, so it was a bit like a vm86 mode DOS sandwhich made with protected mode bread. Hideous, and not something to emulate lightly!
PeterX
Member
Member
Posts: 590
Joined: Fri Nov 22, 2019 5:46 am

Re: NexNix and NexDOS

Post by PeterX »

thewrongchristian wrote:Windows 95 was run atop DOS much in the same way Windows 3.11 was.

Novell even showed a Windows 95 running on top of DR-DOS as part of their suit against Microsoft.

if I understand it correctly, later Windows 3.1 and Win95 hooked in protected mode drivers beneath DOS, so it was a bit like a vm86 mode DOS sandwhich made with protected mode bread. Hideous, and not something to emulate lightly!
Yes, you are right, Win95 was ontop of DOS. But, as you said, it is not to be rewritten or emulated lightly. The Win95's complexity is far higher than DOS's one.

(I don't think if you described Win95's internals right. But that's not important for the original poster. Important is, if he is willing to aim at such a high target. It took lots of programmers to write Win95, ReactOS and Wine. So you better get help if you really want to do emulate that.)

Greetings
Peter
nexos
Member
Member
Posts: 1078
Joined: Tue Feb 18, 2020 3:29 pm
Libera.chat IRC: nexos

Re: NexNix and NexDOS

Post by nexos »

It will be difficult, but I have dreamed of doing that for quite some years. It will probably take a quite a few years, but it will be worth it. If anyone wants to help contribute to NexDOS and soon NexWin (my Win95 emulator), just reply and say you do.
"How did you do this?"
"It's very simple — you read the protocol and write the code." - Bill Joy
Projects: NexNix | libnex | nnpkg
nexos
Member
Member
Posts: 1078
Joined: Tue Feb 18, 2020 3:29 pm
Libera.chat IRC: nexos

Re: NexNix and NexDOS

Post by nexos »

UPDATE: Because NexWin is a BIG project, I am going to use FreeDOS as the base layer. I will not make NexDOS, as there is no point in reinventing the wheel.
"How did you do this?"
"It's very simple — you read the protocol and write the code." - Bill Joy
Projects: NexNix | libnex | nnpkg
kzinti
Member
Member
Posts: 898
Joined: Mon Feb 02, 2015 7:11 pm

Re: NexNix and NexDOS

Post by kzinti »

thewrongchristian wrote:Windows 95 was run atop DOS much in the same way Windows 3.11 was.
That is false. Windows 95 didn't run on top of DOS.

I should know, I worked on graphics drivers for both Windows 3.11 and Windows 95 in the 90s.

From https://en.wikipedia.org/wiki/Windows_95:
When the graphical user interface is started, the virtual machine manager takes over the filesystem-related and disk-related functionality. MS-DOS itself is demoted to a compatibility layer for 16-bit device drivers.[16] This contrasts with earlier versions of Windows which rely on MS-DOS to perform file and disk access (Windows for Workgroups 3.11 could also largely bypass MS-DOS when 32-bit file access and 32-bit disk access were enabled). Keeping MS-DOS in memory allows Windows 95 to use DOS device drivers when suitable Windows drivers are unavailable. Windows 95 is capable of using all 16-bit Windows 3.x drivers.
PeterX
Member
Member
Posts: 590
Joined: Fri Nov 22, 2019 5:46 am

Re: NexNix and NexDOS

Post by PeterX »

kzinti wrote:
thewrongchristian wrote:Windows 95 was run atop DOS much in the same way Windows 3.11 was.
That is false. Windows 95 didn't run on top of DOS.

I should know, I worked on graphics drivers for both Windows 3.11 and Windows 95 in the 90s.
Thanks for the correction, I didn't remember that anymore. I used Win95 back then and it had DOS available. So it led me to the wrong conclusion it was ontop of DOS.
nexos wrote:UPDATE: Because NexWin is a BIG project, I am going to use FreeDOS as the base layer. I will not make NexDOS, as there is no point in reinventing the wheel.
Good to hear, because there are so many DOS clones out there (See the OS project thread in "Announcements").

Perhaps you could cut the NexWin project into smaller chunks or milestones. Don't know. It doesn't need to have 100% compatibility, does it?

There is a public domain project aiming at producing a PD Windows "clone" or so. But the maintainer isn't the most pragmatical guy IMHO. He's actually here at the forum. At least he was here to announce some milestone about self hosting his DOS/Unix-style OS. I'm not sure if he still tries to produce a Windows replacement.
viewtopic.php?f=2&t=36735

EDIT: I quote from his project webpage:
The 32-bit version is now known as PD-Windows, as it supports some of the Win32 API, allowing a subset of Windows executables to be run. It sits on top of 32-bit PDOS/386.
Greetings
Peter
nexos
Member
Member
Posts: 1078
Joined: Tue Feb 18, 2020 3:29 pm
Libera.chat IRC: nexos

Re: NexNix and NexDOS

Post by nexos »

No not fully compatible with Windows 95. For example, I don't have very many plans of supporting DirectX functions. Also, there will be no Win16 subsystem, and a few other features will be cut. It is mainly a learning project for me and anyone who wants to know how Windows 9x worked.
"How did you do this?"
"It's very simple — you read the protocol and write the code." - Bill Joy
Projects: NexNix | libnex | nnpkg
nexos
Member
Member
Posts: 1078
Joined: Tue Feb 18, 2020 3:29 pm
Libera.chat IRC: nexos

Re: NexNix and NexDOS

Post by nexos »

NexWin update: A Windows 9x clone is going to be impossible to build under the Linux. I have decided to clone NT 3.1 instead, as I feel that this is a more stable OS, and easier to do under Linux. Plus, it will reduce dependence on FreeDOS, Please share your thoughts on this major change.
"How did you do this?"
"It's very simple — you read the protocol and write the code." - Bill Joy
Projects: NexNix | libnex | nnpkg
PeterX
Member
Member
Posts: 590
Joined: Fri Nov 22, 2019 5:46 am

Re: NexNix and NexDOS

Post by PeterX »

nexos wrote:NexWin update: A Windows 9x clone is going to be impossible to build under the Linux. I have decided to clone NT 3.1 instead, as I feel that this is a more stable OS, and easier to do under Linux. Plus, it will reduce dependence on FreeDOS, Please share your thoughts on this major change.
1.) I don't understand exactly why Win9x isn't possible on Linux. But maybe you mean 16bit code? Yes, that's difficult on Linux, but you could build Win9x without DOS support. But I've heard NT is better designed than 95/98. I don't know if that's true. But that would be a good point for choosing NT.

2.) I still think you are overstrained by this task. But if you like the learning experience than it is ok (You don't have to clone Windows completely to learn a lot :) ).

3.) Ever thought joining Wine, ReactOS or PDWindows? Or taking source code from them?

EDIT: I noticed a bug in your makefile: If you write several commands after a target, they can possibly (and probably will) be executed parallel, not serial!
So this is wrong:

Code: Select all

WIN.COM: ...
        nasm ... -o WIN.BIN
        mv WIN.BIN WIN.COM
Same with other targets.

Greetings
Peter
nexos
Member
Member
Posts: 1078
Joined: Tue Feb 18, 2020 3:29 pm
Libera.chat IRC: nexos

Re: NexNix and NexDOS

Post by nexos »

One big reason I am switching is because after researching Windows 9x, I have noticed a lot of security and stability bugs. The amount of thunking, the concept of so many virtual machines, the close ties to IA32, the use of V8086 mode, the dependence on DOS, and many other things make it very poorly designed. I think NT is a lot better, and I am a lot more familiar with NT then 9x. So I will clone NT instead. Yes, it is a learning project. It may take me 5 years. Maybe 40. I just want to learn a lot about NT and OSDev in general. And I love huge challenges. It would be difficult to develop under Linux because of VxDs. They are closely tied to Visual Studio.
"How did you do this?"
"It's very simple — you read the protocol and write the code." - Bill Joy
Projects: NexNix | libnex | nnpkg
Post Reply