Changeset 262 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src/Initialization
- Timestamp:
- Feb 24, 2012, 10:28:31 AM (13 years ago)
- google:author:
- gregli@hotmail.com
- Location:
- trunk/XTIDE_Universal_BIOS/Src/Initialization
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/XTIDE_Universal_BIOS/Src/Initialization/DetectDrives.asm
r261 r262 37 37 38 38 %ifdef MODULE_SERIAL 39 jcxz . done; Set to zero on .ideVarsSerialAuto iteration (if any)39 jcxz .AddHardDisks ; Set to zero on .ideVarsSerialAuto iteration (if any) 40 40 %endif 41 41 … … 48 48 ; 49 49 call FindDPT_ToDSDIforSerialDevice 50 j c .done50 jnc .AddHardDisks 51 51 52 52 mov bp, ROMVARS.ideVarsSerialAuto ; Point to our special IDEVARS structure, just for serial scans … … 58 58 %endif 59 59 60 .done: 61 %ifdef MODULE_SERIAL_FLOPPY 60 .AddHardDisks: 62 61 ;---------------------------------------------------------------------- 63 62 ; 64 ; Add in any emulated serial floppy drives. 65 ; 66 mov al, [RAMVARS.xlateVars+XLATEVARS.bFlopCreateCnt] 67 dec al 68 mov cl, al 69 js .NoFloppies ; if no drives are present, we store 0ffh 63 ; Add in hard disks to BDA, finalize our Count and First variables 64 ; 65 mov cx, [RAMVARS.wDrvCntAndFlopCnt] ; Our count of hard disks 66 test cl, cl 67 jz .AddFloppies ; If none, nothing more to do 68 69 mov al, [es:BDA.bHDCount] 70 add cl, al ; Add our drives to the system count 71 mov [es:BDA.bHDCount], cl 72 or al, 80h ; Or in hard disk flag 73 mov [RAMVARS.bFirstDrv], al ; Store first drive number 74 75 76 .AddFloppies: 77 ;%ifdef MODULE_SERIAL_FLOPPY 78 ;---------------------------------------------------------------------- 79 ; 80 ; Add in any emulated serial floppy drives, finalize our packed Count and First variables 81 ; 82 dec ch 83 mov al, ch 84 js .NoFloppies ; if no drives are present, we store 0ffh 70 85 71 86 call FloppyDrive_GetCountFromBIOS_or_BDA … … 73 88 push ax 74 89 75 add al, c l; Add our drives to existing drive count90 add al, ch ; Add our drives to existing drive count 76 91 cmp al, 3 ; For BDA, max out at 4 drives (ours is zero based) 77 92 jl .MaxBDAFloppiesExceeded … … 92 107 pop ax 93 108 94 shr c l, 1 ; number of drives, 1 or 2 only, to CF flag (clear=1, set=2)109 shr ch, 1 ; number of drives, 1 or 2 only, to CF flag (clear=1, set=2) 95 110 rcl al, 1 ; starting drive number in upper 7 bits, number of drives in low bit 96 111 .NoFloppies: 97 112 mov [RAMVARS.xlateVars+XLATEVARS.bFlopCntAndFirst], al 98 %endif113 ;%endif 99 114 100 115 ret -
trunk/XTIDE_Universal_BIOS/Src/Initialization/DetectPrint.asm
r254 r262 43 43 mov dx, [cs:bp+IDEVARS.bDevice-1] ; for Serial: AL=port address>>2, AH=baud rate 44 44 ; DL=COM number character, DH=.bDevice 45 45 46 mov si, g_szDetectOuter ; Load SI with default wrapper string "IDE %s at %s: " 47 46 48 push bp ; setup stack for call to 47 49 mov bp, sp ; BootMenuPrint_FormatCSSIfromParamsInSSBP … … 72 74 73 75 test dl, dl ; Check if serial port "Auto" 74 jz .pushAndPrint 76 jz .pushAndPrintSerial ; CX = string to print, AX and DX won't be used 75 77 76 78 mov cl, (g_szDetectCOMLarge-$$) & 0xff ; Setup secondary print string for "COMn/xx.yK" … … 88 90 89 91 cmp ax,si ; < 10: "2400", "9600", etc.; >= 10: "19.2K", "38.4K", etc. 90 jae .pushAndPrint 92 jae .pushAndPrintSerial 91 93 92 94 mov cl, (g_szDetectCOMSmall-$$) & 0xff ; Setup secondary print string for "COMn/XXy00" 95 96 .pushAndPrintSerial: 97 mov si, g_szDetectOuterSerial ; Finally load SI with wrapper string "Serial %s on %s: " 93 98 94 99 .pushAndPrint: … … 96 101 push ax ; Push high order digits, or port address, or N/A 97 102 push dx ; Push low order digit, or N/A 98 99 mov si, g_szDetectOuter ; Finally load SI with wrapper string "IDE %s at %s: "100 103 101 104 jmp short DetectPrint_BootMenuPrint_FormatCSSIfromParamsInSSBP_Relay -
trunk/XTIDE_Universal_BIOS/Src/Initialization/Initialize.asm
r259 r262 72 72 .StoreDptPointersToIntVectors: 73 73 mov dl, 80h 74 call RamVars_IsDriveHandledByThisBIOS_And_FindDPT_ForDriveNumber; DPT to DS:DI74 call FindDPT_ForDriveNumberInDL ; DPT to DS:DI 75 75 jc SHORT .FindForDrive81h ; Store nothing if not our drive 76 76 mov [es:HD0_DPT_POINTER_41h*4], di … … 78 78 .FindForDrive81h: 79 79 inc dx 80 call RamVars_IsDriveHandledByThisBIOS_And_FindDPT_ForDriveNumber80 call FindDPT_ForDriveNumberInDL 81 81 jc SHORT .ResetDetectedDrives 82 82 mov [es:HD1_DPT_POINTER_46h*4], di
Note:
See TracChangeset
for help on using the changeset viewer.