Changeset 598 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src
- Timestamp:
- Jul 13, 2018, 10:23:54 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/XTIDE_Universal_BIOS/Src/Initialization/DetectDrives.asm
r597 r598 113 113 mov dl, HARD_DISK_TYPES 114 114 call CMOS_ReadFromIndexInDLtoAL 115 test al, al116 jnz SHORT .C ontinueInitialization; CMOS byte 12h is ready for Windows 95115 test al, 0F0h 116 jnz SHORT .ClearBdaDriveCount ; CMOS byte 12h is ready for Windows 95 117 117 call CMOS_Verify10hTo2Dh ; Can we modify CMOS? 118 118 jnz SHORT .ClearBdaDriveCount ; Unsupported BIOS, use plan B 119 119 120 ; Now we can alter CMOS location 12h. Important! We set type for drive 1 121 ; (primary slave) and not for drive 0! Award BIOS locks if we set drive 0 type to Fh. 122 ; We cannot set it to less either since that will fully set predefined hard drive type to the BIOS. 123 ; Windows 95 only cares that the CMOS location 12h is non-zero. 120 ; Now we can alter CMOS location 12h. Award BIOS locks if we set drive 0 type to Fh 121 ; (but accept changes to drive type 1). Windows 95 requires that the drive 0 type is 122 ; non zero and ignores drive 1 type. So if we only set drive 1, then Award BIOS 123 ; won't give problems but Windows 95 stays in MS-DOS compatibility mode. 124 ; 125 ; For Award BIOSes we could set the Drive 0 type to 1 and then clear the BDA drive count. 126 ; So essentially we could automatically do what user needs to do manually to get Windows 95 127 ; working on Award BIOSes. However, I think that should be left to do manually since 128 ; there may be SCSI drives on the system or FLG_ROMVARS_IGNORE_MOTHERBOARD_DRIVES could 129 ; be intentionally cleared and forcing the dummy drive might cause only trouble. 130 131 ; Try to detect Award BIOS (Seems to work on a tested 128k BIOS so hopefully 132 ; there will be no need to scan E000h segment) 133 mov cx, 65536 - 4 134 mov eax, 'Awar' ; Four characters should be enough 135 mov di, 0F000h ; Scan 64k starting from segment F000h 136 mov fs, di ; No need to preserve FS since we set it to zero soon when we boot 137 xor di, di 138 .ScanNextCharacters: 139 cmp [fs:di], eax 140 je SHORT .ClearBdaDriveCount ; Award detected, cannot modify CMOS 141 inc di ; Increment offset by one character (not four) 142 loop .ScanNextCharacters 143 144 ; Now it should be safe to write 124 145 mov dl, HARD_DISK_TYPES 125 mov al, 0F h ; Drive 1 type 16...47 (defined elsewhere in the CMOS)146 mov al, 0F0h ; Drive 0 type 16...47 (supposed to be defined elsewhere in the CMOS) 126 147 call CMOS_WriteALtoIndexInDL 127 148 call CMOS_StoreNewChecksumFor10hto2Dh
Note:
See TracChangeset
for help on using the changeset viewer.