Software for debugging Windows 95's first boot?

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

Software for debugging Windows 95's first boot?

Postby superfury » 2019-4-21 @ 20:40

Is there any software that can be used for debugging Windows 95's first boot(a debugger that can be loaded into memory before Windows starts that lets me actually know what driver is going honky)? It still crashes in my emulator when Windows 95 is booting for the first time, at the "Initializing KERNEL" phase(during Safe Mode boot) and loading the hard disk/CD-ROM driver Protected Mode driver a second time(It says "Initing esdi_506.pdr" directly after "Init Success esdi_506.pdr" (with the same code before it) during Normal boot.
superfury
l33t
 
Posts: 3228
Joined: 2014-3-08 @ 11:25
Location: Netherlands

Re: Software for debugging Windows 95's first boot?

Postby retardware » 2019-4-22 @ 07:24

retardware
Oldbie
 
Posts: 642
Joined: 2019-1-30 @ 02:00

Re: Software for debugging Windows 95's first boot?

Postby superfury » 2019-4-25 @ 13:22

Can Soft-ICE be installed BEFORE Windows performs it's first boot(From MS-DOS 7.x or manually)? If it can't it's useless in my case, since UniPCemu can't get past the "Initializing KERNEL" phase, according to bootlog.txt.

All I see is a Windows installer(which can't be used in UniPCemu's case?).

Edit: Or I can finish the setup on Dosbox, then install Soft-ICE there, finally booting the Soft-ICE enabled Windows 95 disk image in UniPCemu? Although that's not debugging the intended "first boot" anymore.
superfury
l33t
 
Posts: 3228
Joined: 2014-3-08 @ 11:25
Location: Netherlands

Re: Software for debugging Windows 95's first boot?

Postby retardware » 2019-4-25 @ 14:09

superfury wrote:Can Soft-ICE be installed BEFORE Windows performs it's first boot(From MS-DOS 7.x or manually)?


When Windows wants to do its first reboot, just shut down when it's in the BIOS startup phase.
Then insert device=c:\somepath\sice-xx.exe [parms] at the beginning of the firstboot's config.sys.
(You might want to make a backup of the firstboot stage, for repeated debugging without having to install anew)
So Soft-ICE is active before the actual Windows part starts. I'd recommend to use msdos.sys BootGUI=0 anyway, makes things easier. I think the default key to get to S-ICE console is alt-sysrq. Probably it is easiest to set some conditional breakpoint that triggers when Windows enters the "interesting" stage of init.
If it is possible to have DOSBOX include a second monochrome card/monitor, use it that way. S-ICE console on mono, Windows graphics on vga. Way more comfortable!

If you have any question, just ask. I used S-ICE a lot back then, and I am in the process of equipping my retro 486 with a HGC+VGA adapter, because I want to get my DOS screen saver I wrote back in 1990+ fully compatible with W9x. (It cooperates only with 3.x, so I need to "update" it :) )
So I'll have to use S-ICE again and need to get familiar with it again myself...

And, be aware that S-ICE exists in various versions. It is important to use the correct one, because it hooks into some internal Windows stuff, which addresses vary between Windows versions.
retardware
Oldbie
 
Posts: 642
Joined: 2019-1-30 @ 02:00

Re: Software for debugging Windows 95's first boot?

Postby superfury » 2019-4-25 @ 17:08

One simple question: doesn't installation of the Soft-ICE program require Windows to have been started for the installer to run? So that creates a chicken-and-egg problem: I can't start Windows, because it's past the first boot phase at that point(stuff of the OS has been edited during the first boot, thus not having a clean state for the debugger to use), but Windows has to run at least once for the installer to be able to install it's stuff into Windows(which it of course doesn't yet due to CPU emulation bugs afaik)?
superfury
l33t
 
Posts: 3228
Joined: 2014-3-08 @ 11:25
Location: Netherlands

Re: Software for debugging Windows 95's first boot?

Postby kjliew » 2019-4-26 @ 21:02

Then, you will need to use other matured x86 simulator such as Bochs/QEMU and make use of their stable gdbstub and working with gdb. Bochs has its own internal visual debugger with a respective build option, but it can't deal with symbols or source level debugging. That's probably the reason that internal debugger is a moot point if gdbstub is already available, and gdb is a very stable, feature rich and extensible debugging solution. Bochs internal visual debugger was buggy on its first inception as I remember. I hope it had tremendously improved since then. QEMU monitor console only has {stop, continue, disassemble}.
kjliew
Member
 
Posts: 479
Joined: 2004-1-08 @ 03:03


Return to PC Emulation

Who is online

Users browsing this forum: No registered users and 1 guest