Changeset 505 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src
- Timestamp:
- Feb 25, 2013, 4:23:09 PM (12 years ago)
- google:author:
- krille_n_@hotmail.com
- Location:
- trunk/XTIDE_Universal_BIOS/Src
- Files:
-
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/XTIDE_Universal_BIOS/Src/Device/IDE/IdeIO.asm
r503 r505 56 56 mov al, [di+DPT_ATA.bDevice] 57 57 cmp al, DEVICE_8BIT_XTIDE_REV2 58 jb SHORT .InputToALfromRegisterInDX ; Standard IDE controllers and XTIDE rev 1 59 60 %ifdef MODULE_8BIT_IDE_ADVANCED 58 61 je SHORT .ReverseA0andA3fromRegisterIndexInDX 59 jb SHORT .InputToALfromRegisterInDX ; Standard IDE controllers and XTIDE rev 1 60 61 %ifdef MODULE_8BIT_IDE_ADVANCED 62 62 63 cmp al, DEVICE_8BIT_JRIDE_ISA 63 64 jne SHORT .ShlRegisterIndexInDX ; All XT-CF modes … … 71 72 ret 72 73 %endif 73 74 74 75 .ReverseA0andA3fromRegisterIndexInDX: 75 76 mov dl, [cs:bx+g_rgbSwapA0andA3fromIdeRegisterIndex] … … 77 78 78 79 .ShlRegisterIndexInDX: 79 shldx, 180 eSHL_IM dx, 1 80 81 ; Fall to .InputToALfromRegisterInDX 81 82 … … 102 103 mov bl, [di+DPT_ATA.bDevice] 103 104 cmp bl, DEVICE_8BIT_XTIDE_REV2 105 jb SHORT .OutputALtoControlBlockRegisterInDX ; Standard IDE controllers and XTIDE rev 1 106 107 %ifdef MODULE_8BIT_IDE_ADVANCED 104 108 je SHORT .ReverseA0andA3fromRegisterIndexInDX 105 jb SHORT .OutputALtoControlBlockRegisterInDX ; Standard IDE controllers and XTIDE rev 1 106 107 %ifdef MODULE_8BIT_IDE_ADVANCED 109 108 110 cmp bl, DEVICE_8BIT_JRIDE_ISA 109 111 jne SHORT .ShlRegisterIndexInDX ; All XT-CF modes … … 125 127 126 128 .ShlRegisterIndexInDX: 127 shldx, 1129 eSHL_IM dx, 1 128 130 add dx, BYTE XTCF_CONTROL_BLOCK_OFFSET 129 131 jmp SHORT OutputALtoRegisterInDX … … 152 154 mov bl, [di+DPT_ATA.bDevice] 153 155 cmp bl, DEVICE_8BIT_XTIDE_REV2 156 jb SHORT OutputALtoRegisterInDX ; Standard IDE controllers and XTIDE rev 1 157 158 %ifdef MODULE_8BIT_IDE_ADVANCED 154 159 je SHORT .ReverseA0andA3fromRegisterIndexInDX 155 jb SHORT OutputALtoRegisterInDX ; Standard IDE controllers and XTIDE rev 1 156 157 %ifdef MODULE_8BIT_IDE_ADVANCED 160 158 161 cmp bl, DEVICE_8BIT_JRIDE_ISA 159 162 jne SHORT .ShlRegisterIndexInDX ; All XT-CF modes … … 177 180 178 181 .ShlRegisterIndexInDX: 179 shldx, 1182 eSHL_IM dx, 1 180 183 ; Fall to OutputALtoRegisterInDX 181 184 -
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH0h_HReset.asm
r503 r505 39 39 AH0h_HandlerForDiskControllerReset: 40 40 ; Reset foreign Floppy and Hard Drives (those handled by other BIOSes) 41 xor bx, bx ; Zero BH to assume no errors42 or bl, dl ; Copy requested drive to BL 41 eMOVZX bx, dl ; Copy requested drive to BL and zero BH to assume no errors 42 43 43 xor ah, ah ; Disk Controller Reset 44 44 call Int13h_CallPreviousInt13hHandler ; Reset floppy drives only or floppy drives and foreign hard disks -
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH1Eh_XTCF.asm
r491 r505 102 102 out dx, al 103 103 104 ; We always need to enable 8-bit mode since 16-bit mode is restored 105 ; when controller is reset (AH=00h or 0Dh) 106 ePUSH_T bx, AH23h_Enable8bitPioMode 107 104 108 ; Convert Control Register Contents to device code 105 109 test al, al … … 108 112 jae SHORT .SetMemoryMappedMode 109 113 114 ; We need to limit block size here. Consider this scenario; 115 ; 1. While in PIO mode or memory mapped mode, the drive is set to do 116 ; block transfers larger than XTCF_DMA_MODE_MAX_BLOCK_SIZE. 117 ; 2. A call is subsequently made to change device mode to DEVICE_8BIT_XTCF_DMA. 118 ; 3. The call to AH24h_SetBlockSize fails but the change in device mode has been made. 119 110 120 ; Set DMA Mode 111 121 mov BYTE [di+DPT_ATA.bDevice], DEVICE_8BIT_XTCF_DMA 112 122 mov al, [di+DPT_ATA.bBlockSize] 113 call AH24h_SetBlockSize ; AH=24h limits block size if necessary114 jmp SHORT .Enable8bitPioMode123 MIN_U al, XTCF_DMA_MODE_MAX_BLOCK_SIZE 124 jmp SHORT AH24h_SetBlockSize ; Returns via AH23h_Enable8bitPioMode 115 125 116 126 .SetMemoryMappedMode: 117 mov BYTE [di+DPT_ATA.bDevice], DEVICE_8BIT_XTCF_MEMMAP118 jmp SHORT .Enable8bitPioMode127 mov al, DEVICE_8BIT_XTCF_MEMMAP 128 SKIP2B bx 119 129 120 130 .Set8bitPioMode: 121 mov BYTE [di+DPT_ATA.bDevice], DEVICE_8BIT_XTCF_PIO8 122 ; Fall to .Enable8bitPioMode 123 124 ; We always need to enable 8-bit mode since 16-bit mode is restored 125 ; when controller is reset (AH=00h or 0Dh) 126 .Enable8bitPioMode: 127 jmp AH23h_Enable8bitPioMode 131 mov al, DEVICE_8BIT_XTCF_PIO8 132 mov [di+DPT_ATA.bDevice], al 133 ret ; Via AH23h_Enable8bitPioMode 128 134 129 135 -
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH9h_HInit.asm
r493 r505 101 101 call Device_SelectDrive 102 102 STORE_ERROR_FLAG_TO_DPT FLG_INITERROR_FAILED_TO_SELECT_DRIVE 103 %ifdef USE_386 104 jc .ReturnWithErrorCodeInAH 105 %else 103 106 jnc SHORT .ContinueInitializationSinceDriveSelectedSuccesfully 104 107 jmp .ReturnWithErrorCodeInAH 105 108 .ContinueInitializationSinceDriveSelectedSuccesfully: 109 %endif 106 110 107 111 -
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int19h.asm
r493 r505 3 3 4 4 ; 5 ; XTIDE Universal BIOS and Associated Tools 5 ; XTIDE Universal BIOS and Associated Tools 6 6 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2012 by XTIDE Universal BIOS Team. 7 7 ; … … 10 10 ; the Free Software Foundation; either version 2 of the License, or 11 11 ; (at your option) any later version. 12 ; 12 ; 13 13 ; This program is distributed in the hope that it will be useful, 14 14 ; but WITHOUT ANY WARRANTY; without even the implied warranty of 15 15 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 ; GNU General Public License for more details. 16 ; GNU General Public License for more details. 17 17 ; Visit http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 18 ; 18 ; 19 19 20 20 ; Section containing code … … 107 107 ; The following macro could be easily inlined below. Why a macro? Depending on the combination 108 108 ; of MODULE_HOTKEYS or MODULE_BOOT_MENU, this code needs to either come before or after the 109 ; call to the boot menu. 109 ; call to the boot menu. 110 110 ; 111 111 %macro TRY_TO_BOOT_DL_AND_DH_DRIVES 0 112 112 push dx ; it's OK if this is left on the stack, if we are 113 ; aresuccessful, the following call does not return113 ; successful, the following call does not return 114 114 call TryToBootFromPrimaryOrSecondaryBootDevice_AndBoot 115 115 pop dx … … 117 117 call TryToBootFromPrimaryOrSecondaryBootDevice_AndBoot 118 118 %endmacro 119 120 %ifdef MODULE_HOTKEYS 121 call HotkeyBar_ScanHotkeysFromKeyBufferAndStoreToBootvars 119 120 %ifdef MODULE_HOTKEYS 121 call HotkeyBar_ScanHotkeysFromKeyBufferAndStoreToBootvars 122 122 cmp al, ROM_BOOT_HOTKEY_SCANCODE 123 j z.RomBoot ; CF clear so ROM boot123 je .RomBoot ; CF clear so ROM boot 124 124 %ifdef MODULE_BOOT_MENU 125 125 cmp al, BOOT_MENU_HOTKEY_SCANCODE 126 j z.BootMenu126 je .BootMenu 127 127 %endif 128 128 call HotkeyBar_GetBootDriveNumbersToDX … … 130 130 TRY_TO_BOOT_DL_AND_DH_DRIVES 131 131 ;; falls through to boot menu, if it is present. If not present, falls through to rom boot. 132 %endif 132 %endif ; MODULE_HOTKEYS 133 133 134 134 %ifdef MODULE_BOOT_MENU 135 .BootMenu: 135 .BootMenu: 136 136 call BootMenu_DisplayAndReturnDriveInDLRomBootClearCF 137 137 jnc .RomBoot ; CF clear so ROM boot 138 138 139 139 mov dh, dl ; Setup for secondary drive 140 not dh ; Floppy goes to HD, or vice ver as141 and dh, 080h; Go to first drive of the floppy or HD set140 not dh ; Floppy goes to HD, or vice versa 141 and dh, 80h ; Go to first drive of the floppy or HD set 142 142 143 143 %ifdef MODULE_HOTKEYS 144 144 jmp .TryUsingHotKeysCode 145 145 %else 146 TRY_TO_BOOT_DL_AND_DH_DRIVES 146 TRY_TO_BOOT_DL_AND_DH_DRIVES 147 147 jmp .BootMenu 148 148 %endif 149 %endif 150 151 %ifndef MODULE_HOTKEYS 152 %ifndef MODULE_BOOT_MENU 149 %endif ; MODULE_BOOT_MENU 150 151 %ifndef MODULE_HOTKEYS OR MODULE_BOOT_MENU 153 152 xor dl, dl ; Try to boot from Floppy Drive A 154 153 call TryToBootFromPrimaryOrSecondaryBootDevice_AndBoot 155 154 mov dl, 80h ; Try to boot from Hard Drive C 156 155 call TryToBootFromPrimaryOrSecondaryBootDevice_AndBoot 157 %endif158 156 %endif 159 157 … … 162 160 call DriveXlate_Reset ; Clean up any drive mappings before Rom Boot 163 161 %endif 164 clc 162 clc 165 163 ;; fall through to JumpToBootSector_or_RomBoot 166 164 … … 174 172 ; Parameters: 175 173 ; DL: Drive to boot from (translated, 00h or 80h) 176 ; CF: Set for Boot Sector Boot 174 ; CF: Set for Boot Sector Boot 177 175 ; Clear for ROM Boot 178 176 ; ES:BX: (if CF set) Ptr to boot sector … … 187 185 188 186 ; clear segment registers before boot sector or rom call 189 mov ds, ax 187 mov ds, ax 190 188 mov es, ax 191 189 %ifdef USE_386 … … 202 200 ; Boot by calling INT 18h (ROM Basic of ROM DOS) 203 201 .romboot: 204 int BIOS_BOOT_FAILURE_INTERRUPT_18h ; Never returns 205 206 207 ;-------------------------------------------------------------------- 208 ; TryToBootFromPrimaryOrSecondaryBootDevice 202 int BIOS_BOOT_FAILURE_INTERRUPT_18h ; Never returns 203 204 205 ;-------------------------------------------------------------------- 206 ; TryToBootFromPrimaryOrSecondaryBootDevice_AndBoot 209 207 ; Parameters 210 208 ; DL: Drive selected as boot device … … 229 227 230 228 TryToBoot_FallThroughTo_BootSector_TryToLoadFromDriveDL_AndBoot: 231 ; fall through to BootSector_TryToLoadFromDriveDL_AndBoot 232 %endif 233 234 229 ; fall through to BootSector_TryToLoadFromDriveDL_AndBoot 230 %endif 231 -
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int19h/BootSector.asm
r492 r505 3 3 4 4 ; 5 ; XTIDE Universal BIOS and Associated Tools 5 ; XTIDE Universal BIOS and Associated Tools 6 6 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2012 by XTIDE Universal BIOS Team. 7 7 ; … … 10 10 ; the Free Software Foundation; either version 2 of the License, or 11 11 ; (at your option) any later version. 12 ; 12 ; 13 13 ; This program is distributed in the hope that it will be useful, 14 14 ; but WITHOUT ANY WARRANTY; without even the implied warranty of 15 15 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 16 ; GNU General Public License for more details. 17 ; Visit http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 18 ; 17 ; Visit http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 18 ; 19 19 20 20 ; Section containing code … … 22 22 23 23 ;-------------------------------------------------------------------- 24 ; BootSector_TryToLoadFromDriveDL 24 ; BootSector_TryToLoadFromDriveDL_AndBoot 25 25 ; Parameters: 26 26 ; DL: Drive to boot from (translated, 00h or 80h) … … 36 36 call DetectPrint_TryToBootFromDL 37 37 call LoadFirstSectorFromDriveDL 38 %ifndef USE_386 38 39 jc SHORT .FailedToLoadFirstSector 40 %else 41 jc DetectPrint_FailedToLoadFirstSector 42 %endif 39 43 40 44 test dl, dl … … 44 48 .AlwaysBootFromFloppyDriveForBooterGames: 45 49 stc 46 jmp SHORT JumpToBootSector_or_RomBoot 50 jmp SHORT JumpToBootSector_or_RomBoot 51 52 %ifndef USE_386 47 53 .FailedToLoadFirstSector: 48 call DetectPrint_FailedToLoadFirstSector 49 ret 54 jmp DetectPrint_FailedToLoadFirstSector 55 %endif 56 50 57 .FirstHardDiskSectorNotBootable: 51 58 mov si, g_szBootSectorNotFound 52 call DetectPrint_NullTerminatedStringFromCSSIandSetCF 53 ret 59 jmp DetectPrint_NullTerminatedStringFromCSSIandSetCF 54 60 55 %ifndef CHECK_FOR_UNUSED_ENTRYPOINTS 61 %ifndef CHECK_FOR_UNUSED_ENTRYPOINTS 56 62 %ifdef MODULE_DRIVEXLATE 57 63 %if TryToBoot_FallThroughTo_BootSector_TryToLoadFromDriveDL_AndBoot <> BootSector_TryToLoadFromDriveDL_AndBoot … … 79 85 80 86 .ReadRetryLoop: 81 call .LoadFirstSectorFromDLtoESBX 82 jnc SHORT .Return 87 mov ax, 0201h ; Read 1 sector 88 mov cx, 1 ; Cylinder 0, Sector 1 89 xor dh, dh ; Head 0 90 int BIOS_DISK_INTERRUPT_13h 91 jc SHORT .FailedToLoadFirstSector 92 .Return: 93 ret 94 95 .FailedToLoadFirstSector: 83 96 dec di ; Decrement retry counter (preserve CF) 84 97 jz SHORT .Return ; Loop while retries left 85 98 86 99 ; Reset drive and retry 87 xor ax, ax ; AH=0 h, Disk Controller Reset100 xor ax, ax ; AH=00h, Disk Controller Reset 88 101 test dl, dl ; Floppy drive? 89 eCMOVS ah, RESET_HARD_DISK ; AH= Dh, Reset Hard Disk (Alternate reset)102 eCMOVS ah, RESET_HARD_DISK ; AH=0Dh, Reset Hard Disk (Alternate reset) 90 103 int BIOS_DISK_INTERRUPT_13h 91 104 jmp SHORT .ReadRetryLoop 92 105 93 94 ;--------------------------------------------------------------------95 ; .LoadFirstSectorFromDLtoESBX96 ; Parameters:97 ; DL: Drive to boot from (translated, 00h or 80h)98 ; ES:BX: Destination buffer for boot sector99 ; Returns:100 ; AH: INT 13h error code101 ; ES:BX: Ptr to boot sector102 ; CF: Cleared if read successful103 ; Set if any error104 ; Corrupts registers:105 ; AL, CX, DH106 ;--------------------------------------------------------------------107 .LoadFirstSectorFromDLtoESBX:108 mov ax, 0201h ; Read 1 sector109 mov cx, 1 ; Cylinder 0, Sector 1110 xor dh, dh ; Head 0111 int BIOS_DISK_INTERRUPT_13h112 .Return:113 ret -
trunk/XTIDE_Universal_BIOS/Src/Initialization/DetectDrives.asm
r493 r505 50 50 %ifdef MODULE_HOTKEYS 51 51 call HotkeyBar_ScanHotkeysFromKeyBufferAndStoreToBootvars ; Done here while CX is still protected 52 %endif 52 %endif 53 53 54 54 pop cx … … 73 73 %ifdef MODULE_HOTKEYS 74 74 cmp al, COM_DETECT_HOTKEY_SCANCODE ; Set by last call to HotkeyBar_UpdateDuringDriveDetection above 75 j z.DriveDetectLoop76 %endif 75 je .DriveDetectLoop 76 %endif 77 77 78 78 mov al,[cs:ROMVARS.wFlags] ; Configurator set to always scan? … … 201 201 %ifdef MODULE_HOTKEYS 202 202 call HotkeyBar_UpdateDuringDriveDetection 203 %endif 204 203 %endif 204 205 205 %ifdef MODULE_8BIT_IDE_ADVANCED 206 206 pop dx … … 248 248 ; Nothing 249 249 ; Returns: 250 ; CF: Set (from BootMenuPrint_NullTerminatedStringFromCSSIandSetCF)250 ; CF: Set (from DetectPrint_NullTerminatedStringFromCSSIandSetCF) 251 251 ; Corrupts registers: 252 252 ; AX, SI -
trunk/XTIDE_Universal_BIOS/Src/Initialization/DetectPrint.asm
r492 r505 3 3 4 4 ; 5 ; XTIDE Universal BIOS and Associated Tools 5 ; XTIDE Universal BIOS and Associated Tools 6 6 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2012 by XTIDE Universal BIOS Team. 7 7 ; … … 10 10 ; the Free Software Foundation; either version 2 of the License, or 11 11 ; (at your option) any later version. 12 ; 12 ; 13 13 ; This program is distributed in the hope that it will be useful, 14 14 ; but WITHOUT ANY WARRANTY; without even the implied warranty of 15 15 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 ; GNU General Public License for more details. 16 ; GNU General Public License for more details. 17 17 ; Visit http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 18 ; 18 ; 19 19 20 20 ; Section containing code … … 31 31 ;-------------------------------------------------------------------- 32 32 DetectPrint_InitializeDisplayContext: 33 CALL_DISPLAY_LIBRARY InitializeDisplayContext 34 ret 35 36 33 JMP_DISPLAY_LIBRARY InitializeDisplayContext 34 35 37 36 %ifdef MODULE_HOTKEYS 38 37 ;-------------------------------------------------------------------- … … 46 45 ;-------------------------------------------------------------------- 47 46 DetectPrint_GetSoftwareCoordinatesToAX: 48 CALL_DISPLAY_LIBRARY GetSoftwareCoordinatesToAX 49 ret 47 JMP_DISPLAY_LIBRARY GetSoftwareCoordinatesToAX 50 48 %endif 51 49 52 50 53 51 ;-------------------------------------------------------------------- 54 52 ; DetectPrint_StartDetectWithMasterOrSlaveStringInCXandIdeVarsInCSBP … … 75 73 ; Corrupts registers: 76 74 ; AX, CX, DX, SI, DI 77 ;-------------------------------------------------------------------- 75 ;-------------------------------------------------------------------- 78 76 DetectPrint_StartDetectWithAutodetectedBasePortInAXandIdeVarsInCSBP: 79 77 mov dx, [cs:bp+IDEVARS.bDevice-1] ; for Serial: AL=port address>>2, AH=baud rate … … 152 150 DetectPrint_DriveNameFromDrvDetectInfoInESBX: 153 151 push bp 154 mov bp,sp 152 mov bp,sp 155 153 lea si,[bx+DRVDETECTINFO.szDrvName] 156 154 push si … … 158 156 jmp SHORT DetectPrint_FormatCSSIfromParamsInSSBP 159 157 160 158 161 159 ;-------------------------------------------------------------------- 162 160 ; Prints BIOS name and segment address where it is found. … … 175 173 ; so that it can be a different value when using .BootMenuEntry 176 174 177 .BootMenuEntry: 175 .BootMenuEntry: 178 176 push bp 179 177 mov bp, sp … … 186 184 push ax 187 185 %else 188 ; szTitle and szVersion have the high order byte of their addresses zero, 186 ; szTitle and szVersion have the high order byte of their addresses zero, 189 187 ; so these push instructions are only 2 bytes 190 188 ; … … 259 257 260 258 mov si, g_szTryToBoot 261 jmp SHORT DetectPrint_FormatCSSIfromParamsInSSBP 259 jmp SHORT DetectPrint_FormatCSSIfromParamsInSSBP 262 260 263 261 -
trunk/XTIDE_Universal_BIOS/Src/Menus/BootMenu/BootMenu.asm
r492 r505 3 3 4 4 ; 5 ; XTIDE Universal BIOS and Associated Tools 5 ; XTIDE Universal BIOS and Associated Tools 6 6 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2012 by XTIDE Universal BIOS Team. 7 7 ; … … 10 10 ; the Free Software Foundation; either version 2 of the License, or 11 11 ; (at your option) any later version. 12 ; 12 ; 13 13 ; This program is distributed in the hope that it will be useful, 14 14 ; but WITHOUT ANY WARRANTY; without even the implied warranty of 15 15 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 16 ; GNU General Public License for more details. 17 ; Visit http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 18 ; 17 ; Visit http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 18 ; 19 19 20 20 ; Section containing code … … 24 24 ; Displays Boot Menu and returns Drive or Function number. 25 25 ; 26 ; BootMenu_DisplayAnd StoreSelection26 ; BootMenu_DisplayAndReturnDriveInDLRomBootClearCF 27 27 ; Parameters: 28 28 ; DS: RAMVARS segment … … 41 41 42 42 xchg cx, ax 43 43 44 44 ; Clear Boot Menu from screen 45 45 mov ax, ' ' | (MONO_NORMAL<<8) … … 52 52 ; Parameters: 53 53 ; CX: Index of menuitem selected from Boot Menu 54 ; DS: RAMVARS segment 54 55 ; Returns: 55 56 ; DX: Drive number to be used for booting 56 ; DS: RAMVARS segment57 57 ; CF: Set: There is a selected menu item, DL is valid 58 58 ; Clear: The item selected is Rom Boot, DL is not valid 59 59 ; Corrupts registers: 60 ; AX, BX , DI60 ; AX, BX 61 61 ; 62 62 ; NOTE: We can't use the menu structure in here, as we are falling through 63 ; throughfrom BootMenu_DisplayAndReturnDriveInDLRomBootClearCF when the63 ; from BootMenu_DisplayAndReturnDriveInDLRomBootClearCF when the 64 64 ; menu structure has already been destroyed. 65 65 ;-------------------------------------------------------------------- … … 73 73 sub dl, al ; Remove floppy drives from index 74 74 call RamVars_GetHardDiskCountFromBDAtoAX 75 or al, 80h ; Or 80h into AL before the sub 75 or al, 80h ; Or 80h into AL before the sub 76 76 cmp dl, al ; Set CF if hard disk 77 77 ; Clear CF if last item, beyond hard disk list, which indicates ROM boot -
trunk/XTIDE_Universal_BIOS/Src/Menus/DriveXlate.asm
r493 r505 3 3 4 4 ; 5 ; XTIDE Universal BIOS and Associated Tools 5 ; XTIDE Universal BIOS and Associated Tools 6 6 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2012 by XTIDE Universal BIOS Team. 7 7 ; … … 10 10 ; the Free Software Foundation; either version 2 of the License, or 11 11 ; (at your option) any later version. 12 ; 12 ; 13 13 ; This program is distributed in the hope that it will be useful, 14 14 ; but WITHOUT ANY WARRANTY; without even the implied warranty of 15 15 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 ; GNU General Public License for more details. 16 ; GNU General Public License for more details. 17 17 ; Visit http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 18 ; 18 ; 19 19 20 20 ; Section containing code … … 48 48 %if HotkeyBar_FallThroughTo_DriveXlate_ConvertDriveLetterInDLtoDriveNumber <> DriveXlate_ConvertDriveLetterInDLtoDriveNumber 49 49 %error "DriveXlate_ConvertDriveLetterInDLtoDriveNumber must be at the top of DriveXlate.asm, and that file must immediately follow HotKeys.asm" 50 %endif51 50 %endif 52 51 %endif 52 53 53 ;-------------------------------------------------------------------- 54 54 ; DriveXlate_ConvertDriveNumberFromDLtoDriveLetter … … 64 64 ;-------------------------------------------------------------------- 65 65 DriveXlate_ConvertDriveNumberFromDLtoDriveLetter: 66 test dl, dl67 j ns SHORT .GetDefaultFloppyDrive66 xor dl, 80h 67 js SHORT .GetDefaultFloppyDrive 68 68 69 69 ; Store default hard drive to boot from 70 70 call DriveXlate_GetLetterForFirstHardDriveToAX 71 sub dl, 80h72 71 add dl, al 73 72 stc … … 75 74 76 75 .GetDefaultFloppyDrive: 77 add dl, DEFAULT_FLOPPY_DRIVE_LETTER; Clears CF76 sub dl, 80h - DEFAULT_FLOPPY_DRIVE_LETTER ; Clears CF 78 77 ret 79 78 … … 96 95 MAX_U al, DEFAULT_HARD_DRIVE_LETTER 97 96 ret 98 97 99 98 100 99 ;-------------------------------------------------------------------- … … 168 167 mov al, dl ; Store floppy translation 169 168 SKIP2B di 170 .SetHardDriveToSwap: 169 .SetHardDriveToSwap: 171 170 mov ah, dl ; Store HD translation 172 171 mov WORD [RAMVARS.xlateVars+XLATEVARS.wFDandHDswap], ax -
trunk/XTIDE_Universal_BIOS/Src/Menus/HotkeyBar.asm
r500 r505 34 34 call HotkeyBar_ScanHotkeysFromKeyBufferAndStoreToBootvars 35 35 ; Fall to HotkeyBar_DrawToTopOfScreen 36 37 36 37 38 38 ;-------------------------------------------------------------------- 39 39 ; HotkeyBar_DrawToTopOfScreen … … 127 127 call FormatFunctionHotkeyString 128 128 %endif 129 ; Fall to .PrintRomBootHotkey 129 ; Fall to .PrintRomBootHotkey 130 130 131 131 ;-------------------------------------------------------------------- … … 169 169 ;-------------------------------------------------------------------- 170 170 HotkeyBar_ClearRestOfTopRow: 171 CALL_DISPLAY_LIBRARY 171 CALL_DISPLAY_LIBRARY GetColumnsToALandRowsToAH 172 172 eMOVZX cx, al 173 CALL_DISPLAY_LIBRARY 173 CALL_DISPLAY_LIBRARY GetSoftwareCoordinatesToAX 174 174 sub cl, al 175 175 mov al, ' ' 176 CALL_DISPLAY_LIBRARY PrintRepeatedCharacterFromALwithCountInCX 177 ret 176 JMP_DISPLAY_LIBRARY PrintRepeatedCharacterFromALwithCountInCX 178 177 179 178 … … 216 215 217 216 mov si, ATTRIBUTE_CHARS.cHurryTimeout ; Selected hotkey 218 j zSHORT GetDescriptionAttributeToDX ; From compare with bScancode above217 je SHORT GetDescriptionAttributeToDX ; From compare with bScancode above 219 218 220 219 GetNonSelectedHotkeyDescriptionAttributeToDX: … … 226 225 call MenuAttribute_GetToAXfromTypeInSI 227 226 xchg dx, ax ; DX = Description attribute 228 ;; fall through to PushHotkeyParamsAndFormat 227 ;; fall through to PushHotkeyParamsAndFormat 229 228 230 229 … … 232 231 233 232 mov dx, (COLOR_ATTRIBUTE(COLOR_YELLOW, COLOR_CYAN) << 8) | MONO_REVERSE_BLINK 234 j z SHORT SelectAttributeFromDHorDLbasedOnVideoMode; From compare with bScancode above233 je SHORT SelectAttributeFromDHorDLbasedOnVideoMode ; From compare with bScancode above 235 234 236 235 GetNonSelectedHotkeyDescriptionAttributeToDX: … … 245 244 mov dl, dh 246 245 .AttributeLoadedToDL: 247 ;; fall through to PushHotkeyParamsAndFormat 246 ;; fall through to PushHotkeyParamsAndFormat 248 247 249 248 %endif ; MODULE_BOOT_MENU … … 277 276 push di ; Description string 278 277 push cx ; Description string parameter 279 278 280 279 push si ; Key attribute for last space 281 280 … … 308 307 ;-------------------------------------------------------------------- 309 308 HotkeyBar_RestoreCursorCoordinatesFromAX: 310 CALL_DISPLAY_LIBRARY SetCursorCoordinatesFromAX 311 ret 309 JMP_DISPLAY_LIBRARY SetCursorCoordinatesFromAX 312 310 313 311 … … 325 323 HotkeyBar_StoreHotkeyToBootvarsForDriveLetterInDL: 326 324 eMOVZX ax, dl 327 xor al, 32 ; Upper case drive letter to lower case keystroke325 or al, 32 ; Upper case drive letter to lower case keystroke 328 326 jmp SHORT HotkeyBar_StoreHotkeyToBootvarsIfValidKeystrokeInAX 329 327 … … 364 362 ; All scancodes are saved, even if it wasn't a drive letter, 365 363 ; which also covers our function key case. Invalid function keys 366 ; will not do anything (won't be printed, won't be accepted as input) 364 ; will not do anything (won't be printed, won't be accepted as input) 367 365 mov [es:di], ah 368 366 369 367 ; Drive letter hotkeys remaining, allow 'a' to 'z' 370 368 call Char_IsLowerCaseLetterInAL 371 369 jnc SHORT .KeystrokeIsNotValidDriveLetter 372 xor al,32 ; We want to print upper case letters370 and al, ~32 ; We want to print upper case letters 373 371 374 372 ; Clear HD First flag to assume Floppy Drive hotkey … … 377 375 378 376 ; Determine if Floppy or Hard Drive hotkey 379 eMOVZX cx, al ; Clear CH to clear scancode377 xchg cx, ax 380 378 call DriveXlate_GetLetterForFirstHardDriveToAX 381 379 cmp cl, al … … 386 384 387 385 .StoreDriveLetter: 388 sbb di, BYTE 1 ; Sub CF if Floppy Drive386 sbb di, BYTE 1 ; Sub CF if Floppy Drive 389 387 xchg ax, cx 390 mov [es:di], al ; AH = zero to clear function hotkey391 392 .KeystrokeIsNotValidDriveLetter: 388 mov [es:di], al 389 390 .KeystrokeIsNotValidDriveLetter: 393 391 NoHotkeyToProcess: 394 392 mov al, [es:BOOTVARS.hotkeyVars+HOTKEYVARS.bScancode] … … 407 405 HotkeyBar_GetBootDriveNumbersToDX: 408 406 mov dx, [es:BOOTVARS.hotkeyVars+HOTKEYVARS.wFddAndHddLetters] 409 test BYTE [es:BOOTVARS.hotkeyVars+HOTKEYVARS.bFlags], FLG_HOTKEY_HD_FIRST 407 test BYTE [es:BOOTVARS.hotkeyVars+HOTKEYVARS.bFlags], FLG_HOTKEY_HD_FIRST 410 408 jnz .noflip 411 409 xchg dl, dh 412 .noflip: 410 .noflip: 413 411 call DriveXlate_ConvertDriveLetterInDLtoDriveNumber 414 412 xchg dl, dh 415 ; Fall to HotkeyBar_FallThroughTo_DriveXlate_ConvertDriveLetterInDLtoDriveNumber 416 417 HotkeyBar_FallThroughTo_DriveXlate_ConvertDriveLetterInDLtoDriveNumber: 418 413 ; Fall to HotkeyBar_FallThroughTo_DriveXlate_ConvertDriveLetterInDLtoDriveNumber 414 415 HotkeyBar_FallThroughTo_DriveXlate_ConvertDriveLetterInDLtoDriveNumber: 416 -
trunk/XTIDE_Universal_BIOS/Src/Strings.asm
r492 r505 86 86 g_szRomBootDash: db " - " ; String fall through to g_szRomBoot 87 87 %endif 88 %ifdef MODULE_HOTKEYS OR MODULE_BOOT_MENU 89 g_szRomBoot: db "Rom%cBoot", 90 %endif 91 88 %ifdef MODULE_HOTKEYS OR MODULE_BOOT_MENU 89 g_szRomBoot: db "Rom%cBoot",NULL ; "RomBoot" or "Rom Boot" 90 %endif 91 92 92 93 93 %ifdef MODULE_BOOT_MENU -
trunk/XTIDE_Universal_BIOS/Src/StringsCompressed.asm
r492 r505 177 177 178 178 %endif 179 %ifdef MODULE_HOTKEYS OR MODULE_BOOT_MENU 180 g_szRomBoot: ; db "Rom%cBoot", 179 %ifdef MODULE_HOTKEYS OR MODULE_BOOT_MENU 180 g_szRomBoot: ; db "Rom%cBoot",NULL ; "RomBoot" or "Rom Boot" 181 181 ; db 52h, 6fh, 6dh, 25h, 63h, 42h, 6fh, 6fh, 74h, 00h ; uncompressed 182 182 db 58h, 75h, 73h, 3ch, 48h, 75h, 75h, 0bah ; compressed -
trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/RamVars.asm
r493 r505 3 3 4 4 ; 5 ; XTIDE Universal BIOS and Associated Tools 5 ; XTIDE Universal BIOS and Associated Tools 6 6 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2012 by XTIDE Universal BIOS Team. 7 7 ; … … 10 10 ; the Free Software Foundation; either version 2 of the License, or 11 11 ; (at your option) any later version. 12 ; 12 ; 13 13 ; This program is distributed in the hope that it will be useful, 14 14 ; but WITHOUT ANY WARRANTY; without even the implied warranty of 15 15 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 ; GNU General Public License for more details. 16 ; GNU General Public License for more details. 17 17 ; Visit http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 18 ; 18 ; 19 19 20 20 ; Section containing code … … 98 98 ;; when entering the boot menu and also before transferring control at boot time and 99 99 ;; for ROM boots (in int19h.asm). 100 100 101 101 pop es 102 102 ret … … 158 158 call RamVars_GetCountOfKnownDrivesToAX 159 159 push ds 160 LOAD_BDA_SEGMENT_TO ds, cx160 LOAD_BDA_SEGMENT_TO ds, bx 161 161 mov bl, [BDA.bHDCount] 162 162 MAX_U al, bl
Note:
See TracChangeset
for help on using the changeset viewer.