- Timestamp:
- Feb 18, 2012, 2:12:54 PM (13 years ago)
- google:author:
- aitotat@gmail.com
- Location:
- trunk/XTIDE_Universal_BIOS
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/XTIDE_Universal_BIOS/Inc/BootVars.inc
r243 r252 15 15 .szDrvName resb LEN_BOOTNFO_DRV ; Drive name 16 16 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 19 18 endstruc 20 19 … … 29 28 %if BOOTNFO.szDrvName <> 0 30 29 %error "BOOTNFO.szDrvName is assumed to be the first member of struc BOOTNFO, in BootMenuPrint_RefreshItem" 31 %endif32 33 %if BOOTNFO.szDrvName + LEN_BOOTNFO_DRV + 2 <> BOOTNFO.twSectCnt34 %error "BOOTNFO.twSectCnt is assumed to come immediately after BOOTNFO.szDrvName (with zero padding), in BootInfo_CreateForHardDisk"35 30 %endif 36 31 -
trunk/XTIDE_Universal_BIOS/Src/Boot/BootInfo.asm
r241 r252 63 63 ret 64 64 65 65 66 66 ;-------------------------------------------------------------------- 67 ; Finds BOOTNFO for drive and returns total sector count.68 ;69 67 ; BootInfo_GetTotalSectorCount 70 68 ; Parameters: … … 73 71 ; BX:DX:AX: 48-bit sector count 74 72 ; Corrupts registers: 75 ; Nothing73 ; CX 76 74 ;-------------------------------------------------------------------- 77 75 ALIGN JUMP_ALIGN 78 76 BootInfo_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 87 82 88 83 -
trunk/XTIDE_Universal_BIOS/Src/Boot/BootMenuPrint.asm
r243 r252 100 100 ; AX, BX, CX, DX, SI, DI, ES 101 101 ;-------------------------------------------------------------------- 102 103 102 ALIGN JUMP_ALIGN 104 103 BootMenuPrint_RefreshInformation: … … 195 194 ;-------------------------------------------------------------------- 196 195 .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 202 197 203 198 ; Get and push total LBA size … … 205 200 call ConvertSectorCountInBXDXAXtoSizeAndPushForFormat 206 201 jmp BootMenuPrintCfg_ForOurDrive 207 202 208 203 ;-------------------------------------------------------------------- 209 204 ; .HardDiskMenuitemInfoForForeignDrive -
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH15h_HSize.asm
r227 r252 25 25 ALIGN JUMP_ALIGN 26 26 AH15h_HandlerForReadDiskDriveSize: 27 call AH15h_GetSectorCountTo DXAX27 call AH15h_GetSectorCountToBXDXAX 28 28 mov [bp+IDEPACK.intpack+INTPACK.cx], dx ; HIWORD to CX 29 29 mov [bp+IDEPACK.intpack+INTPACK.dx], ax ; LOWORD to DX … … 37 37 ;-------------------------------------------------------------------- 38 38 ; AH15h_GetSectorCountFromForeignDriveToDXAX: 39 ; AH15h_GetSectorCountTo DXAX:39 ; AH15h_GetSectorCountToBXDXAX: 40 40 ; Parameters: 41 ; DL: Drive number 41 ; DL: Drive number (AH15h_GetSectorCountFromForeignDriveToDXAX only) 42 42 ; DS: RAMVARS segment 43 ; DS:DI: Ptr to DPT (AH15h_GetSectorCount only)43 ; DS:DI: Ptr to DPT (AH15h_GetSectorCountToDXAX only) 44 44 ; Returns: 45 45 ; DX:AX: Total sector count … … 53 53 jmp SHORT ConvertAH08hReturnValuesToSectorCount 54 54 55 AH15h_GetSectorCountTo DXAX:55 AH15h_GetSectorCountToBXDXAX: 56 56 call AH8h_GetDriveParameters 57 57 ; Fall to ConvertAH08hReturnValuesToSectorCount -
trunk/XTIDE_Universal_BIOS/Src/Strings.asm
r242 r252 67 67 g_szCapacity: db "Capacity : %s",NULL 68 68 g_szCapacityNum: db "%5-u.%u %ciB",NULL 69 g_sz SizeDual: db "%s /%s",LF,CR69 g_szInformation: db "%s",LF,CR 70 70 db "Addr.",SINGLE_VERTICAL,"Block",SINGLE_VERTICAL,"Bus",SINGLE_VERTICAL, "IRQ",SINGLE_VERTICAL,"Reset",LF,CR 71 71 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 2 2 ;;; 3 3 ;;; This file is generated by StringsCompress.pl from source in Strings.asm 4 ;;; DO NOT EDIT DIRECTLY - See the ma ekfile for how to rebuild this file.4 ;;; DO NOT EDIT DIRECTLY - See the makefile for how to rebuild this file. 5 5 ;;; This file only needs to be rebuilt if Strings.asm is changed. 6 6 ;;; … … 18 18 19 19 ; 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, 21 21 ; which is checked at assembly time below. 22 22 ; 23 g_szDetectStart: 24 g_szDetectMaster: ; db "Master",NULL 23 g_szDetectStart: 24 g_szDetectMaster: ; db "Master",NULL 25 25 ; db 4dh, 61h, 73h, 74h, 65h, 72h, 00h ; uncompressed 26 26 db 53h, 67h, 79h, 7ah, 6bh, 0b8h ; compressed … … 38 38 db 19h ; compressed 39 39 40 g_szDetectCOM: ; db "COM%c%s",NULL 40 g_szDetectCOM: ; db "COM%c%s",NULL 41 41 ; db 43h, 4fh, 4dh, 25h, 63h, 25h, 73h, 00h ; uncompressed 42 42 db 49h, 55h, 53h, 35h, 1eh ; compressed … … 56 56 57 57 58 %ifndef CHECK_FOR_UNUSED_ENTRYPOINTS 58 %ifndef CHECK_FOR_UNUSED_ENTRYPOINTS 59 59 %if ((g_szDetectEnd-$$) & 0xff00) <> ((g_szDetectStart-$$) & 0xff00) 60 60 %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" … … 63 63 64 64 ; Boot Menu menuitem strings 65 ; 65 ; 66 66 ; 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, 68 68 ; which is checked at assembly time below. 69 ; 70 g_szBootMenuPrintStart: 69 ; 70 g_szBootMenuPrintStart: 71 71 g_szDriveNum: ; db "%x %s",NULL 72 72 ; db 25h, 78h, 20h, 25h, 73h, 00h ; uncompressed … … 81 81 db 4ch, 72h, 75h, 76h, 76h, 0ffh, 4ah, 78h, 6fh, 7ch, 0ebh, 15h ; compressed 82 82 83 g_szBootMenuPrintEnd: 83 g_szBootMenuPrintEnd: 84 84 g_szForeignHD: ; db "Foreign Hard Disk",NULL 85 85 ; db 46h, 6fh, 72h, 65h, 69h, 67h, 6eh, 20h, 48h, 61h, 72h, 64h, 20h, 44h, 69h, 73h, 6bh, 00h ; uncompressed … … 87 87 88 88 89 %ifndef CHECK_FOR_UNUSED_ENTRYPOINTS 89 %ifndef CHECK_FOR_UNUSED_ENTRYPOINTS 90 90 %if ((g_szBootMenuPrintStart-$$) & 0xff00) <> ((g_szBootMenuPrintEnd-$$) & 0xff00) 91 91 %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" … … 140 140 db 49h, 67h, 76h, 67h, 69h, 6fh, 7ah, 0ffh, 0c0h, 1eh ; compressed 141 141 142 g_szCapacityNum: ; db "%5-u.%u %ciB",NULL 142 g_szCapacityNum: ; db "%5-u.%u %ciB",NULL 143 143 ; db 25h, 35h, 2dh, 75h, 2eh, 25h, 75h, 20h, 25h, 63h, 69h, 42h, 00h ; uncompressed 144 144 db 38h, 29h, 37h, 20h, 35h, 6fh, 88h ; compressed 145 145 146 g_sz SizeDual: ; db "%s /%s",LF,CR147 ; db 25h, 73h, 20h, 2fh,25h, 73h, 0ah, 0dh ; uncompressed148 db 3eh, 20h, 2ah, 3eh, 3bh; compressed146 g_szInformation: ; db "%s",LF,CR 147 ; db 25h, 73h, 0ah, 0dh ; uncompressed 148 db 3eh, 3bh ; compressed 149 149 150 150 ; db "Addr.",SINGLE_VERTICAL,"Block",SINGLE_VERTICAL,"Bus",SINGLE_VERTICAL, "IRQ",SINGLE_VERTICAL,"Reset",LF,CR … … 158 158 159 159 ; Boot Menu Floppy Disk strings 160 ; 160 ; 161 161 ; 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, 163 163 ; which is checked at assembly time below. 164 ; 165 g_szFddStart: 164 ; 165 g_szFddStart: 166 166 g_szFddUnknown: ; db "Unknown",NULL 167 167 ; db 55h, 6eh, 6bh, 6eh, 6fh, 77h, 6eh, 00h ; uncompressed … … 180 180 db 2dh, 02h ; compressed 181 181 182 g_szFddEnd: 182 g_szFddEnd: 183 183 g_szFddFiveQuarter: ; db "5",ONE_QUARTER,NULL 184 184 ; db 35h, 0ach, 00h ; uncompressed … … 186 186 187 187 188 %ifndef CHECK_FOR_UNUSED_ENTRYPOINTS 188 %ifndef CHECK_FOR_UNUSED_ENTRYPOINTS 189 189 %if ((g_szFddStart-$$) & 0xff00) <> ((g_szFddEnd-$$) & 0xff00) 190 190 %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" 191 191 %endif 192 %endif 193 194 g_szAddressingModes: 192 %endif 193 194 g_szAddressingModes: 195 195 g_szLCHS: ; db "L-CHS",NULL 196 196 ; db 4ch, 2dh, 43h, 48h, 53h, 00h ; uncompressed … … 213 213 ; Ensure that addressing modes are correctly spaced in memory 214 214 ; 215 %ifndef CHECK_FOR_UNUSED_ENTRYPOINTS 215 %ifndef CHECK_FOR_UNUSED_ENTRYPOINTS 216 216 %if g_szLCHS <> g_szAddressingModes 217 217 %error "g_szAddressingModes Displacement Incorrect 1" … … 220 220 %error "g_szAddressingModes Displacement Incorrect 2" 221 221 %endif 222 %if g_szLBA28 <> g_szPCHS + g_szAddressingModes_Displacement 222 %if g_szLBA28 <> g_szPCHS + g_szAddressingModes_Displacement 223 223 %error "g_szAddressingModes Displacement Incorrect 3" 224 224 %endif 225 %if g_szLBA48 <> g_szLBA28 + g_szAddressingModes_Displacement 225 %if g_szLBA48 <> g_szLBA28 + g_szAddressingModes_Displacement 226 226 %error "g_szAddressingModes Displacement Incorrect 4" 227 227 %endif 228 %endif 229 230 g_szBusTypeValues: 228 %endif 229 230 g_szBusTypeValues: 231 231 g_szBusTypeValues_8Dual: ; db "D8 ",NULL 232 232 ; db 44h, 38h, 20h, 00h ; uncompressed … … 257 257 ; Ensure that bus type strings are correctly spaced in memory 258 258 ; 259 %ifndef CHECK_FOR_UNUSED_ENTRYPOINTS 259 %ifndef CHECK_FOR_UNUSED_ENTRYPOINTS 260 260 %if g_szBusTypeValues_8Dual <> g_szBusTypeValues 261 261 %error "g_szBusTypeValues Displacement Incorrect 1" 262 262 %endif 263 263 %if g_szBusTypeValues_8Reversed <> g_szBusTypeValues + g_szBusTypeValues_Displacement 264 %error "g_szBusTypeValues Displacement Incorrect 2" 264 %error "g_szBusTypeValues Displacement Incorrect 2" 265 265 %endif 266 266 %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" 271 271 %endif 272 272 %if g_szBusTypeValues_32 <> g_szBusTypeValues_16 + g_szBusTypeValues_Displacement 273 %error "g_szBusTypeValues Displacement Incorrect 5" 273 %error "g_szBusTypeValues Displacement Incorrect 5" 274 274 %endif 275 275 %if g_szBusTypeValues_Serial <> g_szBusTypeValues_32 + g_szBusTypeValues_Displacement 276 %error "g_szBusTypeValues Displacement Incorrect 6" 276 %error "g_szBusTypeValues Displacement Incorrect 6" 277 277 %endif 278 278 %endif … … 290 290 291 291 ;------------------------------------------------------------------------------------------ 292 ; 292 ; 293 293 ; Tables for StringsCompress.pl 294 294 ; … … 304 304 ;$translate{ord('.')} = 9; [StringsCompress Processed] 305 305 ;$translate{ord('/')} = 10; [StringsCompress Processed] 306 ;$translate{ord('1')} = 11; 306 ;$translate{ord('1')} = 11; [StringsCompress Processed] 307 307 ;$translate{ord('2')} = 12; [StringsCompress Processed] 308 308 ;$translate{ord('3')} = 13; [StringsCompress Processed] … … 334 334 ; 335 335 ; 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 337 337 ; front end. 338 338 ; … … 342 342 ; 343 343 ;------------------------------------------------------------------------------------------ 344 345 346 344 347 345 ;;; end of input stream … … 423 421 ;; translated usage stats 424 422 ;; 33:1 425 ;; 32:3 1423 ;; 32:30 426 424 ;; 181:1 427 425 ;; 53:2 … … 433 431 ;; 50:2 434 432 ;; 51:3 435 ;; 47: 3433 ;; 47:2 436 434 ;; 52:1 437 435 ;; 172:2 … … 450 448 ;; 5-u:2 451 449 ;; x:7 452 ;; s:1 3450 ;; s:12 453 451 ;; 5-x:1 454 452 ;; nl:6 -
trunk/XTIDE_Universal_BIOS/makefile
r240 r252 1 1 ############################################################################### 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. # 6 3 # # 7 4 # Valid makefile targets are: # … … 9 6 # build Builds binary file in \Build # 10 7 # 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 # 11 10 # # 11 # * at the end of target name means that Perl is required for the job. # 12 12 # Build directory must be created manually if it does not exist. # 13 13 # # … … 158 158 @echo Large XT version "$(TARGET)_xtl.bin" built. 159 159 160 strings: src\StringsCompressed.asm 161 160 162 clean: 161 163 @$(RM) $(BUILD_DIR)\*.* … … 170 172 @perl ..\tools\checksum.pl $(TARGET)_xt.bin $(ROMSIZE) 171 173 172 src\StringsCompressed.asm: 174 src\StringsCompressed.asm: src\Strings.asm 173 175 @$(AS) src\Strings.asm $(ASFLAGS) $(DEFS_XT) -DMODULE_STRINGS_COMPRESSED_PRECOMPRESS -o build\Strings.bin -l build\StringsPrecompress.lst 174 176 @perl ..\tools\StringsCompress.pl < build\StringsPrecompress.lst > src\StringsCompressed.asm 175 177 @echo StringsCompressed.asm updated! 176 178 177 $(SRC_ASM): src\StringsCompressed.asm 178 179 xt_unused: xt 179 xt_unused: xt 180 180 $(AS) "$(SRC_ASM)" $(ASFLAGS) $(DEFS_XT) -o"$(TARGET)_xt_unused.asm" -E -DCHECK_FOR_UNUSED_ENTRYPOINTS 181 181 perl ..\tools\unused.pl $(TARGET)_xt.lst $(TARGET)_xt_unused.asm
Note:
See TracChangeset
for help on using the changeset viewer.