Changeset 397 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Inc


Ignore:
Timestamp:
Apr 19, 2012, 11:11:41 AM (12 years ago)
Author:
aitotat@…
google:author:
aitotat@gmail.com
Message:

Changes to XTIDE Universal BIOS:

  • Cleaned some code concerning recent module changes.
  • Removed drive number translation flag from ROMVARS.
  • BOOTMENUINFO is now DRVDETECTINFO.
  • Makefile now builds tiny binary (XT build with minimal features).
Location:
trunk/XTIDE_Universal_BIOS/Inc
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/XTIDE_Universal_BIOS/Inc/BootMenu.inc

    r392 r397  
    3232
    3333
    34 ; Boot Menu Information Table. These are generated for all XTIDE Universal
    35 ; BIOS drives. Available only until boot is successful.
    36 MAX_HARD_DISK_NAME_LENGTH               EQU     30      ; Bytes reserved for drive name
    37 
    38 struc BOOTMENUINFO
    39     .szDrvName              resb    MAX_HARD_DISK_NAME_LENGTH
    40                             resb    2   ; Zero word (ensures string terminates)
    41     .wInitErrorFlags        resb    2   ; Errors during initialization
    42    
    43 %ifdef MODULE_ADVANCED_ATA
    44                             resb    6   ; padding to make BOOTMENUINFO size an even multiple of DPT size
    45 %else
    46                             resb    2   ; padding to make BOOTMENUINFO size an even multiple of DPT size
    47 %endif             
    48 endstruc
    49 
    50 
    51 DPT_BOOTMENUINFO_SIZE_MULTIPLIER  equ   BOOTMENUINFO_size / LARGEST_DPT_SIZE
    52 
    53 %ifndef CHECK_FOR_UNUSED_ENTRYPOINTS
    54 
    55 %if MAX_HARD_DISK_NAME_LENGTH % 2 <> 0
    56     %error "MAX_HARD_DISK_NAME_LENGTH needs to be a multiple of 2, memory is moved with word operations."
    57 %endif
    58 
    59 %if BOOTMENUINFO_size % LARGEST_DPT_SIZE <> 0
    60     %error "BOOTMENUINFO's size must be an even multiple of DPT's size.  Add or remove padding at the bottom of BOOTMENUINFO to bring the two sizes into alignment.  As BOOTMENUINFO is only used at boot time, with plenty of memory to consume, it is OK to waste some space here."
    61 %endif
    62 
    63 %if BOOTMENUINFO.szDrvName <> 0
    64     %error "BOOTMENUINFO.szDrvName is assumed to be the first member of struc BOOTMENUINFO, in BootMenuPrint_RefreshItem"
    65 %endif
    66 
    67 %endif
    68 
    69 
    7034%endif ; BOOTMENU_INC
  • trunk/XTIDE_Universal_BIOS/Inc/BootVars.inc

    r392 r397  
    2222%define BOOTVARS_INC
    2323
    24 
     24; Number of times to retry booting before accepting error
    2525BOOT_READ_RETRY_TIMES       EQU     3
    2626
     
    3636    .rgbMnuStack:
    3737    .dwPostStack        resb    4       ; POST stack pointer when entering INT 19h
     38
     39    .clearToZeroFromThisPoint:
     40%ifdef MODULE_HOTKEYS
    3841    .hotkeyVars         resb    HOTKEYVARS_size
    39     .rgBootNfo:                         ; Array containing BOOTNFO structs
     42%endif
     43   
     44    .rgDrvDetectInfo:                   ; Array containing DRVDETECTINFO structs
    4045endstruc
    4146
     47%ifdef MODULE_HOTKEYS
    4248struc HOTKEYVARS
    4349    .bScancode          resb    1       ; Function hotkey scancode
     
    5157FLG_HOTKEY_HD_FIRST     EQU     (1<<0)  ; First try to boot from HDD, then FDD
    5258
     59%endif ; MODULE_HOTKEY
     60
     61
     62
     63struc DRVDETECTINFO
     64    .szDrvName              resb    MAX_HARD_DISK_NAME_LENGTH
     65                            resb    2   ; Zero word (ensures string terminates)
     66    .wInitErrorFlags        resb    2   ; Errors during initialization
     67   
     68%ifdef MODULE_ADVANCED_ATA
     69                            resb    6   ; padding to make DRVDETECTINFO size an even multiple of DPT size
     70%else
     71                            resb    2   ; padding to make DRVDETECTINFO size an even multiple of DPT size
     72%endif             
     73endstruc
     74
     75; Boot Menu Information Table. These are generated for all XTIDE Universal
     76; BIOS drives. Available only until boot is successful.
     77MAX_HARD_DISK_NAME_LENGTH           EQU     30      ; Bytes reserved for drive name
     78DPT_DRVDETECTINFO_SIZE_MULTIPLIER   EQU     DRVDETECTINFO_size / LARGEST_DPT_SIZE
     79
     80
     81%ifndef CHECK_FOR_UNUSED_ENTRYPOINTS
     82
     83%if MAX_HARD_DISK_NAME_LENGTH % 2 <> 0
     84    %error "MAX_HARD_DISK_NAME_LENGTH needs to be a multiple of 2, memory is moved with word operations."
     85%endif
     86
     87%if DRVDETECTINFO_size % LARGEST_DPT_SIZE <> 0
     88    %error "DRVDETECTINFO's size must be an even multiple of DPT's size.  Add or remove padding at the bottom of DRVDETECTINFO to bring the two sizes into alignment.  As DRVDETECTINFO is only used at boot time, with plenty of memory to consume, it is OK to waste some space here."
     89%endif
     90
     91%if DRVDETECTINFO.szDrvName <> 0
     92    %error "DRVDETECTINFO.szDrvName is assumed to be the first member of struc DRVDETECTINFO, in BootMenuPrint_RefreshItem"
     93%endif
     94
     95%endif
    5396
    5497
  • trunk/XTIDE_Universal_BIOS/Inc/CustomDPT.inc

    r376 r397  
    8181endstruc
    8282
    83 ; Flags for BOOTMENUINFO.wInitErrorFlags
     83; Flags for DPT_ATA.bInitError
    8484FLG_INITERROR_FAILED_TO_SELECT_DRIVE                EQU     (1<<0)
    8585FLG_INITERROR_FAILED_TO_INITIALIZE_CHS_PARAMETERS   EQU     (1<<1)
  • trunk/XTIDE_Universal_BIOS/Inc/ModuleDependency.inc

    r395 r397  
    2525    %endif
    2626%endif
     27
     28
     29
     30; Include module specific .INC files
     31%ifdef MODULE_EBIOS
     32    %include "EBIOS.inc"            ; Equates for EBIOS functions
     33%endif
     34
     35%ifdef MODULE_HOTKEYS
     36    %include "HotkeyBar.inc"        ; For Hotkeys
     37    %ifdef MODULE_BOOT_MENU
     38        %include "BootMenu.inc"         ; For Boot Menu
     39    %endif
     40%endif
     41
     42%ifdef MODULE_ADVANCED_ATA
     43    %include "Vision.inc"           ; For QDI Vision QD65xx VLB IDE Controllers
     44%endif
     45
     46
     47; Included modules for ROMVARS.wFlags
     48%ifdef MODULE_ADVANCED_ATA
     49    MAIN_FLG_MODULE_ADVANCED_ATA    EQU FLG_ROMVARS_MODULE_ADVANCED_ATA
     50%else
     51    MAIN_FLG_MODULE_ADVANCED_ATA    EQU 0
     52%endif
     53
     54%ifdef MODULE_BOOT_MENU
     55    MAIN_FLG_MODULE_BOOT_MENU   EQU FLG_ROMVARS_MODULE_BOOT_MENU
     56%else
     57    MAIN_FLG_MODULE_BOOT_MENU   EQU 0
     58%endif
     59
     60%ifdef MODULE_EBIOS
     61    MAIN_FLG_MODULE_EBIOS   EQU FLG_ROMVARS_MODULE_EBIOS
     62%else
     63    MAIN_FLG_MODULE_EBIOS   EQU 0
     64%endif
     65
     66%ifdef MODULE_HOTKEYS
     67    MAIN_FLG_MODULE_HOTKEYS EQU FLG_ROMVARS_MODULE_HOTKEYS
     68%else
     69    MAIN_FLG_MODULE_HOTKEYS EQU 0
     70%endif
     71
     72%ifdef MODULE_JRIDE
     73    MAIN_FLG_MODULE_JRIDE   EQU FLG_ROMVARS_MODULE_JRIDE
     74%else
     75    MAIN_FLG_MODULE_JRIDE   EQU 0
     76%endif
     77
     78%ifdef MODULE_SERIAL
     79    MAIN_FLG_MODULE_SERIAL  EQU FLG_ROMVARS_MODULE_SERIAL
     80%else
     81    MAIN_FLG_MODULE_SERIAL  EQU 0
     82%endif
     83
     84%ifdef MODULE_SERIAL_FLOPPY
     85    MAIN_FLG_MODULE_SERIAL_FLOPPY   EQU FLG_ROMVARS_MODULE_SERIAL_FLOPPY
     86%else
     87    MAIN_FLG_MODULE_SERIAL_FLOPPY   EQU 0
     88%endif
     89
     90%ifdef MODULE_STRINGS_COMPRESSED
     91    MAIN_FLG_MODULE_STRINGS_COMPRESSED  EQU FLG_ROMVARS_MODULE_STRINGS_COMPRESSED
     92%else
     93    MAIN_FLG_MODULE_STRINGS_COMPRESSED  EQU 0
     94%endif
     95
     96MASK_ROMVARS_INCLUDED_MODULES   EQU MAIN_FLG_MODULE_ADVANCED_ATA | MAIN_FLG_MODULE_BOOT_MENU | MAIN_FLG_MODULE_EBIOS | MAIN_FLG_MODULE_HOTKEYS | MAIN_FLG_MODULE_JRIDE | MAIN_FLG_MODULE_SERIAL | MAIN_FLG_MODULE_SERIAL_FLOPPY | MAIN_FLG_MODULE_STRINGS_COMPRESSED
  • trunk/XTIDE_Universal_BIOS/Inc/RomVars.inc

    r392 r397  
    6666; Bit defines for ROMVARS.wFlags
    6767FLG_ROMVARS_FULLMODE                EQU (1<<0)  ; Full operating mode (steals base RAM, supports EBIOS etc.)
    68 FLG_ROMVARS_DRVXLAT                 EQU (1<<2)  ; Enable drive number translation
    6968FLG_ROMVARS_SERIAL_SCANDETECT       EQU (1<<3)  ; Scan COM ports at the end of drive detection.  Can also be invoked
    7069                                                ; by holding down the ALT key at the end of drive detection.
    7170                                                ; (Conveniently, this is 8, a fact we exploit when testing the bit)
    72 FLG_ROMVARS_MODULE_ADVATA           EQU (1<<4)  ; Here in case the configuration needs to know functionality is present
    73 FLG_ROMVARS_MODULE_JRIDE            EQU (1<<5)  ; Here in case the configuration needs to know functionality is present
    74 FLG_ROMVARS_MODULE_SERIAL           EQU (1<<6)  ; Here in case the configuration needs to know functionality is present
    75 FLG_ROMVARS_MODULE_EBIOS            EQU (1<<7)  ; Here in case the configuration needs to know functionality is present
     71
     72FLG_ROMVARS_MODULE_ADVANCED_ATA         EQU (1<<8)  ; Here in case the configuration needs to know functionality is present
     73FLG_ROMVARS_MODULE_BOOT_MENU            EQU (1<<9)  ; Here in case the configuration needs to know functionality is present
     74FLG_ROMVARS_MODULE_EBIOS                EQU (1<<10) ; Here in case the configuration needs to know functionality is present
     75FLG_ROMVARS_MODULE_HOTKEYS              EQU (1<<11) ; Here in case the configuration needs to know functionality is present
     76FLG_ROMVARS_MODULE_JRIDE                EQU (1<<12) ; Here in case the configuration needs to know functionality is present
     77FLG_ROMVARS_MODULE_SERIAL               EQU (1<<13) ; Here in case the configuration needs to know functionality is present
     78FLG_ROMVARS_MODULE_SERIAL_FLOPPY        EQU (1<<14) ; Here in case the configuration needs to know functionality is present
     79FLG_ROMVARS_MODULE_STRINGS_COMPRESSED   EQU (1<<15) ; Here in case the configuration needs to know functionality is present
     80
    7681
    7782; Boot Menu Display Modes (see Assembly Library Display.inc for standard modes)
Note: See TracChangeset for help on using the changeset viewer.