OSDev.org

The Place to Start for Operating System Developers
It is currently Thu Mar 28, 2024 3:16 pm

All times are UTC - 6 hours




Post new topic Reply to topic  [ 9 posts ] 
Author Message
 Post subject: Windows 95 design issue?
PostPosted: Mon Oct 05, 2015 11:44 am 
Offline

Joined: Mon Oct 05, 2015 11:22 am
Posts: 9
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:
Quote:
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.


Top
 Profile  
 
 Post subject: Re: Windows 95 design issue?
PostPosted: Mon Oct 05, 2015 12:06 pm 
Offline

Joined: Mon Oct 05, 2015 11:22 am
Posts: 9
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.


Top
 Profile  
 
 Post subject: Re: Windows 95 design issue?
PostPosted: Mon Oct 05, 2015 2:18 pm 
Offline
Member
Member

Joined: Mon Mar 25, 2013 7:01 pm
Posts: 5100
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.)


Top
 Profile  
 
 Post subject: Re: Windows 95 design issue?
PostPosted: Mon Oct 05, 2015 2:50 pm 
Offline
Member
Member

Joined: Sat Nov 18, 2006 9:11 am
Posts: 571
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.


Top
 Profile  
 
 Post subject: Re: Windows 95 design issue?
PostPosted: Wed Oct 07, 2015 5:40 pm 
Offline

Joined: Mon Oct 05, 2015 11:22 am
Posts: 9
Quote:
How big is the flash drive?


The flash drive is 3.7 GB formatted with FAT32.

Quote:
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:.

Quote:
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.

Quote:
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.


Top
 Profile  
 
 Post subject: Re: Windows 95 design issue?
PostPosted: Thu Oct 08, 2015 12:46 am 
Offline
Member
Member

Joined: Mon Mar 25, 2013 7:01 pm
Posts: 5100
nkeck72 wrote:
Quote:
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?


Top
 Profile  
 
 Post subject: Re: Windows 95 design issue?
PostPosted: Thu Oct 08, 2015 11:57 am 
Offline
Member
Member
User avatar

Joined: Wed Jul 13, 2011 7:38 pm
Posts: 558
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/archive/2003/08/14/54640.aspx


Top
 Profile  
 
 Post subject: Re: Windows 95 design issue?
PostPosted: Thu Oct 08, 2015 7:21 pm 
Offline
Member
Member

Joined: Wed Oct 26, 2011 9:31 am
Posts: 41
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!


Top
 Profile  
 
 Post subject: Re: Windows 95 design issue?
PostPosted: Fri Oct 09, 2015 10:06 am 
Offline
Member
Member

Joined: Mon Mar 25, 2013 7:01 pm
Posts: 5100
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.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 9 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 19 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group