itsmattkc / dotnet9x Goto Github PK
View Code? Open in Web Editor NEWBackport of .NET 2.0 - 3.5 to Windows 9x
Backport of .NET 2.0 - 3.5 to Windows 9x
I tried installing this on my Windows 98 SE machine (probably very stupid) and now it hangs when it tries to boot. I'm able to get it to start in safe mode. How do I go about uninstalling? Would a whole OS re-install be in order?
I know that NT4 is not 9x, but it is the counterpart to Windows 95 and only supports up to net framework 1.1, which is very basic.
I tried installing it on an NT4.0 SP6a installation with IE6SP1 installed and it doesn't work. On the other hand, great job supporting Windows 95.
These .NET Frameworks can't capable with win95 but can work with win98-me.Could you fix the problem?
I know that NT4 is not 9x, but it is the counterpart to Windows 95 and only supports up to net framework 1.1, which is very basic.
I tried installing it on an NT4.0 SP6a installation with IE6SP1 installed and it doesn't work. On the other hand, great job supporting Windows 95.
is it possible to compile this from source code only?
A good mystery is always too alluring to try and solve.
NDP stands for .NET Development Platform. HLPR stands for "helper".
I would then guess that the driver is there to give .NET access to the kernel and hardware.
No idea what the request code and response from the YT video is for, but if I were to guess, since it's on startup, it's a check to see what version of the .vxd is installed to know what features the current version has access to.
.NET includes ngen
, the Native Image Generator, it's run during the install process and compiles much of the MSIL bytecode into x86 assembly code ahead of time, however this process isn't done during the dotnet9x setup, and after setup appears to fail in an odd way.
When running ngen install "mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
as the original setup would, it prints a lot of (expected) warnings to the console, compilation appears to complete? However installation to the assembly cache fails with E_INVALIDARG
, this appears to happen for every assembly:
Examples on Windows 98 (where this should definitely work):
ngen
, while not needed does drastically improve startup performance where available and would be especially helpful on older, slower machines running Windows 9x.
Since this is a project that could see more general talk on using it and discussing debugging various .NET applications (or writing new ones on 3.5 to use on 95!), I feel like it might make sense to have the discussion tab enabled here.
Great work on the backport and the "movie" about it!
I wrote a whole blogpost about what ndphlpr.vxd does lel
Since the project intercepts the call to DeviceIoControl and forces OutBuffer to 0x40 while ndphlpr.vxd is not really loaded, mscorwks.dll will try to use non-functional APIs for Thread::SuspendThread and ResumeThread
https://pub31415.bearblog.dev/what-ndphlprvxd-does/
I cant test it though, since I dont have .NET on me.
This reimplementation of the function is obviously not atomic:
Lines 1777 to 1789 in ee01c8e
However, this could be properly implemented in assembly via CMPXCHG
if you require at least a 486 processor. Windows 95 requires at least a 386, so this would mean excluding only the oldest supported processor family for a correct implementation.
Detecting if the system is at least a 486 is also trivial, due to being able to set the AC bit in EFLAGS from user mode (https://en.wikipedia.org/wiki/FLAGS_register).
Error log:
error.log
there is nothing here ๐ก๐ก๐ก
Very odd one here, mscorlib.dll as installed by dotnet9x seems to be missing the System.DateTimeOffset
type?
(Left, dotnet9x mscorlib, right, .NET 2.0 mscorlib as present on Windows 11)
Loading the binaries in JustAssembly versus a known good mscorlib.dll shows the following APIs are also missing:
System.GCCollectionMode
System.GCNotificationStatus
System.GC
System.Collections.Generic.ArraySortHelper<T>
(and friends)System.Reflection.Emit.DynamicAssemblyFlags
System.Reflection.Emit.GenericFieldInfo
System.Runtime.GCLatencyMode
System.Runtime.CompilerServices.JitHelpers
System.Runtime.InteropServices.AllowReversePInvokeCallsAttribute
System.Runtime.InteropServices.SafePointer
System.Runtime.Serialization.SurrogateForCyclicalReference
System.Security.SecuritySafeCriticalAttribute
System.Security.SecuritySafe
System.Security.Policy.IDelayEvaluatedEvidence
System.Security.Policy.IReportMatchMembershipCondition
System.Threading.ThreadPoolGlobals
System.Threading.ThreadPoolRequestQueue
I'm honestly not sure where these APIs went? Sorta wondering where the mscorlib.dll
you're using here came from, it could be a .NET 3.5 thing? But then DateTimeOffset
was added in .NET 2.0? It's very strange.
It should be possible to hide the console of the executed child programs like gacutil
ExecShellWait "" app parameters SW_HIDE
(NSIS 3 but that still works on 95 if you turn off Unicode)Hello, here is the problem:
and then whole OS hangs and didn't respond to any clicks.
Windows 95 OSR2.1 Polish + USB Supplement Patch + IE 5.01 PL are installed, as you said.
I don't know that error depends on VBox or my localized Polish version of Windows, but I tried three times with the same result. I can't test it on real hardware, because I have only modern machines. Did I something wrong or can you reproduce error with your setup?
My host is a HP notebook with Ryzen 5500U + Windows 11. I gave that VM 64 MB of RAM and all others are set to VBox default values for Windows 95.
My Setup:
86box with
i430FX ASUS P/I-P55TP4XE
Intel Pentium with Frequency set to 120
64MB RAM
Windows 95 OSR 2.5
IE 5.51 (5.51.4807.2300)
USB Supplemental Installed
Paint.NET version 3.36 (should run with .NET 3.5, SetupShim.exe fails due to an unsupported version of Windows)
Installation fails after launching SetupFrontEnd.exe with following error
System.ComponentModel.Win32Exception: CreateFileMappingW() returned NULL (120)
at PaintDotNet.SystemLayer.SinglelnstanceManager.. ctor(String moniker)
at PaintDotNet.Setup.SetupWizard.GetAppSinglelnstanceManager()
at PaintDotNetSetup.SetupWizard.MainImpl(String[] args)
at PaintDotNetSetup.SetupWizard.Main(String[] args)
I also launched the Lego Island Rebuilder to test if my .NET installation is even working and i am getting the following error code
I would assume that my IE installation may be too new so I am going to setup a fresh Win95 installation later but wanted to give a heads up with these issues.
EDIT: 2024-04-33
Turns out the version of Rebuilder I tested was not the .NET 2.0 build, tried again with the .NET one and Rebuilder opened successfully. Removed the Error in this issue as that would be more appropriate to be reported in the Lego Island Rebuilder repository.
While you may be quite limited by what debuggers will run on Windows 9x, you can bypass this problem by using a GDB stub (like this one) and debugging remotely from the VM host OS. A remote GDB session means you can use any GDB capable debugger including VS Code and probably Ghidra.
I forgot (because I haven't done remote win32 debugging in a long time) but there are prebuilt mingw64 32-bit builds of GDB and the really old mingw builds of GDB(but they need mingw DLLs IIRC) which are suitable for the same purpose.
I hope this suggestion helps.
Some assemblies from .NET 3.x seem to be missing from the installer.
Example: ShareX is missing System.Xml.Linq
Other assemblies that seem to be missing include
WindowsBase
PresentationFamework.*
PresentationCore
PresentationUI
WindowsFormsIntegration
System.AddIn
System.ComponentModel.DataAnnotations
System.Data.DataSetExtensions
System.Data.Entity
System.Data.Linq
System.IdentityModel
System.Printing
System.Runtime.Serialization
(v3.0.0.0)System.Speech
System.ServiceModel.*
System.Transactions
System.Workflow.*
System.Net
(v3.5.0.0)& probably more, my reference system includes Visual Studio and Office 2003 so it's a little hard to parse what's added by those vs. what's included purely in .NET
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.