UniPCemu Windows 95/NT progress and issues

Emulation of old PCs, PC hardware, or PC peripherals.

Re: UniPCemu Windows 95 progress and issues

Postby superfury » 2019-1-27 @ 23:53

Just tried again with the optimized version of protection checking, as well as some bugfixes on the new stack checking(it was checking offset+2 for dword accesses and offset+1 for word accesses, resulting in invalid unaligned and even limit overflowing addresses(throwing general protection faults before Windows even gets to boot at all(triple faults even, due to ESP being 0 when pushing a register on the stack)):S ).

But even with said bugfixes, the OS still crashes at the exact same location(Windows 95 OSR 2).
superfury
l33t
 
Posts: 2813
Joined: 2014-3-08 @ 11:25
Location: Netherlands

Re: UniPCemu Windows 95 progress and issues

Postby superfury » 2019-1-29 @ 16:08

Just had a thought: what if I tried to install Windows NT 3.1? With 12MB of RAM that should work(on the Compaq Deskpro 386 with 12MB and a floppy-based installation)?

Currently at least got as far as formatting the hard disk(actually, the IDE controller reveals it's just reading the disk?) for NTFS. Already working in Protected mode since starting the installer.

If it runs, that will rule out problems of 16-bit/32-bit compatibility layers in Windows 95?
Edit: So far gotten up to floppy disk 2. Format is complete, somehow not NTFS(which I remember I chose), but FAT?
Edit: Disk 3...
Edit: Reached reboot...
Edit: STOP 0x0000007F is encountered? Seems to be somewhere within the ntoskrnl.exe?

Lots of more information compared to Windows 95? It's a double fault according to https://support.microsoft.com/en-us/hel ... ngle-bit-e ?

1014-Windows NT 3.1 crashing BSOD.jpg
Interesting ntoskrnl.exe BSOD on Windows NT 3.1?


Edit: Interestingly, I see it invoking a INT3 single-byte instruction(byte CC) just before the blue screen? It's filtered on CPL=0 and non-real mode.

Edit: I see exception #UD on 0FA6, then single step at 0008:801bae71 to kernel 801bae82, then a page fault for access to 0023:00000000(opcode 011A at 0008:80168e00, which is ADD [edx],ebx(EDX=0)?), then a type 3 (CC) interrupt at 80102090(previous opcode was E8) to 0008:801621b0.

Anyone can defer something from this(other than the cause being ntoskrnl.exe)?
superfury
l33t
 
Posts: 2813
Joined: 2014-3-08 @ 11:25
Location: Netherlands

Re: UniPCemu Windows 95/NT progress and issues

Postby superfury » 2019-1-30 @ 14:46

Perhaps that page fault is the cause for the BSOD? The first #UD is just CPU detection code(80486 detection like Windows 95 does).

But the [EDX] where EDX=0 is a cause for a BSOD, since it's a NULL-pointer dereference by ntoskrnl.exe(kernel mode)? So why is it doing that? Why is EDX 0?

Edit: Tried generating a log with the dumped data, but the NULL page fault happens at a different location:
CR3=30000, paging enabled.
TR=28:80203000
CS:EIP=0008:80168E00

That information should server well(ignoring the EIP part) for a simple debugger filter to find out why the NULL dereference in the NT kernel(ntoskrnl.exe) happens?
debugger_windowsNT3.1kernelcrash_UniPCemu_20190128_0022.7z
NT kernel NULL #PF dereference
(1.26 MiB) Downloaded 1 time
superfury
l33t
 
Posts: 2813
Joined: 2014-3-08 @ 11:25
Location: Netherlands

Re: UniPCemu Windows 95/NT progress and issues

Postby superfury » 2019-1-30 @ 22:30

Just found a bug in the interrupt handler mechanism. When handling non-present or null descriptors(for IDT or GDT(loading CS)), it's supposed to throw a #NP fault instead of a #GP fault(as is documented in many documentations). UniPCemu throwed a #GP fault instead, which is incorrect(for emulation or loading by the OS).
superfury
l33t
 
Posts: 2813
Joined: 2014-3-08 @ 11:25
Location: Netherlands

Re: UniPCemu Windows 95/NT progress and issues

Postby superfury » 2019-2-02 @ 14:51

Having reworked and simplified the segment descriptor loading(just checking for NULL entries, table limits and paging), Windows 95 gives a quick kernel STUB error, then the It's safe to turn off your computer screen(in orange text).

The final entry in the bootlog.txt reports:
Code: Select all
[000DC974] INITCOMPLETESUCCESS = SHELL   


Edit: It says(in text mode): "KernSTUB: Error during boot". Then immediately after that it shows the Windows "It's safe to turn off your computer" screen.
superfury
l33t
 
Posts: 2813
Joined: 2014-3-08 @ 11:25
Location: Netherlands

Re: UniPCemu Windows 95/NT progress and issues

Postby superfury » 2019-2-02 @ 22:42

Improving and simplifying segmentation writes still makes the message occur?
superfury
l33t
 
Posts: 2813
Joined: 2014-3-08 @ 11:25
Location: Netherlands

Re: UniPCemu Windows 95/NT progress and issues

Postby superfury » 2019-2-11 @ 16:41

Just improved gate descriptors protection checks according to the CALL instruction documentation.
Also fixed call gates to NULL segment to throw #GP(0) correctly.
superfury
l33t
 
Posts: 2813
Joined: 2014-3-08 @ 11:25
Location: Netherlands

Previous

Return to PC Emulation

Who is online

Users browsing this forum: No registered users and 2 guests