source: trunk/BOOTCODE/AIR-BOOT.ASM@ 29

Last change on this file since 29 was 29, checked in by Ben Rietbroek, 14 years ago

AiR-BOOT v1.06 -- Complete sourceforge mirror. (r56) [2010-02-19]
Signature-date: 2006-03-13.
Also contains binairy releases from v1.01 to v1.06, cd-rom images, etc.
If you want the whole pre v1.07 shebang, checkout this revision's trunk.
The v1.06 reference version is in 'tags/v1.06r'.
Note that this reference version uses 'NL' for 'Dutch'.

File size: 36.1 KB
Line 
1; AiR-BOOT (c) Copyright 1998-2008 M. Kiewitz
2;
3; This file is part of AiR-BOOT
4;
5; AiR-BOOT is free software: you can redistribute it and/or modify it under
6; the terms of the GNU General Public License as published by the Free
7; Software Foundation, either version 3 of the License, or (at your option)
8; any later version.
9;
10; AiR-BOOT is distributed in the hope that it will be useful, but WITHOUT ANY
11; WARRANTY: without even the implied warranty of MERCHANTABILITY or FITNESS
12; FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
13; details.
14;
15; You should have received a copy of the GNU General Public License along with
16; AiR-BOOT. If not, see <http://www.gnu.org/licenses/>.
17;
18
19;---------------------------------------------------------------------------
20; AiR-BOOT / MAIN-CODE
21;---------------------------------------------------------------------------
22;
23
24; If ReleaseCode is not defined, it will produce debug-able code...
25ReleaseCode equ -1
26
27JUMPS
28
29; All Special Equs for this project
30
31IFDEF ReleaseCode
32 StartBaseSeg equ 00000h
33 StartBasePtr equ 07C00h ; BIOS starts our MBR at 0:7C00
34 ELSE
35 StartBaseSeg equ 03A98h ; Adjust to DOS segment
36 StartBasePtr equ 00100h
37ENDIF
38BootBaseSeg equ 8000h
39BootBasePtr equ 0h ; We put our MBR to this location
40BootBaseExec equ BootBasePtr+offset MBR_RealStart
41StackSeg equ 7000h
42
43VideoIO_Page0 equ 0B800h
44VideoIO_Page1 equ 0B900h
45VideoIO_Page2 equ 0BA00h
46VideoIO_Page4 equ 0BC00h
47VideoIO_FXSegment equ 0A000h
48
49Include ..\INCLUDE\asm.inc
50;Include ..\INCLUDE\DOS\airboot.inc
51
52TextChar_WinLineRight equ 0C4h ; 'Ä'
53TextChar_WinLineDown equ 0B3h ; '³'
54TextChar_WinRep1 equ 0D1h ; 'Ñ'
55TextChar_WinRep2 equ 0C5h ; 'Å'
56TextChar_WinRep3 equ 0CFh ; 'Ï'
57TextChar_WinRep4 equ 0B5h ; 'µ'
58TextChar_WinRep5 equ 0C6h ; 'Æ'
59TextChar_WinRep6 equ 0D8h ; 'Ø'
60
61; Offsets for Partition-Entries in MBR/EPRs
62LocBRPT_LenOfEntry equ 16
63LocBRPT_Flags equ 0
64LocBRPT_BeginCHS equ 1
65LocBRPT_BeginHead equ 1
66LocBRPT_BeginSector equ 2
67LocBRPT_BeginCylinder equ 3
68LocBRPT_SystemID equ 4
69LocBRPT_EndCHS equ 5
70LocBRPT_EndHead equ 5
71LocBRPT_EndSector equ 6
72LocBRPT_EndCylinder equ 7
73LocBRPT_RelativeBegin equ 8
74LocBRPT_AbsoluteLength equ 12
75
76LocBR_Magic equ 510
77
78; Offsets for LVM Information Sector
79LocLVM_SignatureStart equ 0
80LocLVM_SignatureByte0 equ 2
81LocLVM_CRC equ 8 ; CRC is a DWORD
82LocLVM_MaxEntries equ 4
83LocLVM_StartOfEntries equ 60 ; (contains maximum of 4 entries)
84LocLVM_LenOfEntry equ 60
85LocLVM_VolumeID equ 0 ; is DWORD
86LocLVM_PartitionID equ 4 ; is DWORD
87LocLVM_PartitionSize equ 8 ; is DWORD
88LocLVM_PartitionStart equ 12 ; is DWORD
89LocLVM_VolumeLetter equ 18 ; is BYTE (Letter C-Z or 0)
90LocLVM_VolumeName equ 20 ; 20 bytes
91LocLVM_PartitionName equ 40 ; 20 bytes
92
93; Offsets for IPT (Internal Partition Table)
94LocIPT_MaxPartitions equ 30 ; Maximum LocIPT_MaxPartitions
95LocIPT_LenOfSizeElement equ 6 ; Size of one Size-Element
96LocIPT_LenOfIPT equ 34
97LocIPT_Serial equ 0
98LocIPT_Name equ 4
99LocIPT_Drive equ 15 ; Drive-ID
100LocIPT_SystemID equ 16 ; Partition-Type
101LocIPT_Flags equ 17 ; AiR-BOOT Flags for partition
102LocIPT_BootRecordCRC equ 18 ; CRC of Boot-Record
103LocIPT_LocationBegin equ 20 ; Begin of Partition
104LocIPT_LocationPartTable equ 23 ; PartitionTable of Partition
105LocIPT_AbsoluteBegin equ 26 ; Absolute Sector of Begin
106LocIPT_AbsolutePartTable equ 30 ; Absolute Sector of PartTable
107
108LocIPT_DefaultFlags equ 00000011b ; Don't know if boot-able :)
109LocIPT_DefaultNonBootFlags equ 00000010b ; ...VIBR Detection is always on
110
111Flags_BootAble equ 00000001b
112Flags_VIBR_Detection equ 00000010b
113Flags_HideFeature equ 00000100b
114Flags_DriveLetter equ 00001000b ; OS/2 FAT16/HPFS only
115Flags_ExtPartMShack equ 00010000b ; Extended Partition M$-Hack req ?
116Flags_NoPartName equ 01000000b
117Flags_NowFound equ 10000000b ; temp only in OldPartTable
118Flags_SpecialMarker equ 10000000b ; temp only for HiddenSetup
119
120FileSysFlags_BootAble equ 00000001b ; Is this Partition boot-able ?
121FileSysFlags_FAT32 equ 00010000b ; FAT 32 specific name getting
122FileSysFlags_NoName equ 00100000b ; No Name - use PartitionName
123FileSysFlags_DriveLetter equ 01000000b ; DriveLetter Feature possible
124
125Keys_Up equ 48h
126Keys_Down equ 50h
127Keys_Left equ 4Bh
128Keys_Right equ 4Dh
129Keys_PageUp equ 49h
130Keys_PageDown equ 51h
131Keys_GrayPlus equ 4Eh
132Keys_GrayMinus equ 4Ah
133Keys_Plus equ 1Bh
134Keys_Minus equ 35h
135Keys_Enter equ 1Ch
136Keys_ESC equ 1h
137Keys_F1 equ 3Bh
138Keys_F10 equ 44h
139Keys_C equ 2Eh ; Add. Check auf Ctrl!
140Keys_Y equ 2Ch
141Keys_Z equ 15h
142Keys_N equ 31h
143Keys_TAB equ 0Fh
144Keys_Delete equ 53h
145Keys_Backspace equ 0Eh
146Keys_Space equ 20h
147
148Keys_Flags_EnterSetup equ 1100b ; Strg+Alt (AL)
149
150 .386p
151 model large, basic
152
153code_seg segment public use16
154 assume cs:code_seg, ds:code_seg, es:nothing, ss:nothing
155
156 org 00000h ; Sector 1
157;---------------------------------------------------------------------------
158AiR_BOOT: cli ; Some M$ operating systems need a CLI
159 ; here otherwise they will go beserk
160 ; and will do funny things during
161 ; boot phase, it's laughable!
162 db 0EBh ; JMP-Short -> MBR_Start
163 db 'AiRBOOT', 13h, 03h, 20h, 06h, 01h, 06h, TXT_LanguageID
164 ; ID String, Date and Version Number, U for US version
165 db 1 ; Total Sectors Count,
166 ; Will get overwritten by FIXBSET.exe
167MBR_CheckCode dw 0 ; Check-Sum for Code
168
169MBR_Start: sti ; This opcode is dedicated to:
170 cld ; =MICROSOFT JUMP DEPARTMENT=
171 mov ax, StartBaseSeg
172 mov ds, ax
173 mov si, StartBasePtr
174 mov ax, BootBaseSeg
175 mov es, ax
176 mov di, BootBasePtr
177 IFDEF ReleaseCode
178 mov cx, 256
179 ELSE
180 mov cx, 32700
181 ENDIF
182 rep movsw
183 db 0EAh
184 dw BootBaseExec
185 dw BootBaseSeg
186 ; jmp far ptr BootBaseSeg:BootBaseExec
187
188MBR_HaltSystem:
189 mov ax, 8600h
190 xor cx, cx
191 mov dx, 500
192 int 15h ; Wait to display the whole screen :]
193MBR_HaltSys: cli
194 jmp MBR_HaltSys
195
196 db 'FUCKMS:>'
197 jmp MBR_Start ; We jump here, because I needed to
198 ; insert a CLI on start and did not
199 ; want to change AiR-BOOT detection
200 ; because of Microsoft inventions...
201
202 db 'LOAD ERROR!', 0
203MBR_LoadError Proc Near Uses
204 mov si, offset $-12
205 push cs
206 pop ds
207 call MBR_Teletype
208 MBRLE_Halt:
209 jmp MBRLE_Halt
210MBR_LoadError EndP
211
212 db 'SAVE ERROR!', 0
213MBR_SaveError Proc Near Uses
214 mov si, offset $-12
215 push cs
216 pop ds
217 call MBR_Teletype
218 MBRSE_Halt:
219 jmp MBRSE_Halt
220MBR_SaveError EndP
221
222; In: SI - Pointer to begin of string (EOS is 0)
223; Destroyed: SI
224MBR_Teletype Proc Near Uses ax bx cx
225 mov ah, 0Eh
226 mov bx, 7
227 MBRT_Loop:
228 lodsb
229 or al, al
230 jz MBRT_End
231 int 10h
232 jmp MBRT_Loop
233 MBRT_End:
234 ret
235MBR_Teletype EndP
236
237; In: BX - Base Check, DS:SI - Pointer to 512-byte-area to be included
238; Out: BX - Base Check Result
239; Destroyed: SI will get updated (+512)
240MBR_GetCheckOfSector Proc Near Uses ax cx
241 mov cx, 256
242 MBRGCOS_Loop:
243 lodsw
244 xor ax, 0BABEh
245 xor bx, ax
246 loop MBRGCOS_Loop
247 or bx, bx
248 jnz MBRGCOS_NoFixUp
249 mov bx, 1 ; dont allow 0, cause 0 == empty
250 MBRGCOS_NoFixUp:
251 ret
252MBR_GetCheckOfSector EndP
253
254;---------------------------------------------------------------------------
255MBR_RealStart:
256 mov ax, StackSeg
257 mov ss, ax
258 mov sp, 7FFFh
259 mov ax, es
260 mov ds, ax ; Set DS==ES to Code Segment
261 IFNDEF ReleaseCode
262 jmp AiR_BOOT_Start
263 ENDIF
264 ; Load missing parts from harddrive...
265 mov ax, cs
266 mov es, ax
267 mov bx, offset Configuration
268 mov dx, 0080h ; First harddrive, Sector 55
269 mov cx, 0037h
270 mov ax, 0205h ; Read 5 sectors
271 int 13h
272 jnc MBR_ConfigCopy_NoError
273 MBR_ConfigCopy_LoadError:
274 call MBR_LoadError ; Will Abort BootUp
275 MBR_ConfigCopy_NoError:
276 mov bx, offset FurtherMoreLoad
277 mov dx, 0080h ; First harddrive, Sector 2
278 mov cx, 0002h
279 mov ah, 02h
280 mov al, ds:[10h]
281 int 13h
282 jnc MBR_RealStart_NoError
283 jmp MBR_ConfigCopy_LoadError
284 ; [v1.05+]
285 ; Signature for IBM's LVM to detect our "powerful" features ;)
286 db 'I13X'
287 MBR_RealStart_NoError:
288 ; Now Check Code with CheckSum
289 mov si, offset FurtherMoreLoad
290 movzx cx, bptr ds:[10h]
291 xor bx, bx
292 MBR_RealStart_CheckCodeLoop:
293 call MBR_GetCheckOfSector
294 loop MBR_RealStart_CheckCodeLoop
295 cmp MBR_CheckCode, bx
296 je MBR_RealStart_CheckSuccess
297 mov si, offset TXT_ERROR_Attention
298 call MBR_Teletype
299 mov si, offset TXT_ERROR_CheckCode
300 call MBR_Teletype
301 mov si, offset TXT_ERROR_CheckFailed
302 call MBR_Teletype
303 jmp MBR_HaltSystem
304 MBR_RealStart_CheckSuccess:
305 jmp AiR_BOOT_Start
306
307;---------------------------------------------------------------------------
308 Include TEXT\TXTMBR.asm ; All translateable Text in MBR
309;---------------------------------------------------------------------------
310 org 00200h ; Sector 2
311; Everything beyond this point is loaded on startup and is NOT existant at first
312FurtherMoreLoad:
313 ; first Normal-Partition-ID, Hidden-Partition-ID
314 ; and Default-Partition-Flags.
315 ; 01h -> Boot-Able
316 ; 10h -> FAT32 - Name Getting Scheme
317 ; 20h -> No Name To Get (use Partition Name)
318 ; 40h -> 'L' flag possible
319 db 'AiRSYS-TABLE'
320FileSysIDs: db 01h, 11h,01h, 04h,014h,01h, 06h,016h,41h, 0Eh,00Eh,01h
321 db 07h, 17h,41h, 08h,017h,21h, 35h,035h,20h,0FCh,017h,41h
322 db 09h, 19h,11h, 0Bh,01Bh,11h, 0Ch,01Ch,11h,0EBh,0EBh,01h
323 db 63h, 63h,21h, 81h,081h,21h, 83h,083h,21h, 40h,040h,21h
324 db 0A5h,0A5h,21h,0A6h,0A6h,21h, 82h,082h,20h,0A7h,0A7h,21h
325 db 63h, 63h,21h, 4Dh,04Dh,21h, 4Eh,04Eh,21h, 4Fh,04Fh,21h
326 db 01h, 01h,01h, 01h,001h,01h, 01h,001h,01h, 01h,001h,01h
327 db 01h, 01h,01h, 01h,001h,01h, 01h,001h,01h, 01h,001h,01h
328 db 01h, 01h,01h, 01h,001h,01h, 01h,001h,01h, 01h,001h,01h
329 db 01h, 01h,01h,0FDh,0FDh,20h, 84h,084h,20h,0A0h,0A0h,20h
330 db 0Ah, 0Ah,20h,0FEh,0FEh,21h,0FFh,0FFh,21h, 00h,000h,21h
331 db 16 dup (0)
332
333FileSysNames: db 'FAT12 ', 'FAT16 ', 'FAT16Big', 'FAT16Big'
334 db 'HPFS ', 'NTFS ', 'LVM-Data', 'JFS '
335 db 'FAT32 ', 'FAT32 ', 'FAT32 ', 'BeOS '
336 db 'Unix ', 'Minix ', 'Linux ', 'Venix ' ; x row ;)
337 db 'BSD/386 ', 'OpenBSD ', 'LinuxSwp', 'NeXTSTEP'
338 db 'GNU HURD', 'QNX ', 'QNX ', 'QNX '
339 db ' ', ' ', ' ', ' '
340 db ' ', ' ', ' ', ' '
341 db ' ', ' ', ' ', ' '
342 db ' ', 'Kernel ', ' ', '0V-Award'
343 db 'OS/2 Man', 'via BIOS', 'Floppy ', 'Unknown '
344 ; -> 44 Partition-Types
345
346;---------------------------------------------------------------------------
347 org 00400h ; Sector 3
348AiR_BOOT_Start: mov ax, VideoIO_Page1
349 call VideoIO_BackUpTo ; Copy BIOS POST to Second Page
350 mov si, offset Copyright
351 call MBR_Teletype
352 ; Initialize Variable-Tables, Detections, etc.
353 call PRECRAP_Main
354 call PARTSCAN_ScanForPartitions
355 MBR_Main_ReEnterSetup:
356 call SETUP_CheckEnterSETUP
357 call AFTERCRAP_Main
358
359; [Linux support removed since v1.02]
360; ; Now get FAT16-Linux Kernel Partition, If requested
361; cmp [CFG_LinuxKrnlPartition], 0FFh
362; je MBR_Main_NoLinuxKrnlPartition
363; call LINUX_InitFAT16access
364; MBR_Main_NoLinuxKrnlPartition:
365
366 ; SetUp PartitionPointers for BootMenu (filter non-bootable)
367 call PART_CalculateMenuPartPointers
368
369 ; ...and count that one...
370 cmp PartitionPointerCount, 0
371 jne MBR_Main_SomethingBootAble
372 mov si, offset TXT_NoBootAble
373 call MBR_Teletype
374 jmp MBR_HaltSystem
375
376 MBR_Main_SomethingBootAble:
377 ; FixUp Values, define Timed Setup booting, etc.
378 call PART_FixUpDefaultPartitionValues
379
380 ; -------------------------------------------------- BOOT-MENU
381 MBR_Main_ReEnterBootMenu:
382 call BOOTMENU_ResetMenuVars ; reset has to be done
383 test CFG_AutomaticBoot, 1
384 jz MBR_Main_NoAutomaticBooting
385 ; ------------------------------------------ AUTOMATIC BOOTING
386 ; Select automatic partition, disable automatic booting for
387 ; next time and boot system...
388 mov CFG_AutomaticBoot, 0
389 call PASSWORD_AskSystemPwd
390 mov al, Menu_EntryAutomatic
391 mov Menu_EntrySelected, al
392 jmp MBR_Main_NoBootMenu
393
394 MBR_Main_NoAutomaticBooting:
395 test CFG_BootMenuActive, 0FFh
396 jnz MBR_Main_GotBootMenu
397 ; ----------------------------------------------- NO BOOT-MENU
398 ; Select default partition and boot system...
399 call PASSWORD_AskSystemPwd
400 mov al, Menu_EntryDefault
401 mov Menu_EntrySelected, al
402 jmp MBR_Main_NoBootMenu
403
404 MBR_Main_GotBootMenu:
405 ; ------------------------------------------ BOOT-MENU VISUALS
406 call FX_StartScreen
407 call BOOTMENU_BuildBackground
408 call BOOTMENU_BuildMain
409 call FX_EndScreenRight
410 call PASSWORD_AskSystemPwd
411 call BOOTMENU_ResetTimedBoot
412 call BOOTMENU_Execute
413 jc MBR_Main_ReEnterSetup
414 call BOOTMENU_SetVarsAfterMenu
415 ; ------------------------------------------------- BOOTING...
416 MBR_Main_NoBootMenu:
417 call FX_StartScreen
418 call BOOTMENU_BuildGoodBye
419 call FX_EndScreenRight
420 call PASSWORD_AskChangeBootPwd
421
422 IFNDEF ReleaseCode
423 ; Debug Code to terminate DOS .COM program - used for
424 ; testing AiR-BOOT
425 int 3
426 mov ax, 6200h
427 int 21h
428 mov es, bx
429 mov ax, 4C00h ; Quit program
430 int 21h
431 ENDIF
432 call ANTIVIR_SaveBackUpMBR
433 mov dl, Menu_EntrySelected
434 call PART_StartPartition
435
436Include REGULAR\STD_TEXT.asm ; Standard (non-translateable text)
437Include REGULAR\DRIVEIO.asm ; Drive I/O, Config Load/Save
438Include REGULAR\ViDEOIO.asm ; Video I/O
439Include REGULAR\TIMER.asm ; Timer
440Include REGULAR\PARTMAIN.asm ; Regular Partition Routines
441Include REGULAR\PARTSCAN.asm ; Partition Scanning
442Include REGULAR\BOOTMENU.asm ; Boot-Menu
443Include REGULAR\PASSWORD.asm ; Password related
444Include REGULAR\OTHER.asm ; Other Routines
445
446Include SETUP\MAiN.ASM ; The whole AiR-BOOT SETUP
447Include SPECiAL\ViRUS.asm ; Virus Detection / Anti-Virus
448; [Linux support removed since v1.02]
449;Include SPECiAL\FAT16.asm ; FAT-16 Support
450;Include SPECiAL\LINUX.asm ; Linux Kernel Support
451Include SPECiAL\F00K\BILLSUXX.asm ; Extended Partition - Microsoft-Hack
452Include SPECiAL\SOUND.asm ; Sound
453Include SPECiAL\APM.asm ; Power Managment Support
454Include SPECiAL\FX.asm ; l33t Cooper-Bars/Scrolling <bg>
455Include SPECiAL\LVM.asm ; LVM-specific code
456IFDEF TXT_IncludeCyrillic
457 Include SPECiAL\CHARSET.asm ; Charset Support (e.g. Cyrillic)
458ENDIF
459
460;---------------------------------------------------------------------------
461 org 04600h ; Sector 36-37
462MBR_Protection: db 'AiR-BOOT MBR-Protection Image'
463; Hardcoded to 1k (1024 bytes)
464
465;---------------------------------------------------------------------------
466 org 04A00h ; Sector 38-x
467Include TEXT\TXTOTHER.asm ; All translateable Text-Strings
468Include TEXT\TXTMENUS.asm ; All translateable Menu-text
469Include TEXT\CHARSET.asm ; Special Video Charsets (if needed)
470
471;---------------------------------------------------------------------------
472 org 06C00h ; Sector 55
473Configuration:
474 db 'AiRCFG-TABLE­'
475 db 01h, 02h, 'U' ; "Compressed" ID String
476 ; This is still version 1.02, because nothing got
477 ; changed...
478
479CFG_LastTimeEditLow dw 0 ; Last Time Edited Stamp (will incr every setup)
480CFG_LastTimeEditHi dw 0 ; second 16 bit part...
481
482CFG_CheckConfig dw 0 ; Check-Sum for Configuration
483
484CFG_Partitions db 0 ; Count of partitions in IPT
485 db 0 ; Was BootParts - Removed since v0.28b
486CFG_PartDefault db 0 ; Default-Partition (Base=0)
487
488CFG_PartLast db 0 ; Which Partition was booted last time ? (Base=0)
489CFG_TimedBoot db 1 ; Timed Boot Enable (for REAL Enable look TimedBootEnable)
490CFG_TimedSecs db 15 ; Timed Boot - How Many Seconds Till Boot
491CFG_TimedDelay dw 123 ; Timed Boot - Delay
492CFG_TimedBootLast db 0 ; Timed Boot - Boot From Last Drive Booted From
493CFG_RememberBoot db 1 ; Remember Manual Boot Choice
494CFG_RememberTimed db 0 ; Remember if Timed Boot (if both disabled: Boot Default)
495CFG_IncludeFloppy db 1 ; Include Floppy Drives in Boot-Menu
496CFG_BootMenuActive db 1 ; Display Boot-Menu (if Disabled: Boot Default)
497 ; v0.29+ -> 2 - Detailed Bootmenu
498CFG_PartitionsDetect db 1 ; Autodetect New Partitions (Auto-Add!)
499CFG_PasswordSetup db 0 ; Ask Password when entering Setup
500CFG_PasswordSystem db 0 ; Ask Password when booting System
501CFG_PasswordChangeBoot db 0 ; Ask Password when changing boot partition
502CFG_ProtectMBR db 0 ; Protect MBR via TSR ?
503CFG_IgnoreWriteToMBR db 0 ; Just ignore writes to MBR, otherwise crash
504CFG_FloppyBootGetName db 0 ; Gets floppy name for display purposes
505CFG_DetectVirus db 1 ; Detect Virus ?
506CFG_DetectStealth db 1 ; Detect Stealth-Virus ?
507CFG_DetectVIBR db 1 ; Detect BootRecord-Virus ?
508CFG_AutoEnterSetup db 1 ; Automatic Enter Setup (first install!)
509CFG_MasterPassword dw 0101Fh ; Encoded Password (this is just CR)
510 dw 07A53h
511 dw 0E797h
512 dw 0A896h
513CFG_BootPassword dw 0101Fh ; Another CR... ;-)
514 dw 07A53h
515 dw 0E797h
516 dw 0A896h
517 db 0 ; Rude-Protection - Removed since v0.28b
518CFG_LinuxRootPartition db 0 ; Linux Root Partition (Base=0)
519CFG_TimedKeyHandling db 0 ; Timed Key Handling (for Timed Boot)
520 ; 0 - Do Nothing
521 ; 1 - Reset Time
522 ; 2 - Stop Time
523CFG_MakeSound db 0 ; Should be clear ;)
524CFG_FloppyBootGetTimer db 0 ; Floppy Name will get updated every 2 secs
525CFG_ResumeBIOSbootSeq db 0 ; If BIOS Boot Sequence should be resumed
526 ; 0 - Disabled
527 ; 1 - CD-ROM
528 ; 2 - Network
529 ; 3 - ZIP/LS120
530CFG_CooperBars db 0 ; If Cooper Bars should be shown
531CFG_LinuxCommandLine db 75 dup (0) ; Linux Command Line
532CFG_LinuxKrnlPartition db 0FFh ; FAT-16 Linux Kernel Partition (Base=0)
533 ; FFh -> Disabled
534CFG_LinuxDefaultKernel db 'DEFAULT', 4 dup (32), 0 ; Default Kernel Name
535CFG_LinuxLastKernel db 11 dup (32), 0 ; Last-Booted Kernel Name
536CFG_ExtPartitionMShack db 0 ; Extended Partition M$-Hack Global Enable
537CFG_AutomaticBoot db 0 ; Automatic Booting (only one bootup)
538CFG_PartAutomatic db 0 ; Partition-No for automatic booting
539CFG_ForceLBAUsage db 0 ; LBA-BIOS-API forced on any HDD I/O
540CFG_IgnoreLVM db 0 ; Ignores any LVM-Information
541
542; VIR variables are for the AiR-BOOT Anti Virus Code
543; Most of them are backups of Interrupt Points, so we can check, if a
544; stealth virus is on-line, we can intercept its call.
545; Normal (non stealth) virus are trapped simply by rereading the MBR sector.
546; If a virus is found, we will restore MBR from Sektor 60 and stop the system
547; from working, so the user has to press reset. That's saver than a Reboot.
548;
549; If a virus is found on the partition to boot, the system will ONLY halt,
550; nothing more, because we can not remove it. The user shall do it :)
551; Those viruses are detected via a real nasty method...Checksum-Checking of the
552; boot-record, which is to be executed. If it does not match the one in our
553; internal partition table, we will stop. You may however switch this detection
554; off or just reset it by switching 'VIBR Detection'.
555
556 org 06DABh ; 427 Boundry
557AutoDrvLetter db 0
558AutoDrvLetterSerial dd 0
559
560BIOScontIPTentry:
561 db 0, 0, 0, 0, ' '
562 db 0, 0FEh, Flags_BootAble
563 dw 0 ; No Checksum :)
564 db 0, 1, 0
565 db 0, 1, 0 ; Location of Partition/Boot Record
566 dd 0, 0
567
568 ; 466 Sub-Part
569CFG_VIR_INT08 dd 0 ; pointer to saved 08h entry point
570CFG_VIR_INT13 dd 0 ; pointer to saved 13h entry point
571CFG_VIR_INT1C dd 0 ; pointer to saved 1Ch entry point
572
573 ; 478 Boundry
574FloppyIPTentry: db 0, 0, 0, 0, 'FloppyDrive'
575 db 0, 0FFh, Flags_BootAble
576 dw 0 ; No Checksum :)
577 db 0, 1, 0
578 db 0, 1, 0 ; Location of Partition/Boot Record
579 dd 0, 0
580;---------------------------------------------------------------------------
581 org 06E00h ; Sector 56-57
582PartitionTable: ; no-partitions detected... :]
583; db 1, 0, 0, 0, 'Harddisc 1'
584; db 0, 0FFh, Flags_BootAble
585; dw 0 ; No Checksum :)
586; db 0, 0, 1
587; db 0, 0, 1 ; Location of Partition/Boot Record
588; dd 0, 0
589
590 ; Format is:
591 ;============
592 ; SerialNumber * 4
593 ; PartitionName * 11
594 ; Drive * 1
595 ; SystemID * 1 (means the partition type)
596 ; Flags * 1
597 ; Checksum * 2 (for virus checking)
598 ; LocationBegin * 3 (where the partition begins)
599 ; LocationPartTab * 3 (where the partition table is)
600 ; AbsoluteBegin * 4 (where the partition begins, in absolute sectors)
601 ; AbsolutePartTab * 4 (where the partition table is, in absolute sectors)
602 ; --------------------> 34 Bytes (total maximum = 30)
603
604 org 071F6h
605 db 'AiRBOOTPAR' ; 1K internal partition table
606;---------------------------------------------------------------------------
607 org 07200h ; Sector 58
608HidePartitionTable: db 900 dup (0FFh)
609 ; Format is:
610 ;============
611 ; PartitionPtr : BYTE * 30
612 ; --------------------> 30 Bytes * 30
613
614DriveLetters: db 30 dup (0)
615 ; Format is:
616 ;============
617 ; Drive-Letter : BYTE (80h-C:, 81h-D:)
618 ; --------------------> 1 Byte * 30
619
620 org 075F6h
621 db 'AiRBOOTHID' ; 1K internal Hide-partition table
622;---------------------------------------------------------------------------
623 org 07600h ; Sector 60
624MBR_BackUpMBR db 'AiR-BOOT MBR-BackUp - Just to fill this sector with something'
625
626 org 077FFh
627 db 0
628;---------------------------------------------------------------------------
629 org 0A000h ; Uninitialized
630; This space actually gets initialized in PreCrap to NUL (till EndOfVariables)
631BeginOfVariables:
632PartitionSector db 512 dup (?) ; Temporary Sector for Partition
633LVMSector: db 512 dup (?) ; Temporary Sector for LVM
634TmpSector: db 512 dup (?) ; Temporary Sector
635TmpSector2:
636; Everything used to build a new IPT and reference it to the old one
637NewPartTable: db 1024 dup (?) ; New Partition Table
638NewHidePartTable: db 900 dup (?) ; New Hide-Partition Table
639NewDriveLetters: db 30 dup (?) ; Logical Drive-Letters
640
641PartitionSizeTable: db 180 dup (?) ; Size-Table (6 bytes per partition)
642PartitionPointers dw 52 dup (?) ; Maximum is 52 entries till now
643PartitionPointerCount db ? ; Count of total Partition Pointers
644PartitionXref db 30 dup (?) ; X-Reference Table
645PartitionVolumeLetters db 30 dup (?) ; Volume-Letters
646 ; 0 - no LVM support
647 ; 1 - LVM support, but no letter
648 ; 'C'-'Z' - assigned drive letter
649
650TotalHarddiscs db ? ; Total harddrives (by POST)
651LBASwitchTable db 128 dup (?) ; Bit 25-18 for CHS/LBA Switching
652NewPartitions db ? ; Freshly found partitions
653
654VideoIO_Segment dw ? ; Segment for Video I/O
655
656ExtendedAbsPos dd ? ; Extended Partition Absolute Position
657ExtendedAbsPosSet db ? ; If Absolute Position set
658
659CurPartition_Location dw 4 dup (?) ; Where did current partition came from?
660CurIO_UseExtension db ? ; 1-Use INT 13h EXTENSIONS
661 ; (filled out by PreCrap)
662CurIO_Scanning db ? ; 1-AiR-BOOT is scanning partitions
663 ; (for detailed error message)
664
665; [Linux support removed since v1.02]
666;GotLinux db ? ; 1-Linux found
667
668Menu_EntrySelected db ? ; Which partition we boot this time...
669Menu_UpperPart db ? ; Which number (Base=0) is the partition upper pos
670Menu_AbsoluteX db ? ; Pos where Menu stuff starts
671Menu_TotalParts db ? ; Copy of CFG_BootParts
672Menu_TotalLines db ? ; Total Lines on Screen used for BootMenu
673Menu_EntryDefault db ? ; Default Entry in filtered View
674Menu_EntryLast db ? ; LastBooted Entry in filtered View
675Menu_EntryAutomatic db ? ; Automatic Entry in filtered View
676 ; - All adjusted to menu locations
677
678PartSetup_UpperPart db ? ; Partition-Setup (like Menu_UpperPart)
679PartSetup_ActivePart db ? ; Active Partition
680PartSetup_HiddenUpper db ? ; (like Menu_UpperPart)
681PartSetup_HiddenX db ? ; Pos for Hidden-Setup
682PartSetup_HiddenAdd db ? ; Adjust for Hidden-Setup
683
684TimedBootEnable db ? ; Local Enable/Disable for timed boot
685TimedTimeOut dd ? ; TimeOut Timer for TimedBoot (too much time here ;)
686TimedSecondLeft db ? ; How many seconds are left till boom ?
687TimedSecondBack db ? ; To get a modification noticed
688TimedBootUsed db ? ; Timed Boot used for bootup ?
689FloppyGetNameTimer dd ? ; Timer for Floppy-Get-Name
690SETUP_KeysOnEntry db ? ; which Shift Status was there, when booting ?
691SETUP_ExitEvent db ? ; Exit Event to end SETUP
692TempPasswordEntry db 17 dup (?)
693SETUP_OldPwd db 17 dup (?)
694SETUP_NewPwd db 17 dup (?)
695SETUP_VerifyPwd db 17 dup (?)
696StartSoundPlayed db ?
697ChangePartNameSave db ?
698
699FX_UseCount dw ?
700FX_OverallTimer dw ?
701FX_WideScrollerTimer dw ?
702FX_WideScrollerCurPos dw ?
703FX_WideScrollerSpeed db ?
704FX_WideScrollerSpeedState db ?
705FX_WideScrollerDirection db ?
706FX_WideScrollerAbsDirection db ?
707FX_WideScrollerBounceSpeed db ?
708FX_CooperBarsTimer dw ?
709
710; [Linux support removed since v1.02]
711;FAT16_Drive db ? ; FAT-16: Drive of FAT16-partition
712;FAT16_AbsPartitionBegin dd ? ; FAT-16: LBA Begin of Partition
713;FAT16_SecsPerCluster db ? ; FAT-16: Sectors Per Cluster
714;FAT16_NumOfRootEntries dw ? ; FAT-16: Number of Root Entries
715;FAT16_SecsPerFAT dw ? ; FAT-16: Sectors Per FAT
716;FAT16_AbsFATBegin dd ? ; FAT-16: LBA Begin of FAT
717;FAT16_AbsRootBegin dd ? ; FAT-16: LBA Begin of Root
718;FAT16_AbsClusterBegin dd ? ; FAT-16: LBA Begin of Clusters
719;FAT16_FATCacheSector db ? ; FAT-16: FAT-Sector No in Cache
720;FAT16_FATCache db 512 dup (?) ; FAT-16: FAT-Area Cache
721;
722;LINUX_KernelEntries db 680 dup (?) ; 34*20 -> Space for Kernel-Entries
723;LINUX_KernelNo db ? ; Total of Kernels in KernelEntries
724;LINUX_KernelSizeTable db 120 dup (?) ; Size-Table (6 bytes per kernel)
725EndOfVariables:
726
727; Dynamically Generated Tables - do not need to get initialized with NUL
728FX_CooperColors db 672 dup (?) ; 7 cooper bars*96 - runtime calculated
729FX_CooperState: db 7 dup (?)
730FX_SinusPos: db 7 dup (?)
731FX_CooperPos: dw 7 dup (?)
732CharsetTempBuffer db 4096 dup (?) ; Uninitialized Charset buffer
733LVM_CRCTable: dd 256 dup (?) ; LVM-CRC (->SPECiAL\LVM.asm)
734
735code_seg ends
736 end air_boot
Note: See TracBrowser for help on using the repository browser.