Ignore:
Timestamp:
Jan 13, 2013, 8:15:35 AM (13 years ago)
Author:
Ben Rietbroek
Message:

Bumped code-version to v1.0.8 [2011-11-11]

Fixes

o Fixed the drive-letter feature that was broken in v1.07
o Corrected release date in signature which was not updated with v1.07

Changes

o Bumped code-version in signature to v1.0.8

The extra dot is cosmetic only, the version in the signature
is BCD-coded and did not change format.

o Reworked MBR code to contain two I13X signatures

These signatures are actually MOV EAX,'X31I' in the original eCS
LVM MBR-code. However, they are at different offsets in the v1.x
and v2.x versions of the LVM MBR-code. (v1.x->0d5h -- v2.x->0d0h)
Other code might depend on their existence so we put both in
the AiR-BOOT MBR. (See eCS bugtracker issue #3002)

Note

This commit and all following commits upto and including the RC3
commit [2012-09-09] are delayed commits from a local repository.
Also, the RC (Release Candidate) naming of the corresponding commits
is a bit misleading. One would label a revision with RC when near to
a final release. Since many things have changed between RC1,RC2 & RC3,
these RC's should be interpreted as mile-stones.

WARNING!!

All commits upto and including the commit of [2012-05-13] contain
a severe bug!! Building from these sources and then disabling
the 'force LBA' feature while also using the drive-letter feature or
editing the label can destroy the MBR on all attached disks!!
DO NOT DISABLE 'FORCE LBA USAGE' WHEN BUILT FROM THE ABOVE COMMITS!!

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/BOOTCODE/AIR-BOOT.ASM

    r30 r31  
    2020; Rousseau: # Fixes #
    2121; -------------------
     22;
     23; v1.08
     24; -----
     25; - Fixed driveletter feature which was broken in v1.07.
     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 and
     29;   does not write them to disk.
     30; - Corrected contact links.
     31; -
     32;
     33; v1.07
     34; -----
    2235; # Huge Drives and LVM #
    2336; When using disks >512GB under eComStation, the drive geometry changes to
     
    4861
    4962
    50 ;---------------------------------------------------------------------------
    51 ;                                                      AiR-BOOT / MAIN-CODE
    52 ;---------------------------------------------------------------------------
     63;------------------------------------------------------------------------------
     64;                                                         AiR-BOOT / MAIN-CODE
     65;------------------------------------------------------------------------------
    5366;
    5467
     
    6275; skipping an unconditional jump to the target on base of complementary
    6376; condition logic and temporary labels.
    64 ; TASM also has a bug in that when the .ERR2 directive is used when the .386 directive
    65 ; is in effect, the JUMPS directive is also active and cannot be turned off.
     77; TASM also has a bug in that when the .ERR2 directive is used when
     78; the .386 directive is in effect, the JUMPS directive is also active
     79; and cannot be turned off.
    6680; NOJUMPS seems to have no effect in this situation.
    6781; In this case 4 NOP instructions are generated after forward referencing jump
     
    87101; in the BSS.
    88102;
    89 MaxDisks                   equ      16
     103MaxDisks                   equ      64
    90104
    91105;
     
    94108AuxDebug                   equ      1
    95109
    96 
    97 BiosComPort                equ      0                                            ; Com-port for debugging, 0 is disabled
    98 
    99                            ; bits 7-5 = datarate   (000=110,001=150,010=300,011=600,100=1200,101=2400,110=4800,111=9600 bps)
    100                            ; bits 4-3 = parity     (00 or 10 = none, 01 = odd, 11 = even)
    101                            ; bit  2   = stop-bits  (set = 2 stop-bits, clear = 1 stop-bit)
    102                            ; bits 1-0 = data-bits  (00 = 5, 01 = 6, 10 = 7, 11 = 8)
    103 AuxInitParms               equ      11100011b                                    ; 9600 bps, no parity, 1 stop-bit, 8 bits per char
    104 
    105 BIOS_AuxParmsDefault       equ      (AuxInitParms SHL 8) OR BiosComPort          ; Default word value for offset 77FEh (BIOS_AuxParms)
     110; Com-port for debugging, 0 is disabled
     111BiosComPort                equ      0
     112
     113
     114;
     115; bits 7-5 = datarate
     116;  (000=110,001=150,010=300,011=600,100=1200,101=2400,110=4800,111=9600 bps)
     117; bits 4-3 = parity
     118;  (00 or 10 = none, 01 = odd, 11 = even)
     119; bit  2   = stop-bits
     120;  (set = 2 stop-bits, clear = 1 stop-bit)
     121; bits 1-0 = data-bits
     122;  (00 = 5, 01 = 6, 10 = 7, 11 = 8)
     123;
     124
     125; 9600 bps, no parity, 1 stop-bit, 8 bits per char
     126AuxInitParms               equ      11100011b
     127
     128; Default word value for BIOS_AuxParms variable
     129; Note that is has moved since v1.07
     130BIOS_AuxParmsDefault       equ      (AuxInitParms SHL 8) OR BiosComPort
     131
    106132;
    107133; If ReleaseCode is not defined, it will produce debug-able code...
    108134;
    109 ReleaseCode                equ      -1                                           ; Rousseau: this should be replaced
    110                                                                                  ; by the complementary debug logic some day.
    111                                                                                  ; Then instead of being on or off it would be
    112                                                                                  ; more handy to use positive integers with each
    113                                                                                  ; higher number increasing the debug functionality.
     135ReleaseCode                equ      -1
     136
     137
     138
     139
    114140
    115141;
     
    117143;
    118144
    119 ; Use different addresses depending on whether in pre-boot or debug environment.
     145; Use different addresses depending on whether in pre-boot
     146; or debug environment.
    120147IFDEF ReleaseCode
    121    StartBaseSeg             equ     00000h   ; Pre-boot, so we are in low memory
     148   StartBaseSeg             equ     00000h   ; Pre-boot, we are in low memory
    122149   StartBasePtr             equ     07C00h   ; BIOS starts our MBR at 0:7C00
    123150  ELSE
    124    StartBaseSeg             equ     03A98h   ; Adjust to DOS segment             ; Rousseau: where does this value come from ? (should be CS; rectified in actual code by ignoring this value)
    125    StartBasePtr             equ     00100h   ; We are a .com file, some DOS is active
     151   StartBaseSeg             equ     03A98h   ; Adjust to DOS segment
     152                                             ; Rousseau: where does this value
     153                                             ; come from ?
     154                                             ; Should be CS;
     155                                             ; Rectified in actual code by
     156                                             ; ignoring this value.
     157   StartBasePtr             equ     00100h   ; We are a .com file,DOS is active
    126158ENDIF
    127159
    128160; Address labels after code-move
    129 BootBaseSeg                 equ      8000h   ; Pre-boot, somewhere in the low 640K
     161BootBaseSeg                 equ     08000h   ; Pre-boot, in the low 640K
    130162BootBasePtr                 equ         0h   ; We put our MBR to this location
    131 BootBaseExec                equ  BootBasePtr+offset MBR_RealStart
    132 StackSeg                    equ      7000h   ; Put the stack below the code
     163BootBaseExec                equ     BootBasePtr+offset MBR_RealStart
     164StackSeg                    equ     07000h   ; Put the stack below the code
    133165
    134166; Video pages, no INT 10h is used for menu-drawing etc.
     
    154186
    155187; Offsets for Partition-Entries in MBR/EPRs
    156 LocBRPT_LenOfEntry          equ         16                                       ; Length of a standard MBR or EPR entry
    157 LocBRPT_Flags               equ          0                                       ; Bootable, Hidden, etc.
    158 LocBRPT_BeginCHS            equ          1                                       ; Combined 10-bits cyl with 6 bits
    159 LocBRPT_BeginHead           equ          1                                       ; Start head      (0<=H<255)    255 is invalid !
    160 LocBRPT_BeginSector         equ          2                                       ; Start sector    (1<=S<=255)
    161 LocBRPT_BeginCylinder       equ          3                                       ; Start cylinder  (0<=C<[1024,16384,65536,n])
    162 LocBRPT_SystemID            equ          4                                       ; Type of system using the partition
    163 LocBRPT_EndCHS              equ          5                                       ; Same for end of partition
     188LocBRPT_LenOfEntry          equ         16   ; Length of a standard MBR or EPR entry
     189LocBRPT_Flags               equ          0   ; Bootable, Hidden, etc.
     190LocBRPT_BeginCHS            equ          1   ; Combined 10-bits cyl with 6 bits
     191LocBRPT_BeginHead           equ          1   ; Start head      (0<=H<255)    255 is invalid !
     192LocBRPT_BeginSector         equ          2   ; Start sector    (1<=S<=255)
     193LocBRPT_BeginCylinder       equ          3   ; Start cylinder  (0<=C<[1024,16384,65536,n])
     194LocBRPT_SystemID            equ          4   ; Type of system using the partition
     195LocBRPT_EndCHS              equ          5   ; Same for end of partition
    164196LocBRPT_EndHead             equ          5
    165197LocBRPT_EndSector           equ          6
    166198LocBRPT_EndCylinder         equ          7
    167 LocBRPT_RelativeBegin       equ          8                                       ; Where the ...
    168 LocBRPT_AbsoluteLength      equ         12                                       ; ?
    169 
    170 LocBR_Magic                 equ        510                                       ; ?
     199LocBRPT_RelativeBegin       equ          8
     200LocBRPT_AbsoluteLength      equ         12
     201
     202LocBR_Magic                 equ        510
    171203
    172204; Offsets for LVM Information Sector
     
    181213LocLVM_PartitionSize        equ          8   ; is DWORD
    182214LocLVM_PartitionStart       equ         12   ; is DWORD
    183 LocLVM_VolumeLetter         equ         18   ; is BYTE (Letter C-Z or 0) (relative to entry)
     215LocLVM_VolumeLetter         equ         18   ; is BYTE (Letter C-Z or 0)
     216                                             ; (relative to entry)
    184217
    185218; Rousseau: added (index in LVM-sector)
    186 LocLVM_Secs                 equ         20h  ; Sectors per Track                     ; Rousseau: this one is used for the OS/2 extended geometry
     219LocLVM_Secs                 equ         20h  ; Sectors per Track (OS/2 ext-geo)
    187220LocLVM_Heads                equ         1ch  ; Number of heads
    188221LocLVM_VolumeLetter2        equ         78   ; is BYTE (Letter C-Z or 0)             ; FOUT !! niet entry relative !
     
    190223LocLVM_OnBootMenu           equ         76   ; is on bootmenu                        ; FOUT !! niet entry relative !
    191224
     225; Truncated to 11 chars when  displayed in menu
    192226LocLVM_VolumeName           equ         20   ; 20 bytes
    193 LocLVM_PartitionName        equ         40   ; 20 bytes
     227LocLVM_PartitionName        equ         40   ; 20 bytes (Used in menu)
    194228
    195229
     
    197231
    198232; Offsets for IPT (Internal Partition Table)
    199 LocIPT_MaxPartitions        equ         partition_count   ; Maximum LocIPT_MaxPartitions
     233LocIPT_MaxPartitions        equ         partition_count   ; 45 in v1.07
    200234LocIPT_LenOfSizeElement     equ          6   ; Size of one Size-Element
    201235LocIPT_LenOfIPT             equ         34   ; Length of an IPT-entry
    202236LocIPT_Serial               equ          0   ; Serial from MBR ?
    203 LocIPT_Name                 equ          4   ; Name from FS or LVM   (part/vol)
    204 LocIPT_Drive                equ         15   ; Drive-ID              (80h,81h etc. sub 7fh to get 1-based disk-number)
    205 LocIPT_SystemID             equ         16   ; Partition-Type        (06,07,etc)
     237LocIPT_Name                 equ          4   ; Name from FS or LVM  (part/vol)
     238LocIPT_Drive                equ         15   ; Drive-ID             (80h,81h)
     239LocIPT_SystemID             equ         16   ; Partition-Type       (06,07,etc)
    206240LocIPT_Flags                equ         17   ; AiR-BOOT Flags for partition (see below)
    207241LocIPT_BootRecordCRC        equ         18   ; CRC of Boot-Record
     
    278312
    279313
    280 ;===============================================================================
    281                                                                   ; Sector 1
     314;==============================================================================
     315                                                                    ; Sector 1
    282316
    283317
     
    306340
    307341
    308 ;---------------------------------------------------------------------------
     342;------------------------------------------------------------------------------
    309343AiR_BOOT:     cli                         ; Some M$ operating systems need a CLI
    310                                           ;  here otherwise they will go beserk  ; Rousseau: M$ osses are beserk by definition.
     344                                          ;  here otherwise they will go beserk
    311345                                          ;  and will do funny things during
    312346                                          ;  boot phase, it's laughable!
    313               db      0EBh                ; JMP-Short -> MBR_Start               ; Rousseau: uses the 'A' as the displacement !
    314               db      'AiRBOOT', 13h, 03h, 20h, 06h, 01h, 07h, TXT_LanguageID    ; Rousseau: version adjusted to v1.07
     347              db      0EBh                ; JMP-Short -> MBR_Start
     348              ; Uses the 'A' as the displacement !
     349              db      'AiRBOOT', 07h, 11h, 20h, 11h, 01h, 08h, TXT_LanguageID
    315350
    316351              ; ID String, Date and Version Number, U for US version
    317352              db      1                   ; Total Sectors Count,
    318                                           ;  Will get overwritten by FIXBSET.exe
     353                                          ; Will get overwritten by FIXBSET.exe
    319354MBR_CheckCode dw      0                   ; Check-Sum for Code
    320355
    321356;
    322 ; This label is jumped to from the jump after 'eCSRocks'.
    323357; No single instruction below should be changed, added or removed in the code
    324358; below as this will cause the jump-link to go haywire.
     359;
    325360MBR_Start:    sti                         ;    This opcode is dedicated to:
    326361              cld                         ;    =MICROSOFT JUMP DEPARTMENT=
     
    329364              ; AX got loaded wrongly for debug, changed the instructions
    330365              ; without modifying the number of bytes.
    331               ; Don't comment-out the redundant instruction below because this *will*
    332               ; change the number of bytes and break the jump-chain.
     366              ; Don't comment-out the redundant instruction below because this
     367              ; *will* change the number of bytes and break the jump-chain.
    333368              mov     ax, StartBaseSeg    ; The segment we are moving ourself from (NOT USED)
    334369              ;mov     ds, ax
     
    345380                 mov     cx, 256          ; Pre-boot environment
    346381                ELSE
    347                  mov     cx, 32700        ; Debug environment                    ; Rousseau: where does 32700 come from ? (30720)
     382                 mov     cx, 32700        ; Debug environment (move ~64kB)
    348383              ENDIF
    349384
     
    353388              rep     movsw
    354389
    355               ; Code a jump to the
     390              ; Code an intersegment jump to the new location
    356391              db      0EAh
    357392              dw      BootBaseExec        ; This is MBR_RealStart + BootBasePtr
     
    375410              jmp     MBR_HaltSys
    376411
    377 ;
    378 ; Never let this part change it's offset,
    379 ; or the first MBR jump will go haywire.
    380 ;
    381 
    382 ;              db      'FUCKMS:>'        ; Sorry Martin, we had to change this.
    383               db      'eCSRocks'         ; Hope you like this one too :-)
    384               jmp     MBR_Start          ; We jump here, because I needed to
    385                                          ;  insert a CLI on start and did not
    386                                          ;  want to change AiR-BOOT detection
    387                                          ;  because of Microsoft inventions...
     412
     413
     414                     ; Comport settings
     415                     ; It had to be moved to create room for the double I13X
     416                     ; signature.
     417                     ; It cannot be in the config-area (sector 55)
     418                     ; because that area
     419                     ; is crc-protected.
     420BIOS_AuxParms        dw     BIOS_AuxParmsDefault
     421
     422;
     423; Reserved space
     424; Should check overflow here, later...
     425;
     426reserved       db     6 dup(0)
     427
     428
     429               ;
     430               ; We jump here after the first instructions of the
     431               ; AiR-BOOT signature.
     432               ; So we ensure the jump is always at this offset.
     433               org      044h
     434               jmp      MBR_Start      ; We jump here, because I needed to
     435                                       ; insert a CLI on start and did not
     436                                       ; want to change AiR-BOOT detection
     437                                       ; because of Microsoft inventions...
    388438;
    389439; Entry-point when loading fails.
     
    461511;
    462512
    463 ;---------------------------------------------------------------------------
     513;------------------------------------------------------------------------------
    464514MBR_RealStart:
    465515              mov     ax, StackSeg        ; 07000h, below the moved code
    466516              mov     ss, ax
    467               ;mov     sp, 7FFFh           ; Odd stack-pointer ??
    468               mov     sp, 7FFEh           ; Safe value, could also be 8000h because SP is decremented by 2 before push
    469               mov     ax, es              ; ES holds segment where we moved ourself to.
     517              ;mov     sp, 7FFFh          ; Odd stack-pointer ??
     518              mov     sp, 7FFEh           ; Even is better
     519              mov     ax, es              ; ES holds segment where we moved to
    470520              mov     ds, ax              ; Set DS==ES to Code Segment
    471521
    472522              ; If we are in debug-mode, all code is moved already,
    473523              ; so we can directly jump to it.
    474               ; One difference is that in debug-mode, the whole .com image is loaded by dos while
    475               ; when air-boot is active from the MBR it does the loading itself.
    476               ; When active from the MBR air-boot does not load all sectors !
    477               ; This means that i.e. a value stored at 77E0h is present in the debug-version because the whole
    478               ; image is loaded, but is not present in running-mode because this sector is not loaded.
     524              ; One difference is that in debug-mode, the whole .com image is
     525              ; loaded by dos while when air-boot is active from the MBR it
     526              ; does the loading itself.
    479527              IFNDEF ReleaseCode
    480528                 jmp     AiR_BOOT_Start
     
    483531
    484532              ; Load missing parts from harddrive...
    485               mov     ax, cs              ; actually obsolete
    486               mov     es, ax              ; actually obsolete
     533;              mov     ax, cs              ; actually obsolete
     534;              mov     es, ax              ; actually obsolete
    487535
    488536              ; Load the configuration-sectors from disk.
     
    491539              mov     cx, 0037h           ; Is 55d is config-sector
    492540
    493 
    494 
    495 IF image_size EQ image_size_60secs
    496               mov     ax, 0205h           ; Read 5 sectors (55 - 59)
    497 ELSE
    498               mov     ax, 0207h           ; Read 7 sectors (55 - 61)
    499 ENDIF
    500 
    501               int     13h
     541              ; Call the i/o-part
     542              call MBR_LoadConfig
     543
    502544              jnc     MBR_ConfigCopy_NoError
    503545
     
    513555              mov     ah, 02h
    514556
    515               mov     al, ds:[10h]        ; 34h = 52d sectors (35h in extended version)
     557              mov     al, ds:[10h]        ; Number of code sectors
    516558              int     13h
    517559              jnc     MBR_RealStart_NoError
    518560              jmp     MBR_ConfigCopy_LoadError
     561
     562
     563
    519564              ; [v1.05+]
    520565              ; Signature for IBM's LVM to detect our "powerful" features ;)
    521               db      'I13X'
     566              ; [v1.08+]
     567              ; Reworked MBR code to be able to create a double 'I13X' signature.
     568              ; MBR's created with LVM eCS v1.x have the signature at 0d5h
     569              ; MBR's created with LVM eCS v2.x have the signature at 0d0h
     570              ; See eCS bugtracker issue #3002
     571              db      0,'I13X',0,'I13X'
     572
     573
    522574             MBR_RealStart_NoError:
    523575              ; Now Check Code with CheckSum
     
    532584                 call    MBR_GetCheckOfSector
    533585              loop    MBR_RealStart_CheckCodeLoop
     586
     587
    534588              cmp     MBR_CheckCode, bx
    535589              je      MBR_RealStart_CheckSuccess
     590
    536591              mov     si, offset TXT_ERROR_Attention
    537592              call    MBR_Teletype
     
    547602
    548603
    549 ;---------------------------------------------------------------------------
    550    Include TEXT\TXTMBR.asm               ; All translateable Text in MBR
    551 ;---------------------------------------------------------------------------
    552 
    553 
    554 
    555                            ; Comport settings
    556                            ; DO NOT MOVE THIS VARIABLE !!
    557                            ; It cannot be in the config-area (sector 55) because that area
    558                            ; is crc-protected.
    559                            org 001B0h
    560 BIOS_AuxParms              dw     BIOS_AuxParmsDefault                           ; Initialized at start when developing
     604
     605;------------------------------------------------------------------------------
     606   Include TEXT\TXTMBR.asm                     ; All translateable Text in MBR
     607;------------------------------------------------------------------------------
     608
     609eot:
     610
     611; Check for overlap
     612slack00 = eos1 - eot
     613IF slack00 LT 0
     614   .ERR2 "Location Overlap slack00 !"
     615ENDIF
     616
     617
     618; bios aux
     619
     620eos1:
     621
     622; This is an ugly kludge function to create space for the
     623; double 'I13X' signature.
     624; It loads the configuration sectors, but bx,cx and dx are not initialized
     625; in this function. That's done around line 500.
     626; Putting this few bytes here creates just enough room.
     627; The size of this function should grow.
     628MBR_LoadConfig                Proc Near
     629              ; Changed from conditional assembler to calculated
     630              ; 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
     637              mov     ah,02h
     638
     639              int     13h
     640      ret
     641MBR_LoadConfig                EndP
     642
     643                           org   001B8h
     644                           db    'DSIG'
     645
     646                           dw    '$$'
    561647
    562648                           org   00200h
    563649; End of sector 1
    564 eos1:
     650eos1a:
    565651
    566652; Check for overlap
    567 slack01 = sos2 - eos1
     653slack01 = sos2 - eos1a
    568654IF slack01 LT 0
    569655   .ERR2 "Location Overlap slack01 !"
     
    571657
    572658
    573 ;===============================================================================
    574                                                                   ; Sector 2
     659;==============================================================================
     660                                                                    ; Sector 2
    575661
    576662                           ;
     
    581667sos2:
    582668
    583 
    584 ; Everything beyond this point is loaded on startup and is NOT existant at first
     669;
     670; Everything beyond this point is loaded on startup
     671; and is NOT existant at first
     672;
    585673FurtherMoreLoad:
    586674
     
    637725
    638726
    639 ;===============================================================================
    640                                                                   ; Sector 3
     727;==============================================================================
     728                                                                    ; Sector 3
    641729                            org 00400h
    642730; Start of sector 3.
     
    736824                 ;inc     al
    737825                 ;mov     [Menu_EntryAutomatic],al
    738                  mov     [CFG_PartAutomatic],al                                  ; Rousseau: setup entry for install-volume
     826                 mov     [CFG_PartAutomatic],al       ; Setup entry for install-volume
    739827                 mov     [CFG_PartLast],al
    740828                 mov     ah, [eCS_InstallVolume]      ; 1st byte is 0 if no phase 1 active
     
    824912
    825913               ;
    826                ; ########################### WAIT FOR KEY ################################
     914               ; ####################### WAIT FOR KEY #########################
    827915               ;
    828916
     
    851939               call     AuxIO_TeletypeNL
    852940
     941
     942                 ; Save configuration so phase1 boot-through is disabled
     943                 ; on next boot.
     944                 ; Moved here to fix that Esc out of SETUP would also save.
     945                 ; So moved above the MBR_Main_ReEnterSetup label.
     946                 call    DriveIO_SaveConfiguration
     947
     948
     949
    853950               ;
    854951               ; RE-ENTER SETUP
    855952               ;
    856                 MBR_Main_ReEnterSetup:                                           ; Rousseau: SETUP re-enters here !
     953                MBR_Main_ReEnterSetup:
    857954                 call    SETUP_CheckEnterSETUP
    858955
    859956               ;call     SOUND_Beep
    860957
    861 
    862 
    863 
    864                  ; Rousseau: Prematurely save configuration
    865                  call    DriveIO_SaveConfiguration                               ; Rousseau: added SAVE CONFIG
    866 
    867 
    868                  call    AFTERCRAP_Main                                          ; Rousseau: Every time I see "AfterCrap" I have to laugh :-)
     958                 ; Rousseau: Every time I see "AfterCrap" I have to laugh :-)
     959                 call    AFTERCRAP_Main
    869960
    870961; [Linux support removed since v1.02]
     
    906997                 mov     al, Menu_EntryAutomatic
    907998
    908                  ;mov     al, 2                                                   ; Rousseau: 0-based
    909 
    910                  mov     Menu_EntrySelected, al
    911                  jmp     MBR_Main_NoBootMenu                                      ; Rousseau: NO-BOOT-MENU
     999                 ;mov     al, 2
     1000
     1001                 mov     Menu_EntrySelected, al    ; zero based
     1002                 jmp     MBR_Main_NoBootMenu
    9121003
    9131004                MBR_Main_NoAutomaticBooting:
     
    9211012                 call    PASSWORD_AskSystemPwd
    9221013
    923                  ;call    VideoIO_DBG_WriteString2                                ; Rousseau
     1014                 ;call    VideoIO_DBG_WriteString2
    9241015
    9251016                 mov     al, Menu_EntryDefault
    926                  ;mov al,0                                                        ; Rousseau: 0-based
     1017                 ;mov al,0                         ; zero based
    9271018                 mov     Menu_EntrySelected, al
    9281019                 jmp     MBR_Main_NoBootMenu
     
    9511042                 ;call   SOUND_Beep
    9521043
    953                  ; ------------------------------------------------- BOOTING...
     1044                 ; ---------------------------------------------------- BOOTING
    9541045                MBR_Main_NoBootMenu:
    9551046                 call    FX_StartScreen
     
    9701061                 call    ANTIVIR_SaveBackUpMBR
    9711062                 mov     dl, Menu_EntrySelected
    972                  call    PART_StartPartition                                     ; Rousseau: START PARTITION
     1063
     1064                 ; -------------------------------------------- START PARTITION
     1065                 call    PART_StartPartition
    9731066
    9741067
     
    9801073;
    9811074b_std_txt:
    982 Include REGULAR\STD_TEXT.asm             ; Standard (non-translateable text)
     1075Include REGULAR\STD_TEXT.asm     ; Standard (non-translateable text)
    9831076size_std_txt = $-b_std_txt
    9841077
    9851078b_driveio:
    986 Include REGULAR\DRIVEIO.asm              ; Drive I/O, Config Load/Save
     1079Include REGULAR\DRIVEIO.asm      ; Drive I/O, Config Load/Save
    9871080size_driveio = $-b_driveio
    9881081
    9891082b_videoio:
    990 Include REGULAR\ViDEOIO.asm              ; Video I/O
     1083Include REGULAR\ViDEOIO.asm      ; Video I/O
    9911084size_videoio = $-b_videoio
    9921085
    9931086b_timer:
    994 Include REGULAR\TIMER.asm                ; Timer
     1087Include REGULAR\TIMER.asm        ; Timer
    9951088size_timer = $-b_timer
    9961089
    9971090b_partmain:
    998 Include REGULAR\PARTMAIN.asm             ; Regular Partition Routines
     1091Include REGULAR\PARTMAIN.asm     ; Regular Partition Routines
    9991092size_partmain = $-b_partmain
    10001093
    10011094b_partscan:
    1002 Include REGULAR\PARTSCAN.asm             ; Partition Scanning
     1095Include REGULAR\PARTSCAN.asm     ; Partition Scanning
    10031096size_partscan = $-b_partscan
    10041097
    10051098b_bootmenu:
    1006 Include REGULAR\BOOTMENU.asm             ; Boot-Menu
     1099Include REGULAR\BOOTMENU.asm     ; Boot-Menu
    10071100size_bootmenu = $-b_bootmenu
    10081101
    10091102b_password:
    1010 Include REGULAR\PASSWORD.asm             ; Password related
     1103Include REGULAR\PASSWORD.asm     ; Password related
    10111104size_password = $-b_password
    10121105
    10131106b_other:
    1014 Include REGULAR\OTHER.asm                ; Other Routines
     1107Include REGULAR\OTHER.asm        ; Other Routines
    10151108size_other = $-b_other
    10161109
    10171110; Rousseau: Special modules moved upwards.
    10181111b_main:
    1019 Include SETUP\MAiN.ASM                   ; The whole AiR-BOOT SETUP
     1112Include SETUP\MAiN.ASM           ; The whole AiR-BOOT SETUP
    10201113size_main = $-b_main
    10211114
     
    10231116IFDEF TXT_IncludeCyrillic
    10241117b_ccharset:
    1025    Include SPECiAL\CHARSET.asm           ; Charset Support (e.g. Cyrillic)
     1118   Include SPECiAL\CHARSET.asm   ; Charset Support (e.g. Cyrillic)
    10261119size_ccharset = $-b_ccharset
    10271120ENDIF
    10281121
    10291122b_math:
    1030 Include REGULAR\MATH.ASM                  ; Math functions (like 32-bit multiply)
     1123Include REGULAR\MATH.ASM         ; Math functions (like 32-bit multiply)
    10311124size_math = $-b_math
    10321125
    10331126b_conv:
    1034 Include REGULAR\CONV.ASM                  ; Various conversion routines
     1127Include REGULAR\CONV.ASM         ; Various conversion routines
    10351128size_conv = $-b_conv
    10361129
    10371130IFDEF AuxDebug
    10381131b_debug:
    1039    Include REGULAR\DEBUG.ASM                 ; Various debugging routines, uses AUXIO and CONV
     1132   Include REGULAR\DEBUG.ASM     ; Various debugging routines,
     1133                                 ; uses AUXIO and CONV
    10401134size_debug = $-b_debug
    10411135ENDIF
    10421136
    10431137b_auxio:
    1044 Include REGULAR\AUXIO.ASM                 ; Com-port support for debugging
     1138Include REGULAR\AUXIO.ASM        ; Com-port support for debugging
    10451139size_auxio = $-b_auxio
    10461140
     
    10611155
    10621156
    1063 ;===============================================================================
     1157;==============================================================================
    10641158
    10651159                           ;
     
    10931187
    10941188
    1095 ;===============================================================================
    1096                                                                   ; Sector 38-x
     1189;==============================================================================
     1190                                                                 ; Sector 38-x
    10971191                           ;
    10981192                           ; This section contains translatable texts.
     
    11731267
    11741268
    1175 ;===============================================================================
    1176                                                                   ; Sector 55
     1269;==============================================================================
     1270                                                                   ; Sector 55
    11771271
    11781272                           ;
     
    11871281
    11881282
    1189 Configuration:
    1190                              db 'AiRCFG-TABLE­'                                  ; Rousseau: THERE IS AN INVISIBLE CHAR HERE !!
     1283Configuration:               ; THERE IS AN INVISIBLE CHAR HERE !!
     1284                             db 'AiRCFG-TABLE­'
    11911285                             db 01h, 07h, 'U' ; "Compressed" ID String
    1192                              ; This is now version 1.07 to have it in sync with the new code version for eCS.
    1193                              ; Version 1.02 was for code 1.06, 1.03 was internal and 1.04,1.05 and 1.06 do not exist.
    1194                              ; It is not required for the config to have the same version as the code, so in the future
    1195                              ; the code version might be higher than the config version if there are no changes to the latter.
     1286                             ; This is now version 1.07 to have it in sync with
     1287                             ; the new code version for eCS.
     1288                             ; Version 1.02 was for code 1.06, 1.03 was internal
     1289                             ; and 1.04,1.05 and 1.06 do not exist.
     1290                             ; It is not required for the config to have the
     1291                             ; same version as the code, so in the future
     1292                             ; the code version might be higher than the
     1293                             ; config version if there are no changes to the latter.
    11961294
    11971295CFG_LastTimeEditLow          dw     0    ; Last Time Edited Stamp (will incr every setup)
     
    12051303
    12061304CFG_PartLast                 db     0    ; Which Partition was booted last time ? (Base=0)
    1207 CFG_TimedBoot                db     1    ; Timed Boot Enable (for REAL Enable look TimedBootEnable)
     1305CFG_TimedBoot                db     0    ; Timed Boot Enable (for REAL Enable look TimedBootEnable)
    12081306CFG_TimedSecs                db    15    ; Timed Boot - How Many Seconds Till Boot
    12091307CFG_TimedDelay               dw   123    ; Timed Boot - Delay
     
    12211319CFG_IgnoreWriteToMBR         db     0    ; Just ignore writes to MBR, otherwise crash
    12221320CFG_FloppyBootGetName        db     0    ; Gets floppy name for display purposes
    1223 CFG_DetectVirus              db     0    ; Detect Virus ?                                             // Rousseau: disabled
    1224 CFG_DetectStealth            db     0    ; Detect Stealth-Virus ?                                     // Rousseau: disabled
    1225 CFG_DetectVIBR               db     0    ; Detect BootRecord-Virus ?                                  // Rousseau: disabled
    1226 CFG_AutoEnterSetup           db     0    ; Automatic Enter Setup (first install!)                     // Rousseau: disabled
     1321CFG_DetectVirus              db     0    ; Detect Virus ?
     1322CFG_DetectStealth            db     0    ; Detect Stealth-Virus ?
     1323CFG_DetectVIBR               db     0    ; Detect BootRecord-Virus ?
     1324CFG_AutoEnterSetup           db     0    ; Automatic Enter Setup (first install!)
    12271325CFG_MasterPassword           dw 0101Fh   ; Encoded Password (this is just CR)
    12281326                             dw 07A53h
     
    12551353CFG_AutomaticBoot            db     0    ; Automatic Booting (only one bootup)
    12561354CFG_PartAutomatic            db     0    ; Partition-No for automatic booting
    1257 CFG_ForceLBAUsage            db     1    ; LBA-BIOS-API forced on any HDD I/O                         // Rousseau: enabled config (LBA)
     1355CFG_ForceLBAUsage            db     1    ; LBA-BIOS-API forced on any HDD I/O
    12581356CFG_IgnoreLVM                db     0    ; Ignores any LVM-Information
    12591357
     
    12791377soiv:
    12801378
    1281 ; Rousseau: added
    1282 ;eCS_InstallVolume            db     12 dup (0)                                   ; Rousseau: new install-volume
    1283 ;eCS_InstallVolume            db     'HIGHLOG' ,0                                ; Rousseau: new install-volume
    1284 eCS_InstallVolume            db     0,'NOPHASEONE' ,0                            ; Rousseau: new install-volume
    1285 ;eCS_InstallVolume            db     'ECS-MIDDLE',0,0                         ; Rousseau: new install-volume
    1286 ;eCS_InstallVolume            db     'ECS-HIGH',0,0,0,0                         ; Rousseau: new install-volume
    1287 ;eCS_InstallVolume            db     'ECS-HIGH',0,'NO',0                         ; Rousseau: new install-volume
     1379; SET(A)BOOT stores the volume name of the eCS system being installed here.
     1380; It is truncated to 11 chars because AiR-BOOT currently does not support
     1381; longer labelnames. The name is also capitalized.
     1382;eCS_InstallVolume            db     12 dup (0)
     1383;eCS_InstallVolume            db     'HIGHLOG' ,0
     1384eCS_InstallVolume            db     0,'NOPHASEONE' ,0
     1385;eCS_InstallVolume            db     'ECS-MIDDLE',0,0
     1386;eCS_InstallVolume            db     'ECS-HIGH',0,0,0,0
     1387;eCS_InstallVolume            db     'ECS-HIGH',0,'NO',0
    12881388
    12891389
     
    13491449                             db     0, 1, 0 ; Location of Partition/Boot Record
    13501450                             dd     0, 0
    1351 ;---------------------------------------------------------------------------
     1451;------------------------------------------------------------------------------
    13521452
    13531453eosvs:
     
    13601460
    13611461
    1362                             ;org 06E00h                          ; Sector 56-57
     1462                            ;org 06E00h                         ; Sector 56-57
    13631463                            org image_size - 0a00h - (image_size - image_size_60secs)
    13641464sos56:
     
    14161516ENDIF
    14171517
    1418 ;---------------------------------------------------------------------------
    1419                             ;org 07200h                          ; Sector 58
    1420                             org image_size - 600h - (image_size - image_size_60secs) / 2                ; Sector 58
     1518;------------------------------------------------------------------------------
     1519                            ;org 07200h                            ; Sector 58
     1520                            org image_size - 600h - (image_size - image_size_60secs) / 2
    14211521soipt:
    14221522sos58:
     
    14611561
    14621562
    1463 ;---------------------------------------------------------------------------
    1464                             ;org 07600h                          ; Sector 60
    1465                             org image_size - 200h                ; Sector 60
     1563;------------------------------------------------------------------------------
     1564                            ;org 07600h                            ; Sector 60
     1565                            org image_size - 200h                  ; Sector 60
    14661566sohid:
    14671567sos60:
     1568
    14681569MBR_BackUpMBR                db 'AiR-BOOT MBR-BackUp - Just to fill this sector with something',0
    14691570AirBootRocks                 db     'AiR-BOOT Rocks!',0
     
    14821583                           org image_size - 2
    14831584                           dw     0BABEh
    1484                            ;dw 0
    1485 ;BIOS_AuxParms              dw     BIOS_AuxParmsDefault                           ; Initialized at start when developing
    14861585
    14871586eoab:
    14881587
    14891588;
    1490 ; Rousseau:
    14911589; End of AiR-BOOT code and data.
    14921590;
     
    14941592
    14951593;
    1496 ; Rousseau:
    14971594; Below functions like a BSS segment, thus uninitialized data.
    14981595;
    14991596sobss:
    1500 ;---------------------------------------------------------------------------
    1501                             org 0A000h                          ; Uninitialized
     1597;------------------------------------------------------------------------------
     1598                            org 0A000h                         ; Uninitialized
    15021599; This space actually gets initialized in PreCrap to NUL (till EndOfVariables)
    15031600BeginOfVariables:
     
    15071604
    15081605; Everything used to build a new IPT and reference it to the old one
    1509 NewPartTable:                db  1536 dup (?) ; New Partition Table
     1606NewPartTable:                db  1536 dup (?)                  ; New Partition Table
    15101607NewHidePartTable:            db   partition_count * 30 dup (?) ; New Hide-Partition Table
    1511 NewDriveLetters:             db    partition_count dup (?) ; Logical Drive-Letters
     1608NewDriveLetters:             db    partition_count dup (?)     ; Logical Drive-Letters
    15121609
    15131610PartitionSizeTable:          db   partition_count * 6 dup (?) ; Size-Table (6 bytes per partition)
    1514 PartitionPointers            dw    52 dup (?) ; Maximum is 52 entries till now
    1515 PartitionPointerCount        db     ?         ; Count of total Partition Pointers
     1611PartitionPointers            dw    52 dup (?)   ; Maximum is 52 entries till now
     1612PartitionPointerCount        db     ?           ; Count of total Partition Pointers
    15161613PartitionXref                db    partition_count dup (?) ; X-Reference Table
    15171614PartitionVolumeLetters       db    partition_count dup (?) ; Volume-Letters
    1518                                               ;  0 - no LVM support
    1519                                               ;  1 - LVM support, but no letter
    1520                                               ;  'C'-'Z' - assigned drive letter
    1521 
    1522 TotalHarddiscs               db     ?         ; Total harddrives (by POST)
    1523 LBASwitchTable               db   128 dup (?) ; Bit 25-18 for CHS/LBA Switching
    1524 NewPartitions                db     ?         ; Freshly found partitions         ; Independent of SaveConfiguration
    1525 
    1526 VideoIO_Segment              dw     ?    ; Segment for Video I/O
    1527 
    1528 ExtendedAbsPos               dd     ?    ; Extended Partition Absolute Position
    1529 ExtendedAbsPosSet            db     ?    ; If Absolute Position set
    1530 
    1531 CurPartition_Location        dw     4 dup (?)  ; Where did current partition came from?
    1532 CurIO_UseExtension           db     ?    ; 1-Use INT 13h EXTENSIONS
    1533                                          ;    (filled out by PreCrap)
    1534 CurIO_Scanning               db     ?    ; 1-AiR-BOOT is scanning partitions
    1535                                          ;    (for detailed error message)
     1615                                                ;  0 - no LVM support
     1616                                                ;  1 - LVM support, but no letter
     1617                                                ;  'C'-'Z' - assigned drive letter
     1618
     1619TotalHarddiscs               db     ?           ; Total harddrives (by POST)
     1620LBASwitchTable               db   128 dup (?)   ; Bit 25-18 for CHS/LBA Switching
     1621NewPartitions                db     ?           ; Freshly found partitions
     1622                                                ; Independent of SaveConfiguration
     1623
     1624VideoIO_Segment              dw     ?           ; Segment for Video I/O
     1625
     1626ExtendedAbsPos               dd     ?           ; Extended Partition Absolute Position
     1627ExtendedAbsPosSet            db     ?           ; If Absolute Position set
     1628
     1629CurPartition_Location        dw     4 dup (?)   ; Where did current partition came from?
     1630CurIO_UseExtension           db     ?           ; 1-Use INT 13h EXTENSIONS
     1631                                                ; (filled out by PreCrap)
     1632CurIO_Scanning               db     ?           ; 1-AiR-BOOT is scanning partitions
     1633                                                ; (for detailed error message)
    15361634
    15371635; [Linux support removed since v1.02]
     
    16511749           ;db     1  dup(?)
    16521750
    1653 i13xbuf    dw     1  dup (?)                       ; Size of the buffer; this param *must* be present. Code inserts it.
     1751i13xbuf    dw     1  dup (?)                       ; Size of the buffer;
     1752                                                   ; this param *must* be present.
     1753                                                   ; Code inserts it.
    16541754           db     126 dup(?)                       ; The buffer itself.
    1655            i13xbuf_size = $-offset i13xbuf-2       ; Size of buffer (excluding the size word at the start).
     1755           i13xbuf_size = $-offset i13xbuf-2       ; Size of buffer
     1756                                                   ; (excluding the size word at the start).
    16561757
    16571758eobss:
Note: See TracChangeset for help on using the changeset viewer.