Changeset 252 in xtideuniversalbios


Ignore:
Timestamp:
Feb 18, 2012, 2:12:54 PM (13 years ago)
Author:
aitotat@…
google:author:
aitotat@gmail.com
Message:

Changes to XTIDE Universal BIOS:

  • Boot menu now shows only one capacity.
  • Added "strings" makefile target to compress strings.
Location:
trunk/XTIDE_Universal_BIOS
Files:
7 edited

Legend:

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

    r243 r252  
    1515    .szDrvName      resb    LEN_BOOTNFO_DRV     ; Drive name
    1616                    resb    2       ; Zero word (ensures string terminates)
    17     .twSectCnt      resb    6       ; Total user addressable sectors
    18                     resb    2       ; padding to make BOOTNFO size an even multiple of DPT size
     17                    resb    8       ; padding to make BOOTNFO size an even multiple of DPT size
    1918endstruc
    2019
     
    2928%if BOOTNFO.szDrvName <> 0
    3029%error "BOOTNFO.szDrvName is assumed to be the first member of struc BOOTNFO, in BootMenuPrint_RefreshItem"
    31 %endif
    32 
    33 %if BOOTNFO.szDrvName + LEN_BOOTNFO_DRV + 2 <> BOOTNFO.twSectCnt
    34 %error "BOOTNFO.twSectCnt is assumed to come immediately after BOOTNFO.szDrvName (with zero padding), in BootInfo_CreateForHardDisk"
    3530%endif
    3631
  • trunk/XTIDE_Universal_BIOS/Src/Boot/BootInfo.asm

    r241 r252  
    6363    ret
    6464
    65        
     65
    6666;--------------------------------------------------------------------
    67 ; Finds BOOTNFO for drive and returns total sector count.
    68 ;
    6967; BootInfo_GetTotalSectorCount
    7068;   Parameters:
     
    7371;       BX:DX:AX:   48-bit sector count
    7472;   Corrupts registers:
    75 ;       Nothing
     73;       CX
    7674;--------------------------------------------------------------------
    7775ALIGN JUMP_ALIGN
    7876BootInfo_GetTotalSectorCount:
    79     push    ds
    80     call    BootInfo_ConvertDPTtoBX
    81     LOAD_BDA_SEGMENT_TO ds, ax
    82     mov     ax, [bx+BOOTNFO.twSectCnt]
    83     mov     dx, [bx+BOOTNFO.twSectCnt+2]
    84     mov     bx, [bx+BOOTNFO.twSectCnt+4]
    85     pop     ds
    86     ret
     77    test    BYTE [di+DPT.bFlagsLow], FLG_DRVNHEAD_LBA
     78    jnz     SHORT .ReturnFullCapacity
     79    jmp     AH15h_GetSectorCountToBXDXAX
     80.ReturnFullCapacity:
     81    jmp     AccessDPT_GetLbaSectorCountToBXDXAX
    8782
    8883
  • trunk/XTIDE_Universal_BIOS/Src/Boot/BootMenuPrint.asm

    r243 r252  
    100100;       AX, BX, CX, DX, SI, DI, ES
    101101;--------------------------------------------------------------------
    102 
    103102ALIGN JUMP_ALIGN
    104103BootMenuPrint_RefreshInformation:
     
    195194;--------------------------------------------------------------------
    196195.HardDiskMenuitemInfoForOurDrive:
    197     ePUSH_T ax, g_szSizeDual
    198        
    199     ; Get and push L-CHS size
    200     call    AH15h_GetSectorCountToDXAX
    201     call    ConvertSectorCountInBXDXAXtoSizeAndPushForFormat
     196    ePUSH_T ax, g_szInformation
    202197
    203198    ; Get and push total LBA size
     
    205200    call    ConvertSectorCountInBXDXAXtoSizeAndPushForFormat       
    206201    jmp     BootMenuPrintCfg_ForOurDrive
    207                
     202
    208203;--------------------------------------------------------------------
    209204; .HardDiskMenuitemInfoForForeignDrive
  • trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH15h_HSize.asm

    r227 r252  
    2525ALIGN JUMP_ALIGN
    2626AH15h_HandlerForReadDiskDriveSize:
    27     call    AH15h_GetSectorCountToDXAX
     27    call    AH15h_GetSectorCountToBXDXAX
    2828    mov     [bp+IDEPACK.intpack+INTPACK.cx], dx         ; HIWORD to CX
    2929    mov     [bp+IDEPACK.intpack+INTPACK.dx], ax         ; LOWORD to DX
     
    3737;--------------------------------------------------------------------
    3838; AH15h_GetSectorCountFromForeignDriveToDXAX:
    39 ; AH15h_GetSectorCountToDXAX:
     39; AH15h_GetSectorCountToBXDXAX:
    4040;   Parameters:
    41 ;       DL:     Drive number
     41;       DL:     Drive number (AH15h_GetSectorCountFromForeignDriveToDXAX only)
    4242;       DS:     RAMVARS segment
    43 ;       DS:DI:  Ptr to DPT (AH15h_GetSectorCount only)
     43;       DS:DI:  Ptr to DPT (AH15h_GetSectorCountToDXAX only)
    4444;   Returns:
    4545;       DX:AX:  Total sector count
     
    5353    jmp     SHORT ConvertAH08hReturnValuesToSectorCount
    5454
    55 AH15h_GetSectorCountToDXAX:
     55AH15h_GetSectorCountToBXDXAX:
    5656    call    AH8h_GetDriveParameters
    5757    ; Fall to ConvertAH08hReturnValuesToSectorCount
  • trunk/XTIDE_Universal_BIOS/Src/Strings.asm

    r242 r252  
    6767g_szCapacity:           db  "Capacity : %s",NULL
    6868g_szCapacityNum:        db  "%5-u.%u %ciB",NULL
    69 g_szSizeDual:           db  "%s /%s",LF,CR
     69g_szInformation:        db  "%s",LF,CR
    7070    db  "Addr.",SINGLE_VERTICAL,"Block",SINGLE_VERTICAL,"Bus",SINGLE_VERTICAL,  "IRQ",SINGLE_VERTICAL,"Reset",LF,CR
    7171    db     "%s",SINGLE_VERTICAL, "%5-u",SINGLE_VERTICAL, "%s",SINGLE_VERTICAL," %2-I",SINGLE_VERTICAL,"%5-x" ,NULL
  • trunk/XTIDE_Universal_BIOS/Src/StringsCompressed.asm

    r241 r252  
    22;;;
    33;;; This file is generated by StringsCompress.pl from source in Strings.asm
    4 ;;; DO NOT EDIT DIRECTLY - See the maekfile for how to rebuild this file.
     4;;; DO NOT EDIT DIRECTLY - See the makefile for how to rebuild this file.
    55;;; This file only needs to be rebuilt if Strings.asm is changed.
    66;;;
     
    1818
    1919; The following strings are used by DetectPrint_StartDetectWithMasterOrSlaveStringInAXandIdeVarsInCSBP
    20 ; To support an optimization in that code, these strings must start on the same 256 byte page, 
     20; To support an optimization in that code, these strings must start on the same 256 byte page,
    2121; which is checked at assembly time below.
    2222;
    23 g_szDetectStart:       
    24 g_szDetectMaster:       ; db    "Master",NULL 
     23g_szDetectStart:
     24g_szDetectMaster:       ; db    "Master",NULL
    2525                        ; db     4dh,  61h,  73h,  74h,  65h,  72h,  00h    ; uncompressed
    2626                          db     53h,  67h,  79h,  7ah,  6bh, 0b8h          ; compressed
     
    3838                          db     19h                ; compressed
    3939
    40 g_szDetectCOM:          ; db  "COM%c%s",NULL           
     40g_szDetectCOM:          ; db  "COM%c%s",NULL
    4141                        ; db   43h,  4fh,  4dh,  25h,  63h,  25h,  73h,  00h    ; uncompressed
    4242                          db   49h,  55h,  53h,  35h,  1eh                      ; compressed
     
    5656
    5757
    58 %ifndef CHECK_FOR_UNUSED_ENTRYPOINTS               
     58%ifndef CHECK_FOR_UNUSED_ENTRYPOINTS
    5959%if ((g_szDetectEnd-$$) & 0xff00) <> ((g_szDetectStart-$$) & 0xff00)
    6060%error "g_szDetect* strings must start on the same 256 byte page, required by DetectPrint_StartDetectWithMasterOrSlaveStringInAXandIdeVarsInCSBP.  Please move this block up or down within strings.asm"
     
    6363
    6464; Boot Menu menuitem strings
    65 ; 
     65;
    6666; The following strings are used by BootMenuPrint_* routines.
    67 ; To support optimizations in that code, these strings must start on the same 256 byte page, 
     67; To support optimizations in that code, these strings must start on the same 256 byte page,
    6868; which is checked at assembly time below.
    69 ;       
    70 g_szBootMenuPrintStart: 
     69;
     70g_szBootMenuPrintStart:
    7171g_szDriveNum:           ; db    "%x %s",NULL
    7272                        ; db     25h,  78h,  20h,  25h,  73h,  00h    ; uncompressed
     
    8181                          db     4ch,  72h,  75h,  76h,  76h, 0ffh,  4ah,  78h,  6fh,  7ch, 0ebh,  15h                            ; compressed
    8282
    83 g_szBootMenuPrintEnd:   
     83g_szBootMenuPrintEnd:
    8484g_szForeignHD:          ; db    "Foreign Hard Disk",NULL
    8585                        ; db     46h,  6fh,  72h,  65h,  69h,  67h,  6eh,  20h,  48h,  61h,  72h,  64h,  20h,  44h,  69h,  73h,  6bh,  00h    ; uncompressed
     
    8787
    8888
    89 %ifndef CHECK_FOR_UNUSED_ENTRYPOINTS               
     89%ifndef CHECK_FOR_UNUSED_ENTRYPOINTS
    9090%if ((g_szBootMenuPrintStart-$$) & 0xff00) <> ((g_szBootMenuPrintEnd-$$) & 0xff00)
    9191%error "g_szBootMenuPrint* strings must start on the same 256 byte page, required by the BootMenuPrint_* routines.  Please move this block up or down within strings.asm"
     
    140140                          db     49h,  67h,  76h,  67h,  69h,  6fh,  7ah, 0ffh, 0c0h,  1eh                            ; compressed
    141141
    142 g_szCapacityNum:        ; db    "%5-u.%u %ciB",NULL     
     142g_szCapacityNum:        ; db    "%5-u.%u %ciB",NULL
    143143                        ; db     25h,  35h,  2dh,  75h,  2eh,  25h,  75h,  20h,  25h,  63h,  69h,  42h,  00h    ; uncompressed
    144144                          db     38h,  29h,  37h,  20h,  35h,  6fh,  88h                                        ; compressed
    145145
    146 g_szSizeDual:           ; db    "%s /%s",LF,CR
    147                         ; db     25h,  73h,  20h,  2fh, 25h,  73h,  0ah,  0dh    ; uncompressed
    148                           db     3eh,  20h,  2ah,  3eh,  3bh                      ; compressed
     146g_szInformation:        ; db    "%s",LF,CR
     147                        ; db    25h,  73h,  0ah,  0dh    ; uncompressed
     148                          db     3eh,  3bh                ; compressed
    149149
    150150    ; db    "Addr.",SINGLE_VERTICAL,"Block",SINGLE_VERTICAL,"Bus",SINGLE_VERTICAL,  "IRQ",SINGLE_VERTICAL,"Reset",LF,CR
     
    158158
    159159; Boot Menu Floppy Disk strings
    160 ; 
     160;
    161161; The following strings are used by BootMenuPrint_RefreshInformation
    162 ; To support optimizations in that code, these strings must start on the same 256 byte page, 
     162; To support optimizations in that code, these strings must start on the same 256 byte page,
    163163; which is checked at assembly time below.
    164 ;               
    165 g_szFddStart:   
     164;
     165g_szFddStart:
    166166g_szFddUnknown: ; db    "Unknown",NULL
    167167                ; db     55h,  6eh,  6bh,  6eh,  6fh,  77h,  6eh,  00h    ; uncompressed
     
    180180                          db   2dh,  02h          ; compressed
    181181
    182 g_szFddEnd:     
     182g_szFddEnd:
    183183g_szFddFiveQuarter:     ; db  "5",ONE_QUARTER,NULL
    184184                        ; db   35h, 0ach,  00h    ; uncompressed
     
    186186
    187187
    188 %ifndef CHECK_FOR_UNUSED_ENTRYPOINTS               
     188%ifndef CHECK_FOR_UNUSED_ENTRYPOINTS
    189189%if ((g_szFddStart-$$) & 0xff00) <> ((g_szFddEnd-$$) & 0xff00)
    190190%error "g_szFdd* strings must start on the same 256 byte page, required by the BootMenuPrint_RefreshInformation routines for floppy drives.  Please move this block up or down within strings.asm"
    191191%endif
    192 %endif                     
    193 
    194 g_szAddressingModes:                   
     192%endif
     193
     194g_szAddressingModes:
    195195g_szLCHS:       ; db    "L-CHS",NULL
    196196                ; db     4ch,  2dh,  43h,  48h,  53h,  00h    ; uncompressed
     
    213213; Ensure that addressing modes are correctly spaced in memory
    214214;
    215 %ifndef CHECK_FOR_UNUSED_ENTRYPOINTS       
     215%ifndef CHECK_FOR_UNUSED_ENTRYPOINTS
    216216%if g_szLCHS <> g_szAddressingModes
    217217%error "g_szAddressingModes Displacement Incorrect 1"
     
    220220%error "g_szAddressingModes Displacement Incorrect 2"
    221221%endif
    222 %if g_szLBA28 <> g_szPCHS + g_szAddressingModes_Displacement       
     222%if g_szLBA28 <> g_szPCHS + g_szAddressingModes_Displacement
    223223%error "g_szAddressingModes Displacement Incorrect 3"
    224224%endif
    225 %if g_szLBA48 <> g_szLBA28 + g_szAddressingModes_Displacement       
     225%if g_szLBA48 <> g_szLBA28 + g_szAddressingModes_Displacement
    226226%error "g_szAddressingModes Displacement Incorrect 4"
    227227%endif
    228 %endif     
    229 
    230 g_szBusTypeValues:     
     228%endif
     229
     230g_szBusTypeValues:
    231231g_szBusTypeValues_8Dual:        ; db        "D8 ",NULL
    232232                                ; db         44h,  38h,  20h,  00h    ; uncompressed
     
    257257; Ensure that bus type strings are correctly spaced in memory
    258258;
    259 %ifndef CHECK_FOR_UNUSED_ENTRYPOINTS               
     259%ifndef CHECK_FOR_UNUSED_ENTRYPOINTS
    260260%if g_szBusTypeValues_8Dual <> g_szBusTypeValues
    261261%error "g_szBusTypeValues Displacement Incorrect 1"
    262262%endif
    263263%if g_szBusTypeValues_8Reversed <> g_szBusTypeValues + g_szBusTypeValues_Displacement
    264 %error "g_szBusTypeValues Displacement Incorrect 2"     
     264%error "g_szBusTypeValues Displacement Incorrect 2"
    265265%endif
    266266%if g_szBusTypeValues_8Single <> g_szBusTypeValues_8Reversed + g_szBusTypeValues_Displacement
    267 %error "g_szBusTypeValues Displacement Incorrect 3"             
    268 %endif
    269 %if g_szBusTypeValues_16 <> g_szBusTypeValues_8Single + g_szBusTypeValues_Displacement     
    270 %error "g_szBusTypeValues Displacement Incorrect 4"             
     267%error "g_szBusTypeValues Displacement Incorrect 3"
     268%endif
     269%if g_szBusTypeValues_16 <> g_szBusTypeValues_8Single + g_szBusTypeValues_Displacement
     270%error "g_szBusTypeValues Displacement Incorrect 4"
    271271%endif
    272272%if g_szBusTypeValues_32 <> g_szBusTypeValues_16 + g_szBusTypeValues_Displacement
    273 %error "g_szBusTypeValues Displacement Incorrect 5"             
     273%error "g_szBusTypeValues Displacement Incorrect 5"
    274274%endif
    275275%if g_szBusTypeValues_Serial <> g_szBusTypeValues_32 + g_szBusTypeValues_Displacement
    276 %error "g_szBusTypeValues Displacement Incorrect 6"             
     276%error "g_szBusTypeValues Displacement Incorrect 6"
    277277%endif
    278278%endif
     
    290290
    291291;------------------------------------------------------------------------------------------
    292 ; 
     292;
    293293; Tables for StringsCompress.pl
    294294;
     
    304304;$translate{ord('.')} = 9;    [StringsCompress Processed]
    305305;$translate{ord('/')} = 10;    [StringsCompress Processed]
    306 ;$translate{ord('1')} = 11;        [StringsCompress Processed]
     306;$translate{ord('1')} = 11;    [StringsCompress Processed]
    307307;$translate{ord('2')} = 12;    [StringsCompress Processed]
    308308;$translate{ord('3')} = 13;    [StringsCompress Processed]
     
    334334;
    335335; Starting point for the "normal" range, typically around 0x40 to cover upper and lower case
    336 ; letters.  If lower case 'z' is not used, 0x3a can be a good choice as it adds ':' to the 
     336; letters.  If lower case 'z' is not used, 0x3a can be a good choice as it adds ':' to the
    337337; front end.
    338338;
     
    342342;
    343343;------------------------------------------------------------------------------------------
    344 
    345 
    346344
    347345;;; end of input stream
     
    423421;; translated usage stats
    424422;; 33:1
    425 ;; 32:31
     423;; 32:30
    426424;; 181:1
    427425;; 53:2
     
    433431;; 50:2
    434432;; 51:3
    435 ;; 47:3
     433;; 47:2
    436434;; 52:1
    437435;; 172:2
     
    450448;; 5-u:2
    451449;; x:7
    452 ;; s:13
     450;; s:12
    453451;; 5-x:1
    454452;; nl:6
  • trunk/XTIDE_Universal_BIOS/makefile

    r240 r252  
    11###############################################################################
    2 # Generic makefile for building BIOS binary file.                             #
    3 # v. 1.0.0 (28.7.2007 ... 28.7.2007)                                          #
    4 # (C) Tomi Tilli                                                              #
    5 # aitotat@gmail.com                                                           #
     2# Makefile to build XTIDE Universal BIOS.                                     #
    63#                                                                             #
    74# Valid makefile targets are:                                                 #
     
    96# build     Builds binary file in \Build                                      #
    107# clean     Removes all files from \Build                                     #
     8# checksum* Builds all and then generates checksum byte to all binary files   #
     9# strings*  Compress src\strings.asm to src\StringsCompressed.asm             #
    1110#                                                                             #
     11# * at the end of target name means that Perl is required for the job.        #
    1212# Build directory must be created manually if it does not exist.              #
    1313#                                                                             #
     
    158158    @echo Large XT version "$(TARGET)_xtl.bin" built.
    159159
     160strings: src\StringsCompressed.asm
     161
    160162clean:
    161163    @$(RM) $(BUILD_DIR)\*.*
     
    170172    @perl ..\tools\checksum.pl $(TARGET)_xt.bin $(ROMSIZE)
    171173
    172 src\StringsCompressed.asm:  src\Strings.asm
     174src\StringsCompressed.asm: src\Strings.asm
    173175    @$(AS) src\Strings.asm $(ASFLAGS) $(DEFS_XT) -DMODULE_STRINGS_COMPRESSED_PRECOMPRESS -o build\Strings.bin -l build\StringsPrecompress.lst
    174176    @perl ..\tools\StringsCompress.pl < build\StringsPrecompress.lst > src\StringsCompressed.asm
    175177    @echo StringsCompressed.asm updated!
    176178
    177 $(SRC_ASM):     src\StringsCompressed.asm
    178 
    179 xt_unused:  xt
     179xt_unused: xt
    180180    $(AS) "$(SRC_ASM)" $(ASFLAGS) $(DEFS_XT) -o"$(TARGET)_xt_unused.asm" -E -DCHECK_FOR_UNUSED_ENTRYPOINTS
    181181    perl ..\tools\unused.pl $(TARGET)_xt.lst $(TARGET)_xt_unused.asm
Note: See TracChangeset for help on using the changeset viewer.