source:
kStuff/hacks/xtide/xtidebios-patch.diff@
76
Last change on this file since 76 was 74, checked in by , 9 years ago | |
---|---|
File size: 9.1 KB |
-
Src/Device/IDE/IdePioBlock.asm
76 76 rep insb 77 77 ret 78 78 %else ; 808x 79 %ifdef USE_BIRD ; insane bird rollout 80 push bx 81 .NextSector: 82 pushf 83 cli 84 %if 0 ;; @todo 8086+ only, anyone at all? - does not seem to work... 85 ; (nominal ticks / expected instruction fetch ticks / -<instr bytes consumed> +<added> 86 ; 8088 - iAPX88 BOOK (Intel Order No. 210200-002) 87 %rep 256 ; 8086 - iAPX 86,88 User Manual (Intel Order No. 210201-001), TASM Quick Ref v4 88 in al, dx ; 8/+4/-1+1 8/+4/-1+2 1 byte Note! 8086 will only be empty half of the time here, but too 89 xchg bx, ax ; 3/+1/-1+1 3/+1/-1+2 1 byte tired to calculate that now. Probably this comes out as 90 in al, dx ; 8/+4/-1+1 8/--/-1 1 byte a 0 or 1 cycle win in reality... 91 xchg bx, ax ; 3/+1/-1+1 3/+1/-1+2 1 byte 92 mov ah, bl ; 2/+6/-2+2 2/+2/-2+2 2 bytes 93 stosw ; 15/+4/-1+1 11/--/-1 1 byte 94 %endrep ; sum 39/+20 =59 35/+12=47 7 bytes 95 ; save -1/ -7 3/ -1 -3 bytes 96 %else 97 %rep 512 98 in al, dx ; 8/+4/-1+1 8/+4/-1+2 1 byte 99 stosb ; 11/+4/-1+4 11/--/-1 1 byte 100 %endrep ; sum 19/+8 =26 19/+4=23 2 bytes 101 %endif ; x2 38/+16 =52 38/+8=46 4 bytes 102 popf 103 dec cx 104 jnz .NextSector 105 pop bx 106 ret 107 108 %else ; !USE_BIRD 79 109 UNROLL_SECTORS_IN_CX_TO_OWORDS 80 110 ALIGN JUMP_ALIGN 81 111 .ReadNextOword: … … 85 115 %endrep 86 116 loop .ReadNextOword 87 117 ret 118 %endif ; !USE_BIRD 88 119 %endif 89 120 90 121 %endif ; MODULE_8BIT_IDE … … 112 143 ret 113 144 114 145 %else ; 808x 146 %ifdef USE_BIRD ; insane bird rollout. 147 .NextSector: 148 pushf 149 cli 150 %rep 256 ; WORDs 151 in ax, dx ; Read WORD 152 stosw ; Store WORD to [ES:DI] 153 %endrep 154 popf 155 dec cx 156 jnz .NextSector 157 ret 158 159 %else ; !USE_BIRD 115 160 UNROLL_SECTORS_IN_CX_TO_OWORDS 116 161 ALIGN JUMP_ALIGN 117 162 .ReadNextOword: … … 121 166 %endrep 122 167 loop .ReadNextOword 123 168 ret 169 %endif ; !USE_BIRD 124 170 %endif 125 171 126 172 … … 220 266 ret 221 267 222 268 %else ; 808x 269 %ifdef USE_BIRD ; crazy bird loop unrolling 270 push ds 271 push es 272 pop ds 273 274 .NextSector: 275 pushf 276 cli 277 %if 1 278 ; 8088 - iAPX88 BOOK (Intel Order No. 210200-002) 279 %rep 256 ; 8086 - iAPX 86,88 User Manual (Intel Order No. 210201-001), TASM Quick Ref v4 280 lodsw ; 16/+4/-1+1 12/+4|--/-1+2|+0 1 byte - Note! 8086 doesn't need instr fetch half of the time. 281 out dx, al ; 8/+4/-1+1 8/-- /-1 1 byte 282 mov al, ah ; 2/+10/-2+3 2/+6 /-2+4 2 bytes 283 out dx, al ; 8/--/-1 8/-- /-1 1 byte 284 %endrep ; sum 34/+18=52 30/+10|+6=40|36~=38 5 bytes 285 ; save 6/ 4 10/ 8|12~=10 -1 byte 286 %else 287 %rep 512 288 lodsb ; 12/+4/-1+1 12/+4/-1+2 1 byte 289 out dx, al ; 8/+4/-1+1 8/--/-1 1 byte 290 %endrep ; sum 20/+8 =28 20/+4 =24 2 bytes 291 %endif ; x2 40/+16 =56 40/+8 =48 4 bytes 292 popf 293 dec cx 294 jnz .NextSector 295 296 pop ds 297 ret 298 299 %else ; !USE_BIRD 223 300 UNROLL_SECTORS_IN_CX_TO_QWORDS 224 301 push ds 225 302 push es … … 233 310 loop .WriteNextQword 234 311 pop ds 235 312 ret 313 %endif ; !USE_BIRD 236 314 %endif 237 315 238 316 %endif ; MODULE_8BIT_IDE … … 259 337 ret 260 338 261 339 %else ; 808x 340 %ifdef USE_BIRD ; crazy bird loop unrolling 341 push bx 342 push ds 343 push es 344 pop ds 345 346 .NextSector: 347 pushf 348 cli 349 %rep 256 ; WORDs 350 lodsw ; Load WORD from [DS:SI] 351 out dx, ax ; Write WORD 352 %endrep 353 popf 354 dec cx 355 jnz .NextSector 356 357 pop ds 358 pop bx 359 ret 360 361 %else ; !USE_BIRD 262 362 UNROLL_SECTORS_IN_CX_TO_QWORDS 263 363 push ds 264 364 push es … … 272 372 loop .WriteNextQword 273 373 pop ds 274 374 ret 375 %endif ; !USE_BIRD 275 376 %endif 276 377 277 378 ;-------------------------------------------------------------------- -
Src/Handlers/Int13h/AH9h_HInit.asm
175 175 .SupportedBlockSizeFound: 176 176 177 177 178 %if 0 ; bird 179 ;;; InitializePioMode - disable IORDY and use default mode. 180 %if 0 181 mov dl, PIO_DEFAULT_MODE_DISABLE_IORDY 182 %else 183 mov dl, PIO_FLOW_CONTROL_MODE_xxx | 0 184 %endif 185 mov si, FEATURE_SET_TRANSFER_MODE 186 call AH23h_SetControllerFeatures 187 STORE_ERROR_FLAG_TO_DPT FLG_INITERROR_FAILED_TO_SET_PIO_MODE 188 189 %else ; !bird 178 190 %ifdef MODULE_ADVANCED_ATA 179 191 ;;; InitializePioMode 180 192 ; Initialize fastest supported PIO mode … … 190 202 mov si, FEATURE_SET_TRANSFER_MODE 191 203 call AH23h_SetControllerFeatures 192 204 STORE_ERROR_FLAG_TO_DPT FLG_INITERROR_FAILED_TO_SET_PIO_MODE 205 193 206 %endif ; MODULE_ADVANCED_ATA 207 %endif ; !bird 194 208 195 209 196 210 %ifdef MODULE_POWER_MANAGEMENT -
Src/Initialization/DetectDrives.asm
241 241 call CreateDPT_FromAtaInformation 242 242 jc SHORT DetectDrives_DriveNotFound 243 243 call DriveDetectInfo_CreateForHardDisk 244 %ifdef USE_BIRD 245 call DetectPrint_DriveNameFromDrvDetectInfoInESBX 246 call TestBufferXfers 247 ret 248 %else ; !USE_BIRD 244 249 jmp SHORT DetectPrint_DriveNameFromDrvDetectInfoInESBX 250 %endif ; !USE_BIRD 251 252 253 %ifdef USE_BIRD 254 ;-------------------------------------------------------------------- 255 ; TestBufferXfers 256 ; Parameters: 257 ; Returns: 258 ; Nothing 259 ; Corrupts registers: 260 ;-------------------------------------------------------------------- 261 TestBufferXfers: 262 ;; @todo later. The idea is to write to the sector buffer, then read back 263 ;; what we just wrote and check that the data is as expected. This would 264 ;; help detect problems with the PIO Data Write, and in NO_ATAID_VALIDATION 265 ;; mode, also with PIO Data Read. Preventing the user from totally screwing 266 ;; up his CF card in the former case. 267 ret 268 %endif 269 -
makefile
40 40 # USE_386 Use instructions supported by 386 and later (defines USE_286) # 41 41 # USE_AT Use features supported on AT and later systems (not available on XT) # 42 42 # USE_UNDOC_INTEL Optimizations for Intel CPU:s - do NOT use on NEC V20/V30/Sony CPU:s # 43 # USE_BIRD Bird stuff # 44 # USE_BIRD_8086 Use code sequences favoring 8086+ over 8088. # 43 45 # # 44 46 # ** AT Builds only (when USE_AT is defined) # 45 47 # *** Use this only when certain known good drives are not being detected (eg WD Caviars) # … … 102 104 ################################################################# 103 105 # Assembler preprocessor defines. # 104 106 ################################################################# 105 DEFINES_COMMON = MODULE_STRINGS_COMPRESSED MODULE_HOTKEYS MODULE_8BIT_IDE MODULE_EBIOS MODULE_SERIAL MODULE_SERIAL_FLOPPY MODULE_POWER_MANAGEMENT RESERVE_DIAGNOSTIC_CYLINDER NO_ATAID_VALIDATION 107 #DEFINES_COMMON = MODULE_STRINGS_COMPRESSED MODULE_HOTKEYS MODULE_8BIT_IDE MODULE_EBIOS MODULE_SERIAL MODULE_SERIAL_FLOPPY MODULE_POWER_MANAGEMENT RESERVE_DIAGNOSTIC_CYLINDER NO_ATAID_VALIDATION 108 DEFINES_COMMON = MODULE_STRINGS_COMPRESSED MODULE_HOTKEYS MODULE_8BIT_IDE MODULE_EBIOS MODULE_POWER_MANAGEMENT RESERVE_DIAGNOSTIC_CYLINDER 106 109 DEFINES_COMMON_LARGE = MODULE_BOOT_MENU MODULE_8BIT_IDE_ADVANCED MODULE_COMPATIBLE_TABLES 107 110 108 DEFINES_XT = $(DEFINES_COMMON) ELIMINATE_CGA_SNOW MODULE_8BIT_IDE_ADVANCED 111 DEFINES_XT = $(DEFINES_COMMON) ELIMINATE_CGA_SNOW MODULE_8BIT_IDE_ADVANCED USE_BIRD USE_BIRD_8086 109 112 DEFINES_XTPLUS = $(DEFINES_XT) USE_186 110 DEFINES_AT = $(DEFINES_COMMON) USE_AT USE_286 MODULE_IRQ MODULE_ADVANCED_ATA MODULE_COMPATIBLE_TABLES 113 DEFINES_AT = $(DEFINES_COMMON) USE_AT USE_286 MODULE_IRQ MODULE_ADVANCED_ATA MODULE_COMPATIBLE_TABLES USE_BIRD USE_BIRD_8086 111 114 112 115 DEFINES_XT_LARGE = $(DEFINES_XT) $(DEFINES_COMMON_LARGE) 113 116 DEFINES_XTPLUS_LARGE = $(DEFINES_XTPLUS) $(DEFINES_COMMON_LARGE) … … 126 129 127 130 # Target size of the ROM, used in main.asm for number of 512B blocks and by checksum Perl script below 128 131 BIOS_SIZE = 8192 # For BIOS header (use even multiplier!) 132 BIOS_SIZE = 12288 # For BIOS header (use even multiplier!) 129 133 ROMSIZE = $(BIOS_SIZE) # Size of binary to build when building with make checksum 130 134 BIOS_SIZE_LARGE = 12288 131 135 ROMSIZE_LARGE = $(BIOS_SIZE_LARGE)
Note:
See TracBrowser
for help on using the repository browser.