- Timestamp:
- Jan 13, 2013, 8:46:36 AM (13 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 17 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/BOOTCODE/AIR-BOOT.ASM
r31 r32 25 25 ; - Fixed driveletter feature which was broken in v1.07. 26 26 ; - Reworked MBR-code to provide two I13X signatures. 27 ; - Esc from SETUP would save to disk.28 ; It now retains the changes only for this boot and29 ; does not write them to disk.27 ; - Fixes booting older eCS installations on HPFS 28 ; - Fixes booting Windows when installed in logical partition 29 ; with loader on FAT32. 30 30 ; - Corrected contact links. 31 ; - 31 ; NOTE: 32 ; AB v1.07 had a bug with saving and loading the correct size of the 33 ; configuration. Therefore the CRC over the config was also calculated 34 ; wrongly. 35 ; While AB v1.0.8 fixes this, it has to use the v1.07 way of CRC calculation. 36 ; Otherwise SET(A)BOOT from the eCS v2.1 would break and reboot after phase1 37 ; would show the boot-menu instead of automatically booting the system 38 ; being installed. (SET(A)BOOT would see a corrupted AB config) 39 ; This means that the CRC over the AB config is calculated over 5 sectors 40 ; instead of 7, just like in v1.07. 41 ; This will be corrected with a future release of eComStation. 42 ; Note that after such a correction, an installation from a v2.1 eCS CD 43 ; with a version of AiR-BOOT >v1.07 active will not automatically 44 ; boot-through after phase1. 32 45 ; 33 46 ; v1.07 … … 106 119 ; If defined then include DEBUG.ASM and output debug-info to serial-port. 107 120 ; 108 AuxDebug equ 1121 ;AuxDebug equ 1 109 122 110 123 ; Com-port for debugging, 0 is disabled … … 216 229 ; (relative to entry) 217 230 218 ; Rousseau: added (index in LVM-sector)231 ; Rousseau: added (index in extpart LVM-sector) 219 232 LocLVM_Secs equ 20h ; Sectors per Track (OS/2 ext-geo) 220 233 LocLVM_Heads equ 1ch ; Number of heads 221 LocLVM_VolumeLetter2 equ 78 ; is BYTE (Letter C-Z or 0) ; FOUT !! niet entry relative !222 LocLVM_Startable equ 77 ; is startable (newly installed system) ; FOUT !! niet entry relative !223 LocLVM_OnBootMenu equ 76 ; is on bootmenu ; FOUT !! niet entry relative !234 LocLVM_VolumeLetter2 equ 78 ; is BYTE (Letter C-Z or 0) 235 LocLVM_Startable equ 77 ; is startable (newly installed system) 236 LocLVM_OnBootMenu equ 76 ; is on bootmenu 224 237 225 238 ; Truncated to 11 chars when displayed in menu … … 625 638 ; in this function. That's done around line 500. 626 639 ; Putting this few bytes here creates just enough room. 627 ; The size of this function should grow.628 640 MBR_LoadConfig Proc Near 629 ; Changed from conditional assembler to calculated 641 ; Changed from conditional assembler to calculated value 630 642 ; Fixes issue: #2987 -- "air-boot doesn't remember drive letter" 631 mov ax, (MBR_BackUpMBR - Configuration) / 2 ; sizeof(ab-configuration) to write 632 ; TASM does not evaluate expression above corrrectly. 633 ; Listing shows correct opcode but generated opcode has imm. word byteswapped. 634 ; Casting to byte also does not work (overflow). 635 ; So we swap back here -- must be removed in JWasm version !! 636 xchg ah,al 643 ; Size of the ab-configuration in 512 byte sectors 644 mov al, (MBR_BackUpMBR - Configuration) / 200h 637 645 mov ah,02h 638 639 646 int 13h 640 647 ret … … 934 941 ; COM-PORT DEBUG 935 942 ; 936 call AuxIO_TeletypeNL943 ; call AuxIO_TeletypeNL 937 944 mov si, offset PartitionTable 938 call AuxIO_DumpSector939 call AuxIO_TeletypeNL945 ; call AuxIO_DumpSector 946 ; call AuxIO_TeletypeNL 940 947 941 948 … … 1130 1137 IFDEF AuxDebug 1131 1138 b_debug: 1132 Include REGULAR\DEBUG.ASM ; Various debugging routines,1139 ; Include REGULAR\DEBUG.ASM ; Various debugging routines, 1133 1140 ; uses AUXIO and CONV 1134 1141 size_debug = $-b_debug … … 1136 1143 1137 1144 b_auxio: 1138 Include REGULAR\AUXIO.ASM ; Com-port support for debugging1145 ;Include REGULAR\AUXIO.ASM ; Com-port support for debugging 1139 1146 size_auxio = $-b_auxio 1140 1147 -
trunk/BOOTCODE/MAKE.BAT
r31 r32 12 12 goto ExitMe 13 13 14 rem -- We do English last so an English version can be copied 15 rem -- to this directory, using it's normal basename instead 16 rem -- of the language suffixed one. 14 17 :BuildAll 15 18 call make.bat DE … … 54 57 echo Errorlevel not 0, make failed 55 58 :ExitMe 59 60 echo. 61 echo Gonna build the installer and setaboot now... 62 echo. 63 56 64 rem @pause -
trunk/BOOTCODE/REGULAR/DRIVEIO.ASM
r31 r32 62 62 xor bx, bx 63 63 64 ; Changed from 5 to calculated 64 ; Changed from 5 to calculated value (not here, see compat. issue below) 65 65 ; Fixes issue: #2987 -- "air-boot doesn't remember drive letter" 66 mov cx, (MBR_BackUpMBR - Configuration) / 2 ; Size of the ab-configuration 67 ; TASM does not evaluate expression above corrrectly. 68 ; Listing shows correct opcode but generated opcode has imm. word byteswapped. 69 ; Casting to byte also does not work (overflow). 70 ; So we swap back here -- must be removed in JWasm version !! 71 xchg ch,cl 66 ; Size of the ab-configuration in 512 byte sectors 67 ;mov cx, (MBR_BackUpMBR - Configuration) / 200h 68 69 ; AB v1.07 stores a 5 sector configuration with a 5 sector checksum. 70 ; AB v1.0.8 *should* stores a 7 sector configuration with a 71 ; 7 sector checksum. 72 ; Because 5 was hardcoded here, SET(A)BOOT v1.07 will see see an AB v1.0.8 73 ; config as corrupted, while this is not the case. 74 ; So, for compatibility reasons, in v1.0.8, the checksum stored is over 75 ; 5 sectors, to be compatible with v1.07. 76 ; This may change (be corrected) in future versions ! 77 mov cx,5 72 78 73 79 mov dx, [CFG_CheckConfig] … … 83 89 mov cx, 0037h 84 90 85 ; Changed from 5 to calculated 91 ; Changed from 5 to calculated value 86 92 ; Fixes issue: #2987 -- "air-boot doesn't remember drive letter" 87 mov ax, (MBR_BackUpMBR - Configuration) / 2 ; sizeof(ab-configuration) to write 88 ; TASM does not evaluate expression above corrrectly. 89 ; Listing shows correct opcode but generated opcode has imm. word byteswapped. 90 ; Casting to byte also does not work (overflow). 91 ; So we swap back here -- must be removed in JWasm version !! 92 xchg ah,al 93 ; Size of the ab-configuration in 512 byte sectors 94 mov al, (MBR_BackUpMBR - Configuration) / 200h 93 95 mov ah,03h 94 96 … … 250 252 ; Dump drive 251 253 mov si,offset drive 252 call AuxIO_Print254 ; call AuxIO_Print 253 255 xchg al,dl 254 call AuxIO_TeletypeHexByte255 call AuxIO_TeletypeNL256 ; call AuxIO_TeletypeHexByte 257 ; call AuxIO_TeletypeNL 256 258 xchg dl,al 257 259 258 260 ; Dump SPT 259 261 mov si,offset spt_used 260 call AuxIO_Print262 ; call AuxIO_Print 261 263 push dx 262 264 push bx … … 271 273 ;mov [ts],ax 272 274 273 call AuxIO_TeletypeHexWord274 call AuxIO_TeletypeNL275 ; call AuxIO_TeletypeHexWord 276 ; call AuxIO_TeletypeNL 275 277 pop bx 276 278 pop dx … … 281 283 mov dx,word ptr [ExtendedAbsPos+02] 282 284 mov ax,word ptr [ExtendedAbsPos+00] 283 call AuxIO_TeletypeHexDWord284 call AuxIO_TeletypeNL285 ; call AuxIO_TeletypeHexDWord 286 ; call AuxIO_TeletypeNL 285 287 pop dx 286 288 … … 293 295 294 296 mov ax, word ptr[bx] 295 call AuxIO_TeletypeHexWord296 call AuxIO_TeletypeNL297 ; call AuxIO_TeletypeHexWord 298 ; call AuxIO_TeletypeNL 297 299 mov al,[ExtendedAbsPosSet] ; if true -> 1st sector of extpart (EBR), not logpart(BPB) 298 call AuxIO_TeletypeHexByte299 call AuxIO_TeletypeNL300 ; call AuxIO_TeletypeHexByte 301 ; call AuxIO_TeletypeNL 300 302 ; mov si,offset PartitionSector 301 303 ; call AuxIO_DumpSector … … 304 306 ; LBA 305 307 mov si,offset before_lvm_adjust 306 call AuxIO_Print308 ; call AuxIO_Print 307 309 308 310 xchg dx,bx 309 call AuxIO_TeletypeHexDWord310 call AuxIO_TeletypeNL311 ; call AuxIO_TeletypeHexDWord 312 ; call AuxIO_TeletypeNL 311 313 xchg bx,dx 312 314 popa … … 322 324 pusha 323 325 mov si,offset before_lvm_adjust_log 324 call AuxIO_Print326 ; call AuxIO_Print 325 327 ; LBA 326 328 xchg dx,bx 327 call AuxIO_TeletypeHexDWord328 call AuxIO_TeletypeNL329 ; call AuxIO_TeletypeHexDWord 330 ; call AuxIO_TeletypeNL 329 331 xchg bx,dx 330 332 popa … … 349 351 pusha 350 352 mov si,offset after_lvm_adjust_log 351 call AuxIO_Print353 ; call AuxIO_Print 352 354 ; LBA 353 355 xchg dx,bx 354 call AuxIO_TeletypeHexDWord355 call AuxIO_TeletypeNL356 ; call AuxIO_TeletypeHexDWord 357 ; call AuxIO_TeletypeNL 356 358 xchg bx,dx 357 359 popa … … 432 434 pusha 433 435 mov si,offset after_lvm_adjust 434 call AuxIO_Print436 ; call AuxIO_Print 435 437 ; LBA 436 438 xchg dx,bx 437 call AuxIO_TeletypeHexDWord438 call AuxIO_TeletypeNL439 ; call AuxIO_TeletypeHexDWord 440 ; call AuxIO_TeletypeNL 439 441 xchg bx,dx 440 442 popa … … 583 585 pushf 584 586 pusha 585 call AuxIO_TeletypeNL587 ; call AuxIO_TeletypeNL 586 588 mov si,offset db_curlvmsec 587 call AuxIO_Print589 ; call AuxIO_Print 588 590 mov dx,bx 589 call AuxIO_TeletypeHexDWord590 call AuxIO_TeletypeNL591 ; call AuxIO_TeletypeHexDWord 592 ; call AuxIO_TeletypeNL 591 593 mov si,offset LVMSector 592 call AuxIO_DumpSector593 call AuxIO_TeletypeNL594 ; call AuxIO_DumpSector 595 ; call AuxIO_TeletypeNL 594 596 popa 595 597 popf … … 733 735 DriveIO_LoadSector EndP 734 736 737 738 739 ; 740 ; ############################################################ 741 ; # Load a specified sector from a disk using LBA addressing # 742 ; ############################################################ 743 ; 744 ; In 745 ; -- 746 ; DL = Physical Disk 747 ; BX:CX = LBA sector 748 ; DI:SI = Target buffer 749 ; 750 ; Out 751 ; --- 752 ; AX = Error code 753 ; 754 DriveIO_LoadSectorLBA Proc Near Uses bx cx dx si di ds es 755 ; Get one sector 756 mov cs:[DriveIO_DAP_NumBlocks], 1 757 758 ; Setup buffer address 759 mov wptr cs:[DriveIO_DAP_Transfer+0], si 760 mov wptr cs:[DriveIO_DAP_Transfer+2], di 761 762 ; Setup LBA address of requested sector 763 mov wptr cs:[DriveIO_DAP_Absolute+0], cx 764 mov wptr cs:[DriveIO_DAP_Absolute+2], bx 765 mov wptr cs:[DriveIO_DAP_Absolute+4], 0 766 mov wptr cs:[DriveIO_DAP_Absolute+6], 0 767 768 ; Address of packet 769 mov si, offset DriveIO_DAP 770 771 ; Do the extended read 772 mov ah, 42h 773 int 13h 774 775 ; Looking goot so far 776 jnc DriveIO_LoadSectorLBA_succes1 777 778 ; AH should not be zero, if it is then set to undefined and set carry 779 test ah,ah 780 jnz DriveIO_LoadSectorLBA_error1 781 mov ah, 0bbh ; Undefined error 782 DriveIO_LoadSectorLBA_error1: 783 stc 784 jmp DriveIO_LoadSectorLBA_exit 785 786 ; AL should be zero, if not then set to undefined and set carry 787 DriveIO_LoadSectorLBA_succes1: 788 test ah,ah 789 jz DriveIO_LoadSectorLBA_exit 790 stc 791 jmp DriveIO_LoadSectorLBA_exit 792 793 ; Return to caller 794 DriveIO_LoadSectorLBA_exit: 795 ret 796 DriveIO_LoadSectorLBA EndP 797 798 799 800 735 801 ; ######################################################################### 736 802 ; Routine: Writes DS:SI to a specified sector … … 796 862 ; See if a LVM-sector is valid. 797 863 ; In : si, pointer to sector 798 ; Out : ZF=true, not valid; ZF=false, valid864 ; Out : CY if valid LVM sector, NC if not 799 865 DriveIO_LVMSectorValid Proc Near 800 pusha 801 802 call LVM_CheckSectorSignature 803 mov al,0 804 rcl al,1 ; Move CY to AL.0 805 call AuxIO_TeletypeHexByte 806 call AuxIO_TeletypeNL 807 or al,al ; Zero if not a valid sector 808 jz DriveIO_LVMSectorValid_End ; Not a valid sector 809 810 call LVM_CheckSectorCRC 811 stc 812 mov al,0 813 rcl al,1 ; Move CY to AL.0 814 call AuxIO_TeletypeHexByte 815 call AuxIO_TeletypeNL 816 or al,al ; Zero if not a valid sector 817 818 DriveIO_LVMSectorValid_End: 819 820 popa 821 ret 866 pusha 867 868 call LVM_CheckSectorSignature 869 ; NC if no signature found 870 jnc DriveIO_LVMSectorValid_End 871 872 call LVM_CheckSectorCRC 873 ; Force valid !!! 874 stc 875 876 DriveIO_LVMSectorValid_End: 877 popa 878 ret 822 879 DriveIO_LVMSectorValid EndP 823 880 … … 838 895 ; This is also the case when no valid master LVM-sector can be found. 839 896 ; 840 ; Return ZF=true if not found, ZF=false when valid master LVM-sector found. 897 ; Return CF when valid master LVM sector found, NC if not. 898 ; Loads sector at [LVMSector] ! 841 899 DriveIO_LoadMasterLVMSector Proc Near 842 pusha 843 844 mov si,offset db_lmlvm 845 ;call AuxIO_Print 846 847 mov al,dl 848 ;call AuxIO_TeletypeHexByte 849 ;call AuxIO_TeletypeNL 850 851 852 ; Loop over the sector-translation table, 853 ; process the first three values from high (255) to low (bios spt, most likely 63) 854 mov cx,3 855 DriveIO_LoadMasterLVMSector_NextTry: 856 mov bx,offset secs_per_track_table ; sector translation table that corresponds with IsHugeDrive 857 mov si, offset LVMSector ; space to load the master LVM-sector 858 mov [DriveIO_DAP_NumBlocks],1 ; number of sectors to read 859 mov wptr [DriveIO_DAP_Transfer+0],si ; low part of transfer address 860 mov ax, ds 861 mov wptr [DriveIO_DAP_Transfer+2],ax ; high part of transfer address 862 mov ax,cx ; use the counter... 863 dec ax ; as an index into the table 864 xlatb ; translate to number of sectors 865 dec al ; LBA is zero-based, so adjust 900 pusha 901 902 mov si,offset db_lmlvm 903 ;call AuxIO_Print 904 905 ; Physical disk 906 ; mov al,'<' 907 ; call VideoIO_PrintSingleChar 908 ; mov al,dl 909 ; call VideoIO_PrintHexByte 910 ; mov al,'>' 911 ; call VideoIO_PrintSingleChar 912 913 ;call AuxIO_TeletypeHexByte 914 ;call AuxIO_TeletypeNL 915 916 917 ; Loop over the sector-translation table, 918 ; process the first three values from high (255) to low (bios spt, most likely 63) 919 mov cx,3 920 DriveIO_LoadMasterLVMSector_NextTry: 921 ; Number of sectors to read 922 mov [DriveIO_DAP_NumBlocks],1 923 924 ; Setup destination address 925 mov si, offset LVMSector 926 mov wptr [DriveIO_DAP_Transfer+0],si 927 mov ax, ds 928 mov wptr [DriveIO_DAP_Transfer+2],ax 929 930 ; Get the sector-number of the next possible LVM sector (255,127,63) 931 ; using the translation table and the counter as the index 932 mov bx,offset secs_per_track_table 933 mov ax,cx 934 dec ax 935 xlatb 936 dec al 937 938 ; 939 ; AX now contains the LBA address of the sector 940 ; that could be an LVM sector. 941 ; This is all in track0 so the address will not exceed 64kiB sectors. 942 ; 943 944 ; push ax 945 ; push ax 946 ; mov al,'$' 947 ; call VideoIO_PrintSingleChar 948 ; pop ax 949 ; call VideoIO_PrintHexByte 950 ; mov al,'$' 951 ; call VideoIO_PrintSingleChar 952 ; pop ax 866 953 867 954 IFDEF AuxDebug … … 871 958 ENDIF 872 959 873 mov wptr [DriveIO_DAP_Absolute+0],ax ; LBA low ;874 mov wptr [DriveIO_DAP_Absolute+2],00h ; LBA high875 mov si, offset DriveIO_DAP ; address request packet876 mov ah, 42h877 int 13h ; do the i/o878 jc DriveIO_LoadMasterLVMSector_NotFound ; oops, there was an error879 880 IFDEF AuxDebug 881 ; Dump title 882 mov si,offset db_masterlvm 883 ;call AuxIO_Print884 885 ; Dumsector886 mov si, offset LVMSector887 ;call AuxIO_DumpSector 888 ;call AuxIO_TeletypeNL 889 ENDIF 890 ; See is this is a valid LVM-sector 891 call DriveIO_LVMSectorValid 892 893 IFDEF AuxDebug 894 pushf 895 ;call AuxIO_TeletypeNL 896 popf 897 ENDIF 898 ; Yep, we found the master LVM-sector 899 jnz DriveIO_LoadMasterLVMSector_Found 900 ; Try next location901 loop DriveIO_LoadMasterLVMSector_NextTry902 903 ; No master LVM-sector found, set ZF=true904 DriveIO_LoadMasterLVMSector_NotFound: 905 xor ax,ax906 907 ; Jump here with ZF=false if found 908 DriveIO_LoadMasterLVMSector_Found:909 910 popa911 ret960 ; Setup the requested LBA sector number 961 mov wptr [DriveIO_DAP_Absolute+0],ax ; LBA low 962 mov wptr [DriveIO_DAP_Absolute+2],00h ; LBA high 963 mov si, offset DriveIO_DAP ; address request packet 964 mov ah, 42h 965 int 13h ; do the i/o 966 cmc ; Complement carry so we can exit imm. on error 967 jnc DriveIO_LoadMasterLVMSector_End ; oops, return with NC 968 969 970 mov si,offset LVMSector 971 972 ; See if this is a valid LVM-sector 973 call DriveIO_LVMSectorValid 974 975 ; pushf 976 ; mov ah,0 977 ; rcl ah,1 978 ; mov al,'|' 979 ; call VideoIO_PrintSingleChar 980 ; mov al,ah 981 ; call VideoIO_PrintHexByte 982 ; mov al,'|' 983 ; call VideoIO_PrintSingleChar 984 ; popf 985 986 987 ; Yep, we found the master LVM-sector 988 jc DriveIO_LoadMasterLVMSector_Found 989 ; Try next location 990 loop DriveIO_LoadMasterLVMSector_NextTry 991 992 ; No master LVM-sector found, set CF=false 993 clc 994 995 DriveIO_LoadMasterLVMSector_Found: 996 DriveIO_LoadMasterLVMSector_End: 997 popa 998 ret 912 999 DriveIO_LoadMasterLVMSector Endp 913 1000 -
trunk/BOOTCODE/REGULAR/OTHER.ASM
r31 r32 126 126 127 127 ; Initialize the com-port for debugging 128 call AuxIO_Init128 ; call AuxIO_Init 129 129 130 130 xor si,si … … 143 143 mov [bx], al 144 144 145 call DriveIO_LoadMasterLVMSector ; returns ZF=1if no valid LVM record found145 call DriveIO_LoadMasterLVMSector ; returns NC if no valid LVM record found 146 146 147 147 pushf 148 149 ; mov al,'#' 150 ; pushf 151 ; call VideoIO_PrintSingleChar 152 ; popf 153 ; mov al,0 154 ; rcl al,1 155 ; call VideoIO_PrintHexByte 156 ; mov al,'#' 157 ; call VideoIO_PrintSingleChar 158 148 159 mov bx, offset TrueSecs 149 160 add bx,cx … … 155 166 ; bx now contains pointer to truesecs for this drive 156 167 157 jz NoValidMasterLVM 158 168 jnc NoValidMasterLVM 169 170 ; ?? 3f bij disk 80h maar 0 bij disk 81h 159 171 mov si,offset LVMSector 160 172 mov ax,[si+LocLVM_Secs] 173 174 ; pusha 175 ; mov dx,ax 176 ; mov al,'%' 177 ; call VideoIO_PrintSingleChar 178 ; mov ax,dx 179 ; call VideoIO_PrintHexWord 180 ; mov al,'%' 181 ; call VideoIO_PrintSingleChar 182 ; popa 183 161 184 mov word ptr [bx],ax 162 185 jmp SkipUseBiosSecs … … 200 223 ;mov word ptr [LOG_Secs],63 201 224 202 mov al,[HugeDisk] ;; fout, moet nog index bij203 call AuxIO_TeletypeHexByte204 call AuxIO_TeletypeNL205 206 mov ax,word ptr [TrueSecs] ;; fout, moet nog index bij207 call AuxIO_TeletypeHexWord208 call AuxIO_TeletypeNL225 ; mov al,[HugeDisk] ;; fout, moet nog index bij 226 ; call AuxIO_TeletypeHexByte 227 ; call AuxIO_TeletypeNL 228 229 ; mov ax,word ptr [TrueSecs] ;; fout, moet nog index bij 230 ; call AuxIO_TeletypeHexWord 231 ; call AuxIO_TeletypeNL 209 232 210 233 … … 243 266 call MBR_TeleType 244 267 xor si,si 245 call MBR_TeletypeNL ; ALP barks undefined symbol; must use prototypes ?268 call MBR_TeletypeNL 246 269 247 270 … … 364 387 xor bx, bx 365 388 366 ; Changed from 5 to calculated 389 ; Changed from 5 to calculated value (not here, see compat. issue below) 367 390 ; Fixes issue: #2987 -- "air-boot doesn't remember drive letter" 368 mov cx, (MBR_BackUpMBR - Configuration) / 2 ; Size of the ab-configuration 369 ; TASM does not evaluate expression above corrrectly. 370 ; Listing shows correct opcode but generated opcode has imm. word byteswapped. 371 ; Casting to byte also does not work (overflow). 372 ; So we swap back here -- must be removed in JWasm version !! 373 xchg ch,cl 391 ; Size of the ab-configuration in 512 byte sectors 392 ;mov cx, (MBR_BackUpMBR - Configuration) / 200h 393 394 ; AB v1.07 stores a 5 sector configuration with a 5 sector checksum. 395 ; AB v1.0.8 *should* stores a 7 sector configuration with a 396 ; 7 sector checksum. 397 ; Because 5 was hardcoded here, SET(A)BOOT v1.07 will see see an AB v1.0.8 398 ; config as corrupted, while this is not the case. 399 ; So, for compatibility reasons, in v1.0.8, the checksum stored is over 400 ; 5 sectors, to be compatible with v1.07. 401 ; This may change (be corrected) in future versions ! 402 mov cx,5 374 403 375 404 mov dx, CFG_CheckConfig -
trunk/BOOTCODE/REGULAR/PARTMAIN.ASM
r31 r32 694 694 PART_IsInstallVolume_skip2: 695 695 xchg si,di ; Reexchange pointers 696 call AuxIO_Teletype696 ; call AuxIO_Teletype 697 697 call CONV_ToUpper 698 call AuxIO_Teletype698 ; call AuxIO_Teletype 699 699 xchg al,ah 700 call AuxIO_Teletype700 ; call AuxIO_Teletype 701 701 call CONV_ToUpper 702 call AuxIO_Teletype703 call AuxIO_TeletypeNL702 ; call AuxIO_Teletype 703 ; call AuxIO_TeletypeNL 704 704 705 705 ; Are both of them zero ? … … 735 735 mov al,dl 736 736 add al,'0' 737 call AuxIO_TeletypeHexByte738 call AuxIO_TeletypeNL737 ; call AuxIO_TeletypeHexByte 738 ; call AuxIO_TeletypeNL 739 739 rcr dl,1 ; Put found-flag in CY 740 740 ret 741 741 PART_IsInstallVolume EndP 742 743 742 744 743 745 … … 1101 1103 pop si ds ; Restore DS:SI 1102 1104 1105 1106 1107 1108 1109 1110 1111 PSP_NoMBRprotect: 1112 1113 ; Display volume-name in bold 1114 ; Just before booting the selected partition 1115 pushf 1116 pusha 1117 push si 1118 add si, LocIPT_Name 1119 call MBR_TeletypeVolName 1120 xor si,si 1121 call MBR_TeletypeNL 1122 pop si 1123 popa 1124 popf 1125 1126 1127 1103 1128 ; ------------------------------------------------ SPECIAL PARTITION SUPPORT 1104 1129 ; needed by OS/2 Warp / eComStation 1105 PSP_NoMBRprotect: 1106 cmp bptr [si+LocIPT_SystemID], 08 ; I hate Microsuck NTFS check 1107 1108 ;je PSP_NoSpecialSupport 1109 1110 mov di, offset PartitionSector ; ES:DI - Actual Boot-Record 1111 ; Special Support Detection 1112 mov ax, wptr es:[di+24] 1113 cmp ax, 003Fh ; Physical Layout-Sectors... Safety check 1114 1115 1116 ; Rousseau: # Boot Logical Partitions) 1117 ; FreeDOS and eCS on extpart on non-huge needs special support. 1118 ; (old ja jump) 1119 ; PC-DOS7 on huge pri fat16 2G works with both (XP too) when at start of disk. 1120 ; (also when offset at 20MiB) 1121 ; PCD7 bonkt vast als in 2GiB log at start of space. 1122 ; "Starting PC DOS..." verschijnt. PCD Loader probleem. 1123 ; Offset van start-of-disk bij PCD7 niet meer dan 2GiB maken. 1124 ; Special is needed to boot ECS-CXXVAC (log-part) on Douwskie Box with 40G disk. 1125 ; FreeDOS 20G PRI SOD op 400G start niet met special. 1126 ; Heeft drive-id op 26h (36d) van 0dh ! 1127 ; WinXP werkt met special en not-special op 400G normal geo. 1128 ; eCS op PRI op 2G met os2 ext geo werkt ook met beide. 1129 ; eCS LOG werkt niet zonder special op 400G. 1130 ; (hidden secs op 3F en moet 3F00 zijn; BM staat ervoor, 3F00=255*63+63) 1131 ; Laatste 63 is MBR. 1132 ; 1133 ; It seems PRI's already get special treatment in that they get their 1134 ; hidden secs updated. 1135 ; (100MB HD, moved 50MB PRI-DOS part UP, DFSee complains about wrong hidden, 1136 ; but AiR-BOOT corrects it before booting) 1137 1138 ; FreeDOS zet 63 in SPT in BPB op 255/255 geo !!!! 1139 1140 ; PC-DOS7 wil vaak niet starten als er meerdere pri's actief zijn. 1141 ; Logo verschijnt wel maar start niet door. 1142 1143 1144 ; Display volume-name 1145 ; Just before booting the selected partition 1146 pushf 1147 pusha 1148 push si 1149 add si, LocIPT_Name 1150 call MBR_TeletypeVolName 1151 xor si,si 1152 call MBR_TeletypeNL 1153 pop si 1154 popa 1155 popf 1156 1157 1158 1159 1160 1161 1162 ; 1163 ; This section will be sanitized in the JWasm version. 1164 ; 1165 1166 jmp special 1167 ;jmp PSP_NoSpecialSupport 1168 1169 ;ja PSP_NoSpecialSupport 1170 ;jbe PSP_NoSpecialSupport 1171 1172 1173 mov ax, wptr es:[di+26] 1174 cmp ax, 00FFh ; Physical Layout-Heads... Safety check 1175 ja PSP_NoSpecialSupport 1176 mov al, bptr es:[di+36] 1177 cmp al, 80h ; Drive Letter (ID) 1178 jne PSP_NoSpecialSupport 1179 1180 ; Special Support needed 1181 special: 1182 ; Write actual drive-letter to partition boot-record in memory. 1183 mov al, bptr [si+LocIPT_Drive] 1184 1185 ; Also an influence with FreeDOS ! 1186 ; Generates JFS ERROR when not set correctly !!! 1187 mov bptr es:[di+36], al ; Write Actual Drive-Letter to 1188 ; PBR in RAM. (BIOS notation) 1189 1190 ; 1191 ; Display drive info (debug) 1192 ; 1193 push ax 1194 mov al,' ' 1195 call VideoIO_PrintSingleChar 1196 pop ax 1197 call VideoIO_PrintHexByte 1198 mov al,'-' 1199 call VideoIO_PrintSingleChar 1200 1201 ; 1202 ; Absolute offset of volume 1203 ; 1204 mov ax, [si+LocIPT_AbsoluteBegin+2] 1205 call VideoIO_PrintHexWord 1206 mov ax, [si+LocIPT_AbsoluteBegin] 1207 call VideoIO_PrintHexWord 1208 mov al,'-' 1209 call VideoIO_PrintSingleChar 1210 1211 ; 1212 ; Relative offset (3fh/63 with logicals) 1213 ; 1214 mov ax,es:[di+30] 1215 call VideoIO_PrintHexWord 1216 mov ax,es:[di+28] 1217 call VideoIO_PrintHexWord 1218 1219 ; This could be incorrect when a partition is moved, 1220 ; or the system installer puts the wrong value here. 1221 ; FreeDOS (log-part) i.e. puts 03fH (63d) here, eventhough it is not 1222 ; at the start of the disk. 1223 ; This fixing is done by OS/2 BM as well, according to Martin. 1224 mov ax, [si+LocIPT_AbsoluteBegin] 1225 mov wptr es:[di+28], ax ; low word of hidden sectors 1226 mov ax, [si+LocIPT_AbsoluteBegin+2] 1227 mov wptr es:[di+30], ax ; high word of hidden sectors 1228 1229 ; ------------------------------------------------ LOGICAL PARTITION SUPPORT 1230 PSP_NoSpecialSupport: 1231 1232 ;jmp PSP_NoLogicalSupport 1233 1234 1235 ; 1236 ; Test if the drive-letter feature is active for this partition. 1237 ; If so, then the drive that the user defined will be placed at 1238 ; byte 25h (37d) of the in-ram PartitionSector (BPB). 1239 ; (BIOS 80h notation: 80h=C, 81h=D, etc.) 1240 ; This is a remedy for when the corresponding field (25h) in the BPB on 1241 ; disk is zero. 1242 ; 1243 test byte ptr [si+LocIPT_Flags], Flags_DriveLetter 1244 jz PSP_NoLogicalSupport 1245 1246 ;movzx bx, BootPartNo ; EntryNumber is straight view 1247 mov bl,BootPartNo ; EntryNumber is straight view 1248 mov bh,0 1249 1250 mov al, bptr [DriveLetters+bx] 1251 mov bptr es:[di+37], al ; Write Drive Letter (OS/2 only) 1252 1253 ; Display dl-feature drive if active 1254 push ax 1255 mov al,'-' 1256 call VideoIO_PrintSingleChar 1257 pop ax 1258 call VideoIO_PrintHexByte 1259 1260 ; -------------------------------------------- COPY BOOT-RECORD TO STARTBASE 1261 PSP_NoLogicalSupport: 1262 1263 1264 mov al,'-' 1265 call VideoIO_PrintSingleChar 1266 mov al,[ExtendedAbsPosSet] 1267 call VideoIO_PrintHexByte 1268 1269 1270 push si 1271 mov ax, StartBaseSeg 1272 mov es, ax 1273 mov cx, 256 1274 mov si, offset PartitionSector 1275 mov di, StartBasePtr 1276 rep movsw 1277 pop si 1278 ; ---------------------------------------------------- NOW START BOOT-RECORD 1130 1131 1132 cmp byte ptr [si+LocIPT_SystemID],08 ; I hate Microsuck NTFS check 1133 mov di, offset PartitionSector ; ES:DI - Actual Boot-Record 1134 1135 ; Special Support Detection 1136 mov ax, word ptr es:[di+18h] 1137 cmp ax, 003Fh ; Physical Layout-Sectors... Safety check 1138 1139 1140 ; Rousseau: # Boot Logical Partitions) 1141 ; FreeDOS and eCS on extpart on non-huge needs special support. 1142 ; (old ja jump) 1143 ; PC-DOS7 on huge pri fat16 2G works with both (XP too) when at start of disk. 1144 ; (also when offset at 20MiB) 1145 ; PCD7 bonkt vast als in 2GiB log at start of space. 1146 ; "Starting PC DOS..." verschijnt. PCD Loader probleem. 1147 ; Offset van start-of-disk bij PCD7 niet meer dan 2GiB maken. 1148 ; Special is needed to boot ECS-CXXVAC (log-part) on Douwskie Box with 40G disk. 1149 ; FreeDOS 20G PRI SOD op 400G start niet met special. 1150 ; Heeft drive-id op 26h (36d) van 0dh ! 1151 ; WinXP werkt met special en not-special op 400G normal geo. 1152 ; eCS op PRI op 2G met os2 ext geo werkt ook met beide. 1153 ; eCS LOG werkt niet zonder special op 400G. 1154 ; (hidden secs op 3F en moet 3F00 zijn; BM staat ervoor, 3F00=255*63+63) 1155 ; Laatste 63 is MBR. 1156 ; 1157 1158 1159 1160 1161 ; 1162 ; When the phys-disk byte (80h) is put in this BPB in RAM, 1163 ; Windows will not find it's loader if Windows itself 1164 ; is installed in a logical partition but the loader is on FAT 1165 ; in a primary. 1166 ; This goes for all NT-based versions ? 1167 ; 1168 ; Get saved value of phys drive from BPB on disk. 1169 ; See if it's high nibble is above 9, which would indicate 1170 ; FreeDOS or WinBMGR/Loader on FAT32. (0FBh) 1171 ; In that case we don't write the phys-disk number to the BPB. 1172 ; 1173 1174 1175 ; Locate cursor for output of debug-info 1176 pusha 1177 mov ch,7 1178 mov cl,0 1179 call VideoIO_Color 1180 mov ch,6 1181 mov cl,1 1182 call VideoIO_Locate 1183 popa 1184 1185 1186 ; Physical disk for partition 1187 mov al,'<' 1188 call VideoIO_PrintSingleChar 1189 mov ah,byte ptr [si+LocIPT_Drive] 1190 mov al,ah 1191 call VideoIO_PrintHexByte 1192 mov al,'>' 1193 call VideoIO_PrintSingleChar 1194 1195 1196 mov al,'-' 1197 call VideoIO_PrintSingleChar 1198 ; Get BPB physical disk number 1199 mov ah, es:[di+24h] ; boot disk from BPB 1200 mov al,ah 1201 call VideoIO_PrintHexByte 1202 1203 ; We need to allways correct if this byte is zero. 1204 test ah,ah 1205 jz adjust_bpb_phys_drive 1206 1207 ; Don't adjust if below 80h (FreeDOS) 1208 cmp ah,80h 1209 jb no_adjust_bpb_phys_drive 1210 1211 ; Don't adjust if it's above 9fh (Windows FAT32) 1212 cmp ah,9fh 1213 ja no_adjust_bpb_phys_drive 1214 1215 1216 adjust_bpb_phys_drive: 1217 ; We must be booting a system that uses field 24h in the BPB 1218 ; as the physical disk number. Such systems are OS/2, eCS but also 1219 ; PC-DOS7. Adjust the physical drive in the BPB to allow booting from 1220 ; secundary disk. 1221 mov ah, [si+LocIPT_Drive] ; Physical disk in BIOS notation 1222 mov es:[di+24h], ah ; Write to BPB in memory 1223 1224 1225 no_adjust_bpb_phys_drive: 1226 mov al,':' 1227 call VideoIO_PrintSingleChar 1228 mov al,ah 1229 call VideoIO_PrintHexByte ; print corrected value 1230 1231 1232 1233 ; 1234 ; Legacy systems do not put the correct values in the "hidden sectors" 1235 ; field. Also, this field will be incorrect if a partition is moved on 1236 ; disk by a disktool not accounting for this field. 1237 ; Linux does not have a BPB at all, and does not use this field. 1238 ; So we set the correct value here obtained by the partition scanner. 1239 ; This fixing is done by OS/2 BM as well, according to Martin. 1240 ; 1241 1242 mov al,'-' 1243 call VideoIO_PrintSingleChar 1244 1245 1246 ; Low word of 32-bits "hidden sectors" 1247 mov cx,[di+1ch] 1248 mov ax,[si+LocIPT_AbsoluteBegin] 1249 mov es:[di+1ch], ax 1250 ; High word of 32-bits "hidden sectors" 1251 mov bx,[di+1eh] 1252 mov dx,[si+LocIPT_AbsoluteBegin+2] 1253 mov es:[di+1eh], dx 1254 1255 push dx 1256 push ax 1257 mov ax,cx 1258 mov dx,bx 1259 call VideoIO_PrintHexDWord ; print on-disk value 1260 mov al,':' 1261 call VideoIO_PrintSingleChar 1262 pop ax 1263 pop dx 1264 call VideoIO_PrintHexDWord ; print corrected value 1265 1266 1267 ; ----------------------------------------------- LOGICAL PARTITION SUPPORT 1268 1269 1270 ; 1271 ; OS/2 uses this field to indicate the boot-drive for the system. 1272 ; It is in BIOS notation where 80h='C', 81h='D' ... 97h='Z'. 1273 ; This is the field that get's forced to a specific value when the 1274 ; drive-letter feature of AiR-BOOT is used. 1275 ; Also, this field is the culprit of AiR-BOOT v1.07 not handling it 1276 ; correctly when the system uses HPFS and this byte is zero. 1277 ; This mostly involved booting older eCS versions on HPFS. 1278 ; See issues #3067 and #3119 on http://bugs.ecomstation.nl 1279 ; 1280 ; AiR-BOOT now works around it by using the LVM-info (DLAT) of 1281 ; the partiton if present. 1282 ; Note however that if the drive-letter feature is active, 1283 ; this will override AB's automatic fixing. 1284 ; 1285 ; Test if the drive-letter feature is active for this partition. 1286 ; If so, then the drive that the user defined will be placed at 1287 ; byte 25h (37d) of the in-ram PartitionSector (BPB). 1288 ; (BIOS 80h notation: 80h=C, 81h=D, etc.) 1289 ; This is a remedy for when the corresponding field (25h) in the BPB on 1290 ; disk is zero. 1291 ; 1292 1293 ; See if the drive-letter feature is active 1294 test byte ptr [si+LocIPT_Flags], Flags_DriveLetter 1295 ; Nope, it's not so we don't force the boot-drive using field 25h 1296 jz PSP_NoLogicalSupport 1297 1298 ; Pointer to the user specified boot-drive 1299 mov bl,BootPartNo ; EntryNumber is straight view 1300 mov bh,0 1301 1302 ; Get it and store it in the in-ram BPB 1303 mov al, bptr [DriveLetters+bx] 1304 mov bptr es:[di+25h], al ; Write Drive Letter (OS/2 only) 1305 1306 1307 ; ------------------------------------------- COPY BOOT-RECORD TO STARTBASE 1308 PSP_NoLogicalSupport: 1309 1310 1311 1312 ; 1313 ; At this point it's possible that a system is being booted from 1314 ; HPFS with the boot-drive field (25h) set to zero. 1315 ; This will result in OS/2 - eCS being unable to boot the system. 1316 ; So we're gonna check this byte here and if it's zero we will 1317 ; replace it with information found in LVM DLAT info. 1318 ; 1319 ; For primary partitions this information is stored in the last 1320 ; sector of track0; for all four partition entries should they 1321 ; all be primary ones. 1322 ; 1323 ; LVM DLAT info for logical partitions is stored in the sector 1324 ; preceding the start of the partition. 1325 ; 1326 ; Because the LVM info of a logical partition is the easiest to find, 1327 ; we do that first. The LVM info for primary partitions is located 1328 ; dependent on the geometry in use, so we use a special locater 1329 ; call for that. Also, since the LVM info for primaries contains 1330 ; info on all 4 entries, we need the partition index to obtain the 1331 ; correct drive-letter. 1332 ; 1333 1334 ; See if this is a primary partition 1335 ; CY will be set if it is and AL will contain the 0-based 1336 ; index in the P-table. 1337 ; If it's a logical partition, CY will be clear and AL 1338 ; will be set to 0ffh indicating an invalid index. 1339 mov dl,byte ptr [si+LocIPT_Drive] 1340 mov cx,[si+LocIPT_AbsoluteBegin+00h] 1341 mov bx,[si+LocIPT_AbsoluteBegin+02h] 1342 call PART_IsPrimaryPartition 1343 1344 ; Save the index in DL and whether it's PRI or LOG in DH 1345 mov dl,al ; Save PTE-index 1346 mov al,0 1347 rcl al,1 ; CY if primary 1348 mov dh,al ; Save PRI or LOG 1349 1350 ; Save for later use 1351 push dx 1352 1353 ; Load *possible* LVM sector 1354 ; This load is only valid if the partition is logical, in which case 1355 ; the LVM sector is below the start of the partition. 1356 ; If primary, the LVM sector is at a location that 1357 ; DriveIO_LoadMasterLVMSector will find out. 1358 1359 ; Physical disk and absolute start of partition 1360 mov dl,bptr [si+LocIPT_Drive] 1361 mov cx,[si+LocIPT_AbsoluteBegin+00h] 1362 mov bx,[si+LocIPT_AbsoluteBegin+02h] 1363 1364 ; Adjust for logical LVM-sector 1365 sub cx,1 1366 sbb bx,0 1367 1368 ; Load the LVM sector 1369 push si 1370 push di 1371 mov si,offset [LVMSector] 1372 mov di,ds 1373 call DriveIO_LoadSectorLBA 1374 pop di 1375 pop si 1376 1377 ; Point BX to LVM 1st drive-letter 1378 mov bx,offset [LVMSector] 1379 add bx,LocLVM_VolumeLetter2 1380 1381 1382 ; Restore PRI/LOG partition indicator and index 1383 pop dx 1384 1385 ; Test PRI or not 1386 test dh,dh 1387 ; It's not a PRI so we can use the previously loaded LVM sector 1388 jz is_not_pri 1389 1390 ; It's a PRI so we use the special locator function. 1391 ; This locator takes care of extended eCS geometry should that be used 1392 pusha 1393 mov dl,byte ptr [si+LocIPT_Drive] 1394 call DriveIO_LoadMasterLVMSector 1395 popa 1396 1397 ; Calculate index for driveletter of PRI partition 1398 mov ax,03ch ; Length of LVM record ? 1399 mul dl ; Multiply by index 1400 add bx,ax ; Point to LVM-driveletter 1401 1402 1403 is_not_pri: 1404 1405 ; 1406 ; At this point BX points to the drive-letter related to the 1407 ; partition, whether it was a logical or a primary one. 1408 ; We convert it ('C'=80h etc) and put it in DH for later use. 1409 mov dh,[bx] 1410 ; Don't convert if zero 1411 test dh,dh 1412 jz null_lvm_dl 1413 add dh,3dh 1414 null_lvm_dl: 1415 1416 1417 ; Check for HPFS partition 1418 mov dl,bptr [si+LocIPT_Drive] 1419 mov cx,[si+LocIPT_AbsoluteBegin+00h] 1420 mov bx,[si+LocIPT_AbsoluteBegin+02h] 1421 call PART_IsHPFS 1422 1423 ; Save HPFS indicator 1424 mov ah,al 1425 push ax 1426 1427 mov al,'-' 1428 call VideoIO_PrintSingleChar 1429 mov al,ah 1430 call VideoIO_PrintHexByte 1431 mov al,'/' 1432 call VideoIO_PrintSingleChar 1433 1434 ; JFS 1435 call PART_IsJFS 1436 call VideoIO_PrintHexByte 1437 mov al,'/' 1438 call VideoIO_PrintSingleChar 1439 1440 ; BOOTMGR 1441 call PART_IsWinBMGR 1442 call VideoIO_PrintHexByte 1443 mov al,'/' 1444 call VideoIO_PrintSingleChar 1445 1446 ; FAT32 1447 call PART_IsFAT32 1448 call VideoIO_PrintHexByte 1449 mov al,'-' 1450 call VideoIO_PrintSingleChar 1451 1452 mov al,es:[di+25h] 1453 call VideoIO_PrintHexByte 1454 1455 ; Restore and test HPFS indicator 1456 pop ax 1457 test ah,ah 1458 jz no_hpfs 1459 1460 1461 ; See if HPFS BPB needs fixing, which is the case when it's zero. 1462 mov al,es:[di+25h] 1463 test al,al 1464 jnz hpfs_no_fix_needed 1465 1466 ; Oops we have a zero-byte where the drive-letter should 1467 ; be in BIOS notation. 1468 ; Lets use the LVM value which is still stored in DH. 1469 ; Note that this fix is in-ram only, it does not correct the BPB 1470 ; on disk. That's the user's responsibility by using SYSINSTX. 1471 mov es:[di+25h], dh ; Put value from LVM in the BPB in memory. 1472 1473 1474 hpfs_no_fix_needed: 1475 no_hpfs: 1476 1477 mov al,':' 1478 call VideoIO_PrintSingleChar 1479 mov al,es:[di+25h] 1480 call VideoIO_PrintHexByte ; print possibly corrected 25h 1481 1482 mov al,'-' 1483 call VideoIO_PrintSingleChar 1484 mov al,dh 1485 test al,al 1486 jnz dl_not_null 1487 mov al,'*'+3dh 1488 dl_not_null: 1489 sub al,3dh 1490 call VideoIO_PrintSingleChar ; print drive-letter 1491 1492 1493 ; 1494 ; Here we copy the prepared partition boot-record to 7C00h 1495 ; to give it control later on. 1496 push si 1497 mov ax, StartBaseSeg 1498 mov es, ax 1499 mov cx, 256 1500 mov si, offset PartitionSector 1501 mov di, StartBasePtr 1502 rep movsw 1503 pop si 1504 1505 ; --------------------------------------------------- NOW START BOOT-RECORD 1279 1506 1280 1507 … … 1292 1519 ; 1293 1520 1294 ;1295 ; Wait for keypress1296 ;1297 xor ax, ax1298 int 16h1299 1300 ; Is escape-key ?1301 cmp al, 1bh1302 1303 ; Nope, Go activate PBR loader1304 jne start_pbr1305 1306 ; Yep, Reenter bootmenu1307 jmp MBR_Main_ReEnterBootMenuPre1521 ; 1522 ; Wait for keypress 1523 ; 1524 xor ax, ax 1525 int 16h 1526 1527 ; Is escape-key ? 1528 cmp al, 1bh 1529 1530 ; Nope, Go activate PBR loader 1531 jne start_pbr 1532 1533 ; Yep, Reenter bootmenu 1534 jmp MBR_Main_ReEnterBootMenuPre 1308 1535 1309 1536 … … 1314 1541 start_pbr: 1315 1542 1316 ;1317 ; BYE BYE1318 ;1319 xor ax, ax1320 xor bx, bx1321 xor cx, cx1322 mov ds, ax1323 mov es, ax ; DS == ES == 01324 xor dh, dh ; Drive supported by BIOS1325 mov dl, cs:[si+LocIPT_Drive] ; Drive Physical No1326 1327 ;1328 ; JUMP TO PBR loader1329 ;1330 IFDEF ReleaseCode1331 db 0EAh1332 dw StartBasePtr1333 dw StartBaseSeg1334 ENDIF1543 ; 1544 ; BYE BYE 1545 ; 1546 xor ax, ax 1547 xor bx, bx 1548 xor cx, cx 1549 mov ds, ax 1550 mov es, ax ; DS == ES == 0 1551 xor dh, dh ; Drive supported by BIOS 1552 mov dl, cs:[si+LocIPT_Drive] ; Drive Physical No 1553 1554 ; 1555 ; JUMP TO PBR loader 1556 ; 1557 IFDEF ReleaseCode 1558 db 0EAh 1559 dw StartBasePtr 1560 dw StartBaseSeg 1561 ENDIF 1335 1562 1336 1563 … … 1338 1565 1339 1566 1567 ; 1568 ; ###################################### 1569 ; # Is this a primary partition or not # 1570 ; ###################################### 1571 ; 1572 ; In 1573 ; -- 1574 ; DL = Physical Disk 1575 ; BX:CX = LBA sector 1576 ; 1577 ; Out 1578 ; --- 1579 ; AX = Index in PT if found, otherwise -1 1580 ; CY = Set if Primary, clear if not 1581 ; 1582 PART_IsPrimaryPartition Proc Near Uses bx cx dx si di ds es 1583 ; Push LBA address of partition 1584 push bx 1585 push cx 1586 1587 ; Load LBA sector 0 from the disk specified in DL 1588 xor bx,bx 1589 xor cx,cx 1590 mov di,ds 1591 mov si,offset [TmpSector] 1592 call DriveIO_LoadSectorLBA 1593 1594 ; Restore partitions LBA address to DI:SI 1595 pop si 1596 pop di 1597 1598 ; Return with index -1 and CY clear if there was an 1599 ; error loading the sector. 1600 mov ax,-1 1601 cmc 1602 jnc PART_IsPrimaryPartition_exit 1603 1604 ; Compare the partition address with each entry in the P-table 1605 mov cx,4 ; Nr. of PT-entries 1606 mov dx,offset [TmpSector] 1607 add dx,01beh+08h ; Point DX to 1st partition address 1608 1609 next_pe: 1610 ; Computer pointer to PE 1611 mov bx,dx ; Point BX to 1st partition address 1612 mov ax,cx ; Get PE-index 1613 dec ax ; Index is zero based so adjust it 1614 shl ax,4 ; PE's are 16 bytes in size 1615 add bx,ax ; Make BX point to the PE 1616 1617 ; Compare LBA address 1618 push si 1619 push di 1620 xor si,[bx+00h] ; Will put 0 in SI if the same 1621 xor di,[bx+02h] ; Will put 0 in DI if the same 1622 or si,di ; Wil set ZF if both zero 1623 pop di 1624 pop si 1625 loopnz next_pe ; Try next entry if non-zero 1626 1627 ; Partition found or counter exhausted 1628 mov ax,-1 1629 clc 1630 ; Not found, so exit with NC and invalid index 1631 jnz PART_IsPrimaryPartition_exit 1632 1633 ; Partition is Primary, set CY and return index 1634 mov ax,cx 1635 stc 1636 1637 PART_IsPrimaryPartition_exit: 1638 ret 1639 PART_IsPrimaryPartition Endp 1640 1641 1642 1643 ; 1644 ; ############################# 1645 ; # Is this an HPFS partition # 1646 ; ############################# 1647 ; 1648 ; In 1649 ; -- 1650 ; DL = Physical Disk 1651 ; BX:CX = LBA sector 1652 ; 1653 ; Out 1654 ; --- 1655 ; AX = 0 if not, 1 if it is HPFS 1656 ; CY = Set if HPFS, clear if not 1657 ; 1658 PART_IsHPFS Proc Near Uses bx cx dx si di ds es 1659 ; Load specified LBA sector (BX:CX) from the disk in DL 1660 mov di,ds 1661 mov si,offset [TmpSector] 1662 call DriveIO_LoadSectorLBA 1663 1664 ; Check for 'HPFS' string as offset 36h in BPB 1665 mov ax, word ptr [si+36h] ; 'HP' 1666 mov dx, word ptr [si+38h] ; 'FS' 1667 xor ax, 'PH' ; Leaves zero in AX if 'HP' 1668 xor dx, 'SF' ; Leaves zero in DX if 'FS' 1669 or ax,dx ; Leaves zero in AX if partition is HPFS 1670 1671 ; Assume not HPFS, so clear AX,CY (ZF is set above) 1672 mov ax,0 1673 clc 1674 jnz PART_IsHPFS_exit 1675 1676 ; Is HPFS, so indicate in AX, and set CY (ZF is set above) 1677 mov ax,1 1678 stc 1679 1680 PART_IsHPFS_exit: 1681 ret 1682 PART_IsHPFS Endp 1683 1684 1685 ; 1686 ; ############################# 1687 ; # Is this a JFS partition # 1688 ; ############################# 1689 ; 1690 ; In 1691 ; -- 1692 ; DL = Physical Disk 1693 ; BX:CX = LBA sector 1694 ; 1695 ; Out 1696 ; --- 1697 ; AX = 0 if not, 1 if JFS partition 1698 ; CY = Set if JFS partition, clear if not 1699 ; 1700 PART_IsJFS Proc Near Uses bx cx dx si di ds es 1701 1702 ; Load specified LBA sector (BX:CX) from the disk in DL 1703 mov di,ds 1704 mov si,offset [TmpSector] 1705 call DriveIO_LoadSectorLBA 1706 1707 ; Point to location of 'FAT32' identifier. 1708 add si,36h 1709 1710 ; DL holds equality status 1711 xor dl,dl 1712 cld 1713 1714 ; Load letter into AL, xor with letter will result 0 if the same. 1715 ; Then or to DL. 1716 ; If at the end of the sequence DL is zero, the signature is present. 1717 lodsb 1718 xor al,'J' 1719 or dl,al 1720 lodsb 1721 xor al,'F' 1722 or dl,al 1723 lodsb 1724 xor al,'S' 1725 or dl,al 1726 1727 ; Assume not present 1728 mov ax,0 1729 clc 1730 jnz PART_IsJFS_exit 1731 1732 ; JFS signature found 1733 mov ax,1 1734 stc 1735 1736 PART_IsJFS_exit: 1737 ret 1738 PART_IsJFS Endp 1739 1740 ; 1741 ; ############################# 1742 ; # Is this a FAT32 partition # 1743 ; ############################# 1744 ; 1745 ; In 1746 ; -- 1747 ; DL = Physical Disk 1748 ; BX:CX = LBA sector 1749 ; 1750 ; Out 1751 ; --- 1752 ; AX = 0 if not, 1 if FAT32 partition 1753 ; CY = Set if FAT32 partition, clear if not 1754 ; 1755 PART_IsFAT32 Proc Near Uses bx cx dx si di ds es 1756 1757 ; Load specified LBA sector (BX:CX) from the disk in DL 1758 mov di,ds 1759 mov si,offset [TmpSector] 1760 call DriveIO_LoadSectorLBA 1761 1762 ; Point to location of 'FAT32' identifier. 1763 add si,52h 1764 1765 ; DL holds equality status 1766 xor dl,dl 1767 cld 1768 1769 ; Load letter into AL, xor with letter will result 0 if the same. 1770 ; Then or to DL. 1771 ; If at the end of the sequence DL is zero, the signature is present. 1772 lodsb 1773 xor al,'F' 1774 or dl,al 1775 lodsb 1776 xor al,'A' 1777 or dl,al 1778 lodsb 1779 xor al,'T' 1780 or dl,al 1781 lodsb 1782 xor al,'3' 1783 or dl,al 1784 lodsb 1785 xor al,'2' 1786 or dl,al 1787 1788 ; Assume not present 1789 mov ax,0 1790 clc 1791 jnz PART_IsFAT32_exit 1792 1793 ; FAT32 signature found 1794 mov ax,1 1795 stc 1796 1797 PART_IsFAT32_exit: 1798 ret 1799 PART_IsFAT32 Endp 1800 1801 1802 1803 ; 1804 ; ############################################################## 1805 ; # Does this partition have the Windows BootManager installed # 1806 ; ############################################################## 1807 ; 1808 ; In 1809 ; -- 1810 ; DL = Physical Disk 1811 ; BX:CX = LBA sector 1812 ; 1813 ; Out 1814 ; --- 1815 ; AX = 0 if not, 1 if BOOTMGR signature found 1816 ; CY = Set if BOOTMGR found, clear if not 1817 ; 1818 PART_IsWinBMGR Proc Near Uses bx cx dx si di ds es 1819 1820 ; Load specified LBA sector (BX:CX) from the disk in DL 1821 mov di,ds 1822 mov si,offset [TmpSector] 1823 call DriveIO_LoadSectorLBA 1824 1825 ; Point to location of 'BOOTMGR' signature. 1826 add si,169h 1827 1828 ; DL holds equality status 1829 xor dl,dl 1830 cld 1831 1832 ; Load letter into AL, xor with letter will result 0 if the same. 1833 ; Then or to DL. 1834 ; If at the end of the sequence DL is zero, the signature is present. 1835 lodsb 1836 xor al,'B' 1837 or dl,al 1838 lodsb 1839 xor al,'O' 1840 or dl,al 1841 lodsb 1842 xor al,'O' 1843 or dl,al 1844 lodsb 1845 xor al,'T' 1846 or dl,al 1847 lodsb 1848 xor al,'M' 1849 or dl,al 1850 lodsb 1851 xor al,'G' 1852 or dl,al 1853 lodsb 1854 xor al,'R' 1855 or dl,al 1856 1857 ; Assume not present 1858 mov ax,0 1859 clc 1860 jnz PART_IsWinBMGR_exit 1861 1862 ; BOOTMGR signature found 1863 mov ax,1 1864 stc 1865 1866 PART_IsWinBMGR_exit: 1867 ret 1868 PART_IsWinBMGR Endp -
trunk/BOOTCODE/REGULAR/PARTSCAN.ASM
r30 r32 130 130 PSSDFP_LoadThisPartition: 131 131 132 call DriveIO_LoadPartition ; Rousseau: load a partition record132 call DriveIO_LoadPartition ; Load a partition record 133 133 134 134 jc PSSDFP_InvalidPartition 135 135 136 136 ; LVM Support - Reads LVM Information Sector 137 call DriveIO_LoadLVMSector ; Rousseau: load LVM sector137 call DriveIO_LoadLVMSector ; Load LVM sector 138 138 139 139 call PARTSCAN_ScanPartition … … 806 806 807 807 ibm_bm_name: db 'IBM BootMan',0 808 ;win_bm_name: db 'BOOTMGR',0 -
trunk/BOOTCODE/REGULAR/STD_TEXT.ASM
r31 r32 36 36 ;Copyright db ' AiR-BOOT v1.07 - (c) 1998-2011 M. Kiewitz, Dedicated to Gerd Kiewitz (rc5-b35)', 0 37 37 ;Copyright db ' AiR-BOOT v1.07 - (c) 1998-2011 M. Kiewitz, Dedicated to Gerd Kiewitz', 0 38 Copyright db ' AiR-BOOT v1.08 - (c) 1998-2011 M. Kiewitz, Dedicated to Gerd Kiewitz', 039 38 ;Copyright db ' AiR-BOOT v1.0.8 - (c) 1998-2011 M. Kiewitz, Dedicated to Gerd Kiewitz', 0 39 Copyright db ' AiR-BOOT v1.0.8-internal-beta - ** !! NOT FOR DISTRIBUTION !! **', 0 40 40 ; Rousseau: switch around 41 BootEndMsg db 'This is GPLv3+ software. Please visit http://svn.netlabs.org/air-boot', 042 BootEndMsg2 db 'http:// www.gnu.org/licenses/gpl.txt', 041 BootEndMsg db 'This is GPLv3+ software. Please visit: http://www.gnu.org/licenses/gpl.txt', 0 42 BootEndMsg2 db 'http://svn.netlabs.org/air-boot', 0 43 43 44 44 AuxInitMsg db 'Initializing Serial Communications on COM',0 -
trunk/BOOTCODE/REGULAR/VIDEOIO.ASM
r30 r32 143 143 ; In: SI - String to Print (EOS is 0) 144 144 ; Destroyed: SI 145 VideoIO_PrintLikeLenOfName Proc Near Uses es di145 VideoIO_PrintLikeLenOfName Proc Near Uses cx es di 146 146 push si 147 147 xor cx, cx … … 190 190 ; In: AL - Single Char to Print 191 191 ; Destroyed: None 192 VideoIO_PrintSingleChar Proc Near Uses ax es di193 mov bl, al194 call VideoIO_Internal_SetRegs195 mov es:[di], bl196 mov es:[di+1], ah197 inc TextPosX198 ret192 VideoIO_PrintSingleChar Proc Near Uses ax bx es di 193 mov bl, al 194 call VideoIO_Internal_SetRegs 195 mov es:[di], bl 196 mov es:[di+1], ah 197 inc TextPosX 198 ret 199 199 VideoIO_PrintSingleChar EndP 200 200 … … 266 266 ; CL - Times to print it 267 267 ; Destroyed: None 268 VideoIO_PrintSingleMultiChar Proc Near Uses ax cx es di268 VideoIO_PrintSingleMultiChar Proc Near Uses ax bx cx es di 269 269 or cl, cl 270 270 jz VIOPSMC_NoChars … … 637 637 638 638 ; 639 ; Rousseau: added 640 ; Set poosition to teletype cursor 639 ; Set position to teletype cursor 641 640 ; 642 641 VideoIO_SyncPos Proc Near Uses ax bx cx dx … … 687 686 ; Dump the disk-info. 688 687 ; Disk number is in DL. 689 VideoIO_DumpDiskInfo Proc Near 688 VideoIO_DumpDiskInfo Proc Near uses ax bx cx dx 690 689 691 690 VideoIO_DumpDiskInfo_next_disk: … … 725 724 call VideoIO_PrintSingleMultiChar 726 725 727 inc [TextPosY]728 mov [TextPosX],dh729 mov si, offset BiosCyls730 call VideoIO_Print731 732 push dx733 mov bx,offset BIOS_Cyls734 xor dh,dh735 and dl,01111111b736 shl dx,1737 shl dx,1738 add bx,dx739 mov ax,[bx]740 mov dx,[bx+02]741 call VideoIO_PrintHexDWord742 pop dx726 ; inc [TextPosY] 727 ; mov [TextPosX],dh 728 ; mov si, offset BiosCyls 729 ; call VideoIO_Print 730 731 ; push dx 732 ; mov bx,offset BIOS_Cyls 733 ; xor dh,dh 734 ; and dl,01111111b 735 ; shl dx,1 736 ; shl dx,1 737 ; add bx,dx 738 ; mov ax,[bx] 739 ; mov dx,[bx+02] 740 ; call VideoIO_PrintHexDWord 741 ; pop dx 743 742 744 743 inc [TextPosY] … … 782 781 783 782 push dx 783 ; Offset of array containing LVM SPT values for each disk found 784 784 mov bx,offset TrueSecs 785 ; DX to index 785 786 xor dh,dh 786 787 and dl,01111111b … … 788 789 shl dx,1 789 790 add bx,dx 791 ; Get LVM SPT 790 792 mov ax,[bx] 791 793 mov dx,[bx+02] -
trunk/BOOTCODE/_build.cmd
r31 r32 4 4 5 5 /* 6 The language to build is passed by the master Makefile. 6 7 Supported languages are: EN,DE,FR,SW,IT,NL,RU. 7 8 Change lang to 'ALL' to build all language versions. 8 9 */ 9 lang = 'EN'; 10 parse arg lang 11 12 if (lang='') then do 13 lang='EN'; 14 end 15 10 16 11 17 /* Generate BUILD_DATE.ASM */ … … 22 28 Say ''; 23 29 'rem @pause'; 30 -
trunk/BOOTCODE/_clean.cmd
r30 r32 6 6 '@if exist air-boot.map del air-boot.map'; 7 7 '@if exist airboot.bin del airboot.bin'; 8 'rem @if exist blddate.asm del blddate.asm'; /* keep the builddate of the v1.07 eCS v2.1 release */ 8 '@if exist blddate.asm del blddate.asm'; 9 10 '@if exist mbr-prot\*.obj del mbr-prot\*.obj'; 11 '@if exist mbr-prot\*.lst del mbr-prot\*.lst'; 12 '@if exist mbr-prot\*.com del mbr-prot\*.com'; 13 '@if exist mbr-prot\*.exe del mbr-prot\*.exe'; 9 14 10 15 '@if exist ..\RELEASE\BOOTCODE\AIRBT-*.BIN del ..\RELEASE\BOOTCODE\AIRBT-*.BIN'; 11 16 12 17 '@if exist ..\RELEASE\DOS\AIRBOOT.BIN del ..\RELEASE\DOS\AIRBOOT.BIN'; 18 '@if exist ..\RELEASE\DOS\*.COM del ..\RELEASE\DOS\*.COM'; 19 20 '@if exist ..\TOOLS\DOS\INITHDD\*.LST del ..\TOOLS\DOS\INITHDD\*.LST'; 21 22 '@if exist ..\INSTALL\DOS\*.LST del ..\INSTALL\DOS\*.LST'; 23 24 '@if exist ..\INSTALL\FLOPPY\*.LST del ..\INSTALL\FLOPPY\*.LST'; 25 26 '@if exist ..\TOOLS\INTERNAL\*.LST del ..\TOOLS\INTERNAL\*.LST'; 27 '@if exist ..\TOOLS\INTERNAL\*.COM del ..\TOOLS\INTERNAL\*.COM'; 28 13 29 '@if exist ..\RELEASE\OS2\AIRBOOT.BIN del ..\RELEASE\OS2\AIRBOOT.BIN'; 14 30 '@if exist ..\RELEASE\WINNT\AIRBOOT.BIN del ..\RELEASE\WINNT\AIRBOOT.BIN'; -
trunk/BUILD.NFO
r30 r32 1 ===================================================== 2 BUILD.NFO -- Information on building AiR-BOOT v1.0 73 ===================================================== 1 ====================================================== 2 BUILD.NFO -- Information on building AiR-BOOT v1.0.8 3 ====================================================== 4 4 5 Building AiR-BOOT v1.0 7requires the following tools:5 Building AiR-BOOT v1.0.8 requires the following tools: 6 6 - Borland Turbo Assembler v4.1 for DOS 7 7 (TASM.EXE 136.018 bytes) … … 13 13 (Used to build the installer and setaboot etc.) 14 14 15 Putting these executables in ?:\OS2\MDOS will enable them to be found 16 when running the build scripts. 15 Put these DOS executables (not Open Watcom) in a directory 16 and append that directory to the PATH as defined in ?:\AUTOEXEC.BAT. 17 This will enable DOS sessions to find them when called 18 by the Rexx build scripts from an OS2 CMD session. 17 19 18 20 Note that only the loader, installer and setaboot targets are built. -
trunk/INSTALL/C/INSTALL.C
r31 r32 408 408 409 409 /* 410 // Rousseau: 411 // Calculate chechsum over 5 sectors starting at the config-sector at 55. 412 // 55,56,57,58,59 (60 is MBR backup in normal version) 413 // SHOULD ADJUST THIS FOR EXTENDED VERSION ! // !!!!!!!!!!! 410 // Rousseau: # Keep compatible with v1.07 CRC # 411 // AB v1.07 had bugs in writing the wrong number of AB config sectors. 412 // This is fixed in v1.0.8 but the CRC has to be calculated the "v1.07 way" 413 // otherwise v1.07 SET(A)BOOT and INSTALL2.EXE will think the AB config 414 // is corrupted. 415 // So the CRC is calculated over 5 sectors instead of 7. 414 416 */ 415 416 SectorCount = 7; 417 SectorCount = 5; 417 418 418 419 while (SectorCount>0) { … … 499 500 BOOL Virus_CheckThisMBR (PCHAR MBRptr) { // Rousseau: adjusted this function 500 501 USHORT PartitionNo; 501 ULONG CHSStart, CHSEnd;502 ////ULONG CHSStart, CHSEnd; 502 503 503 504 //printf("DEBUG: Virus_CheckThisMBR\n"); … … 532 533 //printf("DEBUG: Virus_CheckThisMBR - Partition: %d\n", PartitionNo); 533 534 // Partition-type defined, analyse partition data 534 CHSStart = (*(MBRptr+3) | ((*(MBRptr+2) >> 6) << 8)) << 16; // Cylinder535 CHSStart |= (*(MBRptr+2) & 0x3F) | ((*(MBRptr+1) << 8)); // Sector / Head535 ////CHSStart = (*(MBRptr+3) | ((*(MBRptr+2) >> 6) << 8)) << 16; // Cylinder 536 ////CHSStart |= (*(MBRptr+2) & 0x3F) | ((*(MBRptr+1) << 8)); // Sector / Head 536 537 //printf("DEBUG: Virus_CheckThisMBR - CHSStart: %d\n", CHSStart); // 3F MASK CHECKEN !! 537 538 538 CHSEnd = (*(MBRptr+7) | ((*(MBRptr+6) >> 6) << 8)) << 16; // Cylinder539 CHSEnd |= (*(MBRptr+6) & 0x3F) | ((*(MBRptr+5) << 8)); // Sector / Head539 ////CHSEnd = (*(MBRptr+7) | ((*(MBRptr+6) >> 6) << 8)) << 16; // Cylinder 540 ////CHSEnd |= (*(MBRptr+6) & 0x3F) | ((*(MBRptr+5) << 8)); // Sector / Head 540 541 //printf("DEBUG: Virus_CheckThisMBR - CHSEnd: %d\n", CHSEnd); 541 542 … … 550 551 */ 551 552 /*if (CHSStart<CHSEnd) {*/ 552 if (CHSStart<=CHSEnd) {553 if (*(PULONG)(MBRptr+12)!=0) // Absolute length > 0?554 return TRUE;555 }553 ////if (CHSStart<=CHSEnd) { 554 //// if (*(PULONG)(MBRptr+12)!=0) // Absolute length > 0? 555 //// return TRUE; 556 ////} 556 557 } 557 558 // Go to next partition … … 616 617 case STATUS_INSTALLEDMGU: 617 618 if (!Option_CID) { 618 printf("intact (v%x.%02x)", Version>>8, Version & 0x0FF); 619 printf("intact (v%x.%1d.%1d)", Version>>8, (Version & 0x0F0)>>4, Version & 0x0F); 620 619 621 } 620 622 if (Status==STATUS_INSTALLEDMGU) … … 637 639 switch (LanguageID) { 638 640 case 'E': printf("english"); break; 639 case ' D': printf("dutch"); break;641 case 'N': printf("dutch"); break; // Changed from 'D' to 'N' 640 642 case 'G': printf("german"); break; 641 643 case 'F': printf("french"); break; … … 690 692 SectorPtr = &Bootcode[54 * BYTES_PER_SECTOR]; // Start at sector 55 691 693 692 SectorCount = 7; 694 /* 695 // Rousseau: # Keep compatible with v1.07 CRC # 696 // AB v1.07 had bugs in writing the wrong number of AB config sectors. 697 // This is fixed in v1.0.8 but the CRC has to be calculated the "v1.07 way" 698 // otherwise v1.07 SET(A)BOOT and INSTALL2.EXE will think the AB config 699 // is corrupted. 700 // So the CRC is calculated over 5 sectors instead of 7. 701 */ 702 SectorCount = 5; 693 703 694 704 while (SectorCount>0) { … … 912 922 else if (Status_Code==STATUS_NOTINSTALLED) printf(" <A> - Add AiR-BOOT "); 913 923 else printf(" <U> - Update/Change AiR-BOOT to "); 914 printf("'v%x.% 02x/", Bootcode_Version>>8, Bootcode_Version & 0x0FF);924 printf("'v%x.%1d.%1d/", Bootcode_Version>>8, (Bootcode_Version & 0x0F0)>>4, Bootcode_Version & 0x0F); 915 925 Language_PrintF(Bootcode_LanguageID); 916 926 printf("' on current system\n"); -
trunk/INSTALL/C/_build.cmd
r30 r32 6 6 /* OS2 version */ 7 7 'ide2make '||debug||' -p OS2.WPJ'; 8 'wmake - f OS2.MK';8 'wmake -h -f OS2.MK'; 9 9 10 10 /* WIN32 version */ 11 11 'ide2make '||debug||' -p WIN32.WPJ'; 12 'wmake - f WIN32.MK';12 'wmake -h -f WIN32.MK'; 13 13 -
trunk/INSTALL/INST_X86/INSTALL.INC
r30 r32 332 332 mov wptr ds:[si+20], 0 ; delete current CheckSum 333 333 xor bx, bx 334 mov cx, 5 334 335 mov cx, 7 ; Rousseau: changed to 7 for v1.0.7+ 336 335 337 IC_CalcConfigLoop: 336 338 call GetCheckOfImageSector … … 502 504 je ISL_Done 503 505 cmp al, 'D' 504 mov si, offset TXT_Language_ DT506 mov si, offset TXT_Language_NL 505 507 je ISL_Done 506 508 cmp al, 'G' … … 647 649 mov wptr es:[si+20], 0 ; Kills current Checksum 648 650 xor bx, bx 649 mov cx, 5 ; Total of 5 Sectors 651 652 mov cx, 7 ; Total of 7 Sectors 653 ; Rousseau: changed above to 7 654 650 655 IVC_CheckSumLoop2: 651 656 call GetCheckOfHDDSector … … 907 912 908 913 TXT_Language_EN db 'english', 0 909 TXT_Language_ DTdb 'dutch', 0914 TXT_Language_NL db 'dutch', 0 910 915 TXT_Language_DE db 'german', 0 911 916 TXT_Language_FR db 'french', 0 … … 1008 1013 1009 1014 ; Space for bootcode-image 1010 BootImage db 3 0720dup (?)1015 BootImage db 31744 dup (?) -
trunk/MAKEFILE
r31 r32 2 2 # MAKEFILE -- Wrapper around the DOS .BAT files. 3 3 # 4 5 LANGUAGE=EN 4 6 5 7 # … … 25 27 cd BOOTCODE 26 28 call _clean.cmd 27 call _build.cmd 29 call _build.cmd $(LANGUAGE) 28 30 @cd .. 29 @echo.30 @echo Gonna build the installer and setaboot now...31 @echo.32 rem @pause33 31 34 32 # OS2 and WIN32 installer -
trunk/TOOLS/OS2/SETABOOT/SETABOOT.C
r30 r32 143 143 #define AiRBOOTIPENTRY_Flags_BootAble 0x01 144 144 145 CHAR Track0[6 0*512]; // Space for Track-0145 CHAR Track0[62*512]; // Space for Track-0 146 146 PAiRBOOTCODESIG AiRBOOT_CodeSig = 0; 147 147 PAiRBOOTCONFIG AiRBOOT_Config = 0; … … 189 189 BOOL Track0Load (void) { 190 190 USHORT IOCTLHandle; 191 ULONG TrackLayoutLen = sizeof(TRACKLAYOUT)+sizeof(ULONG)*(6 0-1);191 ULONG TrackLayoutLen = sizeof(TRACKLAYOUT)+sizeof(ULONG)*(62-1); 192 192 TRACKLAYOUT *TrackLayoutPtr = malloc(TrackLayoutLen); 193 193 ULONG cbParms = sizeof(TrackLayoutPtr); … … 202 202 TrackLayoutPtr->usCylinder = 0; 203 203 TrackLayoutPtr->usFirstSector = 0; 204 TrackLayoutPtr->cSectors = 6 0;205 206 for (i=0; i<6 0; i++) {204 TrackLayoutPtr->cSectors = 62; 205 206 for (i=0; i<62; i++) { 207 207 TrackLayoutPtr->TrackTable[i].usSectorNumber = i+1; 208 208 TrackLayoutPtr->TrackTable[i].usSectorSize = 512; … … 219 219 BOOL Track0Write (void) { 220 220 USHORT IOCTLHandle; 221 ULONG TrackLayoutLen = sizeof(TRACKLAYOUT)+sizeof(ULONG)*(6 0-1);221 ULONG TrackLayoutLen = sizeof(TRACKLAYOUT)+sizeof(ULONG)*(62-1); 222 222 TRACKLAYOUT *TrackLayoutPtr = malloc(TrackLayoutLen); 223 223 ULONG cbParms = sizeof(TrackLayoutPtr); … … 233 233 TrackLayoutPtr->usCylinder = 0; 234 234 TrackLayoutPtr->usFirstSector = 0; 235 TrackLayoutPtr->cSectors = 6 0;236 237 for (i=0; i<6 0; i++) {235 TrackLayoutPtr->cSectors = 62; 236 237 for (i=0; i<62; i++) { 238 238 TrackLayoutPtr->TrackTable[i].usSectorNumber = i+1; 239 239 TrackLayoutPtr->TrackTable[i].usSectorSize = 512; … … 311 311 // If AiR-BOOT is not installed, the user probably meant to control OS/2 BM with this utility. 312 312 // Since the functionality of this utility is for AiR-BOOT only, we will pass the request to 313 // the OS/2 BM SETBOOT utility which is called SETBM.EXE as of eCS 2. 01.313 // the OS/2 BM SETBOOT utility which is called SETBM.EXE as of eCS 2.1. 314 314 // Since the objective here is to supply OS/2 BM SETBOOT compatibility, if SETBM.EXE is not found, 315 315 // some other system locations are searched for the OS/2 version of SETBOOT.EXE. … … 321 321 APIRET rc = -1; 322 322 RESULTCODES crc = {-1,-1}; 323 PTIB ptib = NULL;324 PPIB ppib = NULL;323 // PTIB ptib = NULL; 324 // PPIB ppib = NULL; 325 325 char buffer[256] = "\0"; 326 326 char cmdline[256] = "\0"; … … 453 453 BOOL XWPEntryFound = FALSE; 454 454 BOOL CDBoot = FALSE; // TRUE if booted from CD; New System will be added when using /4:"LABEL" 455 BOOL Track0Loaded = FALSE; // Assume track0 did not load correctly.455 // BOOL Track0Loaded = FALSE; // Assume track0 did not load correctly. 456 456 BOOL AiRBOOTBad = FALSE; 457 457 … … 472 472 */ 473 473 //puts ("SETABOOT - AiR-BOOT Configuration Utility (OS/2) - (c) 2004-2009 by M. Kiewitz"); 474 puts ("SETABOOT v1.07 - AiR-BOOT Configuration Utility - (c) 2004-2011 by M. Kiewitz");474 puts ("SETABOOT v1.07a - AiR-BOOT Configuration Utility - (c) 2004-2011 by M. Kiewitz"); 475 475 476 476 … … 942 942 // Calculate CheckSum... 943 943 ResultCheck = 0; CurSectorNo = 55; 944 while (CurSectorNo<6 0) {944 while (CurSectorNo<62) { 945 945 ResultCheck = GetChecksumOfSector(ResultCheck, CurSectorNo); 946 946 CurSectorNo++; … … 965 965 // Calculate CheckSum... 966 966 ResultCheck = 0; CurSectorNo = 55; 967 968 /* 969 // Rousseau: # Keep compatible with v1.07 CRC # 970 // AB v1.07 had bugs in writing the wrong number of AB config sectors. 971 // This is fixed in v1.0.8 but the CRC has to be calculated the "v1.07 way" 972 // otherwise v1.07 SET(A)BOOT and INSTALL2.EXE will think the AB config 973 // is corrupted. 974 // So the CRC is calculated over 5 sectors instead of 7. 975 */ 967 976 while (CurSectorNo<60) { 968 977 ResultCheck = GetChecksumOfSector(ResultCheck, CurSectorNo); -
trunk/TOOLS/OS2/SETABOOT/_build.cmd
r30 r32 5 5 6 6 'ide2make '||debug||' -p SETABOOT.WPJ'; 7 'wmake - f SETABOOT.MK';7 'wmake -h -f SETABOOT.MK';
Note:
See TracChangeset
for help on using the changeset viewer.