Changeset 127 in xtideuniversalbios
- Timestamp:
- Mar 3, 2011, 6:43:50 PM (14 years ago)
- google:author:
- aitotat
- Location:
- trunk/XTIDE_Universal_BIOS
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/XTIDE_Universal_BIOS/Inc/BootMenu.inc
r92 r127 5 5 6 6 ; Boot menu sizes 7 BOOT_MENU_TITLE_LINES EQU 2 ; Number of title lines 8 BOOT_MENU_INFO_LINES EQU 3 ; Number of info lines 9 BOOT_MENU_TITLE_AND_INFO_LINES EQU (BOOT_MENU_TITLE_LINES | (BOOT_MENU_INFO_LINES<<8)) 10 BOOT_MENU_WIDTH EQU 40 ; Menu width in characters 11 BOOT_MENU_HEIGHT_WITHOUT_ITEMS EQU (BOOT_MENU_TITLE_LINES + BOOT_MENU_INFO_LINES + 4) 12 MENU_SCREEN_BOTTOM_LINES EQU 1 7 BOOT_MENU_TITLE_LINES EQU 2 ; Number of title lines 8 BOOT_MENU_INFO_LINES EQU 3 ; Number of info lines 9 BOOT_MENU_SEPARATOR_LINES_PLUS_SHADOW EQU 5 10 BOOT_MENU_TITLE_AND_INFO_LINES EQU (BOOT_MENU_TITLE_LINES | (BOOT_MENU_INFO_LINES<<8)) 11 BOOT_MENU_WIDTH EQU 40 ; Menu width in characters (including shadow) 12 BOOT_MENU_HEIGHT_WITHOUT_ITEMS EQU (BOOT_MENU_TITLE_LINES + BOOT_MENU_INFO_LINES + BOOT_MENU_SEPARATOR_LINES_PLUS_SHADOW) 13 MENU_SCREEN_BOTTOM_LINES EQU 1 13 14 14 15 ; Hotkeys 15 ROM_BOOT_HOTKEY_SCANCODE EQU 42h ; F816 ROM_BOOT_HOTKEY_SCANCODE EQU 42h ; F8 16 17 17 18 -
trunk/XTIDE_Universal_BIOS/Src/Boot/BootMenu.asm
r124 r127 36 36 ; CX: Index of selected item or NO_ITEM_SELECTED 37 37 ; Corrupts registers: 38 ; BX, DI38 ; AX, BX, DI 39 39 ;-------------------------------------------------------------------- 40 40 ALIGN JUMP_ALIGN … … 166 166 jz SHORT .ReturnItemIndexInDX ; Return if floppy drive (HD bit not set) 167 167 call FloppyDrive_GetCountToCX 168 and dl, ~80h ; Clear HD bit 168 169 add dx, cx 169 170 .ReturnItemIndexInDX: -
trunk/XTIDE_Universal_BIOS/Src/Boot/BootMenuEvent.asm
r124 r127 24 24 ALIGN JUMP_ALIGN 25 25 BootMenuEvent_Handler: 26 cmp bx, MENUEVENT.RefreshItemFromCX ; Above last supported item?26 cmp bx, BYTE MENUEVENT.RefreshItemFromCX ; Above last supported item? 27 27 ja SHORT .EventNotHandled 28 jmp [ bx+.rgfnEventSpecificHandlers]28 jmp [cs:bx+.rgfnEventSpecificHandlers] 29 29 .EventNotHandled: 30 30 clc -
trunk/XTIDE_Universal_BIOS/Src/Boot/BootMenuPrint.asm
r124 r127 88 88 ; AX, BX, SI, DI 89 89 ;-------------------------------------------------------------------- 90 ;ALIGN JUMP_ALIGN91 90 .HardDiskMenuitemForOurDrive: 92 91 call BootInfo_GetOffsetToBX … … 224 223 call FindDPT_ForDriveNumber ; DS:DI to point DPT 225 224 jnc SHORT .HardDiskMenuitemInfoForForeignDrive 226 call .HardDiskMenuitemInfoSizeForOurDrive 227 jmp BootMenuPrintCfg_ForOurDrive 225 ; Fall to .HardDiskMenuitemInfoForOurDrive 226 227 ;-------------------------------------------------------------------- 228 ; .HardDiskMenuitemInfoForOurDrive 229 ; Parameters: 230 ; DL: Untranslated Hard Disk number 231 ; DS:DI: Ptr to DPT 232 ; Returns: 233 ; Nothing 234 ; Corrupts registers: 235 ; AX, BX, CX, DX, SI, DI, ES 236 ;-------------------------------------------------------------------- 237 ALIGN JUMP_ALIGN 238 .HardDiskMenuitemInfoForOurDrive: 239 push di 240 ePUSH_T ax, BootMenuPrintCfg_ForOurDrive ; Return from BootMenuPrint_FormatCSSIfromParamsInSSBP 241 push bp 242 mov bp, sp 243 ePUSH_T ax, g_szCapacity 244 245 ; Get and push L-CHS size 246 call HCapacity_GetSectorCountFromOurAH08h 247 call ConvertSectorCountInBXDXAXtoSizeAndPushForFormat 248 249 ; Get and push total LBA size 250 mov dl, [di+DPT.bDrvNum] 251 call BootInfo_GetTotalSectorCount 252 call ConvertSectorCountInBXDXAXtoSizeAndPushForFormat 253 254 mov si, g_szSizeDual 255 jmp SHORT BootMenuPrint_FormatCSSIfromParamsInSSBP 256 228 257 229 258 ;-------------------------------------------------------------------- … … 248 277 249 278 mov si, g_szSizeSingle 250 jmp SHORT BootMenuPrint_FormatCSSIfromParamsInSSBP251 252 ;--------------------------------------------------------------------253 ; .HardDiskMenuitemInfoSizeForOurDrive254 ; Parameters:255 ; DL: Untranslated Hard Disk number256 ; DS:DI: Ptr to DPT257 ; Returns:258 ; Nothing259 ; Corrupts registers:260 ; AX, BX, CX, DX, SI, ES261 ;--------------------------------------------------------------------262 ALIGN JUMP_ALIGN263 .HardDiskMenuitemInfoSizeForOurDrive:264 push bp265 mov bp, sp266 ePUSH_T ax, g_szCapacity267 268 ; Get and push L-CHS size269 call HCapacity_GetSectorCountFromOurAH08h270 call ConvertSectorCountInBXDXAXtoSizeAndPushForFormat271 272 ; Get and push total LBA size273 call BootInfo_GetTotalSectorCount274 call ConvertSectorCountInBXDXAXtoSizeAndPushForFormat275 276 mov si, g_szSizeDual277 279 ; Fall to BootMenuPrint_FormatCSSIfromParamsInSSBP 278 280 -
trunk/XTIDE_Universal_BIOS/Src/Boot/BootMenuPrintCfg.asm
r116 r127 12 12 ; BootMenuPrintCfg_ForOurDrive 13 13 ; Parameters: 14 ; DS:DI: Ptr to DPT 14 ; DS: Segment to DPT 15 ; Stack: Offset to DPT 15 16 ; Returns: 16 17 ; Nothing … … 20 21 ALIGN JUMP_ALIGN 21 22 BootMenuPrintCfg_ForOurDrive: 23 pop di 22 24 mov si, g_szCfgHeader 23 25 call BootMenuPrint_NullTerminatedStringFromCSSIandSetCF … … 37 39 ; AX, DX, SI, DI 38 40 ;-------------------------------------------------------------------- 39 ALIGN JUMP_ALIGN40 41 PushAndFormatCfgString: 41 42 push bp … … 173 174 PrintValuesFromStack: 174 175 mov si, g_szCfgFormat 175 jmp BootMenuPrint_ NullTerminatedStringFromCSSIandSetCF176 jmp BootMenuPrint_FormatCSSIfromParamsInSSBP 176 177 177 178 -
trunk/XTIDE_Universal_BIOS/Src/Strings.asm
r122 r127 6 6 7 7 ; POST drive detection strings 8 g_szRomAt: db "%s @ %x", CR,LF,NULL8 g_szRomAt: db "%s @ %x",LF,CR,NULL 9 9 g_szMaster: db "Master",NULL 10 10 g_szSlave: db "Slave ",NULL 11 11 g_szDetect: db "IDE %s at %x: ",NULL ; IDE Master at 1F0h: 12 g_szNotFound: db "not found", CR,LF,NULL12 g_szNotFound: db "not found",LF,CR,NULL 13 13 14 14 ; Boot loader strings 15 g_szTryToBoot: db "Booting from %s %x",ANGLE_QUOTE_RIGHT,"%x", CR,LF,NULL15 g_szTryToBoot: db "Booting from %s %x",ANGLE_QUOTE_RIGHT,"%x",LF,CR,NULL 16 16 g_szBootSector: db "Boot sector",NULL 17 17 g_szFound: db "found",NULL 18 g_szSectRead: db "%s %s!", CR,LF,NULL19 g_szReadError: db "Error %x!", CR,LF,NULL18 g_szSectRead: db "%s %s!",LF,CR,NULL 19 g_szReadError: db "Error %x!",LF,CR,NULL 20 20 21 21 ; Boot menu bottom of screen strings … … 34 34 g_szCapacity: db "Capacity : ",NULL 35 35 g_szSizeSingle: db "%s%u.%u %ciB",NULL 36 g_szSizeDual: db "%s%u.%u %ciB / %u.%u %ciB", NULL37 g_szCfgHeader: db "Addr.",SINGLE_VERTICAL,"Block",SINGLE_VERTICAL,"Bus", SINGLE_VERTICAL,"IRQ", SINGLE_VERTICAL,"Reset", CR,LF,NULL36 g_szSizeDual: db "%s%u.%u %ciB / %u.%u %ciB",LF,CR,NULL 37 g_szCfgHeader: db "Addr.",SINGLE_VERTICAL,"Block",SINGLE_VERTICAL,"Bus", SINGLE_VERTICAL,"IRQ", SINGLE_VERTICAL,"Reset",LF,CR,NULL 38 38 g_szCfgFormat: db "%s" ,SINGLE_VERTICAL,"%5u", SINGLE_VERTICAL,"%c%2u",SINGLE_VERTICAL," %c%c",SINGLE_VERTICAL,"%5x", NULL 39 39 g_szLCHS: db "L-CHS",NULL
Note:
See TracChangeset
for help on using the changeset viewer.