Subversion Repositories Kolibri OS

Rev

Rev 3927 | Rev 4825 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
31 halyavin 1
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2
;;                               ;;
3
;;          DEVICE SETUP         ;;
4
;;                               ;;
5
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
3221 hidnplayr 6
; version:      1.15
2639 mario79 7
; last update:  20/04/2012
8
; changed by:   Marat Zakiyanov aka Mario79, aka Mario
9
; changes:      Add the flag of speaker mute.
10
;               Correcting setup.dat
11
;---------------------------------------------------------------------
3221 hidnplayr 12
; version:      1.14
2481 mario79 13
; last update:  20/03/2012
14
; changed by:   Marat Zakiyanov aka Mario79, aka Mario
15
; changes:      optimisations and code refactoring
16
;---------------------------------------------------------------------
31 halyavin 17
; Authors: Ville       - original version
18
;          A. Ivushkin - autostart (w launcher)
19
;          M. Lisovin  - added many feauters (apply all, save all, set time...)
20
;          I. Poddubny - fixed russian keymap
127 mario79 21
;14/08/06  Mario79 - added regulation of mouse features
2478 mario79 22
;-------------------------------------------------------------------------------
3221 hidnplayr 23
format binary as ""
31 halyavin 24
 
3221 hidnplayr 25
        use32
26
        org 0x0
27
 
28
        db 'MENUET01'   ; 8 byte identifier
29
        dd 0x01         ; header version
30
        dd START        ; pointer to program start
31
        dd IM_END       ; size of image
32
        dd I_END        ; reguired amount of memory
33
        dd stack_area   ; stack pointer (esp)
34
        dd boot_param   ; boot parameters
35
        dd 0x0          ; path
2478 mario79 36
;-------------------------------------------------------------------------------
37
include '..\..\..\macros.inc'
38
;-------------------------------------------------------------------------------
31 halyavin 39
LLL equ (56+3)
40
BBB equ 25
2478 mario79 41
;-------------------------------------------------------------------------------
31 halyavin 42
apply_all:
3221 hidnplayr 43
        call    _pci_acc    ;12
44
        call    _syslang    ;5
45
        call    _keyboard    ;2
46
        call    _mouse_speed
47
        call    _mouse_delay
48
        call    _speaker_mute
49
        ret
31 halyavin 50
;-------------------------------------------------------------------------------
2299 hidnplayr 51
apply_all_and_exit:
3221 hidnplayr 52
        mcall   70,read_fileinfo
53
        call    apply_all
54
        jmp     close
2478 mario79 55
;-------------------------------------------------------------------------------
2299 hidnplayr 56
set_language_and_exit:
3221 hidnplayr 57
        mcall   26,2,9
58
        cmp     eax,1
59
        je      russian
31 halyavin 60
 
3221 hidnplayr 61
        xor     eax,eax
2478 mario79 62
;--------------------------------------
2299 hidnplayr 63
set_lang_now:
3221 hidnplayr 64
        mov     [keyboard],eax
65
        call    _keyboard
66
        jmp     close
2478 mario79 67
;--------------------------------------
2299 hidnplayr 68
russian:
3221 hidnplayr 69
        mov     eax,3
70
        jmp     set_lang_now
2478 mario79 71
;-------------------------------------------------------------------------------
2299 hidnplayr 72
set_syslanguage_and_exit:
3221 hidnplayr 73
        mcall   26,5
74
        cmp     eax,6
75
        jne     temp
76
        xor     eax,eax
2478 mario79 77
;--------------------------------------
2299 hidnplayr 78
temp:
3221 hidnplayr 79
        inc     eax
80
        mov     [syslang],eax
81
        call    _syslang
82
        jmp     close
2478 mario79 83
;-------------------------------------------------------------------------------
31 halyavin 84
get_setup_values:
3221 hidnplayr 85
        mcall   26,2,9
86
        dec     eax
87
        mov     [keyboard],eax
2299 hidnplayr 88
 
3221 hidnplayr 89
        mcall   26,5
90
        mov     [syslang],eax
2299 hidnplayr 91
 
3221 hidnplayr 92
        mcall   26,11
93
        mov     [lba_read],eax
2299 hidnplayr 94
 
3221 hidnplayr 95
        mcall   26,12
96
        mov     [pci_acc],eax
2299 hidnplayr 97
 
3221 hidnplayr 98
        mcall   18,19,0
99
        mov     [mouse_speed],eax
2299 hidnplayr 100
 
3221 hidnplayr 101
        mcall   18,19,2
102
        mov     [mouse_delay],eax
103
 
104
        mcall   18,8,1
105
        mov     [speaker_mute],eax
106
        ret
2478 mario79 107
;-------------------------------------------------------------------------------
31 halyavin 108
START:
3221 hidnplayr 109
        mov     eax,boot_param
110
        cmp     [eax],dword 'SLAN'
111
        je      set_syslanguage_and_exit
31 halyavin 112
 
3221 hidnplayr 113
        cmp     [eax],dword 'LANG'
114
        je      set_language_and_exit
31 halyavin 115
 
3221 hidnplayr 116
        cmp     [eax],dword 'BOOT'
117
        je      apply_all_and_exit
31 halyavin 118
 
3221 hidnplayr 119
        call    get_setup_values
120
        call    loadtxt
121
        call    draw_infotext
2478 mario79 122
;-------------------------------------------------------------------------------
31 halyavin 123
red:
3221 hidnplayr 124
        call    draw_window
2478 mario79 125
;-------------------------------------------------------------------------------
31 halyavin 126
still:
2478 mario79 127
sysevent:
3221 hidnplayr 128
        mcall   23,8          ; wait here for event with timeout
129
        cmp     eax,1
130
        jz      red
31 halyavin 131
 
3221 hidnplayr 132
        cmp     eax,2
133
        jz      key
31 halyavin 134
 
3221 hidnplayr 135
        cmp     eax,3
136
        jz      button
31 halyavin 137
 
3221 hidnplayr 138
        jmp     still
2478 mario79 139
;-------------------------------------------------------------------------------
140
key:
3221 hidnplayr 141
        mcall   2
142
        jmp     still
2478 mario79 143
;-------------------------------------------------------------------------------
144
button:
3221 hidnplayr 145
        mcall   17
146
        cmp     ah,99
147
        jne     nosaveall
148
        mcall   70,save_fileinfo
149
        jmp     still
2478 mario79 150
;--------------------------------------
31 halyavin 151
nosaveall:
3221 hidnplayr 152
        cmp     ah,100
153
        jne     no_apply_all
154
        call    apply_all
155
        jmp     still
2478 mario79 156
;--------------------------------------
31 halyavin 157
no_apply_all:
3221 hidnplayr 158
        cmp     ah,1    ; CLOSE APPLICATION
159
        jne     no_close
2478 mario79 160
;--------------------------------------
31 halyavin 161
close:
3221 hidnplayr 162
        or      eax,-1
163
        mcall
2478 mario79 164
;--------------------------------------
165
no_close:
3221 hidnplayr 166
        cmp     ah,4    ; SET KEYBOARD
167
        jnz     nokm
168
        mov     eax,[keyboard]
169
        test    eax,eax
170
        je      downuplbl
171
        dec     eax
172
        jmp     nodownup
2478 mario79 173
;--------------------------------------
174
downuplbl:
3671 hidnplayr 175
        mov     eax,7
2478 mario79 176
;--------------------------------------
177
nodownup:
3221 hidnplayr 178
        mov     [keyboard],eax
179
        call    draw_infotext
2478 mario79 180
;--------------------------------------
181
nokm:
3221 hidnplayr 182
        cmp     ah,5
183
        jnz     nokp
184
        mov     eax,[keyboard]
3671 hidnplayr 185
        cmp     eax,7
3221 hidnplayr 186
        je      updownlbl
187
        inc     eax
188
        jmp     noupdown
2478 mario79 189
;--------------------------------------
190
updownlbl:
3221 hidnplayr 191
        xor     eax,eax
2478 mario79 192
;--------------------------------------
193
noupdown:
3221 hidnplayr 194
        mov     [keyboard],eax
195
        call    draw_infotext
2478 mario79 196
;--------------------------------------
197
nokp:
3221 hidnplayr 198
        cmp     ah,92   ; SET LBA READ
199
        jne     no_lba_d
2478 mario79 200
;--------------------------------------
201
slbal:
3221 hidnplayr 202
        btc     [lba_read],0
203
        call    draw_infotext
204
        jmp     still
2478 mario79 205
;--------------------------------------
206
no_lba_d:
3221 hidnplayr 207
        cmp     ah,93
208
        jne     no_lba_i
209
        jmp     slbal
2478 mario79 210
;--------------------------------------
211
no_lba_i:
3221 hidnplayr 212
        cmp     ah,91
213
        jne     no_set_lba_read
214
        call    _lba_read
215
        jmp     still
2478 mario79 216
;--------------------------------------
217
no_set_lba_read:
3221 hidnplayr 218
        cmp     ah,102  ; SET PCI ACCESS
219
        jne     no_pci_d
2478 mario79 220
;--------------------------------------
221
pcip:
3221 hidnplayr 222
        btc     [pci_acc],0
223
        call    draw_infotext
224
        jmp     still
2478 mario79 225
;--------------------------------------
226
no_pci_d:
3221 hidnplayr 227
        cmp     ah,103
228
        jne     no_pci_i
229
        jmp     pcip
2478 mario79 230
;--------------------------------------
231
no_pci_i:
3221 hidnplayr 232
        cmp     ah,101
233
        jne     no_set_pci_acc
234
        call    _pci_acc
235
        jmp     still
2478 mario79 236
;--------------------------------------
237
no_set_pci_acc:
3221 hidnplayr 238
        cmp     ah,42   ; SET SYSTEM LANGUAGE BASE
239
        jnz     nosysm
240
        mov     eax,[syslang]
241
        dec     eax
242
        jz      still
243
        mov     [syslang],eax
244
        call    draw_infotext
2478 mario79 245
;--------------------------------------
246
nosysm:
3221 hidnplayr 247
        cmp     ah,43
248
        jnz     nosysp
249
        mov     eax,[syslang]
250
        cmp     eax,6
251
        je      nosysp
252
        inc     eax
253
        mov     [syslang],eax
254
        call    draw_infotext
2478 mario79 255
;--------------------------------------
256
nosysp:
3221 hidnplayr 257
        cmp     ah,41
258
        jnz     nosyss
259
        call    _syslang
260
        call    cleantxt
261
        call    loadtxt
262
        call    draw_window
2478 mario79 263
;--------------------------------------
264
nosyss:
3221 hidnplayr 265
        cmp     ah,132  ; SET MOUSE SPEED
266
        jnz     .nominus
267
        mov     eax,[mouse_speed]
268
        sub     eax,2
269
        cmp     eax,9
270
        jb      @f
271
        mov     eax,8
2478 mario79 272
;--------------------------------------
120 mario79 273
@@:
3221 hidnplayr 274
        inc     eax
275
        mov     [mouse_speed],eax
276
        call    draw_infotext
2478 mario79 277
;--------------------------------------
278
.nominus:
3221 hidnplayr 279
        cmp     ah,133
280
        jnz     .noplus
281
        mov     eax,[mouse_speed]
282
        cmp     eax,9
283
        jb      @f
284
        mov     eax,0
2478 mario79 285
;--------------------------------------
120 mario79 286
@@:
3221 hidnplayr 287
        inc     eax
288
        mov     [mouse_speed],eax
289
        call    draw_infotext
2478 mario79 290
;--------------------------------------
291
.noplus:
3221 hidnplayr 292
        cmp     ah,131
293
        jnz     .noapply
294
        call    _mouse_speed
2478 mario79 295
;--------------------------------------
296
.noapply:
297
mousedelay:
3221 hidnplayr 298
        cmp     ah,142        ; SET MOUSE DELAY
299
        jnz     .nominus
300
        mov     eax,[mouse_delay]
301
        sub     eax,2
302
        cmp     eax,0xfff
303
        jb      @f
304
        mov     eax,0xffe
2478 mario79 305
;--------------------------------------
127 mario79 306
@@:
3221 hidnplayr 307
        inc     eax
308
        mov     [mouse_delay],eax
309
        call    draw_infotext
2478 mario79 310
;--------------------------------------
311
.nominus:
3221 hidnplayr 312
        cmp     ah,143
313
        jnz     .noplus
314
        mov     eax,[mouse_delay]
315
        cmp     eax,0xfff
316
        jb      @f
317
        mov     eax,0
2478 mario79 318
;--------------------------------------
127 mario79 319
@@:
3221 hidnplayr 320
        inc     eax
321
        mov     [mouse_delay],eax
322
        call    draw_infotext
2478 mario79 323
;--------------------------------------
324
.noplus:
3221 hidnplayr 325
        cmp     ah,141
326
        jnz     speakermute
327
        call    _mouse_delay
2478 mario79 328
;--------------------------------------
2639 mario79 329
speakermute:
3221 hidnplayr 330
        cmp     ah,152  ; SET SPEAKER
331
        jne     no_speaker_d
2639 mario79 332
;--------------------------------------
333
speaker_p:
3221 hidnplayr 334
        btc     [speaker_mute],0
335
        call    draw_infotext
336
        jmp     still
2639 mario79 337
;--------------------------------------
338
no_speaker_d:
3221 hidnplayr 339
        cmp     ah,153
340
        jne     no_speaker_i
341
        jmp     speaker_p
2639 mario79 342
;--------------------------------------
343
no_speaker_i:
3221 hidnplayr 344
        cmp     ah,151
345
        jne     .noapply
346
        call    _speaker_mute
347
        jmp     still
2639 mario79 348
;--------------------------------------
2478 mario79 349
.noapply:
3221 hidnplayr 350
        cmp     ah,3          ; SET KEYMAP
351
        jne     still
352
        call    _keyboard
353
        jmp     still
2478 mario79 354
;-------------------------------------------------------------------------------
355
_keyboard:
3221 hidnplayr 356
        cmp     [keyboard],0    ; english
357
        jnz     nosetkeyle
358
 
359
        mcall   21,2,1,en_keymap
360
 
361
        inc     ecx
362
        mcall   21,,,en_keymap_shift
127 mario79 363
 
3221 hidnplayr 364
        mcall   21,,9,1
365
        call    alt_gen
2478 mario79 366
;--------------------------------------
367
nosetkeyle:
3221 hidnplayr 368
        cmp     [keyboard],1    ; finnish
369
        jnz     nosetkeylfi
31 halyavin 370
 
3221 hidnplayr 371
        mcall   21,2,1,fi_keymap
372
 
373
        inc     ecx
374
        mcall   21,,,fi_keymap_shift
31 halyavin 375
 
3221 hidnplayr 376
        mcall   21,,9,2
377
        call    alt_gen
2478 mario79 378
;--------------------------------------
379
nosetkeylfi:
3221 hidnplayr 380
        cmp  [keyboard],2       ; german
381
        jnz  nosetkeylge
31 halyavin 382
 
3221 hidnplayr 383
        mcall   21,2,1,ge_keymap
384
 
385
        inc     ecx
386
        mcall   21,,,ge_keymap_shift
31 halyavin 387
 
3221 hidnplayr 388
        mcall   21,,9,3
389
        call    alt_gen
2478 mario79 390
;--------------------------------------
391
nosetkeylge:
3221 hidnplayr 392
        cmp     [keyboard],3    ; russian
393
        jnz     nosetkeylru
2478 mario79 394
 
3221 hidnplayr 395
        mcall   21,2,1,ru_keymap
396
 
397
        inc     ecx
398
        mcall   21,,,ru_keymap_shift
31 halyavin 399
 
3221 hidnplayr 400
        mcall   21,,9,4
401
        call    alt_gen
2478 mario79 402
;--------------------------------------
403
nosetkeylru:
3221 hidnplayr 404
        cmp     [keyboard],4    ;french
405
        jnz     nosetkeylfr
31 halyavin 406
 
3221 hidnplayr 407
        mcall   21,2,1,fr_keymap
408
 
409
        inc     ecx
410
        mcall   21,,,fr_keymap_shift
31 halyavin 411
 
3221 hidnplayr 412
        inc  ecx
413
        mcall   21,,,fr_keymap_alt_gr
31 halyavin 414
 
3221 hidnplayr 415
        mcall   21,,9,5
2478 mario79 416
;--------------------------------------
417
nosetkeylfr:
3221 hidnplayr 418
        cmp     [keyboard],5    ; estonian
419
        jnz     nosetkeylet
31 halyavin 420
 
3221 hidnplayr 421
        mcall   21,2,1,et_keymap
422
 
423
        inc     ecx
424
        mcall   21,,,et_keymap_shift
31 halyavin 425
 
3221 hidnplayr 426
        mcall   21,,9,6
427
        call    alt_gen
2478 mario79 428
;--------------------------------------
429
nosetkeylet:
3221 hidnplayr 430
        cmp     [keyboard],6    ;belgian
3671 hidnplayr 431
        jnz     nosetkeylit
3221 hidnplayr 432
 
433
        mcall   21,2,1,be_keymap
434
 
435
        inc     ecx
436
        mcall   21,,,be_keymap_shift
437
 
438
        inc  ecx
439
        mcall   21,,,be_keymap_alt_gr
440
 
3671 hidnplayr 441
        mcall   21,,9,7
3221 hidnplayr 442
;--------------------------------------
3671 hidnplayr 443
nosetkeylit:
444
        cmp     [keyboard],7    ;italian
445
        jnz     nosetkeylbe
446
 
447
        mcall   21,2,1,it_keymap
448
 
449
        inc     ecx
450
        mcall   21,,,it_keymap_shift
451
 
452
        inc     ecx
453
        mcall   21,,,it_keymap_alt_gr
454
 
455
        mcall   21,,9,8
456
;--------------------------------------
457
 
3221 hidnplayr 458
nosetkeylbe:
459
        ret
2478 mario79 460
;-------------------------------------------------------------------------------
461
alt_gen:
3221 hidnplayr 462
        mcall   21,,3,alt_general
463
        ret
2478 mario79 464
;-------------------------------------------------------------------------------
465
draw_buttons:
3221 hidnplayr 466
        pusha
467
        shl  ecx,16
468
        add  ecx,12
469
        mcall   8,<(350-57),(46+BBB)>
31 halyavin 470
 
3221 hidnplayr 471
        inc     edx
472
        mcall   ,<(350-85),9>
31 halyavin 473
 
3221 hidnplayr 474
        inc     edx
475
        mcall   ,<(350-73),9>
31 halyavin 476
 
3221 hidnplayr 477
        popa
478
        ret
2478 mario79 479
;-------------------------------------------------------------------------------
31 halyavin 480
; ********************************************
481
; ******* WINDOW DEFINITIONS AND DRAW  *******
482
; ********************************************
483
draw_window:
3221 hidnplayr 484
        pusha
485
        mcall   12,1
31 halyavin 486
 
3221 hidnplayr 487
        xor     eax,eax       ; DRAW WINDOW
488
        xor     esi,esi
489
        mcall   ,<40,(355+BBB)>,<40,(12*16)>,0xB4111199,,title
490
 
491
        mcall   9,procinfo,-1
492
 
493
        mov     eax,[ebx+70] ;status of window
494
        test    eax,100b
495
        jne     .end
31 halyavin 496
 
3221 hidnplayr 497
        mcall   8,<(350-85),100>,<(5+16*8),12>,100,0x005588dd   ; APPLY ALL
31 halyavin 498
 
3221 hidnplayr 499
        add     ecx,16*65536          ; SAVE ALL
500
        dec     edx
501
        mcall
31 halyavin 502
 
3221 hidnplayr 503
        mov     esi,0x5580c0
31 halyavin 504
 
3221 hidnplayr 505
        mov     edx,41
506
        mov     ecx,5+0*8
507
        call    draw_buttons
31 halyavin 508
 
3221 hidnplayr 509
        mov     edx,3
510
        mov     ecx,5+2*8
511
        call    draw_buttons
31 halyavin 512
 
3221 hidnplayr 513
        mov     edx,91
514
        mov     ecx,5+4*8
515
        call    draw_buttons
31 halyavin 516
 
3221 hidnplayr 517
        mov     edx,101
518
        mov     ecx,5+6*8
519
        call    draw_buttons
31 halyavin 520
 
3221 hidnplayr 521
        mov     edx,131
522
        mov     ecx,5+8*8
523
        call    draw_buttons
31 halyavin 524
 
3221 hidnplayr 525
        mov     edx,141
526
        mov     ecx,5+10*8
527
        call    draw_buttons
528
 
529
        mov     edx,151
530
        mov     ecx,5+12*8
531
        call    draw_buttons
120 mario79 532
 
3221 hidnplayr 533
        call    draw_infotext
2481 mario79 534
.end:
3221 hidnplayr 535
        mcall   12,2
536
        popa
537
        ret
2478 mario79 538
;-------------------------------------------------------------------------------
31 halyavin 539
draw_infotext:
3221 hidnplayr 540
        pusha
541
        mov     eax,[keyboard]       ; KEYBOARD
542
        test    eax,eax
543
        jnz     noen
544
        mov     [text00+LLL*1+28],dword 'ENGL'
545
        mov     [text00+LLL*1+32],dword 'ISH '
2478 mario79 546
;--------------------------------------
547
noen:
3221 hidnplayr 548
        cmp     eax,1
549
        jnz     nofi
550
        mov     [text00+LLL*1+28],dword 'FINN'
551
        mov     [text00+LLL*1+32],dword 'ISH '
2478 mario79 552
;--------------------------------------
553
nofi:
3221 hidnplayr 554
        cmp     eax,2
555
        jnz     noge
556
        mov     [text00+LLL*1+28],dword 'GERM'
557
        mov     [text00+LLL*1+32],dword 'AN  '
2478 mario79 558
;--------------------------------------
559
noge:
3221 hidnplayr 560
        cmp     eax,3
561
        jnz     nogr
562
        mov     [text00+LLL*1+28],dword 'RUSS'
563
        mov     [text00+LLL*1+32],dword 'IAN '
2478 mario79 564
;--------------------------------------
565
nogr:
3221 hidnplayr 566
        cmp     eax,4
567
        jnz     nofr
568
        mov     [text00+LLL*1+28],dword 'FREN'
569
        mov     [text00+LLL*1+32],dword 'CH  '
2478 mario79 570
;--------------------------------------
571
nofr:
3221 hidnplayr 572
        cmp     eax,5
573
        jnz     noet
3927 kaitz 574
        mov     [text00+LLL*1+28],dword 'EEST'
575
        mov     [text00+LLL*1+32],dword 'I   '
2478 mario79 576
;--------------------------------------
577
noet:
3221 hidnplayr 578
        cmp     eax,6
579
        jnz     nobe
580
        mov     [text00+LLL*1+28],dword 'BELG'
581
        mov     [text00+LLL*1+32],dword 'IAN '
2478 mario79 582
;--------------------------------------
3221 hidnplayr 583
nobe:
3671 hidnplayr 584
        cmp     eax,7
585
        jnz     noit
586
        mov     [text00+LLL*1+28],dword 'ITAL'
587
        mov     [text00+LLL*1+32],dword 'IAN'
588
;--------------------------------------
589
noit:
3221 hidnplayr 590
        mov     eax,[syslang]             ; SYSTEM LANGUAGE
591
        dec     eax
592
        test    eax,eax
593
        jnz     noen5
594
        mov     [text00+LLL*0+28],dword 'ENGL'
595
        mov     [text00+LLL*0+32],dword 'ISH '
596
;--------------------------------------
2478 mario79 597
noen5:
3221 hidnplayr 598
        cmp     eax,1
599
        jnz     nofi5
600
        mov     [text00+LLL*0+28],dword 'FINN'
601
        mov     [text00+LLL*0+32],dword 'ISH '
2478 mario79 602
;--------------------------------------
603
nofi5:
3221 hidnplayr 604
        cmp     eax,2
605
        jnz     noge5
606
        mov     [text00+LLL*0+28],dword 'GERM'
607
        mov     [text00+LLL*0+32],dword 'AN  '
2478 mario79 608
;--------------------------------------
609
noge5:
3221 hidnplayr 610
        cmp     eax,3
611
        jnz     nogr5
612
        mov     [text00+LLL*0+28],dword 'RUSS'
613
        mov     [text00+LLL*0+32],dword 'IAN '
2478 mario79 614
;--------------------------------------
615
nogr5:
3221 hidnplayr 616
        cmp     eax,4
617
        jne     nofr5
618
        mov     [text00+LLL*0+28],dword 'FREN'
619
        mov     [text00+LLL*0+32],dword 'CH  '
2478 mario79 620
;--------------------------------------
621
nofr5:
3221 hidnplayr 622
        cmp     eax,5
623
        jne     noet5
3927 kaitz 624
        mov     [text00+LLL*0+28],dword 'EEST'
625
        mov     [text00+LLL*0+32],dword 'I   '
2478 mario79 626
;--------------------------------------
627
noet5:
3221 hidnplayr 628
        mov     eax,[lba_read]
629
        call    onoff                           ; LBA READ
630
        mov     [text00+LLL*2+28],ebx
31 halyavin 631
 
3221 hidnplayr 632
        mov     eax,[pci_acc]
633
        call    onoff                           ; PCI ACCESS
634
        mov     [text00+LLL*3+28],ebx
635
 
636
        mov     eax,[speaker_mute]
637
        call    onoff                           ; SPEAKER
638
        mov     [text00+LLL*6+28],ebx
31 halyavin 639
 
3221 hidnplayr 640
        mov     eax,[mouse_speed]               ; MOUSE SPEED
641
        add     al,48
642
        mov     [text00+LLL*4+28],al
31 halyavin 643
 
3221 hidnplayr 644
        mov     eax,[mouse_delay]
645
        mov     esi,text00+LLL*5+32
646
        call    hexconvert                      ; MOUSE DELAY
647
        call    text_out
648
 
649
        popa
650
        ret
2478 mario79 651
;-------------------------------------------------------------------------------
304 diamond 652
text_out:
3221 hidnplayr 653
        mcall   13,<165,85>,<0,(14*8)>,0x80111199       ;0x80111199-19
31 halyavin 654
 
3221 hidnplayr 655
        mov     edx,text00
656
        mov     ebx,3*65536+7
657
        mov     eax,4
658
        mov     ecx,0xffffff
659
        mov     esi,LLL
660
        mov     ebp,text1_strings
2478 mario79 661
;--------------------------------------
662
newline:
3221 hidnplayr 663
        mcall
664
        add     ebx,8+8
665
        add     edx,esi
666
        dec     ebp
667
        jnz     newline
31 halyavin 668
 
3221 hidnplayr 669
        mov     ebp,text2_strings
670
        add     ebx,8+8
2478 mario79 671
;--------------------------------------
672
@@:
3221 hidnplayr 673
        mcall
674
        add     ebx,8+8
675
        add     edx,esi
676
        dec     ebp
677
        jnz     @b
678
        ret
2478 mario79 679
;-------------------------------------------------------------------------------
3221 hidnplayr 680
hexconvert:          ;converting dec to hex in ascii
681
        xor     ebx,ebx
682
        mov     bl,al
683
        and     bl,15
684
        add     ebx,hex
685
        mov     cl,[ebx]
686
        mov     [esi],cl
687
        shr     eax,4
688
        xor     ebx,ebx
689
        mov     bl,al
690
        and     bl,15
691
        add     ebx,hex
692
        mov     cl,[ebx]
693
        dec     esi
694
        mov     [esi],cl
695
        shr     eax,4
696
        xor     ebx,ebx
697
        mov     bl,al
698
        and     bl,15
699
        add     ebx,hex
700
        mov     cl,[ebx]
701
        dec     esi
702
        mov     [esi],cl
703
        ret
2478 mario79 704
;-------------------------------------------------------------------------------
31 halyavin 705
onoff:
3221 hidnplayr 706
        cmp     [syslang],4
707
        jne     norus1
708
        mov     ebx,'ДА  '
709
        cmp     eax,1
710
        je      exitsub
711
        mov     ebx,'НЕТ '
712
        ret
3927 kaitz 713
norus1:
714
        cmp     [syslang],6
715
        jne     noet1
716
        mov     ebx,'SEES'
717
        cmp     eax,1
718
        je      exitsub
719
        mov     ebx,'V─L.'
720
        ret
2478 mario79 721
;--------------------------------------
3927 kaitz 722
noet1:
3221 hidnplayr 723
        mov     ebx,'ON  '
724
        cmp     eax,1
725
        je      exitsub
726
        mov     ebx,'OFF '
2478 mario79 727
;--------------------------------------
728
exitsub:
3221 hidnplayr 729
        ret
2478 mario79 730
;-------------------------------------------------------------------------------
31 halyavin 731
_lba_read:
3221 hidnplayr 732
        mcall   21,11,[lba_read]
733
        ret
2478 mario79 734
;-------------------------------------------------------------------------------
31 halyavin 735
_pci_acc:
3221 hidnplayr 736
        mcall   21,12,[pci_acc]
737
        ret
2478 mario79 738
;-------------------------------------------------------------------------------
31 halyavin 739
_syslang:
3221 hidnplayr 740
        mcall   21,5,[syslang]
741
        ret
2478 mario79 742
;-------------------------------------------------------------------------------
127 mario79 743
_mouse_speed:
3221 hidnplayr 744
        mcall   18,19,1,[mouse_speed]
745
        ret
2478 mario79 746
;-------------------------------------------------------------------------------
127 mario79 747
_mouse_delay:
3221 hidnplayr 748
        mcall   18,19,3,[mouse_delay]
749
        ret
2478 mario79 750
;-------------------------------------------------------------------------------
2639 mario79 751
_speaker_mute:
3221 hidnplayr 752
        mcall   18,8,1
753
        cmp     [speaker_mute],eax
754
        je      @f
755
        inc     ecx
756
        mcall   18
757
;--------------------------------------
2639 mario79 758
@@:
3221 hidnplayr 759
        ret
2639 mario79 760
;-------------------------------------------------------------------------------
31 halyavin 761
loadtxt:
3221 hidnplayr 762
        mov     edi,text00
763
        mov     ecx,LLL*(text1_strings + text2_strings)/4+1
764
        cmp     [syslang],4
3927 kaitz 765
        jne     loadet
31 halyavin 766
 
3221 hidnplayr 767
        mov     esi,textrus
3927 kaitz 768
        jmp     sload
769
loadet:
770
        mov     edi,text00
771
        mov     ecx,LLL*(text1_strings + text2_strings)/4+1
772
        cmp     [syslang],6
773
        jne     norus
774
		mov     esi,textet
3221 hidnplayr 775
        jmp     sload
2478 mario79 776
;--------------------------------------
777
norus:
3221 hidnplayr 778
        mov     esi,texteng
2478 mario79 779
;--------------------------------------
780
sload:
3221 hidnplayr 781
        rep     movsd
782
        ret
2478 mario79 783
;-------------------------------------------------------------------------------
31 halyavin 784
cleantxt:
3221 hidnplayr 785
        xor     eax,eax
786
        mov     ecx,LLL*(text1_strings + text2_strings)/4
787
        cld
788
        mov     edi,text00
789
        rep     stosd
790
        mov     [text00+1711],byte 'x'
791
        ret
2478 mario79 792
;-------------------------------------------------------------------------------
31 halyavin 793
; DATA AREA
3221 hidnplayr 794
count:          db 0x0
795
blinkpar:       dd 0x0
796
time:           dw 0x0
797
date:           dd 0x0
2478 mario79 798
;-------------------------------------------------------------------------------
31 halyavin 799
textrus:
3221 hidnplayr 800
        db 'Язык системы              : ENGLISH         - +   Применить'
801
        db 'Раскладка клавиатуры      : ENGLISH         - +   Применить'
802
        db 'Включить LBA              : OFF             - +   Применить'
803
        db 'Доступ к шине PCI         : OFF             - +   Применить'
804
        db 'Скорость курсора мыши     : 1               - +   Применить'
805
        db 'Задержка ускорения мыши   : 0x00a           - +   Применить'
806
        db 'Выключить SPEAKER         : OFF             - +   Применить'
807
 
808
        db 'ВНИМАНИЕ:                                    Применить все '
809
        db 'НЕ ЗАБУДЬТЕ СОХРАНИТЬ НАСТРОЙКИ              Сохранить все '
2478 mario79 810
;-------------------------------------------------------------------------------
31 halyavin 811
texteng:
3221 hidnplayr 812
        db 'System language           : ENGLISH         - +     Apply  '
813
        db 'Keyboard layout           : ENGLISH         - +     Apply  '
814
        db 'LBA read enabled          : OFF             - +     Apply  '
815
        db 'PCI access for appl.      : OFF             - +     Apply  '
816
        db 'Mouse pointer speed       : 1               - +     Apply  '
817
        db 'Mouse pointer delay       : 0x00a           - +     Apply  '
818
        db 'SPEAKER disabled          : OFF             - +     Apply  '
2639 mario79 819
text1_strings = 7
31 halyavin 820
 
3221 hidnplayr 821
        db 'NOTE:                                           Apply all  '
822
        db 'SAVE YOUR SETTINGS BEFORE QUITING KOLIBRI       Save all   '
3927 kaitz 823
textet:
824
        db 'S№steemi keel             : ENGLISH         - +    Kinnita '
825
        db 'Klaviatuuri paigutus      : ENGLISH         - +    Kinnita '
826
        db 'LBA lugemine lubatud      : V─L.            - +    Kinnita '
827
        db 'PCI juurdepффs programm.  : V─L.            - +    Kinnita '
828
        db 'Hiire kursori kiirus      : 1               - +    Kinnita '
829
        db 'Hiire kursori viide       : 0x00a           - +    Kinnita '
830
        db 'SPEAKER disabled          : V─L.            - +    Kinnita '
831
        db 'M─RKUS:                                        Kinnita kїik'
832
        db 'SALVESTA SEADED ENNE KOLIBRIST V─LJUMIST      Salvesta kїik'
833
text2_strings = 3
2478 mario79 834
;-------------------------------------------------------------------------------
3221 hidnplayr 835
title   db 'System setup',0
31 halyavin 836
 
3221 hidnplayr 837
hex     db '0123456789ABCDEF'
2478 mario79 838
;-------------------------------------------------------------------------------
2299 hidnplayr 839
include 'keymaps.inc'
2478 mario79 840
;-------------------------------------------------------------------------------
120 mario79 841
read_fileinfo:
3221 hidnplayr 842
        dd 0
843
        dd 0
844
        dd 0
845
        dd 28
846
        dd keyboard
847
        db 0
848
        dd file_name
2478 mario79 849
;-------------------------------------------------------------------------------
120 mario79 850
save_fileinfo:
3221 hidnplayr 851
        dd 2
852
        dd 0
853
        dd 0
854
        dd 28
855
        dd keyboard
4097 mario79 856
file_name:      db '/SYS/SETTINGS/SETUP.DAT',0
2478 mario79 857
;-------------------------------------------------------------------------------
3221 hidnplayr 858
keyboard        dd 0x0
859
syslang         dd 0x4  ; 4 - rus
860
lba_read        dd 0x1
861
pci_acc         dd 0x1
862
mouse_speed     dd 0x2
863
mouse_delay     dd 0xa
864
speaker_mute    dd 0    ; 0 - enable, 1 - disable
2319 mario79 865
;-----------------------------------------------------------------------------
2478 mario79 866
IM_END:
867
;-----------------------------------------------------------------------------
868
align 4
31 halyavin 869
text00:
3221 hidnplayr 870
        rb LLL*(text1_strings + text2_strings)+4
2478 mario79 871
;-----------------------------------------------------------------------------
872
align 4
2639 mario79 873
boot_param:
2481 mario79 874
procinfo:
3221 hidnplayr 875
        rb 1024
2481 mario79 876
;-----------------------------------------------------------------------------
877
align 4
3221 hidnplayr 878
        rb 0x1000
2478 mario79 879
stack_area:
880
;-----------------------------------------------------------------------------
31 halyavin 881
I_END:
2478 mario79 882
;-------------------------------------------------------------------------------