Emuforums.com

Go Back   Emuforums.com > General Discussion > Web development / Programming
About Us Register FAQ Members List Calendar Mark Forums Read

Closed Thread
 
LinkBack Thread Tools Display Modes
Old August 4th, 2003   #1 (permalink)
Registered User
 
Join Date: Jul 2003
Posts: 16
Windows Kernel Emulation

I was wondering if it would be possible to produce a "copy" of the windows kernel? That is to say a program that could load windows executables, drivers and other modules.

I assume this is fairly simple load the module into memory, do some gubbins with import/export tables, start a new thread and jump to the program entry point.

I guess what I really want to know is... is this all that the windows kernel does?

I think it is. I think every thing else is handled in some driver or other dll. But I only think this. Am I right?

Before you ask... I'm interested in doing this for a couple of reasons but the main one is to produce an open source alternative to windows that can load and run windows executables. I know WINE sort of does this and all but thats not what I'm trying to do here.
AnyJoe is offline  
Old August 4th, 2003   #2 (permalink)
Crasher of Castles
 
N1ghtw0lf's Avatar
 
Join Date: Nov 2002
Location: Missouri
Posts: 6,836
Re: Windows Kernel Emulation

wouldn't microsoft be a bit...ya know...PO'ed...they are losing money if you were to distribute an open source version...though this brings back memories of the movie antitrust and the open source people won...but anyways...microsoft developed the kernal so you'd actually ahve to ask them to be able to do that...right?
__________________
N1ghtw0lf is offline  
Old August 4th, 2003   #3 (permalink)
Registered User
 
Join Date: Jul 2003
Posts: 16
I dont think so.

My understanding of the legalities of this is that it would be fine.

Its all about binary compatibility. I cannot copy their code since this would be a breach of copyright. But if I produce something that does exactly the same as their code then I think everything is ok. I'll need to check up on this however.
AnyJoe is offline  
Old August 4th, 2003   #4 (permalink)
Mad
AKA snkmad
 
Mad's Avatar
 
Join Date: Apr 2001
Location: Brazil, Fortaleza-Ceará
Posts: 2,954
Re: Windows Kernel Emulation

it would be a whole new OS or based on linux??
__________________
[WinXP SP3] [Gigabyte GA-M61PM-S2] [Athlon64 X2 3800+ @2.00Ghz] [XFX Geforce 8600GT XxX 256MB DDR3] [17" SyncMaster 753v] [Samsung SATA II HD250HJ 250GB] [Kingston 2x1GB DDR2 6400@800MHz CL6] [Samsung CDDVDW SH-S203B] [NVIDIA nForce Networking] [Realtek HD Audio ALC883]
Baldurs Gate Dumps
Mad is offline  
Old August 4th, 2003   #5 (permalink)
Registered User
 
Join Date: Jul 2003
Posts: 16
A whole new OS coded from scratch. Although Linux will probably be used as examples of how to do things.
AnyJoe is offline  
Old August 4th, 2003   #6 (permalink)
Registered User
 
scottlc's Avatar
 
Join Date: Sep 2002
Location: St Andrews, Scotland
Posts: 1,575
Re: Windows Kernel Emulation

Writing an OS from scratch is a massive undertaking.
__________________
OS: Arch Linux w/ Kernel 2.6.23.8 + GNOME 2.20.1 - CPU: Intel Pentium M 1.5GHz - Memory: 1280MB DDR PC2700 - Browser: Mozilla Firefox 2.0.0.10
scottlc is offline  
Old August 4th, 2003   #7 (permalink)
邪魔ゎ指せない
 
Kane's Avatar
 
Join Date: Jan 2002
Location: Gosport, England
Posts: 26,255
Re: Windows Kernel Emulation

The Kernel is not open source. It is an integral part of windows, so MS would be loathe to let it go.
Should you create an OS using said code, you would be very vulnerable to attack from MS.
__________________

>Site Live<
Pop over to my site for help with setting up PSX emulators.
Help for the Final Fantasies and other RPGs avalaible

Celes: (Desktop) Athlon 64 X2 4200+, 2Gb 400MHz DDR Ram, MSI K8N Platinum, GeForce 8800 GTS 320Mb, 500Gb RAID HDD, Vista Business
Erika: (MCPC) Athlon XP 2400+, 1Gb 400MHz DDR Ram, geForce 6800 256Mb, 80Gb Hdd, XP 2005 MCE
Kimiko: (Desktop 2) Athlon 64 3000+, 512Mb 400MHz DDR Ram, Asus K8V, geForce 6800 128Mb

Kane is offline  
Old August 4th, 2003   #8 (permalink)
Registered User
 
Join Date: Jul 2003
Posts: 16
Re: Windows Kernel Emulation

Quote:
Originally Posted by Lord Kane
The Kernel is not open source. It is an integral part of windows, so MS would be loathe to let it go.
Should you create an OS using said code, you would be very vulnerable to attack from MS.
The idea is not to use MS code but to reimplement the kernel. I belive binary compatibility is allowed under copyright law.

Quote:
Originally Posted by scott_uk5
Writing an OS from scratch is a massive undertaking.
I would like to know how much of an undertaking. Is it out of the scope of the open source community?

I think the basic requirement to be able to run windows programs would be re-implementations of kernel32.dll and ntdll.dll. I believe these two files mainly drive device drivers to do the majority of the work.
AnyJoe is offline  
Old August 4th, 2003   #9 (permalink)
邪魔ゎ指せない
 
Kane's Avatar
 
Join Date: Jan 2002
Location: Gosport, England
Posts: 26,255
Re: Windows Kernel Emulation

Quote:
The idea is not to use MS code but to reimplement the kernel. I belive binary compatibility is allowed under copyright law.
Do you know why WineX costs? Because they have to pay lisencing fees.
Quote:
I would like to know how much of an undertaking. Is it out of the scope of the open source community?
It's a massive undertaking. It's not like simply writing a small C++ app. It's not even like writing a a big app like Quake 3.
There is a reason MS charges over a hundred quid for it.
__________________

>Site Live<
Pop over to my site for help with setting up PSX emulators.
Help for the Final Fantasies and other RPGs avalaible

Celes: (Desktop) Athlon 64 X2 4200+, 2Gb 400MHz DDR Ram, MSI K8N Platinum, GeForce 8800 GTS 320Mb, 500Gb RAID HDD, Vista Business
Erika: (MCPC) Athlon XP 2400+, 1Gb 400MHz DDR Ram, geForce 6800 256Mb, 80Gb Hdd, XP 2005 MCE
Kimiko: (Desktop 2) Athlon 64 3000+, 512Mb 400MHz DDR Ram, Asus K8V, geForce 6800 128Mb

Kane is offline  
Old August 4th, 2003   #10 (permalink)
Registered User
 
Join Date: Jul 2003
Posts: 16
Re: Windows Kernel Emulation

Quote:
Originally Posted by Lord Kane
Do you know why WineX costs? Because they have to pay lisencing fees.
I dont think the fees go to microsoft they go to TransGaming Technologies.

Quote:
Originally Posted by Lord Kane
There is a reason MS charges over a hundred quid for it.
Linux was a massive undertaking but it was worth it. NTDLL + KERNEL32 = about 1MB. Thats not all that huge an amount of code. I think the vast majority of code is stored in drivers which could be loaded by the new OS.
AnyJoe is offline  
Old August 4th, 2003   #11 (permalink)
Registered User
 
scottlc's Avatar
 
Join Date: Sep 2002
Location: St Andrews, Scotland
Posts: 1,575
Re: Windows Kernel Emulation

Linux has taken many years to develop. Just out of interest, what programming skills do you have. C++ and ASM is a definate must.
__________________
OS: Arch Linux w/ Kernel 2.6.23.8 + GNOME 2.20.1 - CPU: Intel Pentium M 1.5GHz - Memory: 1280MB DDR PC2700 - Browser: Mozilla Firefox 2.0.0.10
scottlc is offline  
Old August 4th, 2003   #12 (permalink)
Registered User
 
Join Date: Jul 2003
Posts: 16
I have about 10 years writing code in c++. I tend to concider my ASM as fairly good but its main used for bebugging. I can normally translate ASM back into c. I was rather hoping that I wouldnt be alone in this though.
AnyJoe is offline  
Old August 4th, 2003   #13 (permalink)
これはバタスです
 
Demigod's Avatar
 
Join Date: Jun 2001
Location: Toronto, Ontario, Canada
Posts: 5,811
Re: Windows Kernel Emulation

There's over 2 million lines of code under Windows's hood, and at least 10,000 of them for the kernel. Good luck trying to emulate it.
__________________
CPU: Intel Core 2 Quad Q9450 @ 2.66 Ghz (Yorkfield) Mobo: Intel DX48BT2 Memory: 2048 MB PC10600 DDR3 Videocard: PNY Geforce 9800 GX2 PCIe w/ 1024 MB GDDR3 Soundcard: On-board SigmaTel High Definition Audio Hard drive: 300 MB Maxtor & 1 TB Hitachi Optical drive: LG GGW-H20L (2x BD-R DL) OS: Microsoft Windows Vista (32-bit)
Demigod is offline  
Old August 4th, 2003   #14 (permalink)
Registered User
 
scottlc's Avatar
 
Join Date: Sep 2002
Location: St Andrews, Scotland
Posts: 1,575
Re: Windows Kernel Emulation

Well it seems to be a waste of time building an open source Windows clone.
__________________
OS: Arch Linux w/ Kernel 2.6.23.8 + GNOME 2.20.1 - CPU: Intel Pentium M 1.5GHz - Memory: 1280MB DDR PC2700 - Browser: Mozilla Firefox 2.0.0.10
scottlc is offline  
Old August 4th, 2003   #15 (permalink)
邪魔ゎ指せない
 
Kane's Avatar
 
Join Date: Jan 2002
Location: Gosport, England
Posts: 26,255
Re: Windows Kernel Emulation

Quote:
I dont think the fees go to microsoft they go to TransGaming Technologies.
They still have to pay license fees, even if the cashgoes to transgaming at first.
__________________

>Site Live<
Pop over to my site for help with setting up PSX emulators.
Help for the Final Fantasies and other RPGs avalaible

Celes: (Desktop) Athlon 64 X2 4200+, 2Gb 400MHz DDR Ram, MSI K8N Platinum, GeForce 8800 GTS 320Mb, 500Gb RAID HDD, Vista Business
Erika: (MCPC) Athlon XP 2400+, 1Gb 400MHz DDR Ram, geForce 6800 256Mb, 80Gb Hdd, XP 2005 MCE
Kimiko: (Desktop 2) Athlon 64 3000+, 512Mb 400MHz DDR Ram, Asus K8V, geForce 6800 128Mb

Kane is offline  
Old August 4th, 2003   #16 (permalink)
Ramsus K
 
Join Date: Mar 2003
Location: Oklahoma
Posts: 461
AnyJoe: An open source clone of Windows NT is already in development (has been for a few years now). For the uninformed, it's called ReactOS. Consider joining their effort. Keep in mind that reimplementing the Windows NT kernel is no easy task, and doesn't involve just rewriting a few DLLs. That's why ReactOS only works with a few console applications and has some basic GDI functionality, despite having been in development for so long.

Lord Kane: Transgaming doesn't have to pay any licensing fees to Microsoft. They don't use any of Microsoft's code. Reverse engineering and alternative implementations of software interfaces (even binary-compatible ones) are completely legal and require the author(s) to pay no royalties to anyone. If you want, I can write a long essay citing a variety of sources that explains why this is so.
RamsusX is offline  
Old August 4th, 2003   #17 (permalink)
邪魔ゎ指せない
 
Kane's Avatar
 
Join Date: Jan 2002
Location: Gosport, England
Posts: 26,255
Re: Windows Kernel Emulation

I was under the impression that WineX use licensed code to run (DirecX stuff)
__________________

>Site Live<
Pop over to my site for help with setting up PSX emulators.
Help for the Final Fantasies and other RPGs avalaible

Celes: (Desktop) Athlon 64 X2 4200+, 2Gb 400MHz DDR Ram, MSI K8N Platinum, GeForce 8800 GTS 320Mb, 500Gb RAID HDD, Vista Business
Erika: (MCPC) Athlon XP 2400+, 1Gb 400MHz DDR Ram, geForce 6800 256Mb, 80Gb Hdd, XP 2005 MCE
Kimiko: (Desktop 2) Athlon 64 3000+, 512Mb 400MHz DDR Ram, Asus K8V, geForce 6800 128Mb

Kane is offline  
Old August 4th, 2003   #18 (permalink)
Ramsus K
 
Join Date: Mar 2003
Location: Oklahoma
Posts: 461
No, they created their own DirectX implementation (which is really more of a DirectX wrapper around OpenGL) that works better than the incomplete implementation the official WINE project already had. They also fixed up the code so certain often-used installers would work with WINE. They claimed they would release their code back to the WINE project after a while, but after failing to do so, the WINE Project switched to the LGPL license.
RamsusX is offline  
Old August 5th, 2003   #19 (permalink)
Registered User
 
Join Date: Jul 2003
Posts: 16
Re: Windows Kernel Emulation

Quote:
Originally Posted by RamsusX
AnyJoe: An open source clone of Windows NT is already in development (has been for a few years now). For the uninformed, it's called ReactOS. Consider joining their effort. Keep in mind that reimplementing the Windows NT kernel is no easy task, and doesn't involve just rewriting a few DLLs. That's why ReactOS only works with a few console applications and has some basic GDI functionality, despite having been in development for so long.
Cheers RamsusX, thats exactly what I've been looking for.
AnyJoe is offline  
Old August 5th, 2003   #20 (permalink)
Registered User
 
Noxious Ninja's Avatar
 
Join Date: Oct 2001
Location: teh intarweb
Posts: 1,718
Re: Windows Kernel Emulation

Quote:
Originally Posted by Lord Kane
I was under the impression that WineX use licensed code to run (DirecX stuff)
IIRC, it is for the copy protection technologies (such as SafeDisc), so they wouldn't be sued under the DMCA.
__________________
09 f9 11 02 9d 74 e3 5b d8 41 56 c5 63 56 88 c0
Noxious Ninja is offline  
Closed Thread

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT. The time now is 17:25.

© 2006 - 2008 Emu Forums | About Emu Forums | Legal | A member of the Crowdgather Forum Community


Powered by vBulletin® Version 3.7.0 Release Candidate 3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0 RC5