Changeset 285 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src
- Timestamp:
- Feb 29, 2012, 7:20:36 PM (13 years ago)
- google:author:
- aitotat@gmail.com
- Location:
- trunk/XTIDE_Universal_BIOS/Src
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/XTIDE_Universal_BIOS/Src/Device/IDE/IdeCommand.asm
r281 r285 129 129 130 130 ; Output Sector Address High (only used by LBA48) 131 %ifdef MODULE_EBIOS 131 132 eMOVZX ax, BYTE [bp+IDEPACK.bLbaLowExt] ; Zero sector count 132 133 mov cx, [bp+IDEPACK.wLbaMiddleAndHighExt] 133 134 call IDEDEVICE%+OutputSectorCountAndAddress 135 %endif 134 136 135 137 ; Output Sector Address Low … … 186 188 eCMOVE bh, TIMEOUT_IDENTIFY_DEVICE 187 189 call IDEDEVICE%+Wait_PollStatusFlagInBLwithTimeoutInBH 188 jc SHORT .ErrorWhenSelectingMasterOrSlave189 ret190 190 191 191 ; Ignore errors from IDE Error Register (set by previous command) 192 .ErrorWhenSelectingMasterOrSlave: 193 cmp ah, RET_HD_TIMEOUT ; Do not ignore timeout 192 cmp ah, RET_HD_TIMEOUT 193 je SHORT .FailedToSelectDrive 194 xor ax, ax ; Always success unless timeout 195 ret 196 .FailedToSelectDrive: 194 197 stc 195 je SHORT .ReturnWithErrorCodeInAHandCF196 xor ah, ah ; No errors197 .ReturnWithErrorCodeInAHandCF:198 198 ret 199 199 -
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH15h_HSize.asm
r283 r285 77 77 ConvertAH08hReturnValuesToSectorCount: 78 78 call Address_ExtractLCHSparametersFromOldInt13hAddress 79 80 mov al, bl ; Get sector value 81 mul bh ; Multiply by heads-1 (since bh is zero based, and could be 255 and overflow) 82 xor bh, bh ; Clear upper byte for following addition... 83 add ax, bx ; Add in one more sector value, since heads was off by one 84 inc cx ; Max cylinder number to cylinder count (again, zero based) 85 mul cx ; Multiply in cylinders 86 xor bx, bx ; Zero upper 16-bits, sector count will not be that large 87 79 mov al, bh ; AL = Max head number 80 inc cx ; Max cylinder number to cylinder count 81 inc ax ; Max head number to head count (AH=8h returns max 254 so no overflow to AH) 82 mul bl ; AX = Head count * Sectors per track 83 mul cx ; DX:AX = Total sector count for AH=0xh transfer functions 84 xor bx, bx 88 85 ret -
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH8h_HParams.asm
r262 r285 18 18 ; CL: Bits 7...6: Cylinder number bits 9...8 19 19 ; Bits 5...0: Maximum sector number (1...63) 20 ; DH: Maximum head number (0...25 5)20 ; DH: Maximum head number (0...254) 21 21 ; DL: Number of drives 22 22 ; ES:DI: Floppy DPT (for floppies only) … … 79 79 ; CL: Bits 7...6: Cylinder number bits 9...8 80 80 ; Bits 5...0: Maximum sector number (1...63) 81 ; DH: Maximum head number (0...25 5)81 ; DH: Maximum head number (0...254) 82 82 ; Corrupts registers: 83 83 ; AX, BX … … 93 93 ; Parameters: 94 94 ; AX: Number of L-CHS cylinders available (1...1024) 95 ; BL: Number of L-CHS heads (1...25 6)95 ; BL: Number of L-CHS heads (1...255) 96 96 ; BH: Number of L-CHS sectors per track (1...63) 97 97 ; DS: RAMVARS segment … … 100 100 ; CL: Bits 7...6: Cylinder number bits 9...8 101 101 ; Bits 5...0: Maximum sector number (1...63) 102 ; DH: Maximum head number (0...25 5)102 ; DH: Maximum head number (0...254) 103 103 ; Corrupts registers: 104 104 ; AX, BX … … 112 112 or cl, bh ; CL bits 0...5 = Sectors per track 113 113 mov dh, bl ; DH = Maximum head number 114 114 115 115 %ifdef MODULE_SERIAL_FLOPPY 116 116 mov bl,[di+DPT.bFlagsHigh] -
trunk/XTIDE_Universal_BIOS/Src/Initialization/DetectPrint.asm
r277 r285 39 39 ;-------------------------------------------------------------------- 40 40 DetectPrint_StartDetectWithMasterOrSlaveStringInAXandIdeVarsInCSBP: 41 42 41 mov ax, [cs:bp+IDEVARS.wPort] ; for IDE: AX=port address, DH=.bDevice 43 42 mov dx, [cs:bp+IDEVARS.bDevice-1] ; for Serial: AL=port address>>2, AH=baud rate 44 43 ; DL=COM number character, DH=.bDevice 45 44 %ifdef MODULE_JRIDE 45 cmp dh, DEVICE_JRIDE_ISA 46 eCMOVE ax, cs ; Use segment address for JR-IDE/ISA 47 %endif 48 46 49 mov si, g_szDetectOuter ; Load SI with default wrapper string "IDE %s at %s: " 47 50 -
trunk/XTIDE_Universal_BIOS/Src/Main.asm
r277 r285 136 136 at ROMVARS.bStealSize, db 1 ; Steal 1kB from base memory in full mode 137 137 138 at ROMVARS.ideVars0+IDEVARS.wPort, dw DEVICE_XTIDE_DEFAULT_PORT ; Controller Command Block base port 139 at ROMVARS.ideVars0+IDEVARS.wPortCtrl, dw DEVICE_XTIDE_DEFAULT_PORTCTRL ; Controller Control Block base port 138 140 %ifdef MODULE_JRIDE 139 141 at ROMVARS.ideVars0+IDEVARS.bDevice, db DEVICE_JRIDE_ISA 140 142 %else 141 at ROMVARS.ideVars0+IDEVARS.wPort, dw DEVICE_XTIDE_DEFAULT_PORT ; Controller Command Block base port142 at ROMVARS.ideVars0+IDEVARS.wPortCtrl, dw DEVICE_XTIDE_DEFAULT_PORTCTRL ; Controller Control Block base port143 143 at ROMVARS.ideVars0+IDEVARS.bDevice, db DEVICE_8BIT_DUAL_PORT_XTIDE 144 144 %endif … … 167 167 %include "Interrupts.asm" ; For Interrupt initialization 168 168 %include "RamVars.asm" ; For RAMVARS initialization and access 169 %include "CreateDPT.asm" ; For creating DPTs 170 %include "FindDPT.asm" ; For finding DPTs 169 171 %ifdef MODULE_STRINGS_COMPRESSED 170 172 %include "StringsCompressed.asm" … … 172 174 %include "Strings.asm" ; For BIOS message strings 173 175 %endif 174 %include "CreateDPT.asm" ; For creating DPTs175 %include "FindDPT.asm" ; For finding DPTs176 176 %include "AccessDPT.asm" ; For accessing DPTs 177 177 %include "BootMenuInfo.asm" ; For creating BOOTMENUINFO structs -
trunk/XTIDE_Universal_BIOS/Src/Strings.asm
r277 r285 49 49 g_szBusTypeValues_32: db " 32",NULL 50 50 g_szBusTypeValues_Serial: db "SER",NULL 51 g_szBusTypeValues_8MemMapped: db "M8 ",NULL 51 52 g_szBusTypeValues_Displacement equ (g_szBusTypeValues_8Reversed - g_szBusTypeValues) 52 53 ; … … 71 72 %if g_szBusTypeValues_Serial <> g_szBusTypeValues_32 + g_szBusTypeValues_Displacement 72 73 %error "g_szBusTypeValues Displacement Incorrect 6" 74 %endif 75 %if g_szBusTypeValues_8MemMapped <> g_szBusTypeValues_Serial + g_szBusTypeValues_Displacement 76 %error "g_szBusTypeValues Displacement Incorrect 7" 73 77 %endif 74 78 %endif -
trunk/XTIDE_Universal_BIOS/Src/StringsCompressed.asm
r277 r285 102 102 db 59h, 4bh, 98h ; compressed 103 103 104 g_szBusTypeValues_8MemMapped: ; db "M8 ",NULL 105 ; db 4dh, 38h, 20h, 00h ; uncompressed 106 db 53h, 31h, 00h ; compressed 107 104 108 g_szBusTypeValues_Displacement equ (g_szBusTypeValues_8Reversed - g_szBusTypeValues) 105 109 ; … … 124 128 %if g_szBusTypeValues_Serial <> g_szBusTypeValues_32 + g_szBusTypeValues_Displacement 125 129 %error "g_szBusTypeValues Displacement Incorrect 6" 130 %endif 131 %if g_szBusTypeValues_8MemMapped <> g_szBusTypeValues_Serial + g_szBusTypeValues_Displacement 132 %error "g_szBusTypeValues Displacement Incorrect 7" 126 133 %endif 127 134 %endif … … 189 196 db 4fh, 4ah, 0cbh, 3eh, 20h, 67h, 0fah, 3eh, 40h, 00h ; compressed 190 197 191 %ifdef MODULE_SERIAL ;%%; is stripped off after string compression, %ifdef won't compress properly198 ;%%; %ifdef MODULE_SERIAL ;%%; is stripped off after string compression, %ifdef won't compress properly 192 199 g_szDetectOuterSerial: ; db "Serial %s on %s: ",NULL 193 200 ; db 53h, 65h, 72h, 69h, 61h, 6ch, 20h, 25h, 73h, 20h, 6fh, 6eh, 20h, 25h, 73h, 3ah, 20h, 00h ; uncompressed … … 210 217 db 2ah, 37h, 29h, 37h, 91h ; compressed 211 218 212 %endif ;%%; is stripped off after string compression, %ifdef won't compress properly219 ;%%; %endif ;%%; is stripped off after string compression, %ifdef won't compress properly 213 220 g_szDetectEnd: 214 221 g_szDetectPort: ; db "%x",NULL ; IDE Master at 1F0h: … … 426 433 ;; translated usage stats 427 434 ;; 33:1 428 ;; 32:3 2435 ;; 32:33 429 436 ;; 181:1 430 437 ;; 53:2 … … 441 448 ;; 34:3 442 449 ;; 49:1 443 ;; 56: 5450 ;; 56:6 444 451 ;; 45:3 445 452 ;; 175:1 … … 482 489 ;; 75,K:1 483 490 ;; 76,L:3 484 ;; 77,M: 3491 ;; 77,M:4 485 492 ;; 78,N: 486 493 ;; 79,O:2
Note:
See TracChangeset
for help on using the changeset viewer.