Changeset 47
- Timestamp:
- Apr 12, 2014, 11:24:51 AM (11 years ago)
- Location:
- trunk
- Files:
-
- 17 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BOOTCODE/.build
r46 r47 3 3 export ASM=jwasm 4 4 make dev 5 make dist -
trunk/BOOTCODE/AIR-BOOT.ASM
r46 r47 1316 1316 ; 1317 1317 ; Critical end of code marker. 1318 ; 1319 db 'DEAD' 1320 db 'FACE' 1318 ; Should always be in the image, otherwise something 1319 ; is very wrong. 1320 ; 1321 db 'DEAD' 1322 db 'FACE' 1321 1323 1322 1324 ; … … 1341 1343 1342 1344 ; If we are debugging, we overwrite the FX code. 1343 ; As long as noFX is disabled this will do no harm.1345 ; As long as FX is disabled this will do no harm. 1344 1346 IFDEF AUX_DEBUG 1345 1347 ORG 06780h 1346 1348 ENDIF 1349 1347 1350 1348 1351 bld_level: … … 1353 1356 ; It is unique for each release of AiR-BOOT. 1354 1357 ; 1358 ; ?? When AUX_DEBUG is enabled and the above org is active, 1359 ; the BLDLEVEL gets corrupted eventhough it gets inserted here 1360 ; explicitly. The effect is almost like an 'OR' or a merge 1361 ; with the already generated FX code. 1362 ; Tasm and JWasm produce different results. 1363 ; ?? 1364 ; 1355 1365 InsertBuildLevel 1356 1366 1367 ;bliep <> 1368 1357 1369 ; 1358 1370 ; End of code marker. 1371 ; If this one vanishes in the image, the FX code will not 1372 ; be operational. 1373 ; Will happen with debugging enabled. 1359 1374 ; 1360 1375 db 'BABE' … … 1371 1386 ORIGIN 06800h 1372 1387 1388 zzz_code_space = $ - code_end 1373 1389 ; 1374 1390 ; This is the AiR-BOOT MBR-Protection Image. -
trunk/BOOTCODE/AIR-BOOT.HIS
r46 r47 23 23 ; Rousseau: Fixes and Enhancements 24 24 ; --------------------------------- 25 ; v1.0.8-rc2-bld201204??+ 26 ; --------------------- 27 28 25 ; 26 ; v1.0.8-rc2-bld2012042? 27 ; ---------------------- 28 ; # Fixed Installer to handle packed hideparttable # 29 ; Hide partition configuration is now preserved when upgrading 30 ; Implemented upgrading from v1.06 to v1.0.8 31 ; Implemented upgrading from v1.07 to v1.0.8 32 ; 33 ; # Implemented DOS code in C cross-platform installer 34 ; There is now one C source for 4 platforms: 35 ; DOS,WIN32,OS2 and LINUX (Linux portion not ready yet) 36 ; This obsoletes AIRBOOT.ASM/AIRBOOT.COM. 37 ; DOS Installer is now AIRBOOTD.EXE. 38 ; 29 39 ; v1.0.8-pre-rc2-bld20120330 30 40 ; -------------------------- -
trunk/BOOTCODE/BLDLEVEL.INC
r46 r47 50 50 51 51 52 53 ;~ bliep struct 54 ;~ db '@#' 55 ;~ db BLDLVL_VENDOR 56 ;~ db ':' 57 ;~ db BLDLVL_MAJOR_VERSION 58 ;~ db '.' 59 ;~ db BLDLVL_MIDDLE_VERSION 60 ;~ db '.' 61 ;~ db BLDLVL_MINOR_VERSION 62 ;~ db '#@##1## ' 63 ;~ bld_level_date_start db BLDLVL_YEAR 64 ;~ db '/' 65 ;~ db BLDLVL_MONTH 66 ;~ db '/' 67 ;~ db BLDLVL_DAY 68 ;~ db ' ' 69 ;~ db BLDLVL_HOURS 70 ;~ db ':' 71 ;~ db BLDLVL_MINUTES 72 ;~ db ':' 73 ;~ db BLDLVL_SECONDS 74 ;~ bld_level_date_end db ' ' 75 ;~ db BLDLVL_MACHINE 76 ;~ db '::' 77 ;~ ; Wasm can only process the reference to 'lang' in pass 2 because it comes 78 ;~ ; from an included file which it has not processed yet at pass 1. 79 ;~ IFDEF WASM 80 ;~ IF2 81 ;~ db BLDLVL_LANGUAGE 82 ;~ ENDIF 83 ;~ ; The other assemblers process 'lang' correctly in pass 1. 84 ;~ ELSE 85 ;~ db BLDLVL_LANGUAGE 86 ;~ ENDIF 87 ;~ db '::' 88 ;~ db BLDLVL_MINOR_VERSION 89 ;~ db '::@@' 90 ;~ db BLDLVL_DESCRIPTION 91 ;~ db 0 92 ;~ bliep ends 93 94 52 95 ; 53 96 ; This macro inserts the BLDLEVEL string at the place where it is invoked. -
trunk/BOOTCODE/Makefile
r46 r47 105 105 # will run out-of-space sooner that the other languages. 106 106 # If that happens at least the others will be built. 107 BLD_LANGUAGES=EN DE NL FR IT SW #RU107 BLD_LANGUAGES=EN DE NL FR IT SW RU 108 108 #BLD_LANGUAGES=EN DE NL 109 109 -
trunk/BOOTCODE/REGULAR/DEBUG.ASM
r46 r47 426 426 db_curlvmsec db 'Current LVM Sector:',0 427 427 428 429 drive db 'drive : ',0 430 before_lvm_adjust db 'before lvm adjust : ',0 431 after_lvm_adjust db 'after lvm adjust : ',0 432 before_lvm_adjust_log db 'before lvm logical adjust: ',0 433 after_lvm_adjust_log db 'after lvm logical adjust : ',0 434 spt_used db 'spt used : ',0 -
trunk/BOOTCODE/REGULAR/DRIVEIO.ASM
r46 r47 248 248 249 249 ; Dump drive 250 mov si,offset drive250 ;mov si,offset drive 251 251 ;call AuxIO_Print 252 xchg al,dl252 ;xchg al,dl 253 253 ;call AuxIO_TeletypeHexByte 254 254 ;call AuxIO_TeletypeNL 255 xchg dl,al255 ;xchg dl,al 256 256 257 257 ; Dump SPT 258 mov si,offset spt_used258 ;mov si,offset spt_used 259 259 ;call AuxIO_Print 260 260 push dx … … 300 300 301 301 ; LBA 302 mov si,offset before_lvm_adjust302 ;mov si,offset before_lvm_adjust 303 303 ;call AuxIO_Print 304 304 305 xchg dx,bx305 ;xchg dx,bx 306 306 ;call AuxIO_TeletypeHexDWord 307 307 ;call AuxIO_TeletypeNL 308 xchg bx,dx308 ;xchg bx,dx 309 309 popa 310 310 … … 317 317 318 318 319 pusha320 mov si,offset before_lvm_adjust_log319 ;pusha 320 ;mov si,offset before_lvm_adjust_log 321 321 ;call AuxIO_Print 322 322 ; LBA 323 xchg dx,bx323 ;xchg dx,bx 324 324 ;call AuxIO_TeletypeHexDWord 325 325 ;call AuxIO_TeletypeNL 326 xchg bx,dx327 popa326 ;xchg bx,dx 327 ;popa 328 328 329 329 … … 346 346 347 347 348 pusha349 mov si,offset after_lvm_adjust_log348 ;pusha 349 ;mov si,offset after_lvm_adjust_log 350 350 ;call AuxIO_Print 351 351 ; LBA 352 xchg dx,bx352 ;xchg dx,bx 353 353 ;call AuxIO_TeletypeHexDWord 354 354 ;call AuxIO_TeletypeNL 355 xchg bx,dx356 popa355 ;xchg bx,dx 356 ;popa 357 357 358 358 jmp done … … 427 427 done: 428 428 429 pusha430 mov si,offset after_lvm_adjust429 ;pusha 430 ;mov si,offset after_lvm_adjust 431 431 ;~ call AuxIO_Print 432 432 ; LBA 433 xchg dx,bx433 ;xchg dx,bx 434 434 ;~ call AuxIO_TeletypeHexDWord 435 435 ;~ call AuxIO_TeletypeNL 436 xchg bx,dx437 popa436 ;xchg bx,dx 437 ;popa 438 438 439 439 ;~ pusha … … 466 466 467 467 468 drive db 'drive : ',0469 before_lvm_adjust db 'before lvm adjust : ',0470 after_lvm_adjust db 'after lvm adjust : ',0471 before_lvm_adjust_log db 'before lvm logical adjust: ',0472 after_lvm_adjust_log db 'after lvm logical adjust : ',0473 spt_used db 'spt used : ',0474 468 475 469 -
trunk/BOOTCODE/REGULAR/STD_TEXT.ASM
r46 r47 55 55 db BLDLVL_MINOR_VERSION,' - (c) ' 56 56 db BLDLVL_YEAR 57 db ' M. Kiewitz <<Internal Release 2 p>> (bld: '57 db ' M. Kiewitz <<Internal Release 2q>> (bld: ' 58 58 db BLDLVL_YEAR 59 59 db BLDLVL_MONTH -
trunk/BOOTCODE/VERSION.INC
r46 r47 17 17 AB_YEAR EQU 2012h 18 18 AB_MONTH EQU 04h 19 AB_DAY EQU 14h19 AB_DAY EQU 21h 20 20 21 21 ; The Hours, Minutes and Seconds, again in BCD for easy manipulation. 22 AB_HOURS EQU 0 1h23 AB_MINUTES EQU 3 0h22 AB_HOURS EQU 08h 23 AB_MINUTES EQU 35h 24 24 AB_SECONDS EQU 00h 25 25 -
trunk/BOOTCODE/_build.cmd
r46 r47 1 1 @SET ASM=tasm 2 2 @wmake dev 3 @wmake dist -
trunk/INSTALL/C/.build
r46 r47 3 3 make clean 4 4 make 5 make dist -
trunk/INSTALL/C/INSTALL.C
r46 r47 29 29 30 30 31 //CHAR Track0[SECTOR_COUNT * BYTES_PER_SECTOR]; 32 //CHAR Bootcode[SECTOR_COUNT * BYTES_PER_SECTOR]; 31 //CHAR Track0[SECTOR_COUNT * BYTES_PER_SECTOR]; // current track 0 from harddrive 32 //CHAR Bootcode[SECTOR_COUNT * BYTES_PER_SECTOR]; // bootcode image from airboot.bin 33 33 34 34 /* 35 35 // With the addition of the C DOS-version, a static buffer for both 36 // Track0 and Bootcode would overflow the DGROUP segment. 37 // Placing the buffers in another segment would increase the executable 38 // image on disk, so we would like it to be (FAR) BSS data. 36 // Track0 and Bootcode would overflow the DGROUP segment. (>64kB) 37 // Placing the buffers in another segment does not work with Open Watcom v1.9. 38 // While the buffers are BSS and should be in segments like FAR_BSS, 39 // Open Watcom places the buffers in FAR_DATA and produces a bloated DOS 40 // executable. Using the same source and then building an OS/2 v1.x 41 // executable does not produce a bloated .EXE, eventhough the segments are 42 // called FAR_DATA and in the middle of the image. 43 // Microsoft C v6.0 displays the same behavior; DOS bloated, OS/2 v1.x ok. 44 // An interesting feat is that when building an OS/2 v1.x executable and then 45 // binding that to produce a FAPI executable does not produce a bloated .EXE 39 46 // 40 // When experimenting with segments and #pragma data_seg(), some47 // Also, when experimenting with segments and #pragma data_seg(), some 41 48 // strange behavior was observed. 42 49 // WCC: 43 50 // Explicitly naming a segment and class for the static buffers caused 44 // wcc to generate it's default SS: based addressing. 45 // Only the -zu flag corrects this. 51 // wcc to keep generating it's default SS: based addressing, eventhough 52 // the segments are not part of DGROUP. 53 // Only the -zu flag corrects this. (DS!=SS) 46 54 // WPP: 47 55 // C++ wpp used correct addressing but the segment class in the #pragma … … 49 57 // 50 58 // In both cases the volatile (transient) data would occupy space in the 51 // disk-image because.59 // disk-image. 52 60 // The only way seems to be putting the buffers in a separate segment using 53 61 // pragma's, using wcc with the -zu flag and use the wlink ORDER directive 54 62 // to place the FAR BSS data above the stack acompanied by a NOEMIT modifier. 55 63 // For this all the class names of the previous segments must be included 56 // in the wlink ORDER directive which would make the link phase dependen t64 // in the wlink ORDER directive which would make the link phase dependend 57 65 // on segment names. This solution does not work for wpp because it mangles 58 66 // the segment name and overrides the custom class name to FAR_DATA. 59 67 // 60 68 // So, these buffers are now dynamically allocated. 61 // Currently they are only freed after succesful program termination,62 // but the RTS should free them in other situations.63 // This will be corrected later.64 69 */ 65 70 PCHAR Track0 = NULL; // Buffer for Track0 from harddisk. … … 89 94 PSZ ImpossibleCause = NULL; 90 95 91 96 CHAR TempHidPartTable[45 * 34]; 92 97 93 98 … … 198 203 // hideparttable. A 'record' in the hideparttable is 34 bytes long and it 199 204 // can store 45 partition numbers using 6-bits per partition number. 200 // Bitfield widths from 1 to 8 are supported and the max umum buffersize is205 // Bitfield widths from 1 to 8 are supported and the maximum buffersize is 201 206 // 256 bytes. 202 207 */ 203 208 char get_bitfield(char* buffer, char index, char fieldwidth) { 209 char rv = 0; 204 210 // These are used to break-up the far pointer in large-data model 16-bit 205 211 // code so the buffer can be addressed correctly. … … 285 291 mov ah,ch ; Get mask in AH. 286 292 and al,ah ; Mask value. 287 ;ret288 293 } 289 294 … … 291 296 // Epilog code. 292 297 // Restore caller's DS. 298 // Store return value. 293 299 _asm { 294 300 pop ds 295 } 296 297 return; 301 mov [rv],al 302 } 303 304 return rv; 298 305 } 299 306 … … 306 313 // hideparttable. A 'record' in the hideparttable is 34 bytes long and it 307 314 // can store 45 partition numbers using 6-bits per partition number. 308 // Bitfield widths from 1 to 8 are supported and the max umum buffersize is315 // Bitfield widths from 1 to 8 are supported and the maximum buffersize is 309 316 // 256 bytes. 310 317 */ … … 439 446 mov ah,ch ; Get mask in AH. 440 447 and al,ah ; Mask value. 441 ;ret442 448 } 443 449 … … 469 475 USHORT CountHarddrives (void) { 470 476 USHORT NumDrives = 0; 471 // Implement ! 477 /* Return the byte at 0040:0075 that contains the nr. of harddisks */ 478 _asm { 479 push es ; We use ES to address the 40h segment. 480 mov ax,40h ; Segment address of DOS BIOS DATA. 481 mov es,ax ; Make ES address it. 482 xor ax,ax ; Clear AX to receive return value. 483 mov al,es:[0075h] ; Nr. of harddisks in AL. 484 pop es ; Restore ES. 485 mov [NumDrives],ax ; Return this value. 486 } 472 487 return NumDrives; 473 488 } 474 489 475 USHORT OS2_GetIOCTLHandle () { 476 USHORT IOCTLHandle = 0; 477 // Implement ! 478 return IOCTLHandle; 479 } 480 481 void OS2_FreeIOCTLHandle (USHORT IOCTLHandle) { 482 // Implement ! 490 BOOL HarddriveCheckGeometry (void) { 491 BOOL rv = FALSE; 492 _asm { 493 ; According to Ralf Brown ES:DI=0000:0000 to avoid BIOS quirks. 494 push es 495 push di 496 xor di,di 497 mov es,di 498 499 ; Get the disk parameters using normal (non-I13X) access. 500 mov ah,08h ; Get Disk Parameters. 501 mov dl,80h ; Boot Disk. 502 int 13h ; Transfer to BIOS. 503 504 ; Check for errors 505 mov dx,0 ; Assume error. 506 jc end ; CY if error. 507 test ah,ah ; Double check for return-status. 508 jnz end ; AH non-zero if error. 509 510 ; Check sectors per track to be above 62 511 and cl,00111111b ; Mask sectors. 512 cmp cl,SECTOR_COUNT ; Compare with max. AiR-BOOT sectors. 513 jbe end ; SECTOR_COUNT or less is not enough. 514 515 inc dx ; Set to no error. 516 517 end: 518 mov ax,dx ; Status to AX. 519 xor dx,dx ; High word to zero. 520 521 ; Store in return value (OS/2 BOOL is 32-bits). 522 mov word ptr [rv],ax 523 mov word ptr [rv+2],dx 524 525 ; Restore ES:DI 526 pop di 527 pop es 528 } 529 530 return rv; 531 } 532 533 534 535 BOOL Track0Load (void) { 536 BOOL Success = FALSE; 537 538 _asm { 539 540 push es ; ES is used to point to loadbuffer. 541 542 ; Load the complete AiR-BOOT image from Track0. 543 mov ah,02h ; Read sectors from disk. 544 mov al,SECTOR_COUNT ; Number of sectors to read. 545 mov cx,1 ; Cyl 0, Sector 1. 546 mov dh,0 ; Head 0. 547 mov dl,80h ; Boot Disk. 548 les bx,[Track0] ; Buffer in ES:BX. 549 int 13h ; Transfer to BIOS. 550 551 ; Check for errors 552 mov dx,0 ; Assume error. 553 jc end ; CY if error. 554 test ah,ah ; Double check status in AH. 555 jnz end ; AH non-zero if error. 556 557 inc dx ; Set to no error. 558 559 end: 560 mov ax,dx ; Status to AX. 561 xor dx,dx ; High word to zero. 562 563 ; Store in return value (OS/2 BOOL is 32-bits). 564 mov word ptr [Success],ax 565 mov word ptr [Success+2],dx 566 567 ; Restore ES. 568 pop es 569 } 570 571 return Success; 572 } 573 574 BOOL Track0Write (void) { 575 BOOL Success = FALSE; 576 577 _asm { 578 579 push es ; ES is used to point to savebuffer. 580 581 ; Save the complete AiR-BOOT image to Track0. 582 mov ah,03h ; Write sectors to disk. 583 mov al,SECTOR_COUNT ; Number of sectors to write. 584 mov cx,1 ; Cyl 0, Sector 1. 585 mov dh,0 ; Head 0. 586 mov dl,80h ; Boot Disk. 587 les bx,[Track0] ; Buffer in ES:BX. 588 int 13h ; Transfer to BIOS. 589 590 ; Check for errors 591 mov dx,0 ; Assume error. 592 jc end ; CY if error. 593 test ah,ah ; Double check status in AH. 594 jnz end ; AH non-zero if error. 595 596 inc dx ; Set to no error. 597 598 end: 599 mov ax,dx ; Status to AX. 600 xor dx,dx ; High word to zero. 601 602 ; Store in return value (OS/2 BOOL is 32-bits). 603 mov word ptr [Success],ax 604 mov word ptr [Success+2],dx 605 606 ; Restore ES. 607 pop es 608 } 609 610 return Success; 611 } 612 613 void RebootSystem (void) { 614 _asm { 615 ; 65 * 65536 = 4259840 us = 4.2 sec. 616 mov ax,8600h ; BIOS Wait. 617 xor dx,dx ; Micro seconds Low. 618 mov cx,65 ; Micro seconds High. 619 int 15h ; Transfer to BIOS. 620 621 //~ ; Try reboot via keyboard. 622 //~ mov al,0feh 623 //~ out 64h,al 624 625 ; Otherwise jump to F000:FFF0. 626 db 0EAh 627 dw 0FFF0h 628 dw 0F000h 629 } 483 630 return; 484 }485 486 487 BOOL HarddriveCheckGeometry (void) {488 USHORT IOCTLHandle;489 490 IOCTLHandle = OS2_GetIOCTLHandle();491 // Implement !492 return FALSE;493 }494 495 BOOL Track0Load (void) {496 USHORT IOCTLHandle;497 BOOL Success = FALSE;498 499 IOCTLHandle = OS2_GetIOCTLHandle();500 // Implement !501 return Success;502 }503 504 BOOL Track0Write (void) {505 USHORT IOCTLHandle;506 BOOL Success = FALSE;507 508 IOCTLHandle = OS2_GetIOCTLHandle();509 // Implement !510 return Success;511 }512 513 void RebootSystem (void) {514 515 // Implement !516 631 } 517 632 … … 577 692 SectorsPerTrack = DeviceParmBlock.cSectorsPerTrack; 578 693 OS2_FreeIOCTLHandle (IOCTLHandle); 579 //if (SectorsPerTrack > 61) return TRUE; // >60 should also be ok for normal image (60 for image 1 for lvm)580 if (SectorsPerTrack > SECTOR_COUNT) return TRUE; // Note: This is 1 sector smaller than above !!694 //if (SectorsPerTrack > 61) return TRUE; 695 if (SectorsPerTrack > SECTOR_COUNT) return TRUE; 581 696 // OS/2 is only able to support 512-byte/sector media, so we dont need to check this 582 697 return FALSE; … … 762 877 } 763 878 764 USHORT OS2_GetIOCTLHandle () {765 USHORT IOCTLHandle = 0;766 // Implement !767 return IOCTLHandle;768 }769 770 void OS2_FreeIOCTLHandle (USHORT IOCTLHandle) {771 // Implement !772 return;773 }774 775 776 879 BOOL HarddriveCheckGeometry (void) { 777 USHORT IOCTLHandle; 778 779 IOCTLHandle = OS2_GetIOCTLHandle(); 880 780 881 // Implement ! 781 882 return FALSE; … … 783 884 784 885 BOOL Track0Load (void) { 785 USHORT IOCTLHandle;786 886 BOOL Success = FALSE; 787 887 788 IOCTLHandle = OS2_GetIOCTLHandle();789 888 // Implement ! 790 889 return Success; … … 792 891 793 892 BOOL Track0Write (void) { 794 USHORT IOCTLHandle;795 893 BOOL Success = FALSE; 796 894 797 IOCTLHandle = OS2_GetIOCTLHandle();798 895 // Implement ! 799 896 return Success; … … 846 943 fseek (FileHandle, 0, SEEK_END); 847 944 BootcodeSize = ftell(FileHandle); 848 if (BootcodeSize!=IMAGE_SIZE ) {945 if (BootcodeSize!=IMAGE_SIZE && BootcodeSize!=IMAGE_SIZE_60SECS) { 849 946 fclose (FileHandle); 850 947 if (!Option_CID) { … … 996 1093 997 1094 998 /* 999 // HIER AANPASSEN VOOR 1.06 -> 1.07, 1.07/1.0.8-rc1 -> 1.0.8-rc2+ ! 1000 // MBR-ProtImg, DriveLetters, Packed hideparttable 1001 */ 1002 1003 // UPGRADE all later versions 1004 // We don't need to "upgrade" the configuration, we simply copy it over. 1005 // From Sector 55, 6 sectors in total but never header/version 1095 // UPGRADE to v1.06 format. 1096 // We don't need to "upgrade" the configuration to move to v1.06, we simply copy it over. 1097 // From Sector 55, 6 sectors in total but never header/version. 1006 1098 // Rousseau: We copy two more sectors (8 in total) in the extended (45 partition) version. 1007 1099 switch (IMAGE_SIZE) { … … 1015 1107 } 1016 1108 } 1109 1110 /* 1111 // Convert v1.06 hideparttable (30x30) to the v1.07 (30x45) format. 1112 */ 1113 if ((Installed_ConfigVersion == 0x102) && (Bootcode_ConfigVersion >= 0x107)) { 1114 int i,j; 1115 char c; 1116 //printf("Converting 1.06 -> 1.07 hidepart"); 1117 memcpy(&Bootcode[0x7400], &Track0[0x7200], 900); 1118 memset(TempHidPartTable, 0xff, 45 * 34); 1119 for (i=0; i<30; i++) { 1120 for (j=0; j<30; j++) { 1121 c = Bootcode[0x7400+i*30+j]; 1122 TempHidPartTable[i*45+j] = c; 1123 } 1124 } 1125 memcpy(&Bootcode[0x7400], TempHidPartTable, 30 * 45); 1126 } 1127 1128 /* 1129 // Convert v1.07 hideparttable (30x45) to a packed v1.0.8+ (45x45) format. 1130 */ 1131 if ((Installed_ConfigVersion < 0x108) && (Bootcode_ConfigVersion >= 0x108)) { 1132 int i,j; 1133 char c; 1134 //printf("Converting to 1.08 packed hidepart"); 1135 memset(TempHidPartTable, 0xff, 45 * 34); 1136 // Unpacked table is 30 rows with 45 columns per row. 1137 // Packed table is 45 rows with 45 columns per row packed in 34 bytes. 1138 for (i=0; i<30; i++) { 1139 for (j=0; j<45; j++) { 1140 c = Bootcode[0x7400+i*45+j]; // Get unpacked value 1141 c = set_bitfield(&TempHidPartTable[i*34], j, 6, c); // Store 6-bit packed value 1142 } 1143 } 1144 memcpy(&Bootcode[0x7400], TempHidPartTable, 45 * 34); 1145 } 1146 1017 1147 return; 1018 1148 } 1149 // MKW: 1019 1150 // Check for prior v0.26 signature 1020 1151 // not supported in C version anymore 1021 // 1022 // 1152 // Don't have this version here for testing and I can't risk breaking 1153 // configuration 1023 1154 return; 1024 1155 } … … 1160 1291 if (!Option_CID) { 1161 1292 printf(", but may be updated"); 1293 } 1294 if (!Option_CID) { 1162 1295 printf("\n"); 1163 1296 } 1164 1297 break; 1298 1165 1299 case STATUS_IMPOSSIBLE: 1166 1300 if (!Option_CID) { 1167 printf(ImpossibleCause);1301 printf(ImpossibleCause); 1168 1302 } 1169 1303 break; … … 1264 1398 1265 1399 1266 1400 void DoDebug() { 1401 USHORT t0codv = 0; 1402 USHORT t0cfgv = 0; 1403 USHORT bccodv = 0; 1404 USHORT bccfgv = 0; 1405 1406 //do_bf_test(); 1407 1408 printf("\nHardisks : %d\n", CountHarddrives()); 1409 printf("\nGEO : %d\n", HarddriveCheckGeometry()); 1410 printf("\nTrack0 : %d\n", Track0Load()); 1411 printf("\nBootcode : %d\n", LoadBootcodeFromFile()); 1412 1413 1414 // Dump Track0 1415 { 1416 int i; 1417 for (i=0; i<512; i++) { 1418 printf("%02X",Track0[i]); 1419 } 1420 } 1421 printf("\n\n"); 1422 // Dump Bootcode 1423 { 1424 int i; 1425 for (i=0; i<512; i++) { 1426 printf("%02X",Bootcode[i]); 1427 } 1428 } 1429 printf("\n\n"); 1430 1431 t0codv = Track0[13] << 8 | Track0[14]; 1432 printf("t0codv : %04X\n", t0codv); 1433 1434 t0cfgv = Track0[0x6c00+13] << 8 | Track0[0x6c00+14]; 1435 printf("t0cfgv : %04X\n", t0cfgv); 1436 1437 bccodv = Bootcode[13] << 8 | Bootcode[14]; 1438 printf("bccodv : %04X\n", bccodv); 1439 1440 bccfgv = Bootcode[0x6c00+13] << 8 | Bootcode[0x6c00+14]; 1441 printf("bccfgv : %04X\n", bccfgv); 1442 1443 return; 1444 1445 } 1267 1446 1268 1447 … … 1283 1462 CHAR TempSpace[MAXCMDPARMLEN+1]; 1284 1463 1285 char* p = NULL; 1286 1287 1288 do_bf_test(); 1289 exit(0); 1290 1291 1292 // printf("AiR-BOOT Installer v1.07\n"); 1293 // printf(" - (c) Copyright 1998-2011 by Martin Kiewitz.\n"); 1294 // printf("\n-> ...Please wait... <-\n"); 1464 1465 // Show header. 1466 if (!Option_CID) { 1467 printf("AiR-BOOT Installer v%s.%s.%s for %s\n", 1468 BLDLVL_MAJOR_VERSION, 1469 BLDLVL_MIDDLE_VERSION, 1470 BLDLVL_MINOR_VERSION, 1471 PLATFORM_NAME); 1472 printf(" - (c) Copyright 1998-2012 by Martin Kiewitz.\n"); 1473 printf("\n-> ...Please wait... <-\n"); 1474 } 1295 1475 1296 1476 // Allocate buffers for Track0 and AIRBOOT.BIN. … … 1307 1487 1308 1488 1309 p = (PCHAR) &Track0; 1310 p = (PCHAR) Track0; 1311 p[0] = 'A'; 1312 1313 { 1314 int i=0; 1315 for (i=0; i<sizeof(Track0); i++) { 1316 Track0[i]='X'; 1317 } 1318 for (i=0; i<sizeof(Bootcode); i++) { 1319 Bootcode[i]='Y'; 1320 } 1321 //~ for (i=0; i<sizeof(Bootcode2); i++) { 1322 //~ Bootcode2[i]='Z'; 1323 //~ } 1324 } 1489 //~ DoDebug(); 1490 //~ exit(0); 1325 1491 1326 1492 -
trunk/INSTALL/C/INSTALL.H
r46 r47 15 15 #define BLDLVL_YEAR "2012" 16 16 #define BLDLVL_MONTH "04" 17 #define BLDLVL_DAY " 14"17 #define BLDLVL_DAY "21" 18 18 // Build time 19 #define BLDLVL_HOURS "0 1"20 #define BLDLVL_MINUTES "3 0"19 #define BLDLVL_HOURS "08" 20 #define BLDLVL_MINUTES "35" 21 21 #define BLDLVL_SECONDS "00" 22 22 // Build machine … … 49 49 #if defined(__DOS__) 50 50 // DOS platform 51 #define PLATFORM_DOS 52 #define PLATFORM_NAME "DOS" 51 53 #include <os2def.h> // We use the OS/2 definitions like CHAR etc. 52 #define PLATFORM_DOS53 54 #elif defined(__OS2__) && !defined(OS2) 54 55 // OS/2 platform 56 #define PLATFORM_OS2 57 #define PLATFORM_NAME "OS/2" 55 58 #define INCL_NOPMAPI 56 59 #define INCL_BASE … … 59 62 #include <os2.h> 60 63 #include <malloc.h> // Rousseau: added to use getenv() 61 #define PLATFORM_OS262 64 #elif defined(__NT__) 63 65 // Win32 platform 66 #define PLATFORM_WINNT 67 #define PLATFORM_NAME "Windows NT/2K/XP/Vista/7" 64 68 #include <windows.h> 65 #define PLATFORM_WINNT 69 66 70 #elif defined(__LINUX__) 67 71 // Linux platform 72 #define PLATFORM_LINUX 73 #define PLATFORM_NAME "Linux" 68 74 #include <os2def.h> // We use the OS/2 definitions like CHAR etc. 69 #define PLATFORM_LINUX70 75 #else 71 76 #error Unsupported platform -
trunk/INSTALL/C/Makefile
r46 r47 327 327 # 328 328 329 330 # ----------------------------------------------------------------------------- 331 # DISTRIBUTE TO RELEASE SPACE 332 # ----------------------------------------------------------------------------- 333 # This distributes all .BIN files to BOOTCODE. 334 # Then it installs the English version to RELEASES as AIRBOOT.BIN. 335 # ----------------------------------------------------------------------------- 336 dist: .SYMBOLIC 337 @if exist *.EXE $(CP) *.EXE ..$(DS)..$(DS)RELEASE$(DS)BOOTCODE 338 339 329 340 # 330 341 # Rebuild all targets. -
trunk/INSTALL/INST_X86/INSTALL.INC
r46 r47 371 371 372 372 373 ; Out: Carry Flag SET if Harddisc failed 6 2-sectors test373 ; Out: Carry Flag SET if Harddisc failed 63-sectors test 374 374 Init_CheckHarddisc Proc Near 375 375 mov ah, 08h … … 378 378 and cl, 111111b 379 379 cmp cl, 62 380 ja eINITCH_Success380 ja INITCH_Success 381 381 stc 382 382 ret -
trunk/TOOLS/INTERNAL/FIXCODE.C
r46 r47 22 22 // It is a quick-and-dirty translation of the original DOS-only ASM file. 23 23 // Of course it's not as small but it's much easier to maintain across 24 // multiple platforms. 24 // multiple platforms. A small change with regard to the old ASM version is 25 // that it directly writes AIRBOOT.BIN instead of writing AIR-BOOT.COM. 26 // This way the pre and post situations are kept valid. 25 27 */ 26 28 … … 49 51 #define IN_FILE "AIR-BOOT.COM" // Target from assembly. 50 52 #ifdef PLATFORM_LINUX 51 #define MERGE_FILE "MBR-PROT/MBR-PROT.BIN" // MBR protection TSR.53 #define MERGE_FILE "MBR-PROT/MBR-PROT.BIN" // MBR Protection Image. 52 54 #else 53 #define MERGE_FILE "MBR-PROT\\MBR-PROT.BIN" // MBR protection TSR.55 #define MERGE_FILE "MBR-PROT\\MBR-PROT.BIN" // MBR Protection Image. 54 56 #endif 55 57 #define OUT_FILE "AIRBOOT.BIN" // Generated loader image. … … 158 160 /* 159 161 // Find Protection Image Signature. 160 // Note that this signature must reside on a sector boundary. 162 // Note that this signature must reside on a sector boundary in the 163 // AIR-BOOT.COM image. 161 164 */ 162 165 for (i=0; i<55; i++) { … … 168 171 169 172 /* 170 // Merge Protection Image.173 // Abort if not found. 171 174 */ 172 175 printf("%s",MergeMBR); … … 175 178 exit(2); 176 179 } 180 181 /* 182 // Merge Protection Image. 183 */ 177 184 memcpy(&BootCode[i*SECSIZE], MBRProtection, MBRPROT_SIZE); 178 185 printf("%s", Okay); … … 181 188 /* 182 189 // Count Code Sectors. 183 // Obsolete now since the Protection Image has moved just below the184 // Configuration and the code is always max. size.190 // Obsolete now because since v1.0.8 the Protection Image has moved just 191 // below the Configuration and the code is always max. size. 185 192 // Overlap checking is done while assembling AIR-BOOT.ASM. 193 // So we just write the max. code sectors here. 186 194 */ 187 195 printf("%s", CountCode); -
trunk/TOOLS/OS2/SETABOOT/SETABOOT.H
r46 r47 16 16 #define BLDLVL_YEAR "2012" 17 17 #define BLDLVL_MONTH "04" 18 #define BLDLVL_DAY " 14"18 #define BLDLVL_DAY "21" 19 19 // Build time 20 #define BLDLVL_HOURS "0 1"21 #define BLDLVL_MINUTES "3 0"20 #define BLDLVL_HOURS "08" 21 #define BLDLVL_MINUTES "35" 22 22 #define BLDLVL_SECONDS "00" 23 23 // Build machine
Note:
See TracChangeset
for help on using the changeset viewer.