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 | ; AiR-BOOT SETUP / PARTITION SETUP
|
---|
20 | ;---------------------------------------------------------------------------
|
---|
21 |
|
---|
22 | IFDEF MODULE_NAMES
|
---|
23 | DB 'PART_SET',0
|
---|
24 | ENDIF
|
---|
25 |
|
---|
26 | ; This here is called from Menu in AIR-BSET.asm
|
---|
27 | PARTSETUP_Main Proc Near
|
---|
28 | ; Build Fixed Content...
|
---|
29 | call PARTSETUP_DrawMenuBase
|
---|
30 | ; Build Dynamic Content...
|
---|
31 | mov dl, PartSetup_ActivePart
|
---|
32 | mov dh, dl ; DL - Current Active, DH - New Active
|
---|
33 | call PARTSETUP_RefreshPartitions
|
---|
34 | ; Show Choice-Bar at DH...
|
---|
35 | call PARTSETUP_BuildChoiceBar
|
---|
36 |
|
---|
37 | ; Now we got everything on-the-screen
|
---|
38 | PSM_MainLoop:
|
---|
39 | push dx
|
---|
40 | mov ah, 0
|
---|
41 | int 16h
|
---|
42 | pop dx
|
---|
43 |
|
---|
44 | ;
|
---|
45 | ; INSERT DEBUG KEYHANDLER HERE ?
|
---|
46 | ;
|
---|
47 |
|
---|
48 | cmp ah, Keys_Up
|
---|
49 | je PSM_KeyUp
|
---|
50 | cmp ah, Keys_Down
|
---|
51 | je PSM_KeyDown
|
---|
52 | cmp ah, Keys_Left
|
---|
53 | je PSM_KeyLeft
|
---|
54 | cmp ah, Keys_Right
|
---|
55 | je PSM_KeyRight
|
---|
56 | cmp ah, Keys_ESC
|
---|
57 | je PSM_KeyESC
|
---|
58 | cmp ah, Keys_F1
|
---|
59 | je PSM_KeyF1
|
---|
60 | cmp ah, Keys_ENTER
|
---|
61 | je PSM_KeyENTER
|
---|
62 | ; Flags-Change
|
---|
63 | and al, 0DFh ; Upper-Case Input
|
---|
64 | cmp al, TXT_SETUP_FlagLetterBootable
|
---|
65 | je PSM_KeyBootAble
|
---|
66 | cmp al, TXT_SETUP_FlagLetterVIBR
|
---|
67 | je PSM_KeyVIBRdetection
|
---|
68 | cmp al, TXT_SETUP_FlagLetterHide
|
---|
69 |
|
---|
70 | jne skip_x
|
---|
71 | jmp PSM_KeyHiddenSetup
|
---|
72 | skip_x:
|
---|
73 | cmp al, TXT_SETUP_FlagLetterDrvLetter
|
---|
74 |
|
---|
75 | jne skip_y
|
---|
76 | jmp PSM_KeyDriveLetterForceSetup
|
---|
77 | skip_y:
|
---|
78 |
|
---|
79 | cmp al, TXT_SETUP_FlagLetterExtMShack
|
---|
80 | jne skip_z
|
---|
81 | jmp PSM_KeyDriveLetterExtMShack
|
---|
82 | skip_z:
|
---|
83 | jmp PSM_MainLoop
|
---|
84 |
|
---|
85 | PSM_KeyESC:
|
---|
86 | ; Simpy exit this menu...
|
---|
87 | mov PartSetup_ActivePart, dl
|
---|
88 | ret
|
---|
89 |
|
---|
90 | PSM_KeyUp:
|
---|
91 | cmp dh, 1
|
---|
92 | jbe PSM_MainLoop
|
---|
93 | sub dh, 2
|
---|
94 | call PARTSETUP_BuildChoiceBar
|
---|
95 | jmp PSM_MainLoop
|
---|
96 |
|
---|
97 | PSM_KeyDown:
|
---|
98 | add dh, 2
|
---|
99 | call PARTSETUP_BuildChoiceBar
|
---|
100 | jmp PSM_MainLoop
|
---|
101 |
|
---|
102 | PSM_KeyLeft:
|
---|
103 | xor dh, 1
|
---|
104 | call PARTSETUP_BuildChoiceBar
|
---|
105 | jmp PSM_MainLoop
|
---|
106 |
|
---|
107 | PSM_KeyRight:
|
---|
108 | xor dh, 1
|
---|
109 | call PARTSETUP_BuildChoiceBar
|
---|
110 | jmp PSM_MainLoop
|
---|
111 |
|
---|
112 | PSM_KeyF1:
|
---|
113 | mov bx, offset TXT_SETUPHELP_InPartitionSetup
|
---|
114 | call SETUP_ShowHelp ; Shows help
|
---|
115 | jmp PSM_MainLoop
|
---|
116 |
|
---|
117 | ; Disabling editing for type 0x35 is currently implemented
|
---|
118 | ; in PARTSETUP_ChangePartitionName.
|
---|
119 | PSM_KeyENTER:
|
---|
120 | call PARTSETUP_ChangePartitionName
|
---|
121 | ; Rebuild Menu...
|
---|
122 | call PARTSETUP_DrawMenuBase
|
---|
123 | call PARTSETUP_RefreshPartitions
|
---|
124 | call PARTSETUP_BuildChoiceBar
|
---|
125 | jmp PSM_MainLoop
|
---|
126 |
|
---|
127 | PSM_KeyBootAble:
|
---|
128 | call PART_GetPartitionPointer ; Gets Partition (DL) Pointer -> SI
|
---|
129 | ; See if this is an OS/2 LVM Volume.
|
---|
130 | ; In that case, we don't allow it to be made bootable.
|
---|
131 | ; We also show a popup to inform the user.
|
---|
132 | call PARTSETUP_IsType35
|
---|
133 | je PSM_KeyBootAble_istype35
|
---|
134 |
|
---|
135 | PSM_KeyBootAble_notype35:
|
---|
136 | mov al, [si+LocIPT_Flags]
|
---|
137 | xor al, Flags_Bootable
|
---|
138 | mov [si+LocIPT_Flags], al
|
---|
139 | call PARTSETUP_DrawPartitionInfo
|
---|
140 | call PARTSETUP_BuildChoiceBar
|
---|
141 | PSM_KeyBootAble_istype35:
|
---|
142 | jmp PSM_MainLoop
|
---|
143 |
|
---|
144 | PSM_KeyVIBRdetection:
|
---|
145 | call PART_GetPartitionPointer ; Gets Partition (DL) Pointer -> SI
|
---|
146 | mov al, [si+LocIPT_Flags]
|
---|
147 | xor al, Flags_VIBR_Detection
|
---|
148 | mov [si+LocIPT_Flags], al
|
---|
149 | xor ax, ax
|
---|
150 | mov word ptr [si+LocIPT_BootRecordCRC], ax
|
---|
151 | call PARTSETUP_DrawPartitionInfo
|
---|
152 | call PARTSETUP_BuildChoiceBar
|
---|
153 | jmp PSM_MainLoop
|
---|
154 |
|
---|
155 | PSM_KeyHiddenSetup:
|
---|
156 | call PARTHIDESETUP_Main
|
---|
157 | ; Rebuild Menu...
|
---|
158 | call PARTSETUP_DrawMenuBase
|
---|
159 | call PARTSETUP_RefreshPartitions
|
---|
160 | call PARTSETUP_BuildChoiceBar
|
---|
161 | jmp PSM_MainLoop
|
---|
162 |
|
---|
163 | PSM_KeyDriveLetterForceSetup:
|
---|
164 | call PARTSETUP_DriveLetterSetup
|
---|
165 | ; Rebuild Menu...
|
---|
166 | call PARTSETUP_DrawMenuBase
|
---|
167 | call PARTSETUP_RefreshPartitions
|
---|
168 | call PARTSETUP_BuildChoiceBar
|
---|
169 | jmp PSM_MainLoop
|
---|
170 |
|
---|
171 | PSM_KeyDriveLetterExtMShack:
|
---|
172 | call PART_GetPartitionPointer ; Gets Partition (DL) Pointer -> SI
|
---|
173 | mov al, [si+LocIPT_Flags]
|
---|
174 | xor al, Flags_ExtPartMShack
|
---|
175 | mov [si+LocIPT_Flags], al
|
---|
176 | call PARTSETUP_DrawPartitionInfo
|
---|
177 | call PARTSETUP_BuildChoiceBar
|
---|
178 | jmp PSM_MainLoop
|
---|
179 | PARTSETUP_Main EndP
|
---|
180 |
|
---|
181 |
|
---|
182 | ; See if this is a partition of type 0x35 and display error
|
---|
183 | ; when user tries to set it as bootable.
|
---|
184 | ; IN: SI = Pointer to partition
|
---|
185 | ; OUT: ZF = Set if 0x35, clear otherwise
|
---|
186 | PARTSETUP_IsType35 Proc Near
|
---|
187 | mov al, [si+LocIPT_SystemID]
|
---|
188 | cmp al, 35h
|
---|
189 | jne PARTSETUP_IsType35_end
|
---|
190 | pushf
|
---|
191 | pusha
|
---|
192 | ; Cannot boot LVM-Data partitions
|
---|
193 | mov cx, 0C04h
|
---|
194 | mov si, offset TXT_SETUP_NoBootType35
|
---|
195 | call SETUP_ShowErrorBox
|
---|
196 | popa
|
---|
197 | call PARTSETUP_DrawMenuBase
|
---|
198 | call PARTSETUP_RefreshPartitions
|
---|
199 | call PARTSETUP_BuildChoiceBar
|
---|
200 | popf
|
---|
201 | PARTSETUP_IsType35_end:
|
---|
202 | ret
|
---|
203 | PARTSETUP_IsType35 EndP
|
---|
204 |
|
---|
205 |
|
---|
206 |
|
---|
207 | CLR_SETUP_PARTITION_LABELS_CLASSIC = 0b01h
|
---|
208 | CLR_SETUP_PARTITION_LABELS_BM = 0b01h
|
---|
209 | CLR_SETUP_PARTITION_LABELS_TB = 0b08h
|
---|
210 | IFDEF TESTBUILD
|
---|
211 | CLR_SETUP_PARTITION_LABELS = CLR_SETUP_PARTITION_LABELS_TB
|
---|
212 | ELSE
|
---|
213 | CLR_SETUP_PARTITION_LABELS = CLR_SETUP_PARTITION_LABELS_BM
|
---|
214 | ENDIF
|
---|
215 |
|
---|
216 | ; Draw all standard-things for Partition Setup, dynamic content not included.
|
---|
217 | PARTSETUP_DrawMenuBase Proc Near Uses dx
|
---|
218 | call SETUP_DrawMenuWindow ; Standard Windows
|
---|
219 |
|
---|
220 | ; 1st No Hd [09] Name [15] Flags [1D] Type
|
---|
221 | ; 2nd No Hd [31] Name [3D] Flags [45] Type
|
---|
222 |
|
---|
223 | mov cx, 0508h
|
---|
224 | call VideoIO_Locate
|
---|
225 | inc TextPosX
|
---|
226 | mov al, TextChar_WinLineDown
|
---|
227 | mov cl, 9
|
---|
228 | call VideoIO_Internal_MakeWinDown ; Line between 1st No Hd and Name
|
---|
229 | mov cx, 0515h
|
---|
230 | call VideoIO_Locate
|
---|
231 | mov al, TextChar_WinLineDown
|
---|
232 | mov cl, 9
|
---|
233 | call VideoIO_Internal_MakeWinDown ; Line between 1st Name and Flags
|
---|
234 | mov cx, 051Dh
|
---|
235 | call VideoIO_Locate
|
---|
236 | mov al, TextChar_WinLineDown
|
---|
237 | mov cl, 9
|
---|
238 | call VideoIO_Internal_MakeWinDown ; Line between 1st Flags and Type
|
---|
239 |
|
---|
240 | mov cx, 0531h ; Line between 2nd No Hd and Name
|
---|
241 | call VideoIO_Locate
|
---|
242 | mov al, TextChar_WinLineDown
|
---|
243 | mov cl, 9
|
---|
244 | call VideoIO_Internal_MakeWinDown
|
---|
245 | mov cx, 053Dh ; Line between 2nd Name and Flags
|
---|
246 | call VideoIO_Locate
|
---|
247 | mov al, TextChar_WinLineDown
|
---|
248 | mov cl, 9
|
---|
249 | call VideoIO_Internal_MakeWinDown
|
---|
250 | mov cx, 0545h ; Line between 2nd Flags and Type
|
---|
251 | call VideoIO_Locate
|
---|
252 | mov al, TextChar_WinLineDown
|
---|
253 | mov cl, 9
|
---|
254 | call VideoIO_Internal_MakeWinDown
|
---|
255 |
|
---|
256 | mov cx, CLR_SETUP_PARTITION_LABELS ; F10-SETUP-PARTITION-SETUP labels bg
|
---|
257 | call VideoIO_Color
|
---|
258 |
|
---|
259 | ; rousseau.comment.201807062250 :: Replaced fixed values with length-query and length-mask
|
---|
260 |
|
---|
261 | ; ------------------------------------- 1st Part
|
---|
262 | mov cx, 0503h
|
---|
263 | call VideoIO_Locate
|
---|
264 | mov si, offset TXT_TopInfos_No ; "No Hd"
|
---|
265 | call GetLenOfString
|
---|
266 | and cl, 07h
|
---|
267 | call VideoIO_FixedPrint
|
---|
268 | mov cx, 050Bh
|
---|
269 | call VideoIO_Locate
|
---|
270 | mov si, offset TXT_TopInfos_Label ; "Label"
|
---|
271 | call GetLenOfString
|
---|
272 | and cl, 0fh
|
---|
273 | call VideoIO_FixedPrint
|
---|
274 | mov cx, 0517h
|
---|
275 | call VideoIO_Locate
|
---|
276 | mov si, offset TXT_TopInfos_Flags ; "Flags"
|
---|
277 | call GetLenOfString
|
---|
278 | and cl, 07h
|
---|
279 | call VideoIO_FixedPrint
|
---|
280 | mov cx, 051Fh
|
---|
281 | call VideoIO_Locate
|
---|
282 | mov si, offset TXT_TopInfos_Type ; "Type"
|
---|
283 | call GetLenOfString
|
---|
284 | and cl, 0fh
|
---|
285 | call VideoIO_FixedPrint
|
---|
286 |
|
---|
287 | ; ------------------------------------- 2nd Part
|
---|
288 | mov cx, 052Bh
|
---|
289 | call VideoIO_Locate
|
---|
290 | mov si, offset TXT_TopInfos_No ; "No Hd"
|
---|
291 | call GetLenOfString
|
---|
292 | and cl, 07h
|
---|
293 | call VideoIO_FixedPrint
|
---|
294 | mov cx, 0533h
|
---|
295 | call VideoIO_Locate
|
---|
296 | mov si, offset TXT_TopInfos_Label ; "Label"
|
---|
297 | call GetLenOfString
|
---|
298 | and cl, 0fh
|
---|
299 | call VideoIO_FixedPrint
|
---|
300 | mov cx, 053Fh
|
---|
301 | call VideoIO_Locate
|
---|
302 | mov si, offset TXT_TopInfos_Flags ; "Flags"
|
---|
303 | call GetLenOfString
|
---|
304 | and cl, 07h
|
---|
305 | call VideoIO_FixedPrint
|
---|
306 | mov cx, 0547h
|
---|
307 | call VideoIO_Locate
|
---|
308 | mov si, offset TXT_TopInfos_Type ; "Type"
|
---|
309 | call GetLenOfString
|
---|
310 | and cl, 0fh
|
---|
311 | call VideoIO_FixedPrint
|
---|
312 |
|
---|
313 | mov si, offset TXT_SETUPHELP_PartSetup
|
---|
314 | call SETUP_DrawMenuHelp
|
---|
315 | ret
|
---|
316 | PARTSETUP_DrawMenuBase EndP
|
---|
317 |
|
---|
318 | ; Displays all partitions into Partition Setup Menu
|
---|
319 | ; aka displays dynamic content.
|
---|
320 | PARTSETUP_RefreshPartitions Proc Near Uses cx dx
|
---|
321 | mov dl, PartSetup_UpperPart
|
---|
322 | mov dh, 12
|
---|
323 | PSRP_Loop:
|
---|
324 | call PARTSETUP_DrawPartitionInfo
|
---|
325 | inc dl
|
---|
326 | dec dh
|
---|
327 | jnz PSRP_Loop
|
---|
328 | ; At last calculate Scroll-Markers
|
---|
329 | IFDEF TESTBUILD
|
---|
330 | mov cx, 0908h
|
---|
331 | ELSE
|
---|
332 | mov cx, 0901h
|
---|
333 | ENDIF
|
---|
334 | call VideoIO_Color
|
---|
335 | mov cx, 0603h ; 6, 3
|
---|
336 | mov dl, PartSetup_UpperPart
|
---|
337 | call PARTSETUP_UpperScrollMarker
|
---|
338 | mov cl, 37 ; 6, 37
|
---|
339 | call PARTSETUP_UpperScrollMarker
|
---|
340 | mov cl, 43 ; 6, 43
|
---|
341 | call PARTSETUP_UpperScrollMarker
|
---|
342 | mov cl, 76 ; 6, 76
|
---|
343 | call PARTSETUP_UpperScrollMarker
|
---|
344 | mov cx, 0D03h ; 13, 3
|
---|
345 | add dl, 12 ; add 12 -> points to last partition
|
---|
346 | mov dh, CFG_Partitions ; Limit
|
---|
347 | call PARTSETUP_LowerScrollMarker
|
---|
348 | mov cl, 37 ; 6, 37
|
---|
349 | call PARTSETUP_LowerScrollMarker
|
---|
350 | inc dl ; add 1 -> cool way ;-)
|
---|
351 | mov cl, 43 ; 6, 43
|
---|
352 | call PARTSETUP_LowerScrollMarker
|
---|
353 | mov cl, 76 ; 6, 76
|
---|
354 | call PARTSETUP_LowerScrollMarker
|
---|
355 | ret
|
---|
356 | PARTSETUP_RefreshPartitions EndP
|
---|
357 |
|
---|
358 | ; Writes Partition-Information to Screen (Partition-Setup)
|
---|
359 | ; In: DL - Number of Partition (Base=0)
|
---|
360 | ; Destroyed: None
|
---|
361 | PARTSETUP_DrawPartitionInfo Proc Near Uses ax bx cx dx si
|
---|
362 | local NoOfPart :byte
|
---|
363 | mov ch, dl
|
---|
364 | sub ch, PartSetup_UpperPart
|
---|
365 | mov cl, 3 ; 3 - first Position
|
---|
366 | shr ch, 1
|
---|
367 | jnc PSDPI_LeftPos
|
---|
368 | mov cl, 43 ; 43 - second Position
|
---|
369 | PSDPI_LeftPos:
|
---|
370 | add ch, 7 ; CH - Line Location for PartInfo
|
---|
371 | ; We got location
|
---|
372 | mov NoOfPart, dl
|
---|
373 | call VideoIO_Locate
|
---|
374 |
|
---|
375 | cmp dl, CFG_Partitions
|
---|
376 | jb PSDPI_GotPartitionData
|
---|
377 | push cx
|
---|
378 | mov al, ' '
|
---|
379 | mov cl, 5
|
---|
380 | call VideoIO_PrintSingleMultiChar
|
---|
381 | pop cx
|
---|
382 | add cl, 7
|
---|
383 | call VideoIO_Locate
|
---|
384 | push cx
|
---|
385 | mov al, ' '
|
---|
386 | mov cl, 11
|
---|
387 | call VideoIO_PrintSingleMultiChar
|
---|
388 | pop cx
|
---|
389 | add cl, 13
|
---|
390 | call VideoIO_Locate
|
---|
391 | push cx
|
---|
392 | mov al, ' '
|
---|
393 | mov cl, 5
|
---|
394 | call VideoIO_PrintSingleMultiChar
|
---|
395 | pop cx
|
---|
396 | add cl, 7
|
---|
397 | call VideoIO_Locate
|
---|
398 | push cx
|
---|
399 | mov al, ' '
|
---|
400 | mov cl, 8
|
---|
401 | call VideoIO_PrintSingleMultiChar
|
---|
402 | pop cx
|
---|
403 | ret
|
---|
404 |
|
---|
405 | PSDPI_GotPartitionData:
|
---|
406 | call PART_GetPartitionPointer ; Gets Pointer to Partition (DL) -> SI
|
---|
407 | mov al, NoOfPart
|
---|
408 | inc al
|
---|
409 | call VideoIO_PrintByteNumber
|
---|
410 |
|
---|
411 | ; Display "No Hd" field aka "01/01"
|
---|
412 | call VideoIO_Locate
|
---|
413 | push cx
|
---|
414 | IFDEF TESTBUILD
|
---|
415 | mov cx, 0F08h
|
---|
416 | ELSE
|
---|
417 | mov cx, 0F01h
|
---|
418 | ENDIF
|
---|
419 | call VideoIO_Color ; Bright White, Blue
|
---|
420 | pop cx
|
---|
421 | mov al, NoOfPart
|
---|
422 | inc al
|
---|
423 | call VideoIO_PrintByteNumber
|
---|
424 | mov al, '/'
|
---|
425 | call VideoIO_PrintSingleChar
|
---|
426 | mov al, [si+LocIPT_Drive]
|
---|
427 | sub al, 7Fh
|
---|
428 | call VideoIO_PrintByteNumber
|
---|
429 |
|
---|
430 | ; Display "Label" field e.g. "OS2 " (fixed 11 bytes)
|
---|
431 | add cl, 7
|
---|
432 | call VideoIO_Locate
|
---|
433 | push cx
|
---|
434 | IFDEF TESTBUILD
|
---|
435 | mov cx, 0E08h
|
---|
436 | ELSE
|
---|
437 | mov cx, 0E01h
|
---|
438 | ENDIF
|
---|
439 | call VideoIO_Color ; Yellow, Blue
|
---|
440 | push si
|
---|
441 | add si, LocIPT_Name
|
---|
442 | mov cl, 11
|
---|
443 | call VideoIO_FixedPrint
|
---|
444 | pop si
|
---|
445 | pop cx
|
---|
446 |
|
---|
447 | ; Display "Flags" field aka "BVHL"
|
---|
448 | add cl, 13
|
---|
449 | call VideoIO_Locate
|
---|
450 | ; This is using a sub-routine for each flag. Is better that way.
|
---|
451 | mov bl, [si+LocIPT_Flags]
|
---|
452 | mov bh, bl
|
---|
453 | mov al, TXT_SETUP_FlagLetterBootable
|
---|
454 | and bl, Flags_Bootable
|
---|
455 | call PARTSETUP_DrawOneFlag
|
---|
456 | mov bl, bh
|
---|
457 | mov al, TXT_SETUP_FlagLetterVIBR
|
---|
458 | and bl, Flags_VIBR_Detection
|
---|
459 | call PARTSETUP_DrawOneFlag
|
---|
460 | mov bl, bh
|
---|
461 | mov al, TXT_SETUP_FlagLetterHide
|
---|
462 | and bl, Flags_HideFeature
|
---|
463 | call PARTSETUP_DrawOneFlag
|
---|
464 | mov bl, bh
|
---|
465 | mov al, TXT_SETUP_FlagLetterDrvLetter
|
---|
466 | and bl, Flags_DriveLetter
|
---|
467 | call PARTSETUP_DrawOneFlag
|
---|
468 | mov bl, bh
|
---|
469 | mov al, TXT_SETUP_FlagLetterExtMShack
|
---|
470 | and bl, Flags_ExtPartMShack
|
---|
471 | call PARTSETUP_DrawOneFlag
|
---|
472 |
|
---|
473 | ; Display "Type" field aka "FAT16Big"
|
---|
474 | add cl, 7
|
---|
475 | call VideoIO_Locate
|
---|
476 | push cx
|
---|
477 | IFDEF TESTBUILD
|
---|
478 | mov cx, 0C08h
|
---|
479 | ELSE
|
---|
480 | mov cx, 0C01h
|
---|
481 | ENDIF
|
---|
482 | call VideoIO_Color ; Bright Red, Blue
|
---|
483 | pop cx
|
---|
484 | mov al, [si+LocIPT_SystemID]
|
---|
485 | call PART_SearchFileSysName
|
---|
486 | mov cl, 8
|
---|
487 | call VideoIO_FixedPrint
|
---|
488 | ret
|
---|
489 | PARTSETUP_DrawPartitionInfo EndP
|
---|
490 |
|
---|
491 | ; In: AL - Flag-Letter
|
---|
492 | ; BL - ==0 -> Flag not set, =!0 -> Flag set
|
---|
493 | ; Destroyed: None
|
---|
494 | PARTSETUP_DrawOneFlag Proc Near Uses cx
|
---|
495 | IFDEF TESTBUILD
|
---|
496 | mov cx, 0A08h ; Bright Green
|
---|
497 | ELSE
|
---|
498 | mov cx, 0A01h ; Bright Green
|
---|
499 | ENDIF
|
---|
500 | or bl, bl
|
---|
501 | jnz PSDOF_FlagSet
|
---|
502 | mov ch, 09h ; Bright Blue
|
---|
503 | PSDOF_FlagSet:
|
---|
504 | call VideoIO_Color
|
---|
505 | call VideoIO_PrintSingleChar
|
---|
506 | ret
|
---|
507 | PARTSETUP_DrawOneFlag EndP
|
---|
508 |
|
---|
509 | ; F10-SETUP
|
---|
510 | CLR_SETUP_SELECTION_BAR_CLASSIC = 10h
|
---|
511 | CLR_SETUP_SELECTION_BAR_BM = 10h
|
---|
512 | CLR_SETUP_SELECTION_BAR_TB = 80h
|
---|
513 | IFDEF TESTBUILD
|
---|
514 | CLR_SETUP_SELECTION_BAR = CLR_SETUP_SELECTION_BAR_TB
|
---|
515 | ELSE
|
---|
516 | CLR_SETUP_SELECTION_BAR = CLR_SETUP_SELECTION_BAR_BM
|
---|
517 | ENDIF
|
---|
518 |
|
---|
519 | ; In: DL - Current Active (to be inactivated)
|
---|
520 | ; DH - New Active (to be activated)
|
---|
521 | ; Destroyed: None
|
---|
522 | PARTSETUP_BuildChoiceBar Proc Near
|
---|
523 | cmp dl, dh
|
---|
524 | je PSBCB_SkipRetrace
|
---|
525 | call VideoIO_WaitRetrace
|
---|
526 | PSBCB_SkipRetrace:
|
---|
527 |
|
---|
528 | ; Deactivate current active bar
|
---|
529 | mov cl, CLR_SETUP_SELECTION_BAR
|
---|
530 | call PARTSETUP_ReColorPart
|
---|
531 |
|
---|
532 | ; Running Fixing
|
---|
533 | cmp dh, 0FFh
|
---|
534 | jne PSBCB_NoUnderflow
|
---|
535 | xor dh, dh
|
---|
536 | PSBCB_NoUnderflow:
|
---|
537 | cmp dh, CFG_Partitions
|
---|
538 | jb PSBCB_NoOverflow
|
---|
539 | mov dh, CFG_Partitions
|
---|
540 | dec dh
|
---|
541 | PSBCB_NoOverflow:
|
---|
542 | mov dl, dh
|
---|
543 |
|
---|
544 | ; Do we need to scroll ?
|
---|
545 | mov al, PartSetup_UpperPart
|
---|
546 | cmp dl, al
|
---|
547 | jb PSBCB_YesScrolling
|
---|
548 | add al, 12
|
---|
549 | cmp dl, al
|
---|
550 | jb PSBCB_NoScrolling
|
---|
551 | mov al, dl
|
---|
552 | and al, 0FEh ; UpperPart is never 1/3/5/7/etc.
|
---|
553 | sub al, 10
|
---|
554 | mov PartSetup_UpperPart, al
|
---|
555 | call PARTSETUP_RefreshPartitions
|
---|
556 | jmp PSBCB_NoScrolling
|
---|
557 | PSBCB_YesScrolling:
|
---|
558 | mov al, dl
|
---|
559 | and al, 0FEh ; UpperPart is never 1/3/5/7/etc.
|
---|
560 | mov PartSetup_UpperPart, al
|
---|
561 | call PARTSETUP_RefreshPartitions
|
---|
562 | PSBCB_NoScrolling:
|
---|
563 |
|
---|
564 | ; Activate fresh active bar
|
---|
565 | mov cl, 40h ; F10-SETUP SelectionBar Active bg
|
---|
566 | call PARTSETUP_ReColorPart
|
---|
567 | ; Now DL==DH
|
---|
568 | ret
|
---|
569 | PARTSETUP_BuildChoiceBar EndP
|
---|
570 |
|
---|
571 | ; In: CL - Color, DL - Partition
|
---|
572 | ; Destroyed: None, but Locate-Pointer
|
---|
573 | PARTSETUP_ReColorPart Proc Near Uses bx cx es di
|
---|
574 | mov bh, cl ; Color to BH
|
---|
575 | ; First calculate location of bar
|
---|
576 | cmp dl, PartSetup_UpperPart
|
---|
577 | jb PSRCP_NotInWindowView
|
---|
578 | mov ch, dl
|
---|
579 | sub ch, PartSetup_UpperPart ; CH - Position relative to UpperPart
|
---|
580 | cmp ch, 12 ; 12 - Maximum Total in Window
|
---|
581 | jae PSRCP_NotInWindowView
|
---|
582 | mov cl, 2 ; 2 - first Position
|
---|
583 | mov bl, 39 ; Length of Bar is 39
|
---|
584 | shr ch, 1
|
---|
585 | jnc PSRCP_LeftPos
|
---|
586 | mov cl, 42 ; 42 - second Position
|
---|
587 | dec bl ; Length of Bar is 38
|
---|
588 | PSRCP_LeftPos:
|
---|
589 | add ch, 7 ; Y-Position add-on fixed 7
|
---|
590 | call VideoIO_Locate ; geht zu CX
|
---|
591 | call VideoIO_Internal_SetRegs
|
---|
592 | inc di ; DI - Destination+1 -> Color-Byte
|
---|
593 | mov cl, bl ; Length of Bar is always 39
|
---|
594 | PSRCP_ClearLoop:
|
---|
595 | mov al, es:[di]
|
---|
596 | and al, 0Fh
|
---|
597 | or al, bh ; setzt den Hintergrund (BH)
|
---|
598 | mov es:[di], al
|
---|
599 | add di, 2
|
---|
600 | dec cl
|
---|
601 | jnz PSRCP_ClearLoop
|
---|
602 | PSRCP_NotInWindowView:
|
---|
603 | ret
|
---|
604 | PARTSETUP_ReColorPart EndP
|
---|
605 |
|
---|
606 | ; In: CX - Location, DL - UpperPartNo
|
---|
607 | ; Destroyed: None, but Locate-Pointer
|
---|
608 | PARTSETUP_UpperScrollMarker Proc Near Uses ax cx
|
---|
609 | call VideoIO_Locate
|
---|
610 | mov al, ' '
|
---|
611 | or dl, dl
|
---|
612 | jz PSUSM_NoMarker
|
---|
613 | mov al, 1Eh
|
---|
614 | PSUSM_NoMarker:
|
---|
615 | mov cl, 3
|
---|
616 | call VideoIO_PrintSingleMultiChar
|
---|
617 | ret
|
---|
618 | PARTSETUP_UpperScrollMarker EndP
|
---|
619 |
|
---|
620 | ; In: CX - Location, DL - UpperPartNo, DH - Limit
|
---|
621 | ; Destroyed: None, cx dx
|
---|
622 | PARTSETUP_LowerScrollMarker Proc Near Uses ax cx
|
---|
623 | call VideoIO_Locate
|
---|
624 | mov al, ' '
|
---|
625 | cmp dl, dh
|
---|
626 | jae PSLSM_NoMarker
|
---|
627 | mov al, 1Fh
|
---|
628 | PSLSM_NoMarker:
|
---|
629 | mov cl, 3
|
---|
630 | call VideoIO_PrintSingleMultiChar
|
---|
631 | ret
|
---|
632 | PARTSETUP_LowerScrollMarker EndP
|
---|
633 |
|
---|
634 | ; =============================================================================
|
---|
635 |
|
---|
636 | ; This is called from MBRS_Routines_PartitionSetup
|
---|
637 | ; In: DL - Partition to ChangeName
|
---|
638 | ; Destroyed: ax bx cx
|
---|
639 | PARTSETUP_ChangePartitionName Proc Near Uses dx ds si di
|
---|
640 | push ds
|
---|
641 | pop es ; we need DS==ES in here for MOVSB etc.
|
---|
642 | call PART_GetPartitionPointer ; Gets the PartitionPointer for DL in SI
|
---|
643 |
|
---|
644 | ; First deactivate current active bar
|
---|
645 | mov cl, 10h
|
---|
646 | call PARTSETUP_ReColorPart
|
---|
647 |
|
---|
648 | ; Calculate where the Partition-Name is located...
|
---|
649 | mov ch, dl
|
---|
650 | sub ch, PartSetup_UpperPart ; CH - Position relative to UpperPart
|
---|
651 | mov cl, 10 ; 10 - first Position
|
---|
652 | shr ch, 1
|
---|
653 | jnc PSCPN_LeftPos
|
---|
654 | mov cl, 50 ; 50 - second Position
|
---|
655 | PSCPN_LeftPos:
|
---|
656 | add ch, 7 ; Y-Position add-on fixed 7
|
---|
657 | call VideoIO_Locate ; Goes to CX
|
---|
658 |
|
---|
659 | mov byte ptr [ChangePartNameSave], 0 ; Don't save to BR / LVM Sector
|
---|
660 |
|
---|
661 | ; We compare, if our IPT contains the same partition name as in BR or LVM
|
---|
662 | ; This is done for security purposes, because if they match, we will update
|
---|
663 | ; the name in both - IPT and BR/LVM.
|
---|
664 |
|
---|
665 | ;movzx bx, dl
|
---|
666 | mov bl,dl
|
---|
667 | mov bh,0
|
---|
668 |
|
---|
669 | cmp byte ptr [PartitionVolumeLetters+bx], 0 ; ==0 means not supported by LVM
|
---|
670 | je PSCPN_NotLVMSupported
|
---|
671 |
|
---|
672 | ;
|
---|
673 | ; BOOKMARK: LVM Label Manipulations
|
---|
674 | ;
|
---|
675 |
|
---|
676 | ; ------------------------------------------------------------[LVM CHECK]---
|
---|
677 | ; Load LVM-Sector here and seek to PartitionName
|
---|
678 | ; Set CurPartition_Location information of destination partition
|
---|
679 | mov ax, [si+LocIPT_AbsolutePartTable]
|
---|
680 | mov [CurPartition_Location+0], ax
|
---|
681 | mov ax, [si+LocIPT_AbsolutePartTable+2]
|
---|
682 | mov [CurPartition_Location+2], ax
|
---|
683 | mov ah, byte ptr [si+LocIPT_LocationPartTable+0]
|
---|
684 | mov al, byte ptr [si+LocIPT_Drive]
|
---|
685 | mov [CurPartition_Location+4], ax
|
---|
686 | mov ax, [si+LocIPT_LocationPartTable+1]
|
---|
687 | mov [CurPartition_Location+6], ax
|
---|
688 | mov di, si ; Put SI into DI
|
---|
689 | call DriveIO_LoadLVMSector
|
---|
690 | jc PSCPN_LVMGotError ; Security again, if problem -> halt
|
---|
691 | push dx
|
---|
692 | mov ax, [di+LocIPT_AbsoluteBegin]
|
---|
693 | mov dx, [di+LocIPT_AbsoluteBegin+2]
|
---|
694 | call LVM_SearchForPartition
|
---|
695 | pop dx
|
---|
696 | jnc PSCPN_LVMGotError ; Not Found? -> display error and halt
|
---|
697 |
|
---|
698 |
|
---|
699 | ; Point to LVM VolumeName
|
---|
700 | add si, LocLVM_VolumeName
|
---|
701 |
|
---|
702 |
|
---|
703 | xchg si, di ; SI-IPTEntry, DI-LVM PartName
|
---|
704 | jmp PSCPN_CheckPartName ; Check, if match...
|
---|
705 |
|
---|
706 |
|
---|
707 |
|
---|
708 | PSCPN_LVMGotError:
|
---|
709 | jmp MBR_LoadError
|
---|
710 |
|
---|
711 |
|
---|
712 |
|
---|
713 | ; mov si, di ; Restore SI and bootrecord fall-back
|
---|
714 | PSCPN_NotLVMSupported:
|
---|
715 | ; ----------------------------------------------------[BOOT-RECORD CHECK]---
|
---|
716 | ; Load Boot-Record...
|
---|
717 | ; BOOKMARK: Load Boot Record
|
---|
718 | push dx
|
---|
719 | mov ax, [si+LocIPT_AbsoluteBegin+0]
|
---|
720 | mov bx, [si+LocIPT_AbsoluteBegin+2]
|
---|
721 | mov cx, [si+LocIPT_LocationBegin+1]
|
---|
722 | mov dh, [si+LocIPT_LocationBegin+0]
|
---|
723 | mov dl, [si+LocIPT_Drive]
|
---|
724 | call DriveIO_LoadPartition
|
---|
725 | pop dx
|
---|
726 |
|
---|
727 | ; We seek to Partition Label within boot-record here
|
---|
728 | mov di, offset PartitionSector
|
---|
729 |
|
---|
730 | push si
|
---|
731 | mov al, [si+LocIPT_SystemID]
|
---|
732 | call PART_SearchFileSysName
|
---|
733 | ; Replies AH - FileSysFlags, AL - UnhiddenID, SI - FileSysNamePtr
|
---|
734 | pop si
|
---|
735 |
|
---|
736 | test ah, FileSysFlags_NoName ; If NoName by FileSysFlag
|
---|
737 | jnz PSCPN_LetUserEditPartName ; -> don't put it into BR at anytime
|
---|
738 | test ah, FileSysFlags_FAT32 ; FAT32 specific name getting
|
---|
739 | jz PSCPN_ResumeNormal
|
---|
740 | add di, 1Ch ; Fix for FAT 32, shit
|
---|
741 | PSCPN_ResumeNormal:
|
---|
742 | add di, 2Bh ; ES:DI - Name of Partition
|
---|
743 |
|
---|
744 |
|
---|
745 |
|
---|
746 |
|
---|
747 |
|
---|
748 | ; This code is used for BR and LVM checking
|
---|
749 | ; Rousseau: Because AiR-BOOT v1.0.8+ uses the LVM_VolumeName, which is copied
|
---|
750 | ; to the IPT, this compare fails when the LVM_PartitionName is not
|
---|
751 | ; the same as the LVM_VolumeName. In that case, only the LVM_VolumeName
|
---|
752 | ; is updated. If they are the same, both are upated so they are the same
|
---|
753 | ; again after the edit.
|
---|
754 |
|
---|
755 | PSCPN_CheckPartName:
|
---|
756 |
|
---|
757 | ; Do no synchronization initially.
|
---|
758 | mov byte ptr [SyncLvmLabels],0
|
---|
759 |
|
---|
760 | ; SI = IPT_Enty, DI points to LVM VolumeName.
|
---|
761 |
|
---|
762 | ; If the partition is an LVM partition then disable editing completely.
|
---|
763 | cmp byte ptr [si+LocIPT_SystemID], 035h
|
---|
764 | jnz no_type_35h
|
---|
765 |
|
---|
766 | ; Cannot boot LVM-Data partitions
|
---|
767 | pusha
|
---|
768 | mov cx, 0C04h
|
---|
769 | mov si, offset TXT_SETUP_NoEditType35
|
---|
770 | call SETUP_ShowErrorBox
|
---|
771 | popa
|
---|
772 |
|
---|
773 |
|
---|
774 | jmp PSCPN_AllDone
|
---|
775 |
|
---|
776 | ; SI = IPT_Enty, DI points to LVM VolumeName.
|
---|
777 | no_type_35h:
|
---|
778 |
|
---|
779 | ;
|
---|
780 | ; Compare LVM VolumeName and PartitionName and
|
---|
781 | ; set flag if they are the same and need to be synced after user edit.
|
---|
782 | ;
|
---|
783 | push si
|
---|
784 | push di
|
---|
785 | mov si,di ; Pointer to LVM V-name in SI
|
---|
786 | add di,LocLVM_LabelLen ; Pointer to LVM P-name in DI
|
---|
787 | mov cx,LocLVM_LabelLen ; Length of LVM label
|
---|
788 | cld
|
---|
789 | repe cmpsb ; Compare V and P labels
|
---|
790 | jnz LVM_Labels_not_equal
|
---|
791 | mov byte ptr [SyncLvmLabels],1 ; Same so set flag for later
|
---|
792 | LVM_Labels_not_equal:
|
---|
793 | pop di
|
---|
794 | pop si
|
---|
795 |
|
---|
796 |
|
---|
797 | mov cx, 11 ; Partition-Name-Length = 11 Bytes
|
---|
798 | push si
|
---|
799 | push di
|
---|
800 | add si, LocIPT_Name ; DS:SI -> Partition-Name
|
---|
801 | repz cmpsb
|
---|
802 | pop di
|
---|
803 | pop si
|
---|
804 | jne PSCPN_LetUserEditPartName ; -> No BR/LVM Changing/Saving
|
---|
805 |
|
---|
806 | mov byte ptr [ChangePartNameSave], 1 ; Remember, so we will save to BR
|
---|
807 |
|
---|
808 | ; SI = IPT_Enty, DI points to LVM PartitionName.
|
---|
809 | PSCPN_LetUserEditPartName:
|
---|
810 | ; User will now edit the volume label...
|
---|
811 | mov cx, 11
|
---|
812 | add si, LocIPT_Name ; DS:SI -> Partition-Name
|
---|
813 | call VideoIO_LetUserEditString ; -> does actual editing
|
---|
814 | jnc PSCPN_AllDone ; Did user abort ?
|
---|
815 |
|
---|
816 | test byte ptr [ChangePartNameSave], 1
|
---|
817 | jz PSCPN_AllDone ; Actually we just skip BR/LVM-Save
|
---|
818 |
|
---|
819 | ; Check, where to save 2nd destination to...
|
---|
820 |
|
---|
821 | ;movzx bx, dl
|
---|
822 | mov bl,dl
|
---|
823 | mov bh,0
|
---|
824 |
|
---|
825 | cmp byte ptr [PartitionVolumeLetters+bx], 0 ; ==0 means not supported by LVM
|
---|
826 | je PSCPN_SaveBootRecord
|
---|
827 |
|
---|
828 |
|
---|
829 | ; Make DI point to LVM VolumeName in LVM-entry
|
---|
830 | ;~ sub di,20
|
---|
831 |
|
---|
832 | ; Points to LVM VolumeName.
|
---|
833 | push di
|
---|
834 |
|
---|
835 | ; -------------------------------------------------[LVM SAVE VOLUME NAME]---
|
---|
836 | ; Copy 11 bytes from IPT into LVM VolumeName, back-padd with zero's
|
---|
837 | mov cx, 11
|
---|
838 | push si
|
---|
839 | rep movsb
|
---|
840 | pop si
|
---|
841 |
|
---|
842 | ; Padd with zero's, but the editor still might have left spaces
|
---|
843 | ; at the end of the 11-byte part. We correct that below.
|
---|
844 | xor al, al
|
---|
845 | mov cx, 9
|
---|
846 | rep stosb
|
---|
847 |
|
---|
848 |
|
---|
849 | ;
|
---|
850 | ; The AiR-BOOT Label Editor inserts spaces when a label is edited
|
---|
851 | ; and characters are backspaced.
|
---|
852 | ; This is fine for filesystem labels, which are space padded,
|
---|
853 | ; but the LVM VolumeName and PartitionName need to be zero padded.
|
---|
854 | ; So, below we replace all trailing spaces with zero's.
|
---|
855 | ;
|
---|
856 | ; Correct LVM VolumeName
|
---|
857 | ;
|
---|
858 | mov cx,20
|
---|
859 | vn_padd_next:
|
---|
860 | jcxz vn_padded
|
---|
861 | dec di
|
---|
862 | dec cx
|
---|
863 | mov al,[di]
|
---|
864 | test al,al
|
---|
865 | jz vn_padd_next
|
---|
866 | cmp al,' '
|
---|
867 | jnz vn_padded
|
---|
868 | mov byte ptr [di],0
|
---|
869 | jmp vn_padd_next
|
---|
870 | vn_padded:
|
---|
871 |
|
---|
872 | ; Points to LVM VolumeName
|
---|
873 | pop di
|
---|
874 |
|
---|
875 | ; See if LVM-labels need to be synced.
|
---|
876 | test byte ptr [SyncLvmLabels],1
|
---|
877 | jz LVM_no_sync_labels
|
---|
878 |
|
---|
879 | ; Sync LVM-labels.
|
---|
880 | mov si,di
|
---|
881 | add di,LocLVM_LabelLen
|
---|
882 | mov cx,LocLVM_LabelLen
|
---|
883 | cld
|
---|
884 | rep movsb
|
---|
885 |
|
---|
886 |
|
---|
887 | LVM_no_sync_labels:
|
---|
888 | ; Update LVM-CRC now...
|
---|
889 | mov si, offset LVMSector
|
---|
890 | call LVM_UpdateSectorCRC
|
---|
891 |
|
---|
892 | call DriveIO_SaveLVMSector ; Save sector
|
---|
893 |
|
---|
894 | jmp PSCPN_AllDone
|
---|
895 |
|
---|
896 | ; -----------------------------------------------------[BOOT-RECORD SAVE]---
|
---|
897 | ; BOOKMARK: Save Boot Record (After change from Setup Menu)
|
---|
898 | PSCPN_SaveBootRecord:
|
---|
899 | ; Copy 11 bytes from IPT to Boot-Record
|
---|
900 | mov cx, 11
|
---|
901 | push si
|
---|
902 | rep movsb ; Copy IPT-name to Boot-Record
|
---|
903 | pop si
|
---|
904 |
|
---|
905 | call DriveIO_SavePartition ; Saves Boot-Record
|
---|
906 |
|
---|
907 | ; And reset VIBR-CRC, otherwise virus-warning and system-halt
|
---|
908 | ; BOOKMARK: Update CRC on Partition Sector
|
---|
909 | sub si, LocIPT_Name ; Now pointer points to base again...
|
---|
910 | mov bx, offset [PartitionSector]
|
---|
911 | call PART_UpdateBootRecordCRC
|
---|
912 |
|
---|
913 | PSCPN_AllDone:
|
---|
914 | ; This here is done for safety, because we misused CurPartition_Location
|
---|
915 | xor ax, ax
|
---|
916 | mov di, offset CurPartition_Location
|
---|
917 | mov cx, 4
|
---|
918 | rep stosw ; NUL out CurPartition_Location
|
---|
919 | ret
|
---|
920 | PARTSETUP_ChangePartitionName EndP
|
---|
921 |
|
---|
922 | ; =============================================================================
|
---|
923 | ; This is called from MBRS_Routines_PartitionSetup
|
---|
924 | ; In: DL - Partition to HiddenSetup
|
---|
925 | ; Destroyed: ax
|
---|
926 | PARTHIDESETUP_Main Proc Near Uses dx
|
---|
927 | ; Spread Special-Marker from Hide-Config
|
---|
928 | call PARTHIDESETUP_GetHideConfigAndSpread
|
---|
929 | ; Calculate Position of Window.
|
---|
930 | ; If Partition Selected Left-Side -> go Right-Sided Window
|
---|
931 | ; otherwise Left-Sided.
|
---|
932 | mov [PartSetup_ActivePart], dl
|
---|
933 | mov ax, 0102h
|
---|
934 | and dl, 1
|
---|
935 | jnz PHSM_FirstStep
|
---|
936 | mov ax, 002Ah
|
---|
937 | PHSM_FirstStep:
|
---|
938 | mov [PartSetup_HiddenX], al
|
---|
939 | mov [PartSetup_HiddenAdd], ah
|
---|
940 |
|
---|
941 | ; Draw Menu...
|
---|
942 | xor dx, dx
|
---|
943 | mov [PartSetup_HiddenUpper], dl
|
---|
944 | call PARTHIDESETUP_DrawMenuBase
|
---|
945 | call PARTHIDESETUP_RefreshPartitions
|
---|
946 | ; Show Choice-Bar at DH...
|
---|
947 | call PARTHIDESETUP_BuildChoiceBar
|
---|
948 |
|
---|
949 | ; Now we got everything on-the-screen
|
---|
950 | PHSM_MainLoop:
|
---|
951 | mov ah, 0
|
---|
952 | int 16h
|
---|
953 | cmp ah, Keys_Up
|
---|
954 | je PHSM_KeyUp
|
---|
955 | cmp ah, Keys_Down
|
---|
956 | je PHSM_KeyDown
|
---|
957 | cmp ah, Keys_ESC
|
---|
958 | je PHSM_KeyESC
|
---|
959 | cmp ah, Keys_F1
|
---|
960 | je PHSM_KeyF1
|
---|
961 | cmp ah, Keys_ENTER
|
---|
962 | je PHSM_KeyToogle
|
---|
963 | cmp ah, Keys_Plus
|
---|
964 | je PHSM_KeyToogle
|
---|
965 | cmp ah, Keys_Minus
|
---|
966 | je PHSM_KeyToogle
|
---|
967 | cmp ah, Keys_GrayPlus
|
---|
968 | je PHSM_KeyToogle
|
---|
969 | cmp ah, Keys_GrayMinus
|
---|
970 | je PHSM_KeyToogle
|
---|
971 | cmp ah, Keys_PageDown
|
---|
972 | je PHSM_KeyToogle
|
---|
973 | cmp ah, Keys_PageUp
|
---|
974 | je PHSM_KeyToogle
|
---|
975 | ; ASCII values...
|
---|
976 | cmp al, Keys_Space
|
---|
977 | je PHSM_KeyToogle
|
---|
978 | jmp PHSM_MainLoop
|
---|
979 |
|
---|
980 | PHSM_KeyESC:
|
---|
981 | ; Collect Hide-Partition-Config and put it into Hide-Table
|
---|
982 | mov dl, [PartSetup_ActivePart]
|
---|
983 |
|
---|
984 | IFDEF AUX_DEBUG
|
---|
985 | IF 0
|
---|
986 | pushf
|
---|
987 | pusha
|
---|
988 | mov al,dl ; Partition the hiding is set for.
|
---|
989 | call AuxIO_TeletypeHexByte
|
---|
990 | call AuxIO_TeletypeNL
|
---|
991 | popa
|
---|
992 | popf
|
---|
993 | ENDIF
|
---|
994 | ENDIF
|
---|
995 |
|
---|
996 | call PARTHIDESETUP_CollectHideConfigAndPutToTable
|
---|
997 | ; Simply return to Partition Setup
|
---|
998 | ret
|
---|
999 |
|
---|
1000 | PHSM_KeyUp:
|
---|
1001 | dec dh
|
---|
1002 | call PARTHIDESETUP_BuildChoiceBar
|
---|
1003 | jmp PHSM_MainLoop
|
---|
1004 |
|
---|
1005 | PHSM_KeyDown:
|
---|
1006 | inc dh
|
---|
1007 | call PARTHIDESETUP_BuildChoiceBar
|
---|
1008 | jmp PHSM_MainLoop
|
---|
1009 |
|
---|
1010 | PHSM_KeyToogle:
|
---|
1011 |
|
---|
1012 | IFDEF AUX_DEBUG
|
---|
1013 | IF 0
|
---|
1014 | pushf
|
---|
1015 | pusha
|
---|
1016 | mov al,dl ; Index of partition to set Special Marker on.
|
---|
1017 | call AuxIO_TeletypeHexByte
|
---|
1018 | call AuxIO_TeletypeNL
|
---|
1019 | popa
|
---|
1020 | popf
|
---|
1021 | ENDIF
|
---|
1022 | ENDIF
|
---|
1023 |
|
---|
1024 | call PART_GetPartitionPointer ; Holt den Pointer der Partition (DL) nach SI
|
---|
1025 | mov al, [si+LocIPT_Flags]
|
---|
1026 | xor al, Flags_SpecialMarker
|
---|
1027 | mov [si+LocIPT_Flags], al
|
---|
1028 | call PARTHIDESETUP_DrawPartitionInfo
|
---|
1029 | call PARTHIDESETUP_BuildChoiceBar
|
---|
1030 | jmp PHSM_MainLoop
|
---|
1031 |
|
---|
1032 | PHSM_KeyF1:
|
---|
1033 | mov bx, offset TXT_SETUPHELP_HideSetup
|
---|
1034 | call SETUP_ShowHelp ; Shows help
|
---|
1035 | jmp PHSM_MainLoop
|
---|
1036 | PARTHIDESETUP_Main EndP
|
---|
1037 |
|
---|
1038 | ; Draw all standard-things for HiddenSetup, dynamic content not included.
|
---|
1039 | PARTHIDESETUP_DrawMenuBase Proc Near Uses dx
|
---|
1040 | ; PartSetup_HiddenX1
|
---|
1041 |
|
---|
1042 |
|
---|
1043 |
|
---|
1044 | CLR_PART_HIDE_WINDOW_BASE_CLASSIC = 0d05h
|
---|
1045 | CLR_PART_HIDE_WINDOW_BASE_BM = 0a02h
|
---|
1046 | CLR_PART_HIDE_WINDOW_BASE_TB = 0a02h
|
---|
1047 | IFDEF TESTBUILD
|
---|
1048 | CLR_PART_HIDE_WINDOW_BASE = CLR_PART_HIDE_WINDOW_BASE_TB
|
---|
1049 | ELSE
|
---|
1050 | CLR_PART_HIDE_WINDOW_BASE = CLR_PART_HIDE_WINDOW_BASE_BM
|
---|
1051 | ENDIF
|
---|
1052 |
|
---|
1053 | mov cx, CLR_PART_HIDE_WINDOW_BASE ; Lila on lila
|
---|
1054 | call VideoIO_Color
|
---|
1055 | mov bh, 05h
|
---|
1056 | mov bl, [PartSetup_HiddenX]
|
---|
1057 | mov dh, 10h
|
---|
1058 | mov dl, bl
|
---|
1059 | add dl, 25h
|
---|
1060 | add dl, [PartSetup_HiddenAdd]
|
---|
1061 | push bx
|
---|
1062 | call VideoIO_MakeWindow
|
---|
1063 | pop bx
|
---|
1064 | ; --- Make Window-Header - "Hide Feature" at top frame-line
|
---|
1065 | inc bl
|
---|
1066 | mov cx, bx
|
---|
1067 | call VideoIO_Locate
|
---|
1068 | mov al, TextChar_WinRep4
|
---|
1069 | call VideoIO_PrintSingleChar
|
---|
1070 |
|
---|
1071 |
|
---|
1072 |
|
---|
1073 | CLR_PART_HIDE_WINDOW_LABEL_CLASSIC = 0e05h
|
---|
1074 | CLR_PART_HIDE_WINDOW_LABEL_BM = 0e02h
|
---|
1075 | CLR_PART_HIDE_WINDOW_LABEL_TB = 0e02h
|
---|
1076 | IFDEF TESTBUILD
|
---|
1077 | CLR_PART_HIDE_WINDOW_LABEL = CLR_PART_HIDE_WINDOW_LABEL_TB
|
---|
1078 | ELSE
|
---|
1079 | CLR_PART_HIDE_WINDOW_LABEL = CLR_PART_HIDE_WINDOW_LABEL_BM
|
---|
1080 | ENDIF
|
---|
1081 |
|
---|
1082 | mov cx, CLR_PART_HIDE_WINDOW_LABEL ; Yellow on Lila
|
---|
1083 | call VideoIO_Color
|
---|
1084 | mov si, offset TXT_SETUP_HideFeature
|
---|
1085 | call VideoIO_Print
|
---|
1086 |
|
---|
1087 |
|
---|
1088 |
|
---|
1089 | CLR_PART_HIDE_WINDOW_BORDER_CLASSIC = 0d05h
|
---|
1090 | CLR_PART_HIDE_WINDOW_BORDER_BM = 0d02h
|
---|
1091 | CLR_PART_HIDE_WINDOW_BORDER_TB = 0d02h
|
---|
1092 | IFDEF TESTBUILD
|
---|
1093 | CLR_PART_HIDE_WINDOW_BORDER = CLR_PART_HIDE_WINDOW_BORDER_TB
|
---|
1094 | ELSE
|
---|
1095 | CLR_PART_HIDE_WINDOW_BORDER = CLR_PART_HIDE_WINDOW_BORDER_BM
|
---|
1096 | ENDIF
|
---|
1097 |
|
---|
1098 | mov cx, CLR_PART_HIDE_WINDOW_BASE ; Lila on lila
|
---|
1099 | call VideoIO_Color
|
---|
1100 | mov al, 0c6h
|
---|
1101 | call VideoIO_PrintSingleChar
|
---|
1102 | ; --- Make Window-Footer - "State when booting..." at bottom right frame-line
|
---|
1103 | mov cx, CLR_PART_HIDE_WINDOW_BORDER ; Lila on lila
|
---|
1104 | call VideoIO_Color
|
---|
1105 | mov dh, 10h
|
---|
1106 | mov dl, [PartSetup_HiddenX]
|
---|
1107 | add dl, 25h
|
---|
1108 | add dl, [PartSetup_HiddenAdd] ; Location 16, HiddenX->right aligned
|
---|
1109 | mov si, offset TXT_SETUP_HideFeature2
|
---|
1110 | call GetLenOfString ; CX - Length of HideFeature2
|
---|
1111 | sub dl, cl ; Adjust Position
|
---|
1112 | push dx
|
---|
1113 | mov dl, [PartSetup_ActivePart]
|
---|
1114 | call PART_GetPartitionPointer ; Holt den Pointer der Partition (DL) nach SI
|
---|
1115 | pop dx
|
---|
1116 | ; Display "Label" field without ending NULs/Spaces
|
---|
1117 | add si, LocIPT_Name
|
---|
1118 | mov cx, 11
|
---|
1119 | call GetLenOfName
|
---|
1120 | sub dl, cl ; Adjust position
|
---|
1121 | sub dl, 2
|
---|
1122 | push cx
|
---|
1123 | push si ; SI == Label Field
|
---|
1124 | mov cx, dx
|
---|
1125 | call VideoIO_Locate
|
---|
1126 | mov al, '<'
|
---|
1127 | call VideoIO_PrintSingleChar
|
---|
1128 | mov si, offset TXT_SETUP_HideFeature2
|
---|
1129 | call VideoIO_Print
|
---|
1130 | pop si
|
---|
1131 | pop cx
|
---|
1132 | call VideoIO_FixedPrint
|
---|
1133 | mov al, '>'
|
---|
1134 | call VideoIO_PrintSingleChar
|
---|
1135 |
|
---|
1136 | ; inc cl
|
---|
1137 | ; call MBR_Locate ; Location 16, HiddenX
|
---|
1138 | ; mov al, TextChar_WinRep4
|
---|
1139 | ; call MBR_PrintSingleChar
|
---|
1140 | ; mov cx, 0E05h ; Yellow on Lila
|
---|
1141 | ; call MBR_Color
|
---|
1142 | ; mov si, offset TXT_SETUP_HideFeature2
|
---|
1143 | ; call MBR_Print
|
---|
1144 | ; mov dl, PartSetup_ActivePart
|
---|
1145 | ; call MBR_Part_GetPartitionPointer ; Holt den Pointer der Partition (DL) nach SI
|
---|
1146 | ; ; Display "Label" field without ending NULs/Spaces
|
---|
1147 | ; add si, LocIPT_Name
|
---|
1148 | ; mov cx, 11
|
---|
1149 | ; call MBR_GetLenOfName
|
---|
1150 | ; call MBR_FixedPrint
|
---|
1151 | ; mov cx, 0D05h ; Lila on lila
|
---|
1152 | ; call MBR_Color
|
---|
1153 | ; mov al, 0c6h
|
---|
1154 | ; call MBR_PrintSingleChar
|
---|
1155 |
|
---|
1156 | ; --- Make ':' Line down
|
---|
1157 |
|
---|
1158 |
|
---|
1159 |
|
---|
1160 | CLR_PART_HIDE_MENU_BASE_CLASSIC = 0f05h
|
---|
1161 | CLR_PART_HIDE_MENU_BASE_BM = 0f02h
|
---|
1162 | CLR_PART_HIDE_MENU_BASE_TB = 0f02h
|
---|
1163 | IFDEF TESTBUILD
|
---|
1164 | CLR_PART_HIDE_MENU_BASE = CLR_PART_HIDE_MENU_BASE_TB
|
---|
1165 | ELSE
|
---|
1166 | CLR_PART_HIDE_MENU_BASE = CLR_PART_HIDE_MENU_BASE_BM
|
---|
1167 | ENDIF
|
---|
1168 |
|
---|
1169 | mov cx, CLR_PART_HIDE_MENU_BASE ; Yellow on Lila
|
---|
1170 | call VideoIO_Color
|
---|
1171 | mov ch, 07h
|
---|
1172 | mov cl, PartSetup_HiddenX
|
---|
1173 | add cl, 24
|
---|
1174 | add cl, PartSetup_HiddenAdd
|
---|
1175 | call VideoIO_Locate
|
---|
1176 | mov al, ':'
|
---|
1177 | mov cl, 8
|
---|
1178 | call VideoIO_Internal_MakeWinDown
|
---|
1179 | ret
|
---|
1180 | PARTHIDESETUP_DrawMenuBase EndP
|
---|
1181 |
|
---|
1182 | ; Draw all partitions to Hidden-Setup aka Dynamic Content-Draw
|
---|
1183 | PARTHIDESETUP_RefreshPartitions Proc Near Uses dx
|
---|
1184 | mov dl, [PartSetup_HiddenUpper]
|
---|
1185 | mov dh, 8
|
---|
1186 | PHSRP_Loop:
|
---|
1187 | call PARTHIDESETUP_DrawPartitionInfo
|
---|
1188 | inc dl
|
---|
1189 | dec dh
|
---|
1190 | jnz PHSRP_Loop
|
---|
1191 |
|
---|
1192 |
|
---|
1193 |
|
---|
1194 | CLR_PART_HIDE_MENU_MARKERS_CLASSIC = 0d05h
|
---|
1195 | CLR_PART_HIDE_MENU_MARKERS_BM = 0a02h
|
---|
1196 | CLR_PART_HIDE_MENU_MARKERS_TB = 0a02h
|
---|
1197 | IFDEF TESTBUILD
|
---|
1198 | CLR_PART_HIDE_MENU_MARKERS = CLR_PART_HIDE_MENU_MARKERS_TB
|
---|
1199 | ELSE
|
---|
1200 | CLR_PART_HIDE_MENU_MARKERS = CLR_PART_HIDE_MENU_MARKERS_BM
|
---|
1201 | ENDIF
|
---|
1202 |
|
---|
1203 | ; At last calculate Scroll-Markers
|
---|
1204 | mov cx, CLR_PART_HIDE_MENU_MARKERS ; Lila on lila ; Hide Feature Markers
|
---|
1205 | call VideoIO_Color
|
---|
1206 | mov cx, 0603h ; 6, +3
|
---|
1207 | add cl, [PartSetup_HiddenX]
|
---|
1208 | mov dl, [PartSetup_HiddenUpper]
|
---|
1209 | call PARTSETUP_UpperScrollMarker
|
---|
1210 | add cl, 29
|
---|
1211 | add cl, [PartSetup_HiddenAdd] ; 6, +29
|
---|
1212 | call PARTSETUP_UpperScrollMarker
|
---|
1213 | mov cx, 0F03h ; 15, +3
|
---|
1214 | add cl, [PartSetup_HiddenX]
|
---|
1215 | add dl, 8 ; add 8 -> points to last partition
|
---|
1216 | mov dh, [CFG_Partitions] ; Limit
|
---|
1217 | call PARTSETUP_LowerScrollMarker
|
---|
1218 | add cl, 29
|
---|
1219 | add cl, [PartSetup_HiddenAdd] ; 6, +29
|
---|
1220 | call PARTSETUP_LowerScrollMarker
|
---|
1221 | ret
|
---|
1222 | PARTHIDESETUP_RefreshPartitions EndP
|
---|
1223 |
|
---|
1224 | PARTHIDESETUP_DrawPartitionInfo Proc Near Uses dx
|
---|
1225 | local NoOfPart :byte
|
---|
1226 | mov ch, dl
|
---|
1227 | sub ch, [PartSetup_HiddenUpper]
|
---|
1228 | add ch, 7
|
---|
1229 | mov cl, 2
|
---|
1230 | add cl, [PartSetup_HiddenX]
|
---|
1231 | ; We got location
|
---|
1232 | mov NoOfPart, dl
|
---|
1233 | call VideoIO_Locate
|
---|
1234 |
|
---|
1235 | ; Clean data-area...
|
---|
1236 | push cx
|
---|
1237 | mov al, ' '
|
---|
1238 | mov cl, 22
|
---|
1239 | call VideoIO_PrintSingleMultiChar
|
---|
1240 | pop cx
|
---|
1241 |
|
---|
1242 | cmp dl, [CFG_Partitions]
|
---|
1243 | jae PHSDPI_NoData
|
---|
1244 |
|
---|
1245 | call PART_GetPartitionPointer ; Holt den Pointer der Partition (DL) nach SI
|
---|
1246 | call VideoIO_Locate
|
---|
1247 | push cx
|
---|
1248 | ; Display "Label" field aka "OS2" without ending NULs/Spaces
|
---|
1249 |
|
---|
1250 |
|
---|
1251 |
|
---|
1252 | CLR_PART_HIDE_LABEL_CLASSIC = 0f05h
|
---|
1253 | CLR_PART_HIDE_LABEL_BM = 0f02h
|
---|
1254 | CLR_PART_HIDE_LABEL_TB = 0f02h
|
---|
1255 | IFDEF TESTBUILD
|
---|
1256 | CLR_PART_HIDE_LABEL = CLR_PART_HIDE_LABEL_TB
|
---|
1257 | ELSE
|
---|
1258 | CLR_PART_HIDE_LABEL = CLR_PART_HIDE_LABEL_BM
|
---|
1259 | ENDIF
|
---|
1260 |
|
---|
1261 | mov cx, CLR_PART_HIDE_LABEL
|
---|
1262 | call VideoIO_Color ; Bright White on Lila
|
---|
1263 | push si
|
---|
1264 | add si, LocIPT_Name
|
---|
1265 | mov cx, 11
|
---|
1266 | call GetLenOfName
|
---|
1267 | call VideoIO_FixedPrint
|
---|
1268 | pop si
|
---|
1269 |
|
---|
1270 |
|
---|
1271 |
|
---|
1272 | CLR_PART_HIDE_WINDOW_FS_CLASSIC = 0d05h
|
---|
1273 | CLR_PART_HIDE_WINDOW_FS_BM = 0a02h
|
---|
1274 | CLR_PART_HIDE_WINDOW_FS_TB = 0a02h
|
---|
1275 | IFDEF TESTBUILD
|
---|
1276 | CLR_PART_HIDE_WINDOW_FS = CLR_PART_HIDE_WINDOW_FS_TB
|
---|
1277 | ELSE
|
---|
1278 | CLR_PART_HIDE_WINDOW_FS = CLR_PART_HIDE_WINDOW_FS_BM
|
---|
1279 | ENDIF
|
---|
1280 |
|
---|
1281 | mov cx, CLR_PART_HIDE_WINDOW_FS
|
---|
1282 | call VideoIO_Color ; Bright Lila on Lila
|
---|
1283 | mov al, ' '
|
---|
1284 | call VideoIO_PrintSingleChar
|
---|
1285 | mov al, '['
|
---|
1286 | call VideoIO_PrintSingleChar
|
---|
1287 | ; Display "Type" field aka "HPFS" without ending NULs/Spaces
|
---|
1288 | push si
|
---|
1289 | mov al, [si+LocIPT_SystemID]
|
---|
1290 | call PART_SearchFileSysName
|
---|
1291 | mov cx, 8
|
---|
1292 | call GetLenOfName
|
---|
1293 | call VideoIO_FixedPrint
|
---|
1294 | pop si
|
---|
1295 | mov al, ']'
|
---|
1296 | call VideoIO_PrintSingleChar
|
---|
1297 | pop cx
|
---|
1298 | add cl, 24
|
---|
1299 | add cl, PartSetup_HiddenAdd
|
---|
1300 | call VideoIO_Locate
|
---|
1301 | push cx
|
---|
1302 |
|
---|
1303 |
|
---|
1304 |
|
---|
1305 | CLR_PART_HIDE_WINDOW_CHOISES_CLASSIC = 0e05h
|
---|
1306 | CLR_PART_HIDE_WINDOW_CHOISES_BM = 0e02h
|
---|
1307 | CLR_PART_HIDE_WINDOW_CHOISES_TB = 0e02h
|
---|
1308 | IFDEF TESTBUILD
|
---|
1309 | CLR_PART_HIDE_WINDOW_CHOISES = CLR_PART_HIDE_WINDOW_CHOISES_TB
|
---|
1310 | ELSE
|
---|
1311 | CLR_PART_HIDE_WINDOW_CHOISES = CLR_PART_HIDE_WINDOW_CHOISES_BM
|
---|
1312 | ENDIF
|
---|
1313 |
|
---|
1314 | mov cx, CLR_PART_HIDE_WINDOW_CHOISES
|
---|
1315 | call VideoIO_Color ; Yellow on Lila
|
---|
1316 | mov al, ' '
|
---|
1317 | mov cl, 10
|
---|
1318 | call VideoIO_PrintSingleMultiChar ; Fill up area with spaces
|
---|
1319 | ; Finally draw Hidden/Unhidden
|
---|
1320 | mov bl, [si+LocIPT_Flags]
|
---|
1321 | mov si, offset TXT_SETUP_MAGIC_Unhidden
|
---|
1322 | and bl, Flags_SpecialMarker
|
---|
1323 | jz PHSDPI_IsNotHidden
|
---|
1324 | mov si, offset TXT_SETUP_MAGIC_Hidden
|
---|
1325 | PHSDPI_IsNotHidden:
|
---|
1326 | call GetLenOfString
|
---|
1327 | mov dx, cx
|
---|
1328 | pop cx
|
---|
1329 | add cx, 10
|
---|
1330 | sub cx, dx
|
---|
1331 | call VideoIO_Locate
|
---|
1332 | call VideoIO_Print
|
---|
1333 | PHSDPI_NoData:
|
---|
1334 | ret
|
---|
1335 | PARTHIDESETUP_DrawPartitionInfo EndP
|
---|
1336 |
|
---|
1337 | ; In: DL - Current Active (to be inactivated)
|
---|
1338 | ; DH - New Active (to be activated)
|
---|
1339 | ; Destroyed: None
|
---|
1340 | PARTHIDESETUP_BuildChoiceBar Proc Near
|
---|
1341 | cmp dl, dh
|
---|
1342 | je PHSBCB_SkipRetrace
|
---|
1343 | call VideoIO_WaitRetrace
|
---|
1344 | PHSBCB_SkipRetrace:
|
---|
1345 |
|
---|
1346 |
|
---|
1347 |
|
---|
1348 | CLR_PART_HIDE_WINDOW_MENU_BAR_CLASSIC = 5eh
|
---|
1349 | CLR_PART_HIDE_WINDOW_MENU_BAR_BM = 2eh
|
---|
1350 | CLR_PART_HIDE_WINDOW_MENU_BAR_TB = 2eh
|
---|
1351 | IFDEF TESTBUILD
|
---|
1352 | CLR_PART_HIDE_WINDOW_MENU_BAR = CLR_PART_HIDE_WINDOW_MENU_BAR_TB
|
---|
1353 | ELSE
|
---|
1354 | CLR_PART_HIDE_WINDOW_MENU_BAR = CLR_PART_HIDE_WINDOW_MENU_BAR_BM
|
---|
1355 | ENDIF
|
---|
1356 |
|
---|
1357 | ; Deactivate current active bar
|
---|
1358 | mov cl, CLR_PART_HIDE_WINDOW_MENU_BAR ; Yellow on Lila
|
---|
1359 | call PARTHIDESETUP_ReColorPart
|
---|
1360 |
|
---|
1361 | ; Running Fixing
|
---|
1362 | cmp dh, 0FFh
|
---|
1363 | jne PHSBCB_NoUnderflow
|
---|
1364 | xor dh, dh
|
---|
1365 | PHSBCB_NoUnderflow:
|
---|
1366 | cmp dh, [CFG_Partitions]
|
---|
1367 | jb PHSBCB_NoOverflow
|
---|
1368 | mov dh, [CFG_Partitions]
|
---|
1369 | dec dh
|
---|
1370 | PHSBCB_NoOverflow:
|
---|
1371 | mov dl, dh
|
---|
1372 |
|
---|
1373 | ; Do we need to scroll ?
|
---|
1374 | mov al, [PartSetup_HiddenUpper]
|
---|
1375 | cmp dl, al
|
---|
1376 | jb PHSBCB_YesScrolling
|
---|
1377 | add al, 8
|
---|
1378 | cmp dl, al
|
---|
1379 | jb PHSBCB_NoScrolling
|
---|
1380 | mov al, dl
|
---|
1381 | sub al, 7
|
---|
1382 | mov [PartSetup_HiddenUpper], al
|
---|
1383 | call PARTHIDESETUP_RefreshPartitions
|
---|
1384 | jmp PHSBCB_NoScrolling
|
---|
1385 | PHSBCB_YesScrolling:
|
---|
1386 | mov al, dl
|
---|
1387 | mov [PartSetup_HiddenUpper], al
|
---|
1388 | call PARTHIDESETUP_RefreshPartitions
|
---|
1389 | PHSBCB_NoScrolling:
|
---|
1390 |
|
---|
1391 |
|
---|
1392 |
|
---|
1393 | ; Activate fresh active bar
|
---|
1394 | CLR_PART_HIDE_WINDOW_MENU_ACTIVE_BAR_CLASSIC = 1fh
|
---|
1395 | CLR_PART_HIDE_WINDOW_MENU_ACTIVE_BAR_BM = 1fh
|
---|
1396 | CLR_PART_HIDE_WINDOW_MENU_ACTIVE_BAR_TB = 1fh
|
---|
1397 | IFDEF TESTBUILD
|
---|
1398 | CLR_PART_HIDE_WINDOW_MENU_ACTIVE_BAR = CLR_PART_HIDE_WINDOW_MENU_ACTIVE_BAR_TB
|
---|
1399 | ELSE
|
---|
1400 | CLR_PART_HIDE_WINDOW_MENU_ACTIVE_BAR = CLR_PART_HIDE_WINDOW_MENU_ACTIVE_BAR_BM
|
---|
1401 | ENDIF
|
---|
1402 |
|
---|
1403 | mov cl, CLR_PART_HIDE_WINDOW_MENU_ACTIVE_BAR ; Bright White on Blue
|
---|
1404 | call PARTHIDESETUP_ReColorPart
|
---|
1405 | ; Now DL==DH
|
---|
1406 | ret
|
---|
1407 | PARTHIDESETUP_BuildChoiceBar EndP
|
---|
1408 |
|
---|
1409 | ; In: CL - Color, DL - Partition
|
---|
1410 | ; Destroyed: None, but Locate-Pointer
|
---|
1411 | PARTHIDESETUP_ReColorPart Proc Near Uses bx cx es di
|
---|
1412 | mov bh, cl ; Color to BH
|
---|
1413 | ; First calculate location of bar
|
---|
1414 | cmp dl, [PartSetup_HiddenUpper]
|
---|
1415 | jb PHSRCP_NotInWindowView
|
---|
1416 | mov ch, dl
|
---|
1417 | sub ch, [PartSetup_HiddenUpper] ; CH - Position relative to HiddenUpper
|
---|
1418 | cmp ch, 8 ; 8 - Maximum Total in Window
|
---|
1419 | jae PHSRCP_NotInWindowView
|
---|
1420 | add ch, 7
|
---|
1421 | mov cl, 26
|
---|
1422 | add cl, [PartSetup_HiddenX]
|
---|
1423 | add cl, [PartSetup_HiddenAdd]
|
---|
1424 |
|
---|
1425 | mov bl, 10 ; Length of Bar is 10
|
---|
1426 | call VideoIO_Locate ; geht zu CX
|
---|
1427 | call VideoIO_Internal_SetRegs
|
---|
1428 | inc di ; DI - Destination+1 -> Color-Byte
|
---|
1429 | mov cl, bl ; Length of Bar is always 39
|
---|
1430 | PHSRCP_ClearLoop:
|
---|
1431 | mov es:[di], bh
|
---|
1432 | add di, 2
|
---|
1433 | dec cl
|
---|
1434 | jnz PHSRCP_ClearLoop
|
---|
1435 | PHSRCP_NotInWindowView:
|
---|
1436 | ret
|
---|
1437 | PARTHIDESETUP_ReColorPart EndP
|
---|
1438 |
|
---|
1439 | ; =============================================================================
|
---|
1440 |
|
---|
1441 |
|
---|
1442 | ;
|
---|
1443 | ; Rousseau: Adjusted for packed hidden-part-table !
|
---|
1444 | ; Needs to be re-written.
|
---|
1445 | ;
|
---|
1446 | ; This is called by MBRS_PS_HiddenSetup
|
---|
1447 | ; In: DL - Partition, where to save Hide-Config
|
---|
1448 | ; Destroyed: None, but Locate-Pointer
|
---|
1449 | PARTHIDESETUP_GetHideConfigAndSpread Proc Near Uses ax bx dx si di
|
---|
1450 | ; First check HideFeature-Flag on selected partition.
|
---|
1451 | ; if it's not set, don't do anything...
|
---|
1452 | call PART_GetPartitionPointer ; Holt den Pointer der Partition (DL) nach SI
|
---|
1453 | mov al, [si+LocIPT_Flags]
|
---|
1454 | test al, Flags_HideFeature
|
---|
1455 | jz PHSGHCAS_EndOfEntries
|
---|
1456 | PHSGHCAS_SomethingHidden:
|
---|
1457 | ; Calculate, where to get Hide-Config
|
---|
1458 | mov ax, LocHPT_LenOfHPT ; Size of a hidden-part-table entry.
|
---|
1459 | mul dl ; Multiply by partition-index.
|
---|
1460 | mov di, offset HidePartitionTable
|
---|
1461 | add di, ax ; We got the pointer
|
---|
1462 |
|
---|
1463 | ; So process Hide-Config. Read out Bitfield-Entries,
|
---|
1464 | ; each points to a partition.
|
---|
1465 | ; 3Fh is end-marker / maximum entries = CFG_Partitions
|
---|
1466 | mov cl, [CFG_Partitions]
|
---|
1467 | mov bx,di ; Pointer to hidden-parts entry for this partition.
|
---|
1468 | mov ch,0 ; Start index in hidden-parts entry for this partition.
|
---|
1469 | mov dh,6 ; Bitfields are 6 bits wide.
|
---|
1470 | PHSGHCAS_SpreadLoop:
|
---|
1471 | mov dl,ch ; Load bitfield index from CH.
|
---|
1472 | call CONV_GetBitfieldValue ; Get value of bitfield.
|
---|
1473 | mov dl,al ; Partition index in DL.
|
---|
1474 | ;~ mov dl, [di]
|
---|
1475 | ;~ inc di
|
---|
1476 | ;~ cmp dl, 0FFh
|
---|
1477 | cmp dl,3fh ; Max value for 6-bits field.
|
---|
1478 | je PHSGHCAS_EndOfEntries
|
---|
1479 | call PART_GetPartitionPointer ; Pointer for partition DL to SI
|
---|
1480 | mov al, [si+LocIPT_Flags]
|
---|
1481 | or al, Flags_SpecialMarker ; Set marker
|
---|
1482 | mov [si+LocIPT_Flags], al
|
---|
1483 | inc ch ; Next bitfield.
|
---|
1484 | dec cl
|
---|
1485 | jnz PHSGHCAS_SpreadLoop
|
---|
1486 | PHSGHCAS_EndOfEntries:
|
---|
1487 | ret
|
---|
1488 | PARTHIDESETUP_GetHideConfigAndSpread EndP
|
---|
1489 |
|
---|
1490 |
|
---|
1491 | ;
|
---|
1492 | ; Rousseau: Adjusted for packed hidden-part-table !
|
---|
1493 | ; Needs to be re-written.
|
---|
1494 | ;
|
---|
1495 | ; This is called by MBRS_PS_HiddenSetup
|
---|
1496 | ; In: DL - Partition, where to save Hide-Config
|
---|
1497 | ; Destroyed: None, but Locate-Pointer
|
---|
1498 | PARTHIDESETUP_CollectHideConfigAndPutToTable Proc Near Uses ax si es di
|
---|
1499 | ; First calculate, where to put Hide-Config
|
---|
1500 | ;~ mov ax, LocIPT_MaxPartitions
|
---|
1501 | mov ax, LocHPT_LenOfHPT ; Length of an HPT-entry.
|
---|
1502 | mul dl ; Partition to store info for.
|
---|
1503 | push cs
|
---|
1504 | pop es
|
---|
1505 | mov di, offset HidePartitionTable ; Packed hideparttable.
|
---|
1506 | add di, ax ; We got the pointer in DI.
|
---|
1507 |
|
---|
1508 | ;~ push di
|
---|
1509 |
|
---|
1510 | ; Fill hide-part-table entry with 'unused' marker.
|
---|
1511 | ; Note that the entry is actually an array of 45 6-bit bitfields.
|
---|
1512 | ; Below fills 34 bytes = 45 6-bit bitfields.
|
---|
1513 | push di
|
---|
1514 | mov cx, LocHPT_LenOfHPT
|
---|
1515 | mov al, 0FFh
|
---|
1516 | rep stosb ; Fill up with FFh
|
---|
1517 | pop di
|
---|
1518 |
|
---|
1519 | ;~ mov bp,di
|
---|
1520 |
|
---|
1521 | ; Now walk through the IPT collecting all SpecialMarkers.
|
---|
1522 | ; For each do a bitfield-entry containing the number of the partition.
|
---|
1523 | mov si, offset PartitionTable
|
---|
1524 | xor ch, ch ; Partition index
|
---|
1525 | mov cl, [CFG_Partitions] ; Nr. of partitions in IPT
|
---|
1526 | mov ah,0 ; Next hide-index to write.
|
---|
1527 |
|
---|
1528 | ;
|
---|
1529 | ; Collect all partitions that have the special marker set.
|
---|
1530 | ; This marker was set by toggling the hide/unhide option in the setup menu.
|
---|
1531 | ;
|
---|
1532 | PHSCHCAPTT_CollectLoop:
|
---|
1533 |
|
---|
1534 | ; Get marker and test it.
|
---|
1535 | mov bl, [si+LocIPT_Flags]
|
---|
1536 | test bl, Flags_SpecialMarker
|
---|
1537 |
|
---|
1538 | ; No marker.
|
---|
1539 | jz PHSCHCAPTT_NoMarker
|
---|
1540 |
|
---|
1541 | ; Setup stuff for bitfield operation.
|
---|
1542 | push dx ; Save partition pointer.
|
---|
1543 | push bx ; Save marker.
|
---|
1544 | mov bx,di ; Get pointer to HPT-entry.
|
---|
1545 | mov dl,ah ; Index in entry.
|
---|
1546 | mov dh,6 ; Bitfield width.
|
---|
1547 | push ax ; Save index.
|
---|
1548 | mov al,ch ; Partition index to store.
|
---|
1549 |
|
---|
1550 |
|
---|
1551 | IFDEF AUX_DEBUG
|
---|
1552 | ;~ pushf
|
---|
1553 | ;~ pusha
|
---|
1554 | ;~ push ax
|
---|
1555 | ;~ mov al,dl
|
---|
1556 | ;~ call AuxIO_TeletypeHexByte
|
---|
1557 | ;~ mov al,':'
|
---|
1558 | ;~ call AuxIO_Teletype
|
---|
1559 | ;~ mov ax,bx
|
---|
1560 | ;~ call AuxIO_TeletypeHexWord
|
---|
1561 | ;~ mov al,':'
|
---|
1562 | ;~ call AuxIO_Teletype
|
---|
1563 | ;~ mov ax,bp
|
---|
1564 | ;~ call AuxIO_TeletypeHexWord
|
---|
1565 | ;~ mov al,':'
|
---|
1566 | ;~ call AuxIO_Teletype
|
---|
1567 | ;~ mov ax,sp
|
---|
1568 | ;~ call AuxIO_TeletypeHexWord
|
---|
1569 | ;~ mov al,':'
|
---|
1570 | ;~ call AuxIO_Teletype
|
---|
1571 | ;~ pop ax
|
---|
1572 | ;~ call AuxIO_TeletypeHexByte
|
---|
1573 | ;~ call AuxIO_TeletypeNL
|
---|
1574 | ;~ popa
|
---|
1575 | ;~ popf
|
---|
1576 | ENDIF
|
---|
1577 |
|
---|
1578 | call CONV_SetBitfieldValue ; Store bitfield.
|
---|
1579 | pop ax ; Restore index.
|
---|
1580 | pop bx ; Restore marker.
|
---|
1581 | pop dx ; Restore partition pointer.
|
---|
1582 |
|
---|
1583 | inc ah ; Advance to next index.
|
---|
1584 |
|
---|
1585 | ;~ mov ds:[di], ch ; Write byte-Entry
|
---|
1586 | ;~ inc di
|
---|
1587 | xor bl, Flags_SpecialMarker ; Reset Flag
|
---|
1588 | mov [si+LocIPT_Flags], bl ; Store it in IPT
|
---|
1589 |
|
---|
1590 |
|
---|
1591 | PHSCHCAPTT_NoMarker:
|
---|
1592 | add si, LocIPT_LenOfIPT ; Advance to next partition in IPT.
|
---|
1593 | inc ch ; Next partition-index.
|
---|
1594 | dec cl ; Decrement partitions to process.
|
---|
1595 | jnz PHSCHCAPTT_CollectLoop ; Are we done yet ?
|
---|
1596 |
|
---|
1597 | ;~ pop si ; Original Hide-Config Pointer -> SI
|
---|
1598 | ; Now check, if we have written anything
|
---|
1599 | ;~ cmp si, di
|
---|
1600 | test ah,ah ; See if we had to store anything.
|
---|
1601 | jne PHSCHCAPTT_SomethingToHide ; Yep, go to write end-marker.
|
---|
1602 |
|
---|
1603 | ; Nothing to hide...so UNSET the Hidden-Feature Flag
|
---|
1604 | call PART_GetPartitionPointer ; Use DL to get part-pointer in SI.
|
---|
1605 | mov al, [si+LocIPT_Flags] ; Get flags.
|
---|
1606 | mov ah, Flags_HideFeature ; Hide mask.
|
---|
1607 | not ah ; Complement.
|
---|
1608 | and al, ah ; Clear hide-flag.
|
---|
1609 | mov [si+LocIPT_Flags], al ; Store it.
|
---|
1610 | ;~ pop bp
|
---|
1611 | ret ; Return to caller.
|
---|
1612 |
|
---|
1613 | PHSCHCAPTT_SomethingToHide:
|
---|
1614 | cmp ah, LocIPT_MaxPartitions ; See if index is at end.
|
---|
1615 | jae PHSCHCAPTT_AllUsed ; Yep, no need to store end-marker.
|
---|
1616 |
|
---|
1617 | ; Write end-marker.
|
---|
1618 | push dx ; Save partition pointer.
|
---|
1619 | mov al,3fh ; End marker (6-bit)
|
---|
1620 | mov dl,ah ; Index in HPT-entry.
|
---|
1621 | mov dh,6 ; Bitfield width.
|
---|
1622 | mov bx,di ; Get pointer to HPT-entry.
|
---|
1623 | call CONV_SetBitfieldValue ; Store end-marker.
|
---|
1624 | pop dx ; Restore partition pointer.
|
---|
1625 |
|
---|
1626 | ;~ mov ax, si
|
---|
1627 | ;~ add ax, LocIPT_MaxPartitions
|
---|
1628 | ;~ cmp di, ax
|
---|
1629 | ;~ jae PHSCHCAPTT_AllUsed
|
---|
1630 | ; Set END-marker
|
---|
1631 | ;~ mov al, 0FFh
|
---|
1632 | ;~ stosb ; Write byte-Entry
|
---|
1633 | PHSCHCAPTT_AllUsed:
|
---|
1634 |
|
---|
1635 | ; Something to hide...so SET the Hidden-Feature Flag
|
---|
1636 | call PART_GetPartitionPointer ; Use DL to get part-pointer in SI.
|
---|
1637 | mov al, [si+LocIPT_Flags] ; Get flags.
|
---|
1638 | or al, Flags_HideFeature ; Set hide-flag.
|
---|
1639 | mov [si+LocIPT_Flags], al ; Store it.
|
---|
1640 | ;~ pop bp
|
---|
1641 | ret ; Return to caller.
|
---|
1642 | PARTHIDESETUP_CollectHideConfigAndPutToTable EndP
|
---|
1643 |
|
---|
1644 | ; =============================================================================
|
---|
1645 |
|
---|
1646 | ; This is called from MBRS_Routines_PartitionSetup
|
---|
1647 | ; In: DL - Partition to LogicalDriveLetter-Setup
|
---|
1648 | ; Destroyed: ax
|
---|
1649 | PARTSETUP_DriveLetterSetup Proc Near Uses dx si es di
|
---|
1650 | call PART_GetPartitionPointer ; Gets the PartitionPointer for DL in SI
|
---|
1651 | ; SystemID must support DriveLetter feature (FAT16, HPFS, JFS)
|
---|
1652 | mov al, bptr [si+LocIPT_SystemID]
|
---|
1653 | push si
|
---|
1654 | call PART_SearchFileSysName
|
---|
1655 | pop si
|
---|
1656 | test ah, FileSysFlags_DriveLetter
|
---|
1657 | jnz PSDLS_GotLDLP
|
---|
1658 |
|
---|
1659 | ; Drive-Letter feature only possible on HPFS/FAT16 (OS/2) systems
|
---|
1660 | mov cx, 0C04h
|
---|
1661 | mov si, offset TXT_SETUP_NoLDLpartition
|
---|
1662 | call SETUP_ShowErrorBox
|
---|
1663 | ret
|
---|
1664 |
|
---|
1665 | PSDLS_GotLDLP:
|
---|
1666 | ; First build up menu and display current setting...
|
---|
1667 | call PARTSETUPDL_DrawMenuBase ; DL - partition-no
|
---|
1668 |
|
---|
1669 | ; Now get the Logical-Drive-Letter for that partition...
|
---|
1670 | ;movzx bx, dl
|
---|
1671 | mov bl,dl
|
---|
1672 | mov bh,0
|
---|
1673 |
|
---|
1674 | mov dl, byte ptr [DriveLetters+bx]
|
---|
1675 |
|
---|
1676 | push bx
|
---|
1677 | ; DS:SI - IPT Entry of Partition, DL - LogicalDriveLetter
|
---|
1678 | call PARTSETUPDL_DrawDriveLetter
|
---|
1679 |
|
---|
1680 | ; Now we got everything on-the-screen
|
---|
1681 | PSDLS_MainLoop:
|
---|
1682 | mov ah, 0
|
---|
1683 | int 16h
|
---|
1684 | cmp ah, Keys_Backspace
|
---|
1685 | je PSDLS_BackSpace
|
---|
1686 | cmp ah, Keys_Up
|
---|
1687 | je PSDLS_KeyUp
|
---|
1688 | cmp ah, Keys_Down
|
---|
1689 | je PSDLS_KeyDown
|
---|
1690 | cmp ah, Keys_ESC
|
---|
1691 | je PSDLS_KeyDONE
|
---|
1692 | cmp ah, Keys_ENTER
|
---|
1693 | je PSDLS_KeyDONE
|
---|
1694 | ; Direct-Letter-Input
|
---|
1695 | or al, 20h ; Lower-Case Input
|
---|
1696 | cmp al, 'c'
|
---|
1697 | jb PSDLS_MainLoop
|
---|
1698 | cmp al, 'z'
|
---|
1699 | ja PSDLS_MainLoop
|
---|
1700 | mov dl, al
|
---|
1701 | add dl, 1Dh ; -> Convert to used logic
|
---|
1702 | call PARTSETUPDL_DrawDriveLetter
|
---|
1703 | jmp PSDLS_MainLoop
|
---|
1704 |
|
---|
1705 |
|
---|
1706 | ; Clear drive-letter with backspace
|
---|
1707 | PSDLS_BackSpace:
|
---|
1708 | xor dl,dl
|
---|
1709 | call PARTSETUPDL_DrawDriveLetter
|
---|
1710 | jmp PSDLS_MainLoop
|
---|
1711 |
|
---|
1712 | PSDLS_KeyUp:
|
---|
1713 | dec dl
|
---|
1714 | cmp dl, 7Fh
|
---|
1715 | jne PSDLS_KeyUpFix1
|
---|
1716 | xor dl, dl
|
---|
1717 | PSDLS_KeyUpFix1:
|
---|
1718 | cmp dl, 97h
|
---|
1719 | jbe PSDLS_KeyUpFix2
|
---|
1720 | mov dl, 97h
|
---|
1721 | PSDLS_KeyUpFix2:
|
---|
1722 | call PARTSETUPDL_DrawDriveLetter
|
---|
1723 | jmp PSDLS_MainLoop
|
---|
1724 |
|
---|
1725 | PSDLS_KeyDown:
|
---|
1726 | inc dl
|
---|
1727 | cmp dl, 97h
|
---|
1728 | jbe PSDLS_KeyDownFix1
|
---|
1729 | xor dl, dl
|
---|
1730 | PSDLS_KeyDownFix1:
|
---|
1731 | cmp dl, 01h
|
---|
1732 | jne PSDLS_KeyDownFix2
|
---|
1733 | mov dl, 80h
|
---|
1734 | PSDLS_KeyDownFix2:
|
---|
1735 | call PARTSETUPDL_DrawDriveLetter
|
---|
1736 | jmp PSDLS_MainLoop
|
---|
1737 |
|
---|
1738 |
|
---|
1739 | PSDLS_KeyDONE:
|
---|
1740 | ; Write Drive-Letter into DriveLetter-Table
|
---|
1741 | pop bx
|
---|
1742 | mov bptr [DriveLetters+bx], dl
|
---|
1743 | mov al, ds:[si+LocIPT_Flags]
|
---|
1744 | mov ah, Flags_DriveLetter
|
---|
1745 | not ah
|
---|
1746 | and al, ah
|
---|
1747 | or dl, dl
|
---|
1748 | jz PSDLS_NoFlag
|
---|
1749 | or al, Flags_DriveLetter
|
---|
1750 | PSDLS_NoFlag:
|
---|
1751 | mov ds:[si+LocIPT_Flags], al
|
---|
1752 | ret
|
---|
1753 | PARTSETUP_DriveLetterSetup EndP
|
---|
1754 |
|
---|
1755 | ; Draw all standard-things for DriveLetterSetup, dynamic content not included.
|
---|
1756 | PARTSETUPDL_DrawMenuBase Proc Near Uses dx si
|
---|
1757 | ; Calculate Position of Window.
|
---|
1758 | ; If Partition Selected Left-Side -> go Right-Sided Window
|
---|
1759 | ; otherwise Left-Sided.
|
---|
1760 | mov PartSetup_ActivePart, dl
|
---|
1761 | mov al, 8 ; X-Pos = 8
|
---|
1762 | and dl, 1
|
---|
1763 | jnz PSDLDMB_FirstStep
|
---|
1764 | mov al, 30h ; X-Pos = 48
|
---|
1765 | PSDLDMB_FirstStep:
|
---|
1766 | mov PartSetup_HiddenX, al
|
---|
1767 |
|
---|
1768 |
|
---|
1769 |
|
---|
1770 | ; Draw base-window
|
---|
1771 | CLR_PART_DL_XX_CLASSIC = 0d05h
|
---|
1772 | CLR_PART_DL_XX_BM = 0a02h
|
---|
1773 | CLR_PART_DL_XX_TB = 0a02h
|
---|
1774 | IFDEF TESTBUILD
|
---|
1775 | CLR_PART_DL_XX = CLR_PART_DL_XX_TB
|
---|
1776 | ELSE
|
---|
1777 | CLR_PART_DL_XX = CLR_PART_DL_XX_BM
|
---|
1778 | ENDIF
|
---|
1779 |
|
---|
1780 | mov cx, CLR_PART_DL_XX ; Lila on lila
|
---|
1781 | call VideoIO_Color
|
---|
1782 | mov bh, 06h
|
---|
1783 | mov bl, [PartSetup_HiddenX]
|
---|
1784 | mov dh, 0Ah
|
---|
1785 | mov dl, bl
|
---|
1786 | add dl, 16h
|
---|
1787 | push bx
|
---|
1788 | call VideoIO_MakeWindow
|
---|
1789 | pop bx
|
---|
1790 | ; Make Window-Header
|
---|
1791 | inc bl
|
---|
1792 | push bx
|
---|
1793 | mov cx, bx
|
---|
1794 | call VideoIO_Locate
|
---|
1795 | mov al, TextChar_WinRep4
|
---|
1796 | call VideoIO_PrintSingleChar
|
---|
1797 |
|
---|
1798 |
|
---|
1799 |
|
---|
1800 | CLR_PART_DL_WINDOW_TITLE_CLASSIC = 0e05h
|
---|
1801 | CLR_PART_DL_WINDOW_TITLE_BM = 0e02h
|
---|
1802 | CLR_PART_DL_WINDOW_TITLE_TB = 0e02h
|
---|
1803 | IFDEF TESTBUILD
|
---|
1804 | CLR_PART_DL_WINDOW_TITLE = CLR_PART_DL_WINDOW_TITLE_TB
|
---|
1805 | ELSE
|
---|
1806 | CLR_PART_DL_WINDOW_TITLE = CLR_PART_DL_WINDOW_TITLE_BM
|
---|
1807 | ENDIF
|
---|
1808 |
|
---|
1809 | mov cx, CLR_PART_DL_WINDOW_TITLE ; Yellow on Lila
|
---|
1810 | call VideoIO_Color
|
---|
1811 | mov si, offset TXT_SETUP_DriveLetter
|
---|
1812 | call VideoIO_Print
|
---|
1813 |
|
---|
1814 |
|
---|
1815 |
|
---|
1816 | CLR_PART_DL_WINDOW_BORDER2_CLASSIC = 0d05h
|
---|
1817 | CLR_PART_DL_WINDOW_BORDER2_BM = 0a02h
|
---|
1818 | CLR_PART_DL_WINDOW_BORDER2_TB = 0a02h
|
---|
1819 | IFDEF TESTBUILD
|
---|
1820 | CLR_PART_DL_WINDOW_BORDER2 = CLR_PART_DL_WINDOW_BORDER2_TB
|
---|
1821 | ELSE
|
---|
1822 | CLR_PART_DL_WINDOW_BORDER2 = CLR_PART_DL_WINDOW_BORDER2_BM
|
---|
1823 | ENDIF
|
---|
1824 |
|
---|
1825 | mov cx, CLR_PART_DL_WINDOW_BORDER2 ; Lila on lila
|
---|
1826 | call VideoIO_Color
|
---|
1827 | mov al, 0c6h
|
---|
1828 | call VideoIO_PrintSingleChar
|
---|
1829 | pop bx
|
---|
1830 | ; Display help-information
|
---|
1831 | mov si, offset TXT_SETUPHELP_DriveLetter
|
---|
1832 |
|
---|
1833 |
|
---|
1834 |
|
---|
1835 | CLR_PART_DL_SETUP_HELP_CLASSIC = 0d05h
|
---|
1836 | CLR_PART_DL_SETUP_HELP_BM = 0a02h
|
---|
1837 | CLR_PART_DL_SETUP_HELP_TB = 0a02h
|
---|
1838 | IFDEF TESTBUILD
|
---|
1839 | CLR_PART_DL_SETUP_HELP = CLR_PART_DL_SETUP_HELP_TB
|
---|
1840 | ELSE
|
---|
1841 | CLR_PART_DL_SETUP_HELP = CLR_PART_DL_SETUP_HELP_BM
|
---|
1842 | ENDIF
|
---|
1843 |
|
---|
1844 | mov cx, CLR_PART_DL_SETUP_HELP ; Lila on lila
|
---|
1845 | call VideoIO_Color
|
---|
1846 |
|
---|
1847 | call GetLenOfString ; CX - Len of string
|
---|
1848 | mov dx, cx
|
---|
1849 | mov cx, bx
|
---|
1850 | add cx, 0413h
|
---|
1851 | sub cl, dl
|
---|
1852 | call VideoIO_Locate
|
---|
1853 | mov al, '<'
|
---|
1854 | call VideoIO_PrintSingleChar
|
---|
1855 | call VideoIO_Print
|
---|
1856 | mov al, '>'
|
---|
1857 | call VideoIO_PrintSingleChar
|
---|
1858 | ;
|
---|
1859 | mov cx, 0F01h ; Bright White on Blue
|
---|
1860 | call VideoIO_Color
|
---|
1861 | mov cx, 0805h ; Position 8, 5
|
---|
1862 | add cl, PartSetup_HiddenX
|
---|
1863 | call VideoIO_Locate
|
---|
1864 | mov al, ' '
|
---|
1865 | mov cl, 12
|
---|
1866 | call VideoIO_PrintSingleMultiChar
|
---|
1867 | ret
|
---|
1868 | PARTSETUPDL_DrawMenuBase EndP
|
---|
1869 |
|
---|
1870 | ; Writes Logical Drive-Letter to Screen (Logical-Drive-Letter-Setup)
|
---|
1871 | ; In: DL - Logical Drive-Letter Byte
|
---|
1872 | ; Destroyed: None
|
---|
1873 | PARTSETUPDL_DrawDriveLetter Proc Near Uses si
|
---|
1874 | ; 00h -> standard drive letter
|
---|
1875 | ; 80h -> use C: as drive letter
|
---|
1876 | ; 97h -> use Z: as drive letter
|
---|
1877 | push dx
|
---|
1878 | mov cx, 0805h ; Position 8, 5
|
---|
1879 | add cl, [PartSetup_HiddenX]
|
---|
1880 | call VideoIO_Locate
|
---|
1881 | add cl, 6 ; Everything centered (12/2)
|
---|
1882 | push cx
|
---|
1883 | mov al, ' '
|
---|
1884 | mov cl, 12
|
---|
1885 | call VideoIO_PrintSingleMultiChar ; Fill up area with spaces
|
---|
1886 |
|
---|
1887 | or dl, dl
|
---|
1888 | jnz PSDLDDL_Letter
|
---|
1889 | mov si, offset TXT_SETUP_MAGIC_Disabled
|
---|
1890 | call GetLenOfString
|
---|
1891 | mov dx, cx
|
---|
1892 | pop cx
|
---|
1893 | call VideoIO_LocateToCenter ; LocateToCenter using TotalLen
|
---|
1894 | call VideoIO_Print
|
---|
1895 | pop dx
|
---|
1896 | ret
|
---|
1897 |
|
---|
1898 | PSDLDDL_Letter:
|
---|
1899 | mov si, offset TXT_SETUP_MAGIC_Set
|
---|
1900 | call GetLenOfString
|
---|
1901 | mov dx, cx
|
---|
1902 | add dx, 2
|
---|
1903 | pop cx
|
---|
1904 | call VideoIO_LocateToCenter ; LocateToCenter using TotalLen
|
---|
1905 | call VideoIO_Print
|
---|
1906 | pop dx
|
---|
1907 | mov al, dl
|
---|
1908 | sub al, 3Dh
|
---|
1909 | call VideoIO_PrintSingleChar
|
---|
1910 | mov al, ':'
|
---|
1911 | call VideoIO_PrintSingleChar
|
---|
1912 | ret
|
---|
1913 | PARTSETUPDL_DrawDriveLetter EndP
|
---|