Emuforums.com

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

Closed Thread
 
Thread Tools Display Modes
Old August 4th, 2003, 12:43   #1
AnyJoe
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  

Advertisement [Remove Advertisement]

Old August 4th, 2003, 12:55   #2
N1ghtw0lf
Crasher of Castles
 
N1ghtw0lf's Avatar
 
Join Date: Nov 2002
Location: Missouri
Posts: 7,010
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, 13:02   #3
AnyJoe
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, 15:52   #4
Mad
AKA snkmad
 
Mad's Avatar
 
Join Date: Apr 2001
Location: Brazil, Fortaleza-Ceará
Posts: 4,030
Re: Windows Kernel Emulation

it would be a whole new OS or based on linux??
__________________
Main PC:Win 7 SP1 PRO X64 - Asus P5G41C-M LX - Intel Q6600@2.4Ghz - OCZ 2x 2GB DDR2 1000Mhz - Sapphire Vapor-X HD5770 1GB GDDR5 - 19" LCD SyncMaster T190 - Samsung SATA II HD322HJ 320GB
HTPC:Acer Aspire AR1600 - Windows 7 PRO X86 - Atom 230@1.6Ghz - 3GB DDR2 800Mhz - Nvidia ION LE - SATA II WD 160GB + Seagate GoFlex Desk 2TB USB 3.0
Notebook:Dell Inspiron 14R N4110 - Windows 7 SP1 PRO X64 / Ubuntu 12.04 X64 - Intel Core i5 2410M@2.3Ghz - 8GB DDR3@1333Mhz - Intel HD 3000 - WDC SATA II 640GB + SSD Kingston V200 128GB +WD Scorpio Blue 320GB USB 3.0 CASE
Mad is offline  

Old August 4th, 2003, 16:05   #5
AnyJoe
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, 16:11   #6
scottlc
Registered User
 
scottlc's Avatar
 
Join Date: Sep 2002
Location: St Andrews, Scotland
Posts: 1,577
Re: Windows Kernel Emulation

Writing an OS from scratch is a massive undertaking.
__________________
Computer: White MacBook (late 2008) - OS: Mac OS X 10.5.7 - CPU: Intel Core 2 Duo 2.1GHz - Memory: 4GB DDR2 PC2-5300
scottlc is offline  

Old August 4th, 2003, 16:24   #7
Kane
邪魔ゎ指せない
 
Kane's Avatar
 
Join Date: Jan 2002
Location: Gosport, England
Posts: 26,303
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) Phenom II X4, 4Gb DDR2, GeForce 8800 GTS 320Mb, 32Gb OCZ Vertex SSD, 500Gb RAID HDD, Windows 7 Home Premium
Erika: (MCPC) Revo3610, Windows 7 Home Premium
Kimiko: (Craptop) HP Mini 210

Kane is offline  

Old August 4th, 2003, 16:33   #8
AnyJoe
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, 16:43   #9
Kane
邪魔ゎ指せない
 
Kane's Avatar
 
Join Date: Jan 2002
Location: Gosport, England
Posts: 26,303
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) Phenom II X4, 4Gb DDR2, GeForce 8800 GTS 320Mb, 32Gb OCZ Vertex SSD, 500Gb RAID HDD, Windows 7 Home Premium
Erika: (MCPC) Revo3610, Windows 7 Home Premium
Kimiko: (Craptop) HP Mini 210

Kane is offline  

Old August 4th, 2003, 17:01   #10
AnyJoe
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, 17:10   #11
scottlc
Registered User
 
scottlc's Avatar
 
Join Date: Sep 2002
Location: St Andrews, Scotland
Posts: 1,577
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.
__________________
Computer: White MacBook (late 2008) - OS: Mac OS X 10.5.7 - CPU: Intel Core 2 Duo 2.1GHz - Memory: 4GB DDR2 PC2-5300
scottlc is offline  

Old August 4th, 2003, 17:15   #12
AnyJoe
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, 17:18   #13
Demigod
これはバタスです
 
Demigod's Avatar
 
Join Date: Jun 2001
Location: Toronto, Ontario, Canada
Posts: 6,332
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 Mobo: Intel DX48BT2 Memory: 4096 MB PC10600 DDR3 Videocard: PNY Geforce 9800 GX2 Soundcard: On-board SigmaTel High Definition Audio Hard drive: 120 GB OCZ RevoDrive PCI-E SSD & 1 TB Hitachi Optical drive: LG GGW-H20L (2x BD-R DL) PSU: Nexus 1000 Watt PSU OS: Microsoft Windows 7 Ultimate (64-bit)

Proud millionaire folder of the NGEmu folding team
Demigod is offline  

Old August 4th, 2003, 18:08   #14
scottlc
Registered User
 
scottlc's Avatar
 
Join Date: Sep 2002
Location: St Andrews, Scotland
Posts: 1,577
Re: Windows Kernel Emulation

Well it seems to be a waste of time building an open source Windows clone.
__________________
Computer: White MacBook (late 2008) - OS: Mac OS X 10.5.7 - CPU: Intel Core 2 Duo 2.1GHz - Memory: 4GB DDR2 PC2-5300
scottlc is offline  

Old August 4th, 2003, 18:34   #15
Kane
邪魔ゎ指せない
 
Kane's Avatar
 
Join Date: Jan 2002
Location: Gosport, England
Posts: 26,303
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) Phenom II X4, 4Gb DDR2, GeForce 8800 GTS 320Mb, 32Gb OCZ Vertex SSD, 500Gb RAID HDD, Windows 7 Home Premium
Erika: (MCPC) Revo3610, Windows 7 Home Premium
Kimiko: (Craptop) HP Mini 210

Kane is offline  

Old August 4th, 2003, 19:34   #16
RamsusX
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, 19:43   #17
Kane
邪魔ゎ指せない
 
Kane's Avatar
 
Join Date: Jan 2002
Location: Gosport, England
Posts: 26,303
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) Phenom II X4, 4Gb DDR2, GeForce 8800 GTS 320Mb, 32Gb OCZ Vertex SSD, 500Gb RAID HDD, Windows 7 Home Premium
Erika: (MCPC) Revo3610, Windows 7 Home Premium
Kimiko: (Craptop) HP Mini 210

Kane is offline  

Old August 4th, 2003, 19:54   #18
RamsusX
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, 17:07   #19
AnyJoe
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:17   #20
Noxious Ninja
Registered User
 
Noxious Ninja's Avatar
 
Join Date: Oct 2001
Location: teh intarweb
Posts: 1,720
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

Forum Jump

All times are GMT +1. The time now is 07:34.

© 2006 - 2012 Emu Forums | About Emu Forums | Advertisers | Investors | Legal | A member of the Crowdgather Forum Community


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.