Windows 95 design issue?

Discussions on more advanced topics such as monolithic vs micro-kernels, transactional memory models, and paging vs segmentation should go here. Use this forum to expand and improve the wiki!
Post Reply
nkeck72
Posts: 9
Joined: Mon Oct 05, 2015 11:22 am
Libera.chat IRC: nkeck72

Windows 95 design issue?

Post by nkeck72 »

I have been trying to get Windows 95 to boot on my old Dell Latitude d505 laptop for a while now. Since I do not have a hard drive for the machine, I have enabled USB emulation in the BIOS which makes a USB flash drive appear to be (and pretty much act like) an ATA hard disk. When Windows 95 tries to boot, it just hangs. No "Starting Windows 95...", no safe mode menu, just a blinking cursor. So, when I stepped through the debugger, the instruction that causes it to hang surprised me:
AX=0201 BX=0700 CX=0001 DX=0080 SP=7BD2 BP=7C00 SI=7BD2 DI=052D
DS=0000 ES=0000 SS=0000 CS=0000 IP=7D6C NV UP DI PL NZ NA PO NC
0000:7D6C CD13 INT 13
Upon executing this instruction, the computer seems to read the sector Windows 95 is getting at (the disk activity light blinks) but then the computer immediately freezes, acting as though it hit a HLT with IF=0. An image of the laptop screen with the debugger running is attatched.
Edit: Board will not let me post the image, apparently max file size is 64KiB
Edit Edit: Uploaded in PNG form. :D
Edit Edit Edit: Says PNG is inavlid. :(
It won't take long if you take it one byte at a time.
nkeck72
Posts: 9
Joined: Mon Oct 05, 2015 11:22 am
Libera.chat IRC: nkeck72

Re: Windows 95 design issue?

Post by nkeck72 »

For those who are wondering, that was just stepping through the bootsector code when it crashed. IDK if the kernel has any issues.

Also, I am aware of the 2.1 GHz processor speed issue, and the laptop is running at 600MHz. So it isn't the processor. I know that it can't be the hardware, because setup ran and rebooted fine. The reboot after all setup is done (i.e. after setting up username and password, after saving registry info, after final reboot) is when this issue crops up. It also happens on Windows 98 SE, but I haven't run the debugger through it yet. Suggestions?

Edit: I may have the wrong topic here. I just want to know if it is a serious issue, as I was going to use this laptop to test my OS.
It won't take long if you take it one byte at a time.
Octocontrabass
Member
Member
Posts: 5568
Joined: Mon Mar 25, 2013 7:01 pm

Re: Windows 95 design issue?

Post by Octocontrabass »

Windows 95 was never designed to boot from a USB flash drive, so I wouldn't call this a Windows 95 design issue.
nkeck72 wrote:Since I do not have a hard drive for the machine, I have enabled USB emulation in the BIOS which makes a USB flash drive appear to be (and pretty much act like) an ATA hard disk.
Emulation makes the flash drive accessible using INT 0x13. It does not make the disk appear to be an ATA hard disk. In fact, it may not appear as a hard disk at all - many BIOSes will automatically choose between hard disk and floppy disk emulation based on the contents of the flash drive.

How big is the flash drive? Do the contents of the boot sectors make sense? If you replace the boot code (and only the code, none of the data) with something that displays the value of DL and halts, what value does it display?

nkeck72 wrote:Edit: Board will not let me post the image, apparently max file size is 64KiB
You can upload it somewhere else. Try this site. (You don't need to create an account.)
Ready4Dis
Member
Member
Posts: 571
Joined: Sat Nov 18, 2006 9:11 am

Re: Windows 95 design issue?

Post by Ready4Dis »

Yes, you are emulating a hard drive using int 0x13. This doesn't really do anything for windows as once it loads its own drivers it doesn't use in t0x13 anyways. Also, windows will crap out with to much ram as well (see this http://support.microsoft.com/kb/q253912/)

http://ubuntuforums.org/showthread.php?t=1703888 -> A guide for windows 95 for unbuntu, but the general idea is the same irregardless.
nkeck72
Posts: 9
Joined: Mon Oct 05, 2015 11:22 am
Libera.chat IRC: nkeck72

Re: Windows 95 design issue?

Post by nkeck72 »

How big is the flash drive?
The flash drive is 3.7 GB formatted with FAT32.
If you replace the boot code (and only the code, none of the data) with something that displays the value of DL and halts, what value does it display?
It displays 0x80, so the first hard disk. I have done testing in DOS, and it appears as drive C:.
Do the contents of the boot sectors make sense?
What exactly do you mean by this question? If you mean it has the 0xAA55 signature and the code looks correct then yes.
Also, windows will crap out with to much ram as well
I have 512MB of RAM in the laptop, I didn't think RAM would really be an issue...
It won't take long if you take it one byte at a time.
Octocontrabass
Member
Member
Posts: 5568
Joined: Mon Mar 25, 2013 7:01 pm

Re: Windows 95 design issue?

Post by Octocontrabass »

nkeck72 wrote:
Do the contents of the boot sectors make sense?
What exactly do you mean by this question? If you mean it has the 0xAA55 signature and the code looks correct then yes.
Is the partition table in the MBR correct? Are all of the values in the BPB correct? This includes having sensible values for cylinders, heads, and sectors. I've only seen 255 heads and 63 sectors on flash drives, but I have no idea if all BIOSes use those values.


Since it sounds like the issue might be the BIOS and not Windows, have you tried installing some other OS on the flash drive?
User avatar
Kazinsal
Member
Member
Posts: 559
Joined: Wed Jul 13, 2011 7:38 pm
Libera.chat IRC: Kazinsal
Location: Vancouver
Contact:

Re: Windows 95 design issue?

Post by Kazinsal »

nkeck72 wrote: have 512MB of RAM in the laptop, I didn't think RAM would really be an issue...
Windows 95 will refuse to boot with more than 480 MB of RAM. The memory manager initializes a fixed heap to find the memory in the system, then once it finds the memory in the system, it re-initializes itself in a heap in the found memory. If you have more than 480 megs in the system, it overflows the fixed heap.

Source: http://blogs.msdn.com/b/oldnewthing/arc ... 54640.aspx
psychobeagle12
Member
Member
Posts: 41
Joined: Wed Oct 26, 2011 9:31 am

Re: Windows 95 design issue?

Post by psychobeagle12 »

I'm not sure because it's been a long time, but unless I am much mistaken, Win95 doesn't recognize USB correct? Win95 OSR2.1 and up support USB, but regular Win95 does not. Even Win98 required device drivers be installed for pretty much all flash disks I ever owned. I know you are talking specifically here of the boot process, but the question is isn't this all in vain anyway since once Windows gets to the point where it no longer uses BIOS calls will the whole process not fail anyway? Just a question.
My i386-based kernel: https://github.com/bmelikant/missy-kernel
Picking a name for my kernel was harder than picking my wife, so I just used her name until I decide!
Octocontrabass
Member
Member
Posts: 5568
Joined: Mon Mar 25, 2013 7:01 pm

Re: Windows 95 design issue?

Post by Octocontrabass »

psychobeagle12 wrote:I'm not sure because it's been a long time, but unless I am much mistaken, Win95 doesn't recognize USB correct? Win95 OSR2.1 and up support USB, but regular Win95 does not.
The initial release of Windows 95 also does not support FAT32, so it must be one of the later versions.
psychobeagle12 wrote:I know you are talking specifically here of the boot process, but the question is isn't this all in vain anyway since once Windows gets to the point where it no longer uses BIOS calls will the whole process not fail anyway?
If no driver can be located for the hard disk, non-NT versions of Windows will continue using the BIOS.

Windows 95 isn't smart enough to recognize a USB device as its boot disk, so if it loads a USB driver, it will crash. However, it is smart enough to recognize when a driver causes a crash (at least during the hardware detection part of the installer), so it will only crash once and then work afterwards.
Post Reply