Changeset 583 in xtideuniversalbios


Ignore:
Timestamp:
Apr 23, 2015, 4:28:47 PM (10 years ago)
Author:
krille_n_@…
google:author:
krille_n_@hotmail.com
Message:

Changes:

  • Changed BOOT_MENU_DEFAULT_TIMEOUT to reduce rounding error.
  • Minor optimizations and fixes, mostly to the menu library code.
Location:
trunk
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • trunk/Assembly_Library/Inc/BiosData.inc

    r245 r583  
    7777    .wKBPtrStart    resb    2       ; 0:480h, Keyboard, Pointer to start of buffer (XT+)
    7878    .wKBPtrEnd      resb    2       ; 0:482h, Keyboard, Pointer to end of buffer (XT+)
    79     .bVidRows       resb    1       ; 0:484h, Video, Number of rows (EGA+)
     79    .bVidRows       resb    1       ; 0:484h, Video, Number of rows minus one (EGA+)
    8080    .wVidPpC        resb    2       ; 0:485h, Video, Pixels per character (EGA+)
    8181    .bVidOptns      resb    1       ; 0:487h, Video, Options (EGA+)
  • trunk/Assembly_Library/Src/Display/CgaSnow.asm

    r526 r583  
    2929;               Cleared if CGA not detected
    3030;   Corrupts registers:
    31 ;       AX
     31;       Nothing
    3232;--------------------------------------------------------------------
    3333ALIGN DISPLAY_JUMP_ALIGN
     
    3737
    3838    ; All standard CGA modes use 25 rows but only EGA and later store it to BDA.
    39     cmp     BYTE [BDA.bVidRows], 25
    40     jge     SHORT .CgaNotFound
    41     stc
     39    cmp     BYTE [BDA.bVidRows], 25     ; *FIXME* Shouldn't this be 24 (rows - 1)?
     40    jae     SHORT .CgaNotFound
    4241    ret
    4342ALIGN DISPLAY_JUMP_ALIGN
  • trunk/Assembly_Library/Src/Menu/Dialog/Dialog.asm

    r526 r583  
    180180    CALL_DISPLAY_LIBRARY GetColumnsToALandRowsToAH
    181181    xchg    bx, ax
    182     mov     ah, [bp+MENUINIT.bTitleLines]
     182    mov     ah, MENU_VERTICAL_BORDER_LINES
     183    add     ah, [bp+MENUINIT.bTitleLines]
    183184    add     ah, [bp+MENUINIT.wItems]
    184185    add     ah, [bp+MENUINIT.bInfoLines]
    185     add     ah, BYTE MENU_VERTICAL_BORDER_LINES
    186186    cmp     ah, bh
    187187    jb      .AHlessThanBH
  • trunk/Assembly_Library/Src/Menu/MenuBorders.asm

    r580 r583  
    135135ALIGN MENU_JUMP_ALIGN
    136136MenuBorders_GetNumberOfMiddleCharactersToDX:
    137     eMOVZX  dx, [bp+MENUINIT.bWidth]
    138     sub     dx, BYTE MENU_HORIZONTAL_BORDER_LINES
     137    mov     dx, -MENU_HORIZONTAL_BORDER_LINES & 0FFh
     138    add     dl, [bp+MENUINIT.bWidth]
    139139    ret
    140140
  • trunk/Assembly_Library/Src/Menu/MenuLocation.asm

    r526 r583  
    133133ALIGN MENU_JUMP_ALIGN
    134134MenuLocation_GetMaxTextLineLengthToAX:
    135     eMOVZX  ax, [bp+MENUINIT.bWidth]
    136     sub     ax, BYTE MENU_HORIZONTAL_BORDER_LINES + MENU_TEXT_COLUMN_OFFSET
     135    mov     ax, -(MENU_HORIZONTAL_BORDER_LINES + MENU_TEXT_COLUMN_OFFSET) & 0FFh
     136    add     al, [bp+MENUINIT.bWidth]
    137137    ret
  • trunk/Assembly_Library/Src/Menu/MenuScrollbars.asm

    r568 r583  
    248248ALIGN MENU_JUMP_ALIGN
    249249MenuScrollbars_GetMaxVisibleItemsOnPageToCX:
    250     eMOVZX  cx, [bp+MENUINIT.bHeight]
     250    mov     cx, -MENU_VERTICAL_BORDER_LINES & 0FFh
     251    add     cl, [bp+MENUINIT.bHeight]
    251252    sub     cl, [bp+MENUINIT.bTitleLines]
    252253    sub     cl, [bp+MENUINIT.bInfoLines]
    253     sub     cl, MENU_VERTICAL_BORDER_LINES
    254     ret
     254    ret
  • trunk/Assembly_Library/Src/Menu/MenuText.asm

    r526 r583  
    240240    cmp     cx, [bp+MENUINIT.wHighlightedItem]
    241241    jne     SHORT .ReturnAttributeTypeInSI
    242     sub     si, BYTE ATTRIBUTE_CHARS.cItem - ATTRIBUTE_CHARS.cHighlightedItem
     242    inc     si      ; SI = ATTRIBUTE_CHARS.cHighlightedItem
    243243ALIGN MENU_JUMP_ALIGN, ret
    244244.ReturnAttributeTypeInSI:
  • trunk/XTIDE_Universal_BIOS/Inc/BootMenu.inc

    r526 r583  
    2222
    2323; Boot menu sizes
    24 BOOT_MENU_DEFAULT_TIMEOUT               EQU (30 * TICKS_PER_SECOND)
    25 BOOT_MENU_TITLE_LINES                   EQU 2   ; Number of title lines
    26 BOOT_MENU_INFO_LINES                    EQU 3   ; Number of info lines
    27 BOOT_MENU_SEPARATOR_LINES_PLUS_SHADOW   EQU 5
    28 BOOT_MENU_TITLE_AND_INFO_LINES          EQU (BOOT_MENU_TITLE_LINES | (BOOT_MENU_INFO_LINES<<8))
    29 BOOT_MENU_WIDTH                         EQU 40  ; Menu width in characters (including shadow)
    30 BOOT_MENU_HEIGHT_WITHOUT_ITEMS          EQU (BOOT_MENU_TITLE_LINES + BOOT_MENU_INFO_LINES + BOOT_MENU_SEPARATOR_LINES_PLUS_SHADOW)
    31 MENU_SCREEN_BOTTOM_LINES                EQU 1
     24BOOT_MENU_DEFAULT_TIMEOUT               EQU     (TICKS_PER_MINUTE / 2)
     25BOOT_MENU_TITLE_LINES                   EQU     2   ; Number of title lines
     26BOOT_MENU_INFO_LINES                    EQU     3   ; Number of info lines
     27BOOT_MENU_SEPARATOR_LINES_PLUS_SHADOW   EQU     5
     28BOOT_MENU_TITLE_AND_INFO_LINES          EQU     (BOOT_MENU_TITLE_LINES | (BOOT_MENU_INFO_LINES<<8))
     29BOOT_MENU_WIDTH                         EQU     40  ; Menu width in characters (including shadow)
     30BOOT_MENU_HEIGHT_WITHOUT_ITEMS          EQU     (BOOT_MENU_TITLE_LINES + BOOT_MENU_INFO_LINES + BOOT_MENU_SEPARATOR_LINES_PLUS_SHADOW)
     31MENU_SCREEN_BOTTOM_LINES                EQU     1
    3232
    3333
  • trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH15h_HSize.asm

    r580 r583  
    7474
    7575;--------------------------------------------------------------------
    76 ; AH15h_GetSectorCountFromForeignDriveToDXAX
     76; AH15h_GetSectorCountFromForeignDriveToBXDXAX
    7777; AH15h_GetSectorCountToBXDXAX
    7878;   Parameters:
    79 ;       DL:     Drive number (AH15h_GetSectorCountFromForeignDriveToDXAX only)
     79;       DL:     Drive number (AH15h_GetSectorCountFromForeignDriveToBXDXAX only)
    8080;       DS:     RAMVARS segment
    81 ;       DS:DI:  Ptr to DPT (AH15h_GetSectorCountToDXAX only)
     81;       DS:DI:  Ptr to DPT (AH15h_GetSectorCountToBXDXAX only)
    8282;   Returns:
    8383;       DX:AX:  Total sector count
     
    8787;--------------------------------------------------------------------
    8888%ifdef MODULE_BOOT_MENU
    89 AH15h_GetSectorCountFromForeignDriveToDXAX:
     89AH15h_GetSectorCountFromForeignDriveToBXDXAX:
    9090    mov     ah, GET_DRIVE_PARAMETERS
    9191    call    Int13h_CallPreviousInt13hHandler
  • trunk/XTIDE_Universal_BIOS/Src/Menus/BootMenu/BootMenuPrint.asm

    r567 r583  
    199199.HardDiskMenuitemInfoForForeignDrive:
    200200    call    DriveXlate_ToOrBack
    201     call    AH15h_GetSectorCountFromForeignDriveToDXAX
     201    call    AH15h_GetSectorCountFromForeignDriveToBXDXAX
    202202
    203203.ConvertSectorCountInBXDXAXtoSizeAndPushForFormat:
  • trunk/XTIDE_Universal_BIOS_Configurator_v2/Inc/Variables.inc

    r526 r583  
    2222
    2323; Equates and defines
    24 BOOT_MENU_DEFAULT_TIMEOUT           EQU (30 * TICKS_PER_SECOND)
     24BOOT_MENU_DEFAULT_TIMEOUT           EQU     (TICKS_PER_MINUTE / 2)
    2525MAX_ALLOWED_IDE_CONTROLLERS         EQU     4   ; Maximum number of IDE controllers
    2626MAX_LITE_MODE_CONTROLLERS           EQU     2
  • trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Menupages/MasterSlaveMenu.asm

    r567 r583  
    399399    push    dx
    400400
    401     mov     ax, [es:di]
    402     mov     dx, [es:di+2]       ; DX:AX now holds user defined LBA28 limit
    403     add     ax, BYTE 1          ; Increment by one
    404     adc     dx, BYTE 0
     401    mov     ax, 1
     402    cwd                         ; DX:AX = 1
     403    add     ax, [es:di]
     404    adc     dx, [es:di+2]       ; User defined LBA28 limit added
    405405
    406406    xchg    ax, dx              ; SHR 16
Note: See TracChangeset for help on using the changeset viewer.