- Timestamp:
- Apr 19, 2012, 11:11:41 AM (13 years ago)
- google:author:
- aitotat@gmail.com
- Location:
- trunk/XTIDE_Universal_BIOS
- Files:
-
- 13 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/XTIDE_Universal_BIOS/Inc/BootMenu.inc
r392 r397 32 32 33 33 34 ; Boot Menu Information Table. These are generated for all XTIDE Universal35 ; BIOS drives. Available only until boot is successful.36 MAX_HARD_DISK_NAME_LENGTH EQU 30 ; Bytes reserved for drive name37 38 struc BOOTMENUINFO39 .szDrvName resb MAX_HARD_DISK_NAME_LENGTH40 resb 2 ; Zero word (ensures string terminates)41 .wInitErrorFlags resb 2 ; Errors during initialization42 43 %ifdef MODULE_ADVANCED_ATA44 resb 6 ; padding to make BOOTMENUINFO size an even multiple of DPT size45 %else46 resb 2 ; padding to make BOOTMENUINFO size an even multiple of DPT size47 %endif48 endstruc49 50 51 DPT_BOOTMENUINFO_SIZE_MULTIPLIER equ BOOTMENUINFO_size / LARGEST_DPT_SIZE52 53 %ifndef CHECK_FOR_UNUSED_ENTRYPOINTS54 55 %if MAX_HARD_DISK_NAME_LENGTH % 2 <> 056 %error "MAX_HARD_DISK_NAME_LENGTH needs to be a multiple of 2, memory is moved with word operations."57 %endif58 59 %if BOOTMENUINFO_size % LARGEST_DPT_SIZE <> 060 %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 %endif62 63 %if BOOTMENUINFO.szDrvName <> 064 %error "BOOTMENUINFO.szDrvName is assumed to be the first member of struc BOOTMENUINFO, in BootMenuPrint_RefreshItem"65 %endif66 67 %endif68 69 70 34 %endif ; BOOTMENU_INC -
trunk/XTIDE_Universal_BIOS/Inc/BootVars.inc
r392 r397 22 22 %define BOOTVARS_INC 23 23 24 24 ; Number of times to retry booting before accepting error 25 25 BOOT_READ_RETRY_TIMES EQU 3 26 26 … … 36 36 .rgbMnuStack: 37 37 .dwPostStack resb 4 ; POST stack pointer when entering INT 19h 38 39 .clearToZeroFromThisPoint: 40 %ifdef MODULE_HOTKEYS 38 41 .hotkeyVars resb HOTKEYVARS_size 39 .rgBootNfo: ; Array containing BOOTNFO structs 42 %endif 43 44 .rgDrvDetectInfo: ; Array containing DRVDETECTINFO structs 40 45 endstruc 41 46 47 %ifdef MODULE_HOTKEYS 42 48 struc HOTKEYVARS 43 49 .bScancode resb 1 ; Function hotkey scancode … … 51 57 FLG_HOTKEY_HD_FIRST EQU (1<<0) ; First try to boot from HDD, then FDD 52 58 59 %endif ; MODULE_HOTKEY 60 61 62 63 struc 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 73 endstruc 74 75 ; Boot Menu Information Table. These are generated for all XTIDE Universal 76 ; BIOS drives. Available only until boot is successful. 77 MAX_HARD_DISK_NAME_LENGTH EQU 30 ; Bytes reserved for drive name 78 DPT_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 53 96 54 97 -
trunk/XTIDE_Universal_BIOS/Inc/CustomDPT.inc
r376 r397 81 81 endstruc 82 82 83 ; Flags for BOOTMENUINFO.wInitErrorFlags83 ; Flags for DPT_ATA.bInitError 84 84 FLG_INITERROR_FAILED_TO_SELECT_DRIVE EQU (1<<0) 85 85 FLG_INITERROR_FAILED_TO_INITIALIZE_CHS_PARAMETERS EQU (1<<1) -
trunk/XTIDE_Universal_BIOS/Inc/ModuleDependency.inc
r395 r397 25 25 %endif 26 26 %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 96 MASK_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 66 66 ; Bit defines for ROMVARS.wFlags 67 67 FLG_ROMVARS_FULLMODE EQU (1<<0) ; Full operating mode (steals base RAM, supports EBIOS etc.) 68 FLG_ROMVARS_DRVXLAT EQU (1<<2) ; Enable drive number translation69 68 FLG_ROMVARS_SERIAL_SCANDETECT EQU (1<<3) ; Scan COM ports at the end of drive detection. Can also be invoked 70 69 ; by holding down the ALT key at the end of drive detection. 71 70 ; (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 72 FLG_ROMVARS_MODULE_ADVANCED_ATA EQU (1<<8) ; Here in case the configuration needs to know functionality is present 73 FLG_ROMVARS_MODULE_BOOT_MENU EQU (1<<9) ; Here in case the configuration needs to know functionality is present 74 FLG_ROMVARS_MODULE_EBIOS EQU (1<<10) ; Here in case the configuration needs to know functionality is present 75 FLG_ROMVARS_MODULE_HOTKEYS EQU (1<<11) ; Here in case the configuration needs to know functionality is present 76 FLG_ROMVARS_MODULE_JRIDE EQU (1<<12) ; Here in case the configuration needs to know functionality is present 77 FLG_ROMVARS_MODULE_SERIAL EQU (1<<13) ; Here in case the configuration needs to know functionality is present 78 FLG_ROMVARS_MODULE_SERIAL_FLOPPY EQU (1<<14) ; Here in case the configuration needs to know functionality is present 79 FLG_ROMVARS_MODULE_STRINGS_COMPRESSED EQU (1<<15) ; Here in case the configuration needs to know functionality is present 80 76 81 77 82 ; Boot Menu Display Modes (see Assembly Library Display.inc for standard modes) -
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int19h.asm
r395 r397 107 107 108 108 ; Check if ROM boot (INT 18h) wanted 109 %ifdef MODULE_HOTKEYS 109 110 cmp BYTE [es:BOOTVARS.hotkeyVars+HOTKEYVARS.bScancode], ROM_BOOT_HOTKEY_SCANCODE 110 111 je SHORT JumpToBootSector_or_RomBoot ; CF clear so ROM boot 112 %endif 111 113 112 114 ; Try to boot from Primary boot drive (00h by default) -
trunk/XTIDE_Universal_BIOS/Src/Initialization/DetectDrives.asm
r395 r397 211 211 ; ES:SI Ptr to ATA information for the drive 212 212 ; DS: RAMVARS segment 213 ; ES: BDA /Bootnfosegment213 ; ES: BDA segment 214 214 ; Returns: 215 215 ; Nothing … … 220 220 call CreateDPT_FromAtaInformation 221 221 jc SHORT DetectDrives_DriveNotFound 222 call BootMenuInfo_CreateForHardDisk223 jmp SHORT DetectPrint_DriveNameFrom BootnfoInESBX222 call DriveDetectInfo_CreateForHardDisk 223 jmp SHORT DetectPrint_DriveNameFromDrvDetectInfoInESBX -
trunk/XTIDE_Universal_BIOS/Src/Initialization/DetectPrint.asm
r395 r397 153 153 154 154 ;-------------------------------------------------------------------- 155 ; DetectPrint_DriveNameFrom BootnfoInESBX156 ; Parameters: 157 ; ES:BX: Ptr to BOOTMENUINFO (if drive found)155 ; DetectPrint_DriveNameFromDrvDetectInfoInESBX 156 ; Parameters: 157 ; ES:BX: Ptr to DRVDETECTINFO (if drive found) 158 158 ; Returns: 159 159 ; Nothing … … 161 161 ; AX, SI 162 162 ;-------------------------------------------------------------------- 163 DetectPrint_DriveNameFrom BootnfoInESBX:163 DetectPrint_DriveNameFromDrvDetectInfoInESBX: 164 164 push di 165 165 push bx 166 166 167 lea si, [bx+ BOOTMENUINFO.szDrvName]167 lea si, [bx+DRVDETECTINFO.szDrvName] 168 168 mov bx, es 169 169 CALL_DISPLAY_LIBRARY PrintNullTerminatedStringFromBXSI -
trunk/XTIDE_Universal_BIOS/Src/Main.asm
r395 r397 52 52 %include "IdeRegisters.inc" ; For ATA Registers, flags and commands 53 53 %include "Int13h.inc" ; Equates for INT 13h functions 54 %ifdef MODULE_EBIOS55 %include "EBIOS.inc" ; Equates for EBIOS functions56 %endif57 54 %include "CustomDPT.inc" ; For Disk Parameter Table 58 55 %include "RomVars.inc" ; For ROMVARS and IDEVARS structs 59 56 %include "RamVars.inc" ; For RAMVARS struct 60 57 %include "BootVars.inc" ; For BOOTVARS struct 61 %include "HotkeyBar.inc" ; For Hotkeys62 %include "BootMenu.inc" ; For Boot Menu63 58 %include "IDE_8bit.inc" ; For IDE 8-bit data port macros 64 59 %include "DeviceIDE.inc" ; For IDE device equates 65 %include "Vision.inc" ; For QDI Vision QD65xx VLB IDE Controllers 60 66 61 67 62 … … 79 74 at ROMVARS.szVersion, db ROM_VERSION_STRING 80 75 81 ;;; For OR'ing into wFlags below82 ;;;83 %ifdef MODULE_SERIAL84 MAIN_FLG_MODULE_SERIAL equ FLG_ROMVARS_MODULE_SERIAL85 %else86 MAIN_FLG_MODULE_SERIAL equ 087 %endif88 89 %ifdef MODULE_EBIOS90 MAIN_FLG_MODULE_EBIOS equ FLG_ROMVARS_MODULE_EBIOS91 %else92 MAIN_FLG_MODULE_EBIOS equ 093 %endif94 95 %ifdef MODULE_JRIDE96 MAIN_FLG_MODULE_JRIDE equ FLG_ROMVARS_MODULE_JRIDE97 %else98 MAIN_FLG_MODULE_JRIDE equ 099 %endif100 101 %ifdef MODULE_ADVANCED_ATA102 MAIN_FLG_MODULE_ADVATA equ FLG_ROMVARS_MODULE_ADVATA103 %else104 MAIN_FLG_MODULE_ADVATA equ 0105 %endif106 107 108 76 ;---------------------------; 109 77 ; AT Build default settings ; 110 78 ;---------------------------; 111 79 %ifdef USE_AT 112 at ROMVARS.wFlags, dw FLG_ROMVARS_FULLMODE | FLG_ROMVARS_DRVXLAT | MAIN_FLG_MODULE_SERIAL | MAIN_FLG_MODULE_EBIOS | MAIN_FLG_MODULE_JRIDE | MAIN_FLG_MODULE_ADVATA80 at ROMVARS.wFlags, dw FLG_ROMVARS_FULLMODE | MASK_ROMVARS_INCLUDED_MODULES 113 81 at ROMVARS.wDisplayMode, dw DEFAULT_TEXT_MODE 114 at ROMVARS.wBootTimeout, dw BOOT_MENU_DEFAULT_TIMEOUT 82 %ifdef MODULE_BOOT_MENU 83 at ROMVARS.wBootTimeout, dw BOOT_MENU_DEFAULT_TIMEOUT 84 %endif 115 85 at ROMVARS.bIdeCnt, db 4 ; Number of supported controllers 116 86 at ROMVARS.bBootDrv, db 80h ; Boot Menu default drive … … 154 124 ; XT and XT+ Build default settings ; 155 125 ;-----------------------------------; 156 at ROMVARS.wFlags, dw FLG_ROMVARS_DRVXLAT | MAIN_FLG_MODULE_SERIAL | MAIN_FLG_MODULE_EBIOS | MAIN_FLG_MODULE_JRIDE | MAIN_FLG_MODULE_ADVATA126 at ROMVARS.wFlags, dw MASK_ROMVARS_INCLUDED_MODULES 157 127 at ROMVARS.wDisplayMode, dw DEFAULT_TEXT_MODE 158 at ROMVARS.wBootTimeout, dw BOOT_MENU_DEFAULT_TIMEOUT 128 %ifdef MODULE_BOOT_MENU 129 at ROMVARS.wBootTimeout, dw BOOT_MENU_DEFAULT_TIMEOUT 130 %endif 159 131 at ROMVARS.bIdeCnt, db 1 ; Number of supported controllers 160 132 at ROMVARS.bBootDrv, db 80h ; Boot Menu default drive … … 165 137 at ROMVARS.ideVars0+IDEVARS.wPort, dw DEVICE_XTIDE_DEFAULT_PORT ; Controller Command Block base port 166 138 at ROMVARS.ideVars0+IDEVARS.wPortCtrl, dw DEVICE_XTIDE_DEFAULT_PORTCTRL ; Controller Control Block base port 167 %ifdef MODULE_JRIDE168 at ROMVARS.ideVars0+IDEVARS.bDevice, db DEVICE_JRIDE_ISA169 %else170 139 at ROMVARS.ideVars0+IDEVARS.bDevice, db DEVICE_XTIDE_REV1 171 %endif172 at ROMVARS.ideVars0+IDEVARS.bIRQ, db 0 ; IRQ173 140 at ROMVARS.ideVars0+IDEVARS.drvParamsMaster+DRVPARAMS.wFlags, db DISABLE_WRITE_CACHE | FLG_DRVPARAMS_BLOCKMODE 174 141 at ROMVARS.ideVars0+IDEVARS.drvParamsSlave+DRVPARAMS.wFlags, db DISABLE_WRITE_CACHE | FLG_DRVPARAMS_BLOCKMODE … … 221 188 %include "AccessDPT.asm" ; For accessing DPTs 222 189 %include "LbaAssist.asm" ; For generating L-CHS parameters to LBA drives 223 %include " BootMenuInfo.asm" ; For creating BOOTMENUINFO structs190 %include "DrvDetectInfo.asm" ; For creating DRVDETECTINFO structs 224 191 %include "AtaID.asm" ; For ATA Identify Device information 225 192 %include "DetectDrives.asm" ; For detecting IDE drives -
trunk/XTIDE_Universal_BIOS/Src/Menus/BootMenu/BootMenuPrint.asm
r392 r397 42 42 jc .notOurs 43 43 44 call BootMenuInfo_ConvertDPTtoBX44 call DriveDetectInfo_ConvertDPTtoBX 45 45 mov si, g_szDriveNumBOOTNFO ; special g_szDriveNum that prints from BDA 46 46 jmp .go … … 186 186 .HardDiskMenuitemInfoForOurDrive: 187 187 ePUSH_T ax, g_szInformation ; Add substring for our hard disk information 188 call BootMenuInfo_GetTotalSectorCount ; Get Total LBA Size188 call GetTotalSectorCount 189 189 jmp .ConvertSectorCountInBXDXAXtoSizeAndPushForFormat 190 190 … … 218 218 db 2880 / FloppyTypes.rgbCapacityMultiplier ; type 5 219 219 db 2880 / FloppyTypes.rgbCapacityMultiplier ; type 6 220 221 222 ;-------------------------------------------------------------------- 223 ; GetTotalSectorCount 224 ; Parameters: 225 ; DS:DI: DPT Pointer 226 ; Returns: 227 ; BX:DX:AX: 48-bit sector count 228 ; Corrupts registers: 229 ; CX 230 ;-------------------------------------------------------------------- 231 GetTotalSectorCount: 232 test BYTE [di+DPT.bFlagsLow], FLG_DRVNHEAD_LBA 233 jnz SHORT .ReturnFullCapacity 234 jmp AH15h_GetSectorCountToBXDXAX 235 .ReturnFullCapacity: 236 jmp AccessDPT_GetLbaSectorCountToBXDXAX -
trunk/XTIDE_Universal_BIOS/Src/Menus/DriveXlate.asm
r395 r397 33 33 ALIGN JUMP_ALIGN 34 34 DriveXlate_ToOrBack: 35 test BYTE [cs:ROMVARS.wFlags], FLG_ROMVARS_DRVXLAT36 jz SHORT .Return ; Return if translation disabled37 35 xchg di, ax ; Backup AX 38 36 … … 57 55 .RestoreAXandReturn: 58 56 xchg ax, di ; Restore AX 59 ALIGN JUMP_ALIGN, ret60 .Return:61 57 ret 62 58 … … 73 69 ; Nothing 74 70 ;-------------------------------------------------------------------- 75 ALIGN JUMP_ALIGN76 71 DriveXlate_Reset: 77 72 mov WORD [RAMVARS.xlateVars+XLATEVARS.wFDandHDswap], 8000h … … 91 86 ; Nothing 92 87 ;-------------------------------------------------------------------- 93 ALIGN JUMP_ALIGN94 88 DriveXlate_SetDriveToSwap: 95 89 test dl, dl ; Floppy drive? 96 js SHORT .SetHardDiskToSwap 97 .SetFloppyDriveToSwap: 90 js SHORT .SetHardDriveToSwap 91 92 ; Set Floppy Drive to swap 98 93 mov [RAMVARS.xlateVars+XLATEVARS.bFDSwap], dl 99 94 ret 100 ALIGN JUMP_ALIGN 101 .SetHardD iskToSwap:95 96 .SetHardDriveToSwap: 102 97 mov [RAMVARS.xlateVars+XLATEVARS.bHDSwap], dl 103 98 ret -
trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/BootVars.asm
r395 r397 33 33 BootVars_Initialize: 34 34 ; Clear to zero 35 mov al, BOOTMENUINFO_size35 mov al, DRVDETECTINFO_size 36 36 mul BYTE [cs:ROMVARS.bIdeCnt] 37 mov di, BOOTVARS. hotkeyVars; We must not initialize anything before this!37 mov di, BOOTVARS.clearToZeroFromThisPoint ; We must not initialize anything before this! 38 38 add ax, BOOTVARS_size 39 39 sub ax, di -
trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/DrvDetectInfo.asm
r395 r397 23 23 24 24 ;-------------------------------------------------------------------- 25 ; Creates new BOOTMENUINFO struct for detected hard disk.25 ; Creates new DRVDETECTINFO struct for detected hard disk. 26 26 ; 27 ; BootMenuInfo_CreateForHardDisk27 ; DriveDetectInfo_CreateForHardDisk 28 28 ; Parameters: 29 29 ; DL: Drive number … … 31 31 ; ES:SI: Ptr to 512-byte ATA information read from the drive 32 32 ; Returns: 33 ; ES:BX: Ptr to BOOTMENUINFO (if successful)33 ; ES:BX: Ptr to DRVDETECTINFO (if successful) 34 34 ; Corrupts registers: 35 35 ; AX, BX, CX, DX, DI 36 36 ;-------------------------------------------------------------------- 37 BootMenuInfo_CreateForHardDisk:38 call BootMenuInfo_ConvertDPTtoBX ; ES:BX now points to new BOOTMENUINFO37 DriveDetectInfo_CreateForHardDisk: 38 call DriveDetectInfo_ConvertDPTtoBX ; ES:BX now points to new DRVDETECTINFO 39 39 40 40 ; Store Drive Name … … 46 46 47 47 add si, BYTE ATA1.strModel ; DS:SI now points drive name 48 lea di, [bx+ BOOTMENUINFO.szDrvName] ; ES:DI now points to name destination48 lea di, [bx+DRVDETECTINFO.szDrvName] ; ES:DI now points to name destination 49 49 mov cx, MAX_HARD_DISK_NAME_LENGTH / 2 ; Max number of WORDs allowed 50 50 .CopyNextWord: … … 63 63 64 64 ;-------------------------------------------------------------------- 65 ; BootMenuInfo_GetTotalSectorCount 66 ; Parameters: 67 ; DS:DI: DPT Pointer 68 ; Returns: 69 ; BX:DX:AX: 48-bit sector count 70 ; Corrupts registers: 71 ; CX 72 ;-------------------------------------------------------------------- 73 %ifdef MODULE_BOOT_MENU 74 BootMenuInfo_GetTotalSectorCount: 75 test BYTE [di+DPT.bFlagsLow], FLG_DRVNHEAD_LBA 76 jnz SHORT .ReturnFullCapacity 77 jmp AH15h_GetSectorCountToBXDXAX 78 .ReturnFullCapacity: 79 jmp AccessDPT_GetLbaSectorCountToBXDXAX 80 %endif 81 82 83 ;-------------------------------------------------------------------- 84 ; Returns offset to BOOTMENUINFO based on DPT pointer. 65 ; Returns offset to DRVDETECTINFO based on DPT pointer. 85 66 ; 86 ; BootMenuInfo_ConvertDPTtoBX67 ; DriveDetectInfo_ConvertDPTtoBX 87 68 ; Parameters: 88 69 ; DS:DI: DPT Pointer 89 70 ; Returns: 90 ; BX: Offset to BOOTMENUINFO struct71 ; BX: Offset to DRVDETECTINFO struct 91 72 ; Corrupts registers: 92 73 ; AX 93 74 ;-------------------------------------------------------------------- 94 BootMenuInfo_ConvertDPTtoBX:75 DriveDetectInfo_ConvertDPTtoBX: 95 76 mov ax, di 96 77 sub ax, BYTE RAMVARS_size ; subtract off base of DPTs 97 mov bl, DPT_ BOOTMENUINFO_SIZE_MULTIPLIER ; BOOTMENUINFO'sare a whole number multiple of DPT size78 mov bl, DPT_DRVDETECTINFO_SIZE_MULTIPLIER ; DRVDETECTINFO are a whole number multiple of DPT size 98 79 mul bl 99 add ax, BOOTVARS.rg BootNfo ; add base of BOOTMENUINFO80 add ax, BOOTVARS.rgDrvDetectInfo ; add base of DRVDETECTINFO 100 81 xchg ax, bx 101 82 ret -
trunk/XTIDE_Universal_BIOS/makefile
r395 r397 91 91 ################################################################# 92 92 DEFINES_COMMON = MODULE_STRINGS_COMPRESSED MODULE_HOTKEYS MODULE_EBIOS 93 94 DEFINES_XT = ELIMINATE_CGA_SNOW MODULE_SERIAL MODULE_SERIAL_FLOPPY 95 DEFINES_XTPLUS = USE_186 ELIMINATE_CGA_SNOW MODULE_SERIAL MODULE_SERIAL_FLOPPY 96 DEFINES_AT = USE_AT USE_286 MODULE_SERIAL MODULE_SERIAL_FLOPPY MODULE_ADVANCED_ATA 97 98 DEFINES_XT_LARGE = $(DEFINES_XT) MODULE_BOOT_MENU MODULE_JRIDE MODULE_ADVANCED_ATA 99 DEFINES_XTPLUS_LARGE = $(DEFINES_XTPLUS) MODULE_BOOT_MENU MODULE_JRIDE MODULE_ADVANCED_ATA 100 DEFINES_AT_LARGE = $(DEFINES_AT) MODULE_BOOT_MENU MODULE_JRIDE MODULE_ADVANCED_ATA 101 102 DEFINES_JRIDE_8K = ELIMINATE_CGA_SNOW MODULE_JRIDE 103 DEFINES_386_8K = USE_AT USE_386 MODULE_ADVANCED_ATA 93 DEFINES_COMMON_LARGE = MODULE_BOOT_MENU MODULE_JRIDE MODULE_SERIAL MODULE_SERIAL_FLOPPY 94 95 DEFINES_XT = $(DEFINES_COMMON) ELIMINATE_CGA_SNOW MODULE_JRIDE MODULE_SERIAL MODULE_SERIAL_FLOPPY 96 DEFINES_XTPLUS = $(DEFINES_COMMON) $(DEFINES_XT) USE_186 97 DEFINES_AT = $(DEFINES_COMMON) USE_AT USE_286 MODULE_SERIAL MODULE_SERIAL_FLOPPY MODULE_ADVANCED_ATA 98 99 DEFINES_XT_LARGE = $(DEFINES_XT) $(DEFINES_COMMON_LARGE) 100 DEFINES_XTPLUS_LARGE = $(DEFINES_XTPLUS) $(DEFINES_COMMON_LARGE) 101 DEFINES_AT_LARGE = $(DEFINES_AT) $(DEFINES_COMMON_LARGE) 102 103 DEFINES_XT_TINY = MODULE_STRINGS_COMPRESSED 104 DEFINES_386_8K = $(DEFINES_AT) USE_386 104 105 105 106 … … 113 114 114 115 # Add -D in front of every preprocessor define declaration 115 DEFS = $(DEFINES_COMMON:%=-D%)116 116 DEFS_XT = $(DEFINES_XT:%=-D%) -DROMSIZE=$(ROMSIZE) 117 117 DEFS_XTPLUS = $(DEFINES_XTPLUS:%=-D%) -DROMSIZE=$(ROMSIZE) … … 120 120 DEFS_XTPLUS_LARGE = $(DEFINES_XTPLUS_LARGE:%=-D%) -DROMSIZE=$(ROMSIZE_LARGE) 121 121 DEFS_AT_LARGE = $(DEFINES_AT_LARGE:%=-D%) -DROMSIZE=$(ROMSIZE_LARGE) 122 DEFS_ JRIDE_8K = $(DEFINES_JRIDE_8K:%=-D%) -DROMSIZE=$(ROMSIZE)122 DEFS_XT_TINY = $(DEFINES_XT_TINY:%=-D%) -DROMSIZE=$(ROMSIZE) 123 123 DEFS_386_8K = $(DEFINES_386_8K:%=-D%) -DROMSIZE=$(ROMSIZE) 124 124 … … 149 149 # Assembly compiler flags 150 150 ASFLAGS = -f bin # Produce binary object files 151 ASFLAGS += $(DEFS) # Preprocessor defines152 151 ASFLAGS += $(IHEADERS) # Set header file directory paths 153 152 ASFLAGS += -Worphan-labels # Warn about labels without colon … … 162 161 @echo All done! 163 162 164 small: at xtplus xt jride_8k386_8k163 small: xt_tiny xt xtplus at 386_8k 165 164 @echo All 8 kiB binaries built! 166 165 167 large: at_large xtplus_large xt_large166 large: xt_large xtplus_large at_large 168 167 @echo All 15 kiB binaries built! 169 168 … … 192 191 @echo *15k XT version "$(TARGET)_xtl.bin" built. 193 192 194 jride_8k:195 @$(AS) "$(SRC_ASM)" $(ASFLAGS) $(DEFS_ JRIDE_8K) -l"$(TARGET)_jr8k.lst" -o"$(TARGET)_jr8k.bin"196 @echo * 8k JR-IDE/ISA version "$(TARGET)_jr8k.bin" built.193 xt_tiny: 194 @$(AS) "$(SRC_ASM)" $(ASFLAGS) $(DEFS_XT_TINY) -l"$(TARGET)_tiny.lst" -o"$(TARGET)_tiny.bin" 195 @echo * Tiny XT version "$(TARGET)_tiny.bin" built. 197 196 198 197 386_8k: … … 210 209 211 210 checksum: all 211 @perl ..\tools\checksum.pl $(TARGET)_tiny.bin $(ROMSIZE) 212 @perl ..\tools\checksum.pl $(TARGET)_xt.bin $(ROMSIZE) 213 @perl ..\tools\checksum.pl $(TARGET)_xtp.bin $(ROMSIZE) 214 @perl ..\tools\checksum.pl $(TARGET)_at.bin $(ROMSIZE) 215 @perl ..\tools\checksum.pl $(TARGET)_xtl.bin $(ROMSIZE_LARGE) 216 @perl ..\tools\checksum.pl $(TARGET)_xtpl.bin $(ROMSIZE_LARGE) 212 217 @perl ..\tools\checksum.pl $(TARGET)_atl.bin $(ROMSIZE_LARGE) 213 @perl ..\tools\checksum.pl $(TARGET)_xtpl.bin $(ROMSIZE_LARGE)214 @perl ..\tools\checksum.pl $(TARGET)_xtl.bin $(ROMSIZE_LARGE)215 @perl ..\tools\checksum.pl $(TARGET)_at.bin $(ROMSIZE)216 @perl ..\tools\checksum.pl $(TARGET)_xtp.bin $(ROMSIZE)217 @perl ..\tools\checksum.pl $(TARGET)_xt.bin $(ROMSIZE)218 @perl ..\tools\checksum.pl $(TARGET)_jr8k.bin $(ROMSIZE)219 218 @perl ..\tools\checksum.pl $(TARGET)_386.bin $(ROMSIZE) 220 219
Note:
See TracChangeset
for help on using the changeset viewer.