Rev 5632 | Rev 5854 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 5632 | Rev 5849 | ||
---|---|---|---|
Line 1... | Line 1... | ||
1 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
1 | ;;;;;;;;;;;;;;;;;;;;;;; |
2 | ;; ;; |
- | |
3 | ;; DEVICE SETUP ;; |
2 | ;; SYSTEM SETTINGS ;; |
4 | ;; ;; |
- | |
5 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
3 | ;;;;;;;;;;;;;;;;;;;;;;; |
6 | ; version: 1.17 |
- | |
7 | ; last update: 30/07/2015 |
- | |
8 | ; changed by: Kiril Lipatov, aka Leency |
- | |
9 | ; changes: Mouse speed and mouse delay options moved to mouse_cfg |
- | |
10 | ;--------------------------------------------------------------------- |
- | |
11 | ; version: 1.16 |
- | |
12 | ; last update: 12/04/2014 |
- | |
13 | ; changed by: Yurii Shevtsov, aka gtament |
- | |
14 | ; changes: Fixed junk draw at the bottom of window |
- | |
15 | ;--------------------------------------------------------------------- |
- | |
16 | ; version: 1.15 |
- | |
17 | ; last update: 20/04/2012 |
- | |
18 | ; changed by: Marat Zakiyanov aka Mario79, aka Mario |
- | |
19 | ; changes: Add the flag of speaker mute. |
- | |
20 | ; Correcting setup.dat |
- | |
21 | ;--------------------------------------------------------------------- |
- | |
22 | ; version: 1.14 |
- | |
23 | ; last update: 20/03/2012 |
- | |
24 | ; changed by: Marat Zakiyanov aka Mario79, aka Mario |
- | |
25 | ; changes: optimisations and code refactoring |
- | |
26 | ;--------------------------------------------------------------------- |
- | |
27 | ; Authors: Ville - original version |
- | |
28 | ; A. Ivushkin - autostart (w launcher) |
- | |
29 | ; M. Lisovin - added many feauters (apply all, save all, set time...) |
- | |
30 | ; I. Poddubny - fixed russian keymap |
- | |
31 | ;14/08/06 Mario79 - added regulation of mouse features |
- | |
32 | ;------------------------------------------------------------------------------- |
- | |
33 | format binary as "" |
- | |
Line -... | Line 4... | ||
- | 4 | ||
34 | 5 | format binary as "" |
|
35 | use32 |
6 | use32 |
- | 7 | org 0 |
|
- | 8 | ||
- | 9 | db 'MENUET01' |
|
- | 10 | dd 1 |
|
- | 11 | dd START |
|
- | 12 | dd IM_END |
|
- | 13 | dd I_END |
|
- | 14 | dd stack_area |
|
- | 15 | dd boot_param |
|
Line 36... | Line -... | ||
36 | org 0x0 |
- | |
37 | - | ||
38 | db 'MENUET01' ; 8 byte identifier |
- | |
39 | dd 0x01 ; header version |
- | |
40 | dd START ; pointer to program start |
- | |
41 | dd IM_END ; size of image |
- | |
42 | dd I_END ; reguired amount of memory |
- | |
43 | dd stack_area ; stack pointer (esp) |
- | |
44 | dd boot_param ; boot parameters |
- | |
45 | dd 0x0 ; path |
16 | dd 0 |
46 | ;------------------------------------------------------------------------------- |
- | |
47 | include '../../../macros.inc' |
- | |
48 | ;------------------------------------------------------------------------------- |
- | |
49 | LLL equ (56+3) |
17 | |
50 | BBB equ 25 |
- | |
51 | ;------------------------------------------------------------------------------- |
- | |
52 | apply_all: |
- | |
53 | call _pci_acc ;12 |
- | |
54 | call _syslang ;5 |
- | |
55 | call _keyboard ;2 |
- | |
56 | call _speaker_mute |
- | |
57 | ret |
- | |
58 | ;------------------------------------------------------------------------------- |
- | |
59 | apply_all_and_exit: |
- | |
60 | mcall 70,read_fileinfo |
- | |
61 | call apply_all |
- | |
62 | jmp close |
18 | include '../../../macros.inc' |
63 | ;------------------------------------------------------------------------------- |
19 | ;--------------------------------------------------------------- |
64 | set_language_and_exit: |
20 | set_language_and_exit: |
65 | mcall 26,2,9 |
21 | mcall 26,2,9 |
66 | cmp eax,1 |
- | |
67 | je russian |
22 | cmp eax,1 |
68 | - | ||
69 | xor eax,eax |
23 | je russian |
70 | ;-------------------------------------- |
24 | xor eax,eax |
71 | set_lang_now: |
25 | @@: |
72 | mov [keyboard],eax |
26 | mov [keyboard],eax |
73 | call _keyboard |
- | |
74 | jmp close |
27 | call _keyboard |
75 | ;-------------------------------------- |
28 | jmp close |
76 | russian: |
29 | russian: |
77 | mov eax,3 |
30 | mov eax,3 |
78 | jmp set_lang_now |
31 | jmp @b |
79 | ;------------------------------------------------------------------------------- |
32 | ;--------------------------------------------------------------- |
80 | set_syslanguage_and_exit: |
33 | set_syslanguage_and_exit: |
81 | mcall 26,5 |
34 | mcall 26,5 |
82 | cmp eax,6 |
35 | cmp eax,6 |
83 | jne temp |
- | |
84 | xor eax,eax |
36 | jne @f |
85 | ;-------------------------------------- |
37 | xor eax,eax |
86 | temp: |
38 | @@: |
87 | inc eax |
39 | inc eax |
88 | mov [syslang],eax |
40 | mov [syslang],eax |
89 | call _syslang |
41 | call _syslang |
90 | jmp close |
42 | jmp close |
- | 43 | ;--------------------------------------------------------------- |
|
91 | ;------------------------------------------------------------------------------- |
44 | apply_all_and_exit: |
- | 45 | mov byte[fileinfo],0 |
|
92 | get_setup_values: |
46 | mcall 70,fileinfo |
- | 47 | call apply_all |
|
- | 48 | jmp close |
|
- | 49 | ;--------------------------------------------------------------- |
|
- | 50 | apply_all: |
|
- | 51 | call fontApply |
|
- | 52 | call _syslang |
|
- | 53 | call _lba_read |
|
93 | mcall 26,2,9 |
54 | call _pci_acc |
94 | dec eax |
55 | call _speaker_mute |
- | 56 | call _keyboard |
|
95 | mov [keyboard],eax |
57 | ret |
96 | 58 | ;--------------------------------------------------------------- |
|
97 | mcall 26,5 |
- | |
98 | mov [syslang],eax |
59 | _syslang: |
- | 60 | mcall 21,5,[syslang] |
|
- | 61 | jmp loadtxt |
|
99 | 62 | ;--------------------------------------------------------------- |
|
100 | mcall 26,11 |
63 | _lba_read: |
- | 64 | mcall 21,11,[lba_read] |
|
101 | mov [lba_read],eax |
65 | ret |
102 | 66 | ;--------------------------------------------------------------- |
|
- | 67 | _pci_acc: |
|
- | 68 | mcall 21,12,[pci_acc] |
|
- | 69 | ret |
|
- | 70 | ;--------------------------------------------------------------- |
|
103 | mcall 26,12 |
71 | fontApply: |
- | 72 | mcall 48,10,[fontSmoothing] |
|
- | 73 | ret |
|
104 | mov [pci_acc],eax |
74 | ;--------------------------------------------------------------- |
105 | 75 | _speaker_mute: |
|
- | 76 | mcall 18,8,1 |
|
- | 77 | cmp [speaker_mute],eax |
|
- | 78 | je @f |
|
- | 79 | inc ecx |
|
- | 80 | mcall 18 |
|
- | 81 | @@: |
|
- | 82 | ret |
|
- | 83 | ;--------------------------------------------------------------- |
|
- | 84 | _keyboard: |
|
- | 85 | mov ebp,[keyboard] |
|
- | 86 | mov edx,[ebp*4+keymapTab] |
|
- | 87 | mcall 21,2,1 |
|
- | 88 | inc ecx |
|
- | 89 | mov edx,[ebp*4+shiftKeymapTab] |
|
- | 90 | mcall 21 |
|
- | 91 | inc ecx |
|
- | 92 | mov edx,[ebp*4+altKeymapTab] |
|
- | 93 | mcall 21 |
|
- | 94 | mov edx,ebp |
|
- | 95 | inc edx |
|
106 | mcall 18,8,1 |
96 | mov cl, 9 |
107 | mov [speaker_mute],eax |
97 | mcall 21 |
108 | ret |
98 | ret |
109 | ;------------------------------------------------------------------------------- |
99 | ;--------------------------------------------------------------- |
110 | START: |
100 | START: |
111 | mov eax,boot_param |
101 | mov eax,boot_param |
Line 112... | Line 102... | ||
112 | cmp [eax],dword 'SLAN' |
102 | cmp [eax],dword 'SLAN' |
113 | je set_syslanguage_and_exit |
103 | je set_syslanguage_and_exit |
Line 114... | Line 104... | ||
114 | 104 | ||
115 | cmp [eax],dword 'LANG' |
105 | cmp [eax],dword 'LANG' |
116 | je set_language_and_exit |
- | |
117 | 106 | je set_language_and_exit |
|
118 | cmp [eax],dword 'BOOT' |
- | |
119 | je apply_all_and_exit |
- | |
120 | - | ||
121 | call get_setup_values |
- | |
122 | call loadtxt |
- | |
123 | call draw_infotext |
- | |
124 | ;------------------------------------------------------------------------------- |
- | |
125 | red: |
- | |
126 | call draw_window |
- | |
127 | ;------------------------------------------------------------------------------- |
- | |
128 | still: |
- | |
129 | sysevent: |
- | |
130 | mcall 23,8 ; wait here for event with timeout |
- | |
131 | cmp eax,1 |
- | |
132 | jz red |
- | |
133 | - | ||
134 | cmp eax,2 |
- | |
135 | jz key |
- | |
136 | - | ||
137 | cmp eax,3 |
- | |
138 | jz button |
- | |
139 | 107 | ||
140 | jmp still |
- | |
141 | ;------------------------------------------------------------------------------- |
- | |
142 | key: |
- | |
143 | mcall 2 |
- | |
144 | jmp still |
- | |
145 | ;------------------------------------------------------------------------------- |
- | |
146 | button: |
- | |
147 | mcall 17 |
- | |
148 | cmp ah,99 |
- | |
149 | jne nosaveall |
- | |
150 | mcall 70,save_fileinfo |
- | |
151 | jmp still |
- | |
152 | ;-------------------------------------- |
- | |
153 | nosaveall: |
- | |
154 | cmp ah,100 |
- | |
155 | jne no_apply_all |
- | |
156 | call apply_all |
- | |
157 | jmp still |
- | |
158 | ;-------------------------------------- |
- | |
159 | no_apply_all: |
- | |
160 | cmp ah,1 ; CLOSE APPLICATION |
- | |
161 | jne no_close |
- | |
162 | ;-------------------------------------- |
- | |
163 | close: |
- | |
164 | or eax,-1 |
- | |
165 | mcall |
- | |
166 | ;-------------------------------------- |
- | |
167 | no_close: |
- | |
168 | cmp ah,4 ; SET KEYBOARD |
- | |
169 | jnz nokm |
108 | cmp [eax],dword 'BOOT' |
170 | mov eax,[keyboard] |
- | |
171 | test eax,eax |
- | |
172 | je downuplbl |
- | |
173 | dec eax |
- | |
174 | jmp nodownup |
- | |
175 | ;-------------------------------------- |
- | |
176 | downuplbl: |
- | |
177 | mov eax,7 |
- | |
178 | ;-------------------------------------- |
- | |
179 | nodownup: |
- | |
180 | mov [keyboard],eax |
- | |
181 | call draw_infotext |
- | |
182 | ;-------------------------------------- |
- | |
183 | nokm: |
- | |
184 | cmp ah,5 |
- | |
185 | jnz nokp |
- | |
186 | mov eax,[keyboard] |
- | |
187 | cmp eax,7 |
- | |
188 | je updownlbl |
- | |
189 | inc eax |
- | |
190 | jmp noupdown |
- | |
191 | ;-------------------------------------- |
- | |
192 | updownlbl: |
109 | je apply_all_and_exit |
193 | xor eax,eax |
- | |
194 | ;-------------------------------------- |
- | |
195 | noupdown: |
- | |
196 | mov [keyboard],eax |
- | |
197 | call draw_infotext |
- | |
198 | ;-------------------------------------- |
- | |
199 | nokp: |
- | |
200 | cmp ah,92 ; SET LBA READ |
- | |
201 | jne no_lba_d |
- | |
202 | ;-------------------------------------- |
- | |
203 | slbal: |
- | |
204 | btc [lba_read],0 |
- | |
205 | call draw_infotext |
- | |
206 | jmp still |
- | |
207 | ;-------------------------------------- |
- | |
208 | no_lba_d: |
- | |
209 | cmp ah,93 |
- | |
210 | jne no_lba_i |
- | |
211 | jmp slbal |
- | |
212 | ;-------------------------------------- |
- | |
213 | no_lba_i: |
- | |
214 | cmp ah,91 |
- | |
215 | jne no_set_lba_read |
- | |
216 | call _lba_read |
- | |
217 | jmp still |
- | |
218 | ;-------------------------------------- |
- | |
219 | no_set_lba_read: |
- | |
220 | cmp ah,102 ; SET PCI ACCESS |
- | |
221 | jne no_pci_d |
- | |
222 | ;-------------------------------------- |
- | |
223 | pcip: |
- | |
224 | btc [pci_acc],0 |
- | |
225 | call draw_infotext |
- | |
226 | jmp still |
- | |
227 | ;-------------------------------------- |
- | |
228 | no_pci_d: |
- | |
229 | cmp ah,103 |
- | |
230 | jne no_pci_i |
- | |
231 | jmp pcip |
- | |
232 | ;-------------------------------------- |
- | |
233 | no_pci_i: |
- | |
234 | cmp ah,101 |
- | |
235 | jne no_set_pci_acc |
- | |
236 | call _pci_acc |
- | |
237 | jmp still |
- | |
238 | ;-------------------------------------- |
- | |
239 | no_set_pci_acc: |
- | |
240 | cmp ah,42 ; SET SYSTEM LANGUAGE BASE |
- | |
241 | jnz nosysm |
- | |
242 | mov eax,[syslang] |
- | |
243 | dec eax |
- | |
244 | jz still |
- | |
245 | mov [syslang],eax |
- | |
246 | call draw_infotext |
- | |
247 | ;-------------------------------------- |
- | |
248 | nosysm: |
- | |
249 | cmp ah,43 |
- | |
250 | jnz nosysp |
- | |
251 | mov eax,[syslang] |
- | |
252 | cmp eax,6 |
- | |
253 | je nosysp |
- | |
254 | inc eax |
- | |
255 | mov [syslang],eax |
- | |
256 | call draw_infotext |
- | |
257 | ;-------------------------------------- |
- | |
258 | nosysp: |
- | |
259 | cmp ah,41 |
- | |
260 | jnz nosyss |
- | |
261 | call _syslang |
- | |
262 | call cleantxt |
- | |
263 | call loadtxt |
- | |
264 | call draw_window |
- | |
265 | ;-------------------------------------- |
- | |
266 | nosyss: |
- | |
267 | ;-------------------------------------- |
- | |
268 | speakermute: |
- | |
269 | cmp ah,152 ; SET SPEAKER |
- | |
270 | jne no_speaker_d |
- | |
271 | ;-------------------------------------- |
- | |
272 | speaker_p: |
- | |
273 | btc [speaker_mute],0 |
- | |
274 | call draw_infotext |
- | |
275 | jmp still |
- | |
276 | ;-------------------------------------- |
- | |
277 | no_speaker_d: |
- | |
278 | cmp ah,153 |
- | |
279 | jne no_speaker_i |
- | |
280 | jmp speaker_p |
- | |
281 | ;-------------------------------------- |
- | |
282 | no_speaker_i: |
- | |
283 | cmp ah,151 |
- | |
284 | jne .noapply |
- | |
285 | call _speaker_mute |
- | |
286 | jmp still |
- | |
287 | ;-------------------------------------- |
- | |
288 | .noapply: |
- | |
289 | cmp ah,3 ; SET KEYMAP |
- | |
290 | jne still |
- | |
291 | call _keyboard |
- | |
292 | jmp still |
- | |
293 | ;------------------------------------------------------------------------------- |
- | |
294 | _keyboard: |
- | |
295 | cmp [keyboard],0 ; english |
- | |
296 | jnz nosetkeyle |
- | |
297 | - | ||
298 | mcall 21,2,1,en_keymap |
- | |
299 | - | ||
300 | inc ecx |
- | |
301 | mcall 21,,,en_keymap_shift |
- | |
302 | - | ||
303 | mcall 21,,9,1 |
- | |
304 | call alt_gen |
- | |
305 | ;-------------------------------------- |
- | |
306 | nosetkeyle: |
- | |
307 | cmp [keyboard],1 ; finnish |
- | |
308 | jnz nosetkeylfi |
- | |
309 | - | ||
310 | mcall 21,2,1,fi_keymap |
- | |
311 | - | ||
312 | inc ecx |
- | |
313 | mcall 21,,,fi_keymap_shift |
- | |
314 | - | ||
315 | mcall 21,,9,2 |
- | |
316 | call alt_gen |
- | |
317 | ;-------------------------------------- |
- | |
318 | nosetkeylfi: |
- | |
319 | cmp [keyboard],2 ; german |
- | |
320 | jnz nosetkeylge |
- | |
321 | - | ||
Line 322... | Line -... | ||
322 | mcall 21,2,1,ge_keymap |
- | |
323 | - | ||
324 | inc ecx |
- | |
325 | mcall 21,,,ge_keymap_shift |
- | |
326 | - | ||
327 | mcall 21,,9,3 |
- | |
328 | call alt_gen |
- | |
329 | ;-------------------------------------- |
- | |
330 | nosetkeylge: |
- | |
331 | cmp [keyboard],3 ; russian |
- | |
332 | jnz nosetkeylru |
- | |
333 | - | ||
334 | mcall 21,2,1,ru_keymap |
- | |
335 | - | ||
336 | inc ecx |
- | |
337 | mcall 21,,,ru_keymap_shift |
- | |
338 | - | ||
339 | mcall 21,,9,4 |
- | |
340 | call alt_gen |
- | |
341 | ;-------------------------------------- |
- | |
342 | nosetkeylru: |
- | |
343 | cmp [keyboard],4 ;french |
- | |
344 | jnz nosetkeylfr |
- | |
345 | - | ||
346 | mcall 21,2,1,fr_keymap |
- | |
347 | - | ||
348 | inc ecx |
- | |
349 | mcall 21,,,fr_keymap_shift |
110 | ; get current settings |
350 | - | ||
351 | inc ecx |
- | |
352 | mcall 21,,,fr_keymap_alt_gr |
- | |
353 | - | ||
354 | mcall 21,,9,5 |
- | |
355 | ;-------------------------------------- |
- | |
356 | nosetkeylfr: |
- | |
357 | cmp [keyboard],5 ; estonian |
- | |
358 | jnz nosetkeylet |
- | |
359 | - | ||
360 | mcall 21,2,1,et_keymap |
- | |
361 | - | ||
362 | inc ecx |
- | |
363 | mcall 21,,,et_keymap_shift |
- | |
364 | 111 | mcall 26,2,9 |
|
365 | mcall 21,,9,6 |
- | |
Line 366... | Line 112... | ||
366 | call alt_gen |
112 | dec eax |
- | 113 | mov [keyboard],eax |
|
Line 367... | Line 114... | ||
367 | ;-------------------------------------- |
114 | |
368 | nosetkeylet: |
115 | mcall 26,5 |
Line 369... | Line 116... | ||
369 | cmp [keyboard],6 ;belgian |
116 | mov [syslang],eax |
370 | jnz nosetkeylit |
117 | |
Line 371... | Line 118... | ||
371 | 118 | mcall 26,11 |
|
372 | mcall 21,2,1,be_keymap |
- | |
373 | - | ||
374 | inc ecx |
119 | mov [lba_read],eax |
375 | mcall 21,,,be_keymap_shift |
- | |
Line 376... | Line 120... | ||
376 | 120 | ||
Line -... | Line 121... | ||
- | 121 | mcall 26,12 |
|
- | 122 | mov [pci_acc],eax |
|
377 | inc ecx |
123 | |
378 | mcall 21,,,be_keymap_alt_gr |
124 | mcall 18,8,1 |
- | 125 | mov [speaker_mute],eax |
|
- | 126 | ||
- | 127 | mcall 48,9 |
|
Line -... | Line 128... | ||
- | 128 | mov [fontSmoothing],eax |
|
379 | 129 | ||
380 | mcall 21,,9,7 |
130 | call loadtxt |
- | 131 | ||
- | 132 | draw_infotext: |
|
- | 133 | mov eax,[syslang] |
|
Line -... | Line 134... | ||
- | 134 | mov edi,[text] |
|
381 | ;-------------------------------------- |
135 | lea esi,[eax*8+langs-8] |
382 | nosetkeylit: |
136 | add edi,28 |
Line 383... | Line -... | ||
383 | cmp [keyboard],7 ;italian |
- | |
384 | jnz nosetkeylbe |
- | |
385 | - | ||
386 | mcall 21,2,1,it_keymap |
- | |
387 | 137 | movsd |
|
388 | inc ecx |
- | |
389 | mcall 21,,,it_keymap_shift |
- | |
390 | - | ||
391 | inc ecx |
- | |
392 | mcall 21,,,it_keymap_alt_gr |
138 | movsd |
393 | 139 | ||
394 | mcall 21,,9,8 |
- | |
Line -... | Line 140... | ||
- | 140 | mov eax,[keyboard] |
|
395 | ;-------------------------------------- |
141 | add edi,LLL-8 |
396 | 142 | lea esi,[eax*8+langs] |
|
Line -... | Line 143... | ||
- | 143 | movsd |
|
- | 144 | movsd |
|
- | 145 | add edi,LLL-8 |
|
397 | nosetkeylbe: |
146 | |
- | 147 | mov eax,[lba_read] |
|
- | 148 | call onoff |
|
- | 149 | mov [edi],ebx |
|
- | 150 | ||
398 | ret |
151 | mov eax,[pci_acc] |
- | 152 | call onoff |
|
Line 399... | Line -... | ||
399 | ;------------------------------------------------------------------------------- |
- | |
400 | alt_gen: |
- | |
401 | mcall 21,,3,alt_general |
- | |
402 | ret |
- | |
403 | ;------------------------------------------------------------------------------- |
- | |
404 | draw_buttons: |
- | |
405 | pusha |
153 | mov [edi+LLL],ebx |
406 | shl ecx,16 |
- | |
407 | add ecx,12 |
154 | |
408 | mcall 8,<(350-57),(46+BBB)> |
- | |
- | 155 | mov eax,[speaker_mute] |
|
409 | 156 | call onoff |
|
- | 157 | mov [edi+LLL*2],ebx |
|
- | 158 | ||
- | 159 | mov ebx,'SUBP' |
|
- | 160 | mov ecx,'IXEL' |
|
- | 161 | cmp [fontSmoothing],2 |
|
- | 162 | jz @f |
|
410 | inc edx |
163 | mov eax,[fontSmoothing] |
411 | mcall ,<(350-85),9> |
164 | call onoff |
412 | 165 | mov ecx,' ' |
|
413 | inc edx |
166 | @@: |
- | 167 | mov [edi+LLL*3],ebx |
|
414 | mcall ,<(350-73),9> |
168 | mov [edi+LLL*3+4],ecx |
415 | 169 | ||
- | 170 | draw_window: |
|
- | 171 | mcall 12,1 |
|
416 | popa |
172 | mov ecx,50*65536+32*(4+stringsAmount) |
- | 173 | mcall 0,<50,700>,,0xB4111199,0,title |
|
- | 174 | ; Main buttons |
|
417 | ret |
175 | mov eax,8 |
418 | ;------------------------------------------------------------------------------- |
176 | mov ecx,6*65536+26 |
419 | ; ******************************************** |
177 | mov edx,4 |
420 | ; ******* WINDOW DEFINITIONS AND DRAW ******* |
178 | mov esi,0x5580c0 |
421 | ; ******************************************** |
179 | mov ebp,stringsAmount |
422 | draw_window: |
- | |
423 | pusha |
- | |
424 | mcall 12,1 |
- | |
425 | - | ||
426 | mcall 0,<40,(355+BBB)>,<40,(10*16)>,0xB4111199,0,title ; DRAW WINDOW |
- | |
427 | - | ||
428 | mcall 9,procinfo,-1 |
- | |
429 | - | ||
430 | mov eax,[ebx+70] ;status of window |
- | |
431 | test eax,100b |
- | |
432 | jne .end |
- | |
433 | - | ||
434 | mcall 8,<(350-85),100>,<(5+16*6),12>,100,0x005588dd ; APPLY ALL |
- | |
435 | - | ||
436 | add ecx,16*65536 ; SAVE ALL |
- | |
437 | dec edx |
- | |
438 | mcall |
- | |
439 | - | ||
440 | mov esi,0x5580c0 |
- | |
441 | - | ||
442 | mov edx,41 |
- | |
443 | mov ecx,5+0*8 |
- | |
444 | call draw_buttons |
- | |
445 | - | ||
446 | mov edx,3 |
- | |
447 | mov ecx,5+2*8 |
- | |
448 | call draw_buttons |
- | |
449 | - | ||
450 | mov edx,91 |
- | |
451 | mov ecx,5+4*8 |
- | |
452 | call draw_buttons |
- | |
453 | - | ||
454 | mov edx,101 |
- | |
455 | mov ecx,5+6*8 |
- | |
456 | call draw_buttons |
- | |
457 | - | ||
458 | mov edx,151 |
- | |
459 | mov ecx,5+8*8 |
- | |
460 | call draw_buttons |
- | |
461 | - | ||
462 | call draw_infotext |
- | |
463 | .end: |
- | |
464 | mcall 12,2 |
- | |
465 | popa |
- | |
466 | ret |
- | |
467 | ;------------------------------------------------------------------------------- |
- | |
468 | draw_infotext: |
- | |
469 | pusha |
- | |
470 | mov eax,[keyboard] ; KEYBOARD |
- | |
471 | test eax,eax |
- | |
472 | jnz noen |
- | |
473 | mov [text00+LLL*1+28],dword 'ENGL' |
- | |
474 | mov [text00+LLL*1+32],dword 'ISH ' |
- | |
475 | ;-------------------------------------- |
- | |
476 | noen: |
- | |
477 | cmp eax,1 |
- | |
478 | jnz nofi |
- | |
479 | mov [text00+LLL*1+28],dword 'FINN' |
- | |
480 | mov [text00+LLL*1+32],dword 'ISH ' |
- | |
481 | ;-------------------------------------- |
- | |
482 | nofi: |
- | |
483 | cmp eax,2 |
- | |
484 | jnz noge |
- | |
485 | mov [text00+LLL*1+28],dword 'GERM' |
- | |
486 | mov [text00+LLL*1+32],dword 'AN ' |
- | |
487 | ;-------------------------------------- |
- | |
488 | noge: |
- | |
489 | cmp eax,3 |
- | |
490 | jnz nogr |
- | |
491 | mov [text00+LLL*1+28],dword 'RUSS' |
- | |
492 | mov [text00+LLL*1+32],dword 'IAN ' |
- | |
493 | ;-------------------------------------- |
- | |
494 | nogr: |
- | |
495 | cmp eax,4 |
- | |
496 | jnz nofr |
- | |
497 | mov [text00+LLL*1+28],dword 'FREN' |
- | |
498 | mov [text00+LLL*1+32],dword 'CH ' |
- | |
499 | ;-------------------------------------- |
- | |
500 | nofr: |
- | |
501 | cmp eax,5 |
- | |
502 | jnz noet |
- | |
503 | mov [text00+LLL*1+28],dword 'EEST' |
- | |
504 | mov [text00+LLL*1+32],dword 'I ' |
- | |
505 | ;-------------------------------------- |
- | |
506 | noet: |
- | |
507 | cmp eax,6 |
- | |
508 | jnz nobe |
- | |
509 | mov [text00+LLL*1+28],dword 'BELG' |
- | |
510 | mov [text00+LLL*1+32],dword 'IAN ' |
- | |
511 | ;-------------------------------------- |
- | |
512 | nobe: |
- | |
513 | cmp eax,7 |
- | |
514 | jnz noit |
- | |
515 | mov [text00+LLL*1+28],dword 'ITAL' |
- | |
516 | mov [text00+LLL*1+32],dword 'IAN' |
- | |
517 | ;-------------------------------------- |
- | |
518 | noit: |
- | |
519 | mov eax,[syslang] ; SYSTEM LANGUAGE |
- | |
520 | dec eax |
- | |
521 | test eax,eax |
- | |
522 | jnz noen5 |
- | |
523 | mov [text00+LLL*0+28],dword 'ENGL' |
- | |
524 | mov [text00+LLL*0+32],dword 'ISH ' |
- | |
525 | ;-------------------------------------- |
- | |
526 | noen5: |
- | |
527 | cmp eax,1 |
- | |
528 | jnz nofi5 |
- | |
529 | mov [text00+LLL*0+28],dword 'FINN' |
- | |
530 | mov [text00+LLL*0+32],dword 'ISH ' |
- | |
531 | ;-------------------------------------- |
- | |
532 | nofi5: |
- | |
533 | cmp eax,2 |
- | |
534 | jnz noge5 |
- | |
535 | mov [text00+LLL*0+28],dword 'GERM' |
- | |
536 | mov [text00+LLL*0+32],dword 'AN ' |
- | |
537 | ;-------------------------------------- |
- | |
538 | noge5: |
- | |
539 | cmp eax,3 |
- | |
540 | jnz nogr5 |
- | |
541 | mov [text00+LLL*0+28],dword 'RUSS' |
- | |
542 | mov [text00+LLL*0+32],dword 'IAN ' |
- | |
543 | ;-------------------------------------- |
- | |
544 | nogr5: |
- | |
545 | cmp eax,4 |
- | |
546 | jne nofr5 |
- | |
547 | mov [text00+LLL*0+28],dword 'FREN' |
- | |
548 | mov [text00+LLL*0+32],dword 'CH ' |
- | |
549 | ;-------------------------------------- |
- | |
550 | nofr5: |
- | |
551 | cmp eax,5 |
- | |
552 | jne noet5 |
- | |
553 | mov [text00+LLL*0+28],dword 'EEST' |
- | |
554 | mov [text00+LLL*0+32],dword 'I ' |
- | |
555 | ;-------------------------------------- |
180 | @@: |
556 | noet5: |
- | |
557 | mov eax,[lba_read] |
- | |
558 | call onoff ; LBA READ |
- | |
559 | mov [text00+LLL*2+28],ebx |
- | |
560 | - | ||
561 | mov eax,[pci_acc] |
- | |
562 | call onoff ; PCI ACCESS |
181 | mcall ,<490,24> |
- | 182 | inc edx |
|
563 | mov [text00+LLL*3+28],ebx |
183 | mcall ,<526,24> |
- | 184 | inc edx |
|
564 | 185 | mcall ,<562,120> |
|
565 | mov eax,[speaker_mute] |
186 | inc edx |
566 | call onoff ; SPEAKER |
- | |
567 | mov [text00+LLL*4+28],ebx |
187 | add ecx,32*65536 |
568 | 188 | dec ebp |
|
569 | call text_out |
189 | jnz @b |
570 | 190 | ; APPLY ALL |
|
571 | popa |
191 | add ecx,32*65536 |
572 | ret |
192 | mcall ,<514,168>,,3,0x005588dd |
Line 573... | Line 193... | ||
573 | ;------------------------------------------------------------------------------- |
193 | ; SAVE ALL |
574 | text_out: |
194 | add ecx,32*65536 |
575 | mcall 13,<165,85>,<0,(14*8)>,0x80111199 ;0x80111199-19 |
- | |
576 | 195 | dec edx |
|
577 | mov edx,text00 |
196 | mcall |
578 | mov ebx,3*65536+7 |
197 | ; text |
579 | mov eax,4 |
198 | mov eax,4 |
580 | mov ecx,0xffffff |
199 | mov ebx,6*65536+11 |
581 | mov esi,LLL |
200 | mov ecx,1ffffffh |
- | 201 | mov edx,[text] |
|
- | 202 | mov esi,LLL |
|
- | 203 | mov ebp,stringsAmount |
|
- | 204 | newline: |
|
- | 205 | mcall |
|
- | 206 | add ebx,32 |
|
- | 207 | add edx,esi |
|
- | 208 | dec ebp |
|
- | 209 | jnz newline |
|
- | 210 | ||
- | 211 | mov ebp,2 |
|
- | 212 | add ebx,32 |
|
- | 213 | @@: |
|
- | 214 | mcall |
|
- | 215 | add ebx,32 |
|
- | 216 | add edx,esi |
|
- | 217 | dec ebp |
|
- | 218 | jnz @b |
|
- | 219 | ||
- | 220 | mcall 12,2 |
|
- | 221 | ||
- | 222 | still: |
|
- | 223 | mcall 10 |
|
- | 224 | cmp eax,1 |
|
- | 225 | jz draw_window |
|
- | 226 | ||
- | 227 | cmp eax,2 |
|
- | 228 | jz key |
|
- | 229 | ||
- | 230 | cmp eax,3 |
|
- | 231 | jz button |
|
- | 232 | ||
- | 233 | jmp still |
|
- | 234 | ;--------------------------------------------------------------- |
|
- | 235 | key: |
|
- | 236 | mcall 2 |
|
- | 237 | jmp still |
|
- | 238 | ;--------------------------------------------------------------- |
|
- | 239 | button: |
|
- | 240 | mcall 17 |
|
- | 241 | shr eax,8 |
|
- | 242 | call dword[eax*4+buttonTab-4] |
|
- | 243 | jmp draw_infotext |
|
- | 244 | close: |
|
- | 245 | pop eax |
|
- | 246 | mcall -1 |
|
- | 247 | saveAll: |
|
- | 248 | mov byte[fileinfo],2 |
|
- | 249 | mcall 70,fileinfo |
|
- | 250 | ret |
|
- | 251 | language1: |
|
- | 252 | dec [syslang] |
|
- | 253 | jnz @f |
|
- | 254 | mov [syslang],6 |
|
- | 255 | ret |
|
- | 256 | language2: |
|
- | 257 | inc [syslang] |
|
- | 258 | cmp [syslang],7 |
|
- | 259 | jnz @f |
|
- | 260 | mov [syslang],1 |
|
- | 261 | ret |
|
- | 262 | layout1: |
|
- | 263 | dec [keyboard] |
|
- | 264 | jns @f |
|
- | 265 | mov [keyboard],7 |
|
- | 266 | ret |
|
- | 267 | layout2: |
|
- | 268 | inc [keyboard] |
|
- | 269 | cmp [keyboard],8 |
|
- | 270 | jnz @f |
|
- | 271 | mov [keyboard],0 |
|
- | 272 | ret |
|
- | 273 | LBA1: |
|
- | 274 | btr [lba_read],0 |
|
- | 275 | ret |
|
- | 276 | LBA2: |
|
- | 277 | bts [lba_read],0 |
|
- | 278 | ret |
|
- | 279 | PCI1: |
|
- | 280 | btr [pci_acc],0 |
|
- | 281 | ret |
|
- | 282 | PCI2: |
|
582 | mov ebp,text1_strings |
283 | bts [pci_acc],0 |
583 | ;-------------------------------------- |
284 | ret |
- | 285 | SPEAKER1: |
|
- | 286 | btr [speaker_mute],0 |
|
- | 287 | ret |
|
- | 288 | SPEAKER2: |
|
- | 289 | bts [speaker_mute],0 |
|
- | 290 | ret |
|
- | 291 | font1: |
|
- | 292 | cmp [fontSmoothing],0 |
|
- | 293 | jz @f |
|
- | 294 | dec [fontSmoothing] |
|
- | 295 | ret |
|
- | 296 | font2: |
|
- | 297 | cmp [fontSmoothing],2 |
|
- | 298 | jz @f |
|
584 | newline: |
299 | inc [fontSmoothing] |
585 | mcall |
300 | @@: |
586 | add ebx,8+8 |
301 | ret |
587 | add edx,esi |
302 | ;--------------------------------------------------------------- |
588 | dec ebp |
303 | loadtxt: |
Line 613... | Line 328... | ||
613 | mov ebx,'SEES' |
328 | mov ebx,'SEES' |
614 | cmp eax,1 |
329 | cmp eax,1 |
615 | je exitsub |
330 | je exitsub |
616 | mov ebx,'VÄL.' |
331 | mov ebx,'VÄL.' |
617 | ret |
332 | ret |
618 | ;-------------------------------------- |
- | |
619 | noet1: |
333 | noet1: |
620 | mov ebx,'ON ' |
334 | mov ebx,'ON ' |
621 | cmp eax,1 |
335 | cmp eax,1 |
622 | je exitsub |
336 | je exitsub |
623 | mov ebx,'OFF ' |
337 | mov ebx,'OFF ' |
624 | ;-------------------------------------- |
- | |
625 | exitsub: |
338 | exitsub: |
626 | ret |
339 | ret |
627 | ;------------------------------------------------------------------------------- |
340 | ;--------------------------------------------------------------- |
- | 341 | align 4 |
|
- | 342 | buttonTab: ; button handler pointers: -,+,apply |
|
- | 343 | dd close |
|
- | 344 | dd saveAll |
|
- | 345 | dd apply_all |
|
- | 346 | dd language1 |
|
- | 347 | dd language2 |
|
- | 348 | dd _syslang |
|
- | 349 | dd layout1 |
|
- | 350 | dd layout2 |
|
628 | _lba_read: |
351 | dd _keyboard |
- | 352 | dd LBA1 |
|
- | 353 | dd LBA2 |
|
629 | mcall 21,11,[lba_read] |
354 | dd _lba_read |
630 | ret |
355 | dd PCI1 |
631 | ;------------------------------------------------------------------------------- |
- | |
- | 356 | dd PCI2 |
|
632 | _pci_acc: |
357 | dd _pci_acc |
- | 358 | dd SPEAKER1 |
|
- | 359 | dd SPEAKER2 |
|
633 | mcall 21,12,[pci_acc] |
360 | dd _speaker_mute |
634 | ret |
361 | dd font1 |
635 | ;------------------------------------------------------------------------------- |
- | |
- | 362 | dd font2 |
|
- | 363 | dd fontApply |
|
636 | _syslang: |
364 | keymapTab: |
637 | mcall 21,5,[syslang] |
365 | dd en_keymap |
638 | ret |
366 | dd fi_keymap |
639 | ;------------------------------------------------------------------------------- |
- | |
640 | _speaker_mute: |
367 | dd ge_keymap |
- | 368 | dd ru_keymap |
|
641 | mcall 18,8,1 |
369 | dd fr_keymap |
642 | cmp [speaker_mute],eax |
370 | dd et_keymap |
643 | je @f |
371 | dd be_keymap |
644 | inc ecx |
372 | dd it_keymap |
- | 373 | shiftKeymapTab: |
|
- | 374 | dd en_keymap_shift |
|
- | 375 | dd fi_keymap_shift |
|
- | 376 | dd ge_keymap_shift |
|
- | 377 | dd ru_keymap_shift |
|
- | 378 | dd fr_keymap_shift |
|
- | 379 | dd et_keymap_shift |
|
- | 380 | dd be_keymap_shift |
|
- | 381 | dd it_keymap_shift |
|
- | 382 | altKeymapTab: |
|
- | 383 | dd alt_general |
|
- | 384 | dd alt_general |
|
- | 385 | dd alt_general |
|
- | 386 | dd alt_general |
|
- | 387 | dd fr_keymap_alt_gr |
|
645 | mcall 18 |
388 | dd alt_general |
- | 389 | dd be_keymap_alt_gr |
|
- | 390 | dd it_keymap_alt_gr |
|
- | 391 | ||
646 | ;-------------------------------------- |
392 | setup.dat: ; file structure |
- | 393 | syslang dd 0 |
|
- | 394 | keyboard dd 0 |
|
- | 395 | lba_read dd 0 |
|
- | 396 | pci_acc dd 0 |
|
- | 397 | speaker_mute dd 0 |
|
- | 398 | fontSmoothing dd 0 |
|
- | 399 | ||
- | 400 | fileinfo: |
|
647 | @@: |
401 | dd 0 |
648 | ret |
402 | dd 0 |
649 | ;------------------------------------------------------------------------------- |
- | |
- | 403 | dd 0 |
|
650 | loadtxt: |
404 | dd 4*6 |
651 | mov edi,text00 |
405 | dd setup.dat |
- | 406 | db '/SYS/SETTINGS/SETUP.DAT',0 |
|
- | 407 | ||
652 | mov ecx,LLL*(text1_strings + text2_strings)/4+1 |
408 | title db 'System settings',0 |
- | 409 | hex db '0123456789ABCDEF' |
|
- | 410 | ||
- | 411 | LLL = 56 |
|
653 | cmp [syslang],4 |
412 | stringsAmount = 6 |
- | 413 | ||
- | 414 | align 4 |
|
654 | jne loadet |
415 | text dd 0 |
- | 416 | langs: |
|
- | 417 | db 'ENGLISH FINNISH GERMAN RUSSIAN FRENCH ESTONIANBELGIAN ITALIAN ' |
|
Line 655... | Line -... | ||
655 | - | ||
656 | mov esi,textrus |
- | |
657 | jmp sload |
- | |
658 | loadet: |
- | |
659 | mov edi,text00 |
- | |
660 | mov ecx,LLL*(text1_strings + text2_strings)/4+1 |
- | |
661 | cmp [syslang],6 |
- | |
662 | jne norus |
- | |
663 | mov esi,textet |
- | |
664 | jmp sload |
- | |
665 | ;-------------------------------------- |
- | |
666 | norus: |
- | |
667 | mov esi,texteng |
- | |
668 | ;-------------------------------------- |
- | |
669 | sload: |
- | |
670 | rep movsd |
- | |
671 | ret |
- | |
672 | ;------------------------------------------------------------------------------- |
- | |
673 | cleantxt: |
- | |
674 | xor eax,eax |
- | |
675 | mov ecx,LLL*(text1_strings + text2_strings)/4 |
- | |
676 | cld |
- | |
677 | mov edi,text00 |
- | |
678 | rep stosd |
- | |
679 | mov [text00+1711],byte 'x' |
- | |
680 | ret |
- | |
681 | ;------------------------------------------------------------------------------- |
- | |
682 | ; DATA AREA |
- | |
683 | count: db 0x0 |
- | |
684 | blinkpar: dd 0x0 |
- | |
685 | time: dw 0x0 |
- | |
686 | date: dd 0x0 |
- | |
687 | ;------------------------------------------------------------------------------- |
418 | |
688 | textrus: |
419 | textrus: |
689 | db '§ëª á¨á⥬ë : ENGLISH - + ਬ¥¨âì' |
420 | db '§ëª á¨á⥬ë : < > ਬ¥¨âì' |
690 | db ' ᪫ ¤ª ª« ¢¨ âãàë : ENGLISH - + ਬ¥¨âì' |
421 | db ' ᪫ ¤ª ª« ¢¨ âãàë : < > ਬ¥¨âì' |
691 | db 'ª«îç¨âì LBA : OFF - + ਬ¥¨âì' |
422 | db 'ª«îç¨âì LBA : - + ਬ¥¨âì' |
692 | db '®áâ㯠ª 訥 PCI : OFF - + ਬ¥¨âì' |
423 | db '®áâ㯠ª 訥 PCI : - + ਬ¥¨âì' |
- | 424 | db '몫îç¨âì SPEAKER : - + ਬ¥¨âì' |
|
Line 693... | Line 425... | ||
693 | db '몫îç¨âì SPEAKER : OFF - + ਬ¥¨âì' |
425 | db '£« ¦¨¢ ¨¥ èà¨ä⮢ : - + ਬ¥¨âì' |
694 | 426 | ||
695 | db ' : ਬ¥¨âì ¢á¥ ' |
- | |
- | 427 | db ' : ਬ¥¨âì ¢á¥' |
|
696 | db ' ®åà ¨âì ¢á¥ ' |
428 | db ' ®åà ¨âì ¢á¥' |
697 | ;------------------------------------------------------------------------------- |
429 | |
698 | texteng: |
430 | texteng: |
699 | db 'System language : ENGLISH - + Apply ' |
431 | db 'System language : < > Apply ' |
700 | db 'Keyboard layout : ENGLISH - + Apply ' |
432 | db 'Keyboard layout : < > Apply ' |
701 | db 'LBA read enabled : OFF - + Apply ' |
433 | db 'LBA read enabled : - + Apply ' |
702 | db 'PCI access for appl. : OFF - + Apply ' |
434 | db 'PCI access for appl. : - + Apply ' |
Line 703... | Line 435... | ||
703 | db 'SPEAKER disabled : OFF - + Apply ' |
435 | db 'SPEAKER disabled : - + Apply ' |
704 | text1_strings = 5 |
436 | db 'Font smoothing : - + Apply ' |
- | 437 | ||
705 | 438 | db 'NOTE: Apply all ' |
|
706 | db 'NOTE: Apply all ' |
439 | db 'SAVE YOUR SETTINGS BEFORE QUITING KOLIBRI Save all ' |
707 | db 'SAVE YOUR SETTINGS BEFORE QUITING KOLIBRI Save all ' |
440 | |
708 | textet: |
441 | textet: |
709 | db 'Süsteemi keel : ENGLISH - + Kinnita ' |
442 | db 'Süsteemi keel : < > Kinnita ' |
710 | db 'Klaviatuuri paigutus : ENGLISH - + Kinnita ' |
443 | db 'Klaviatuuri paigutus : < > Kinnita ' |
- | 444 | db 'LBA lugemine lubatud : - + Kinnita ' |
|
- | 445 | db 'PCI juurdepääs programm. : - + Kinnita ' |
|
711 | db 'LBA lugemine lubatud : VÄL. - + Kinnita ' |
446 | db 'SPEAKER disabled : - + Kinnita ' |
712 | db 'PCI juurdepääs programm. : VÄL. - + Kinnita ' |
447 | db 'Font smoothing : - + Kinnita ' |
713 | db 'SPEAKER disabled : VÄL. - + Kinnita ' |
- | |
714 | db 'MÄRKUS: Kinnita kõik' |
- | |
715 | db 'SALVESTA SEADED ENNE KOLIBRIST VÄLJUMIST Salvesta kõik' |
- | |
Line 716... | Line -... | ||
716 | text2_strings = 2 |
- | |
717 | ;------------------------------------------------------------------------------- |
- | |
718 | title db 'System setup',0 |
448 | |
719 | - | ||
720 | hex db '0123456789ABCDEF' |
- | |
721 | ;------------------------------------------------------------------------------- |
- | |
722 | include 'keymaps.inc' |
- | |
723 | ;------------------------------------------------------------------------------- |
- | |
724 | read_fileinfo: |
- | |
725 | dd 0 |
- | |
726 | dd 0 |
- | |
727 | dd 0 |
- | |
728 | dd 28 |
- | |
729 | dd keyboard |
- | |
730 | db 0 |
- | |
731 | dd file_name |
- | |
732 | ;------------------------------------------------------------------------------- |
- | |
733 | save_fileinfo: |
- | |
734 | dd 2 |
- | |
735 | dd 0 |
- | |
736 | dd 0 |
- | |
737 | dd 28 |
- | |
738 | dd keyboard |
- | |
739 | file_name: db '/SYS/SETTINGS/SETUP.DAT',0 |
- | |
740 | ;------------------------------------------------------------------------------- |
- | |
741 | keyboard dd 0x0 |
- | |
742 | syslang dd 0x4 ; 4 - rus |
- | |
743 | lba_read dd 0x1 |
449 | db 'MÄRKUS: Kinnita kõik ' |
744 | pci_acc dd 0x1 |
- | |
745 | speaker_mute dd 0 ; 0 - enable, 1 - disable |
- | |
746 | ;----------------------------------------------------------------------------- |
- | |
747 | IM_END: |
- | |
748 | ;----------------------------------------------------------------------------- |
- | |
749 | align 4 |
- | |
750 | text00: |
450 | db 'SALVESTA SEADED ENNE KOLIBRIST VÄLJUMIST Salvesta kõik' |
751 | rb LLL*(text1_strings + text2_strings)+4 |
- | |
752 | ;----------------------------------------------------------------------------- |
451 | |
753 | align 4 |
- | |
754 | boot_param: |
- | |
755 | procinfo: |
- | |
756 | rb 1024 |
452 | include 'keymaps.inc' |
757 | ;----------------------------------------------------------------------------- |
- | |
758 | align 4 |
453 | IM_END: |
759 | rb 0x1000 |
- | |
760 | stack_area: |
454 | boot_param: |