Subversion Repositories Kolibri OS

Rev

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

Rev Author Line No. Line
386 mikedld 1
;=============================================================================
3446 mario79 2
; Kolibri Graphics Benchmark 0.7
3339 mario79 3
;--------------------------------------
386 mikedld 4
; MGB - Menuet Graphics Benchmark 0.3
5
; Compile with FASM
6
;
7
;=============================================================================
3446 mario79 8
; version:	0.7
9
; last update:  05/04/2013
10
; written by:   Marat Zakiyanov aka Mario79, aka Mario
11
; changes:      benchmark GS selector - read screen area
12
;---------------------------------------------------------------------
3377 mario79 13
; version:	0.6
14
; last update:  14/03/2013
15
; written by:   Marat Zakiyanov aka Mario79, aka Mario
16
; changes:      benchmark f36 - read screen area
17
;---------------------------------------------------------------------
3339 mario79 18
; version:	0.5
19
; last update:  05/03/2013
20
; written by:   Marat Zakiyanov aka Mario79, aka Mario
21
; changes:      benchmark f73-blitter
22
;---------------------------------------------------------------------
1621 mario79 23
; version:	0.4
24
; last update:  18/09//2010
25
; written by:   Marat Zakiyanov aka Mario79, aka Mario
26
; changes:      select path with OpenDialog,
27
;               use of Box_Lib and Proc_Lib,
28
;               support start with path for *.mgb file
29
;               optimization code and size of use memory
30
;---------------------------------------------------------------------
386 mikedld 31
; Original author and copyrights holder:
32
;     Mikhail Lisovin a.k.a. Mihasik
33
;     lisovin@26.ru
34
;
35
; Disassembled with IDA 5.0.0.879:
36
;     http://www.datarescue.com/
37
; With use of 'ida.int' and 'kloader.ldw':
38
;     Eugene Grechnikov a.k.a. diamond
39
;     diamondz@land.ru
40
;     http://diamondz.land.ru/
41
;
42
; Modified for version 0.3:
43
;     Mike Semenako a.k.a mike.dld
44
;     mike.dld@gmail.com
45
;     http://www.mikedld.com/
46
;
47
;=============================================================================
48
 
49
org 0x0
50
use32
51
 
1621 mario79 52
	db 'MENUET01'
53
	dd 1
54
	dd start
55
	dd IM_END
56
	dd I_END	;0x200000
57
	dd stacktop	;0x07FFF0
58
	dd fname_buf
59
	dd cur_dir_path
386 mikedld 60
 
1702 Lrz 61
include '../../../config.inc'		;for nightbuild
485 heavyiron 62
include '..\..\..\macros.inc'
1621 mario79 63
include '..\..\..\proc32.inc'
3446 mario79 64
;include '..\..\..\debug.inc'
1621 mario79 65
include '../../../develop/libraries/box_lib/trunk/box_lib.mac'
66
include '../../../develop/libraries/box_lib/load_lib.mac'
3628 fedesco 67
include 'lang.inc'	;language support
1621 mario79 68
	@use_library
69
;---------------------------------------------------------------------
70
start:
71
	mcall	68,11
478 Ghost 72
 
1621 mario79 73
load_libraries l_libs_start,end_l_libs
386 mikedld 74
 
1621 mario79 75
	cmp	eax,-1
76
	jz	close
77
;---------------------------------------------------------------------
78
	mov	edi,filename_area
79
	mov	esi,start_temp_file_name
80
	call	copy_str_1
386 mikedld 81
 
1621 mario79 82
	mov	edi,comment_string_1
83
	mov	esi,aComment1
84
	call	copy_str_1
386 mikedld 85
 
1621 mario79 86
	mov	edi,comment_string_2
87
	mov	esi,aComment2
88
	call	copy_str_1
386 mikedld 89
 
1621 mario79 90
	mov	edi,fname_buf
91
	cmp	[edi],byte 0
92
	jne	@f
93
	mov	esi,path4
94
	call	copy_str_1
95
	jmp	.OpenDialog
96
@@:
97
	call	locLoadFile
3352 mario79 98
	xor	dword [wFlags],1
1621 mario79 99
.OpenDialog:
100
;OpenDialog	initialisation
3352 mario79 101
	push	dword OpenDialog_data
102
	call	[OpenDialog_Init]
1621 mario79 103
;---------------------------------------------------------------------
104
	mcall	40,0x27
105
red:
106
	call	draw_window
107
still:
108
	mcall	10
109
	cmp	eax,1
110
	jz	red
111
	cmp	eax,2
112
	jz	key
113
	cmp	eax,3
114
	jz	button
115
	jmp	still
116
;---------------------------------------------------------------------
117
copy_str_1:
118
	xor	eax,eax
119
	cld
120
@@:
121
	lodsb
122
	stosb
123
	test	eax,eax
124
	jnz	@b
125
	ret
126
;---------------------------------------------------------------------
127
key:
128
	mcall	2
129
	cmp	ah,'t'
130
	jz	ActionTest
131
	cmp	ah,'c'
132
	jz	ActionComment
133
	cmp	ah,'p'
134
	jz	ActionPattern
135
	cmp	ah,'o'
136
	jz	ActionOpen
137
	cmp	ah,'s'
138
	jz	ActionSave
139
	jmp	still
140
;---------------------------------------------------------------------
141
button:
142
	mcall	17
143
	cmp	ah,1
144
	jnz	NotClose
145
close:
146
	mcall	-1
147
NotClose:
148
	cmp	ah,2
149
	jnz	locNotTest
150
ActionTest:
151
	test	dword [wFlags],1
152
	jnz	still
153
	mcall	51,1,TestWndProc,thread_stack1
154
	jmp	still
155
;---------------------------------------------------------------------
156
locNotTest:
157
	cmp	ah,3
158
	jnz	NotComment
159
ActionComment:
160
	test	dword [wFlags],1
161
	jnz	still
162
	mcall	51,1,thread_comment,thread_stack2
163
	jmp	still
164
;---------------------------------------------------------------------
165
NotComment:
166
	cmp	ah,4
167
	jnz	NotPattern
168
ActionPattern:
169
	test	dword [wFlags],1
170
	jnz	still
171
	mov	esi,results_table
172
	cld
173
@@:
174
	lodsd
175
	mov	[esi],eax
176
	add	esi,TEST_REC_SIZE-4
177
	cmp	dword [esi+TEST_REC_SIZE-4],0
178
	jne	@b
179
	mov	esi,comment_string_1
180
	mov	edi,comment_string_2
181
	call	copy_str_1
182
	call	DrawBars
183
	jmp	still
184
;---------------------------------------------------------------------
185
NotPattern:
186
	cmp	ah,5
187
	jnz	NotOpen
188
ActionOpen:
189
	test	dword [wFlags],1
190
	jnz	still
191
	mov	[OpenDialog_data.type],0 ; open
192
	call	OpenDialog_Start_1
3352 mario79 193
	jne	still
1621 mario79 194
	call	locLoadFile
195
	call	DrawBars
196
.1:
3352 mario79 197
	xor	dword [wFlags],1
1621 mario79 198
	jmp	still
199
;---------------------------------------------------------------------
200
OpenDialog_Start_1:
201
	push    dword OpenDialog_data
3352 mario79 202
	call	[OpenDialog_Start]
1621 mario79 203
	cmp	[OpenDialog_data.status],1
204
	ret
205
;---------------------------------------------------------------------
206
NotOpen:
207
	cmp	ah,6
208
	jnz	still
209
ActionSave:
210
	test	dword [wFlags],1
211
	jnz	still
212
	mov	[OpenDialog_data.type],1 ; save
213
	call	OpenDialog_Start_1
3352 mario79 214
	jne	still
1621 mario79 215
	call	locSaveFile
216
	jmp	ActionOpen.1
217
;---------------------------------------------------------------------
218
TestWndProc:
3377 mario79 219
	mcall	68,12,90*123*3
220
	mov	[area_for_f36],eax
1621 mario79 221
	or	dword [wFlags],1
222
	mov	esi,results_table+8
223
align 4
224
.next_test:
225
	xor	edi,edi
226
	mcall	 26,9
227
	inc	eax
228
	mov	ecx,eax
229
	add	eax,100
230
	mov	[dwTestEndTime],eax
231
align 4
232
@@:
233
	mcall	 26
234
	cmp	eax,ecx
235
	jb	@r
236
align 4
237
@@:
238
	push	esi
239
	call	dword [esi]
240
	pop	esi
241
	inc	edi
242
	mcall	26,9
243
	cmp	eax,[dwTestEndTime]
244
	jb	@b
245
	mov	[esi-8],edi
386 mikedld 246
 
1621 mario79 247
	add	esi,TEST_REC_SIZE
248
	cmp	dword [esi],0
249
	jnz	.next_test
3352 mario79 250
	xor	dword [wFlags],1
3377 mario79 251
	mcall	68,13,[area_for_f36]
1621 mario79 252
	mcall	-1
253
;---------------------------------------------------------------------
254
draw_window:
255
	mcall	12,1
256
	mcall	48,4
257
	mov	ebx,100*65536+72*5+14
258
	mov	ecx,80*65536+TESTS_NUM*LINE_HEIGHT+15+20+35
259
	add	cx,ax
260
	xor	eax,eax
261
	xor	esi,esi
262
	mcall	,,,34000000h,,aCaption
386 mikedld 263
 
1621 mario79 264
	mov	eax,8
265
	mov	ebx,050036h+12
266
	mov	ecx,5*65536+20
267
	mov	edx,2
268
	mov	esi,0x00007F7F
269
@@:
270
	mcall
271
	add	ebx,72*65536
272
	inc	edx
273
	cmp	edx,7
274
	jb	@r
386 mikedld 275
 
1621 mario79 276
	mov	ecx,31
277
	mov	edx,0x00007F7F
278
	mov	esi,(72*5)/2
279
	call	drawSeparator
386 mikedld 280
 
1621 mario79 281
	mcall	4,<27,12>,0x80DDEEFF,aButtonsText
282
	call	DrawBars
386 mikedld 283
 
1621 mario79 284
	mov	ecx,TESTS_NUM*LINE_HEIGHT+15+21
285
	mov	edx,0x00007F7F
286
	mov	esi,(72*5)/2
287
	call	drawSeparator
288
	mcall	12,2
289
	ret
290
;---------------------------------------------------------------------
291
drawSeparator:
292
	mov	eax,1
293
	mov	ebx,3
294
@@:
295
	mcall
296
	add	ebx,2
297
	dec	esi
298
	jnz	@b
299
	ret
300
;---------------------------------------------------------------------
301
align 4
302
testDrawWindow:
303
	xor	eax,eax
304
	mcall	,640145h,4F0190h,3000000h
305
	ret
306
;---------------------------------------------------------------------
307
align 4
308
testDrawBar:
309
	mcall	13,0A0064h,1E00FAh,6A73D0h
310
	ret
311
;---------------------------------------------------------------------
312
align 4
313
testDrawPicture:
3377 mario79 314
;	xor	ebx,ebx
315
	mcall	7,[area_for_f36],<90,123>,<15,33>
1621 mario79 316
	ret
317
;---------------------------------------------------------------------
318
align 4
3339 mario79 319
testDrawPicture_f73:
320
	xor	ebx,ebx
321
	mcall	73,,params_f73
322
	ret
323
;---------------------------------------------------------------------
324
align 4
3377 mario79 325
testGetScreen_f36:
326
	xor	ebx,ebx
327
	mcall	36,[area_for_f36],<90,123>,<15,33>
328
	ret
329
;---------------------------------------------------------------------
330
align 4
3446 mario79 331
testGetScreen_GS:
332
	push	edi
333
	mov	[start_x],15
334
	mov	[start_y],33
335
	mov	[size_x],90
336
	mov	[size_y],123
337
	mov	edi,[area_for_f36]
338
 
339
	mcall	61,2
340
	cmp	eax,24
341
	je	get_area_with_GS_24
342
;-----------------------------------------------------------------------------
343
align 4
3628 fedesco 344
get_area_with_GS_32:
3446 mario79 345
	mcall	61,1
346
	shr	eax,16
347
	shl	eax,2
348
	mov	[offset_x],eax
349
 
350
	mov	esi,[start_y]
351
	imul	esi,eax
3628 fedesco 352
 
3446 mario79 353
	mov	eax,[start_x]
354
	shl	eax,2
355
	add	esi,eax
356
 
357
	mov	eax,[size_x]
358
	shl	eax,2
359
	sub	[offset_x],eax
3628 fedesco 360
 
3446 mario79 361
	mov	edx,[size_y]
362
	mov	ebx,[offset_x]
363
	sub	esi,ebx
364
	mov	ebp,[size_x]
365
;--------------------------------------
366
align 4
367
.start_y:
368
	add	esi,ebx
369
	mov	ecx,ebp
370
;--------------------------------------
371
align 4
3628 fedesco 372
.start_x:
3446 mario79 373
	mov	eax,[gs:esi]
374
	mov	[edi],eax
375
	add	esi,4
376
	add	edi,3
3628 fedesco 377
 
3446 mario79 378
        dec     ecx
379
        jnz     .start_x
3628 fedesco 380
 
3446 mario79 381
        dec     edx
382
        jnz     .start_y
3628 fedesco 383
 
3446 mario79 384
	pop	edi
385
	ret
386
;-----------------------------------------------------------------------------
387
align 4
3628 fedesco 388
get_area_with_GS_24:
3446 mario79 389
	mcall	61,1
390
	shr	eax,16
391
	lea	eax,[eax*3]
392
	mov	[offset_x],eax
3628 fedesco 393
 
3446 mario79 394
	mov	esi,[start_y]
395
	imul	esi,eax
3628 fedesco 396
 
3446 mario79 397
	mov	eax,[start_x]
398
	lea	eax,[eax*3]
399
	add	esi,eax
3628 fedesco 400
 
3446 mario79 401
	mov	eax,[size_x]
402
	lea	eax,[eax*3]
403
	sub	[offset_x],eax
3628 fedesco 404
 
3446 mario79 405
	mov	edx,[size_y]
406
	mov	ebx,[offset_x]
407
	sub	esi,ebx
408
	mov	ebp,[size_x]
409
;--------------------------------------
410
align 4
411
.start_y:
412
	add	esi,ebx
413
	mov	ecx,ebp
414
;--------------------------------------
415
align 4
3628 fedesco 416
.start_x:
3446 mario79 417
	mov	eax,[gs:esi]
418
	mov	[edi],eax
419
	add	esi,3
420
	add	edi,3
421
 
422
        dec     ecx
423
        jnz     .start_x
3628 fedesco 424
 
3446 mario79 425
        dec     edx
426
        jnz     .start_y
427
 
428
	pop	edi
429
	ret
430
;-----------------------------------------------------------------------------
431
align 4
1621 mario79 432
testDrawVertLine:
433
	mcall	38,<300,300>,<30,380>,1090207Fh
434
	ret
435
;---------------------------------------------------------------------
436
align 4
437
testDrawHorzLine:
438
	mcall	38,<30,300>,<380,380>,1090207Fh
439
	ret
440
;---------------------------------------------------------------------
441
align 4
442
testDrawFreeLine:
443
	mcall	38,<30,300>,<380,30>,1090207Fh
444
	ret
445
;---------------------------------------------------------------------
446
align 4
447
testDrawText1:
448
	mcall	4,0C012Ch,0AA66h,aTestText,34
449
	ret
450
;---------------------------------------------------------------------
451
align 4
452
testDrawText2:
453
	mcall	4,1B013Bh,10E7B850h,aTestText,34
454
	ret
455
;---------------------------------------------------------------------
456
align 4
457
testDrawNumber:
458
	mcall	47,80000h,12345678,2A014Ah,0E0B27Bh
459
	ret
460
;---------------------------------------------------------------------
461
align 4
462
testDrawPixel:
463
	mcall	1,100,100,0FFFFFFh
464
	ret
465
;---------------------------------------------------------------------
466
DrawBars:
467
	mov	edi,results_table
468
	mov	ebx,30+7
469
.next_result:
470
	cmp	dword[edi+TEST_REC_SIZE-4],0
471
	je	.exit
386 mikedld 472
 
1621 mario79 473
	push	ebx
474
	movzx	ecx,bx
475
	add	ecx,-2
476
	shl	ecx,16
477
	mov	cx,LINE_HEIGHT
478
	mov	ebx,0*65536+72*5+5
479
	xor	edx,edx
480
	mcall	13
481
	pop	ebx
386 mikedld 482
 
1621 mario79 483
	and	ebx,0x0000FFFF
484
	or	ebx,5*65536
485
	mov	edx,[edi+TEST_REC_SIZE-4]
486
	mcall	4,,0x8000CCCC
386 mikedld 487
 
1621 mario79 488
	push	'=' 0x00FFFF00 0x00FFFF7F 0x00FFFF7F
489
	mov	eax,[edi+0]
490
	cmp	eax,[edi+4]
491
	je	@f
492
	jb	.lp1
493
	mov	dword[esp+0],0x007FFF7F
494
	mov	dword[esp+4],0x00FF7F7F
495
	mov	dword[esp+8],0x0000FF00
496
	mov	byte[esp+12],'>'
497
.lp1:
498
	ja	@f
499
	mov	dword[esp+0],0x00FF7F7F
500
	mov	dword[esp+4],0x007FFF7F
501
	mov	dword[esp+8],0x00FF0000
502
	mov	byte[esp+12],'<'
503
@@:
504
	pop	ecx
505
	call	int2str
506
	add	ebx,(72*5-6*8*2-6-10-5)*65536 ; 196
507
	mcall	4,,,textarea,8
386 mikedld 508
 
1621 mario79 509
	pop	ecx
510
	mov	eax,[edi+4]
511
	call	int2str
512
	add	ebx,(6*8+6+10)*65536
513
	mcall	4
386 mikedld 514
 
1621 mario79 515
	pop	ecx
516
	add	ebx,(-6-5)*65536
517
	mov	edx,esp
518
	mov	esi,1
519
	mcall
520
	add	esp,4
386 mikedld 521
 
1621 mario79 522
	add	edi,TEST_REC_SIZE
523
	add	bx,LINE_HEIGHT
524
	jmp	.next_result
525
.exit:
526
	mov	ebx, 0*65536+72*5+5
527
	mov	ecx, (TESTS_NUM*LINE_HEIGHT+15+25)*65536+26
528
	xor	edx, edx
529
	mcall	13
386 mikedld 530
 
1621 mario79 531
	mov	ebx, 5*65536+(TESTS_NUM*LINE_HEIGHT+15+27)
532
	mcall	4,,0x8000CCCC,aLeft
386 mikedld 533
 
1621 mario79 534
	add	ebx, (6*10)*65536
535
	mcall	,,0x80FFFF00,comment_string_1
386 mikedld 536
 
1621 mario79 537
	mov	ebx, 5*65536+(TESTS_NUM*LINE_HEIGHT+15+27+12)
538
	mcall	,,0x8000CCCC,aRight
386 mikedld 539
 
1621 mario79 540
	add	ebx, (6*10)*65536
541
	mcall	,,0x80FFFF00,comment_string_2
542
	ret
543
;---------------------------------------------------------------------
544
int2str:
545
	push	eax ecx edx edi
546
	mov	edi,textarea+7
547
	mov	dword[textarea+0],'    '
548
	mov	dword[textarea+4],'    '
549
	mov	ecx,10
550
@@:
551
	xor	edx,edx
552
	div	ecx
553
	add	dl,'0'
554
	mov	[edi],dl
555
	dec	edi
556
	or	eax,eax
557
	jnz	@b
558
	pop	edi edx ecx eax
559
	ret
560
;---------------------------------------------------------------------
561
thread_comment:
562
	or	dword [wFlags],1
563
	mcall	40,0x27
564
	mov	esi,comment_string_1
565
	cld
566
@@:
567
	lodsb
568
	test	al,al
569
	jne	@r
570
	sub	esi,comment_string_1
571
	mov	eax,esi
572
	dec	eax
573
	mov	edi, edit1
3352 mario79 574
	mov	[edi+48], eax	;ed_size
575
	mov	[edi+52], eax	;ed_pos
1621 mario79 576
;---------------------------------------------------------------------
577
.red:
578
	call .draw_window
579
.still:
580
	mcall	10	; wait here for event
581
	cmp	eax,1	; redraw request ?
582
	je	.red
583
	cmp	eax,2	; key in buffer ?
584
	je	.key
585
	cmp	eax,3	; button in buffer ?
586
	je	.button
386 mikedld 587
 
3352 mario79 588
	push	dword name_editboxes
589
	call	[edit_box_mouse]
1621 mario79 590
	jmp	.still
591
;---------------------------------------------------------------------
592
.key:		; key
593
	mcall	2
594
	cmp	ah,13
595
	je	.close	;.close_with_open_file
596
	cmp	ah,27
597
	je	.close
3628 fedesco 598
 
3352 mario79 599
	push	dword name_editboxes
600
	call	[edit_box_key]
1621 mario79 601
	jmp	.still
602
;---------------------------------------------------------------------
603
.button:		; button
604
	mcall	17
605
	cmp	ah,1	; button id=1 ?
606
	jne	.still
607
.close:
3352 mario79 608
	xor	dword [wFlags],1
1621 mario79 609
	mcall	-1
610
;---------------------------------------------------------------------
611
.draw_window:
612
	mcall	12,1
613
	xor	eax,eax
614
	xor	esi,esi
615
	mcall	,<100,300>,<100,80>,0x34780078,,aComment
3352 mario79 616
	push	dword name_editboxes
617
	call	[edit_box_draw]
1621 mario79 618
	mcall	12,2
619
	ret
620
;---------------------------------------------------------------------
621
locLoadFile:
622
	mov	[stFileInfoBlock], 0
623
	or	dword [wFlags],1
624
	mcall	70,stFileInfoBlock
625
	mov	esi,mgb_data
626
	mov	edi,results_table+4
627
	cld
628
@@:
629
	cmp	dword[edi+TEST_REC_SIZE-8],0
630
	je	@f
631
	movsd
632
	add	edi,TEST_REC_SIZE-4
633
	jmp	@b
634
@@:
635
	mov	edi,comment_string_2
636
	mov	ecx,44
637
	rep	movsb
638
	ret
639
;---------------------------------------------------------------------
640
locSaveFile:
641
	mov	[stFileInfoBlock], 2
642
	or	dword [wFlags],1
643
	mov	esi,results_table+4
644
	mov	edi,mgb_data
645
	cld
646
@@:
647
	cmp	dword[esi+TEST_REC_SIZE-8],0
648
	je	@f
649
	movsd
650
	add	esi,TEST_REC_SIZE-4
651
	jmp	@b
652
@@:
653
	mov	esi,comment_string_2
654
	mov	ecx,44
655
	rep	movsb
656
	mcall	70,stFileInfoBlock
657
	ret
658
;---------------------------------------------------------------------
659
align 4
660
stFileInfoBlock dd 0,0,0
661
dwDataSize	dd TESTS_NUM*4+44	;1
662
		dd mgb_data
663
		db 0
664
		dd fname_buf
665
;---------------------------------------------------------------------
666
wFlags		dd 0
667
;---------------------------------------------------------------------
668
align 4
669
results_table dd \
3352 mario79 670
	?,?,testDrawWindow,aDrawingWindow,\
671
	?,?,testDrawBar,aDrawingBar,\
3377 mario79 672
	?,?,testGetScreen_f36,aGetScreenF36,\
3446 mario79 673
	?,?,testGetScreen_GS,aGetScreen_GS,\
3352 mario79 674
	?,?,testDrawPicture,aDrawingPicture,\
675
	?,?,testDrawPicture_f73,aDrawingPictF73,\
676
	?,?,testDrawVertLine,aDrawingVLine,\
677
	?,?,testDrawHorzLine,aDrawingHLine,\
678
	?,?,testDrawFreeLine,aDrawingFLine,\
679
	?,?,testDrawText1,aDrawingText1,\
680
	?,?,testDrawText2,aDrawingText2,\
681
	?,?,testDrawNumber,aDrawingNumber,\
682
	?,?,testDrawPixel,aDrawingPixel,\
683
	0,0,0,0
1621 mario79 684
;---------------------------------------------------------------------
685
LINE_HEIGHT   = 13
686
TEST_REC_SIZE = 16
687
TESTS_NUM     = ($ - results_table) / TEST_REC_SIZE - 1
688
;---------------------------------------------------------------------
3628 fedesco 689
if lang eq it
690
	aDrawingWindow	db 'Window Of Type #3, 325x400 px',0
691
	aDrawingBar	db 'Filled Rectangle, 100x250 px',0
692
	aDrawingPicture db 'Picture, 90x123, px',0
693
	aDrawingPictF73	db 'Picture for Blitter, 90x123, px',0
694
	aGetScreenF36	db 'Get a piece of screen f.36, 90x123, px',0
695
	aGetScreen_GS	db 'Get a piece of screen GS, 90x123, px',0
696
	aDrawingVLine	db 'Linea verticale, 350 px',0
697
	aDrawingHLine	db 'Linea orizzontale, 270 px',0
698
	aDrawingFLine	db 'Free-angled Line, 350 px',0
699
	aDrawingText1	db 'Fixed-width Text, 34 chars',0
700
	aDrawingText2	db 'Proportional Text, 34 chars',0
701
	aDrawingNumber	db 'Decimal Number, 8 digits',0
702
	aDrawingPixel	db 'Singolo pixel',0
386 mikedld 703
 
3628 fedesco 704
	aTestText	db 'This is a 34-charachters test text'
705
	aButtonsText	db 'Test      Commenti    Pattern+     Apri        Salva',0
706
	aCaption	db 'Kolibri Graphical Benchmark 0.7',0
386 mikedld 707
 
3628 fedesco 708
	aLeft	db 'Sinistra:',0
709
	aRight	db 'Destra  :',0
386 mikedld 710
 
3628 fedesco 711
	aComment1	db 'Attuale ',0
712
	aComment2	db 'no pattern',0
713
	aComment	db 'Commento',0
714
else
715
	aDrawingWindow	db 'Window Of Type #3, 325x400 px',0
716
	aDrawingBar	db 'Filled Rectangle, 100x250 px',0
717
	aDrawingPicture db 'Picture, 90x123, px',0
718
	aDrawingPictF73	db 'Picture for Blitter, 90x123, px',0
719
	aGetScreenF36	db 'Get a piece of screen f.36, 90x123, px',0
720
	aGetScreen_GS	db 'Get a piece of screen GS, 90x123, px',0
721
	aDrawingVLine	db 'Vertical Line, 350 px',0
722
	aDrawingHLine	db 'Horizontal Line, 270 px',0
723
	aDrawingFLine	db 'Free-angled Line, 350 px',0
724
	aDrawingText1	db 'Fixed-width Text, 34 chars',0
725
	aDrawingText2	db 'Proportional Text, 34 chars',0
726
	aDrawingNumber	db 'Decimal Number, 8 digits',0
727
	aDrawingPixel	db 'Single Pixel',0
728
 
729
	aTestText	db 'This is a 34-charachters test text'
730
	aButtonsText	db 'Test      Comment+    Pattern+      Open        Save',0
731
	aCaption	db 'Kolibri Graphical Benchmark 0.7',0
732
 
733
	aLeft	db 'Left    :',0
734
	aRight	db 'Right   :',0
735
 
736
	aComment1	db 'current',0
737
	aComment2	db 'no pattern',0
738
	aComment	db 'Comment',0
739
end if
1621 mario79 740
;---------------------------------------------------------------------
741
system_dir_Boxlib	db '/sys/lib/box_lib.obj',0
742
system_dir_ProcLib	db '/sys/lib/proc_lib.obj',0
743
;---------------------------------------------------------------------
744
head_f_i:
3628 fedesco 745
if lang eq it
746
	head_f_l	db 'Errore Sistema',0
747
else
748
	head_f_l	db 'System error',0
749
end if
386 mikedld 750
 
1621 mario79 751
err_message_found_lib1	db 'box_lib.obj - Not found!',0
752
err_message_found_lib2	db 'proc_lib.obj - Not found!',0
386 mikedld 753
 
1621 mario79 754
err_message_import1	db 'box_lib.obj - Wrong import!',0
755
err_message_import2	db 'proc_lib.obj - Wrong import!',0
756
;---------------------------------------------------------------------
757
align 4
758
l_libs_start:
386 mikedld 759
 
1621 mario79 760
library01  l_libs system_dir_Boxlib+9, cur_dir_path, library_path, system_dir_Boxlib, \
761
err_message_found_lib1, head_f_l, Box_lib_import, err_message_import1, head_f_i
386 mikedld 762
 
1621 mario79 763
library02  l_libs system_dir_ProcLib+9, cur_dir_path, library_path, system_dir_ProcLib, \
764
err_message_found_lib2, head_f_l, ProcLib_import, err_message_import2, head_f_i
386 mikedld 765
 
1621 mario79 766
end_l_libs:
767
;---------------------------------------------------------------------
768
align 4
769
OpenDialog_data:
770
.type			dd 1	; Save
771
.procinfo		dd procinfo	;+4
772
.com_area_name		dd communication_area_name	;+8
773
.com_area		dd 0	;+12
774
.opendir_pach		dd temp_dir_pach	;+16
775
.dir_default_pach	dd communication_area_default_pach	;+20
776
.start_path		dd open_dialog_path	;+24
777
.draw_window		dd draw_window	;+28
778
.status			dd 0	;+32
779
.openfile_pach 		dd fname_buf	;+36
780
.filename_area		dd filename_area	;+40
781
.filter_area		dd Filter
782
.x:
783
.x_size			dw 420 ;+48 ; Window X size
784
.x_start		dw 10 ;+50 ; Window X position
785
.y:
786
.y_size			dw 320 ;+52 ; Window y size
787
.y_start		dw 10 ;+54 ; Window Y position
386 mikedld 788
 
1621 mario79 789
communication_area_name:
790
	db 'FFFFFFFF_open_dialog',0
791
open_dialog_path:
1702 Lrz 792
if __nightbuild eq yes
3352 mario79 793
	db '/sys/MANAGERS/opendial',0
1702 Lrz 794
else
3352 mario79 795
	db '/sys/File Managers/opendial',0
1702 Lrz 796
end if
1621 mario79 797
communication_area_default_pach:
798
	db '/rd0/1/',0
386 mikedld 799
 
1621 mario79 800
Filter:
801
dd	Filter.end - Filter
802
.1:
803
db	'MGB',0
804
.end:
805
db	0
386 mikedld 806
 
1621 mario79 807
start_temp_file_name:	db 'pattern.mgb',0
386 mikedld 808
 
1621 mario79 809
path4	db '/rd/1/pattern.mgb',0
810
;---------------------------------------------------------------------
386 mikedld 811
align 4
3339 mario79 812
params_f73:
813
; destination
814
.offset_X_dest	dd 0	; +0
815
.offset_Y_dest	dd 0	; +4
816
.width_dest	dd 90	; +8
817
.height_dest	dd 123	; +12
818
; source
819
.offset_X_src	dd 0	; +16
820
.offset_Y_src	dd 0	; +20
821
.width_src	dd 90	; +24
822
.height_src	dd 123	; +28
823
; other
824
.pointer	dd 0	; 90*4	; +32
825
.row_size	dd 90*4	; +36
826
;---------------------------------------------------------------------
827
align 4
1621 mario79 828
ProcLib_import:
829
OpenDialog_Init		dd aOpenDialog_Init
830
OpenDialog_Start	dd aOpenDialog_Start
831
;OpenDialog__Version	dd aOpenDialog_Version
3352 mario79 832
	dd 0
833
	dd 0
1621 mario79 834
aOpenDialog_Init	db 'OpenDialog_init',0
835
aOpenDialog_Start	db 'OpenDialog_start',0
836
;aOpenDialog_Version	db 'Version_OpenDialog',0
837
;---------------------------------------------------------------------
838
align 4
3628 fedesco 839
Box_lib_import:
1621 mario79 840
;init_lib		dd a_init
841
;version_lib		dd a_version
386 mikedld 842
 
843
 
1621 mario79 844
edit_box_draw		dd aEdit_box_draw
845
edit_box_key		dd aEdit_box_key
846
edit_box_mouse		dd aEdit_box_mouse
847
;version_ed		dd aVersion_ed
386 mikedld 848
 
1621 mario79 849
;check_box_draw		dd aCheck_box_draw
850
;check_box_mouse	dd aCheck_box_mouse
851
;version_ch		dd aVersion_ch
386 mikedld 852
 
1621 mario79 853
;option_box_draw	dd aOption_box_draw
854
;option_box_mouse	dd aOption_box_mouse
855
;version_op		dd aVersion_op
386 mikedld 856
 
1621 mario79 857
;scrollbar_ver_draw	dd aScrollbar_ver_draw
858
;scrollbar_ver_mouse	dd aScrollbar_ver_mouse
859
;scrollbar_hor_draw	dd aScrollbar_hor_draw
860
;scrollbar_hor_mouse	dd aScrollbar_hor_mouse
861
;version_scrollbar	dd aVersion_scrollbar
386 mikedld 862
 
1621 mario79 863
;dinamic_button_draw	dd aDbutton_draw
864
;dinamic_button_mouse	dd aDbutton_mouse
865
;version_dbutton	dd aVersion_dbutton
386 mikedld 866
 
1621 mario79 867
;menu_bar_draw		dd aMenu_bar_draw
868
;menu_bar_mouse		dd aMenu_bar_mouse
869
;menu_bar_activate	dd aMenu_bar_activate
870
;version_menu_bar	dd aVersion_menu_bar
478 Ghost 871
 
1621 mario79 872
;FileBrowser_draw	dd aFileBrowser_draw
873
;FileBrowser_mouse	dd aFileBrowser_mouse
874
;FileBrowser_key	dd aFileBrowser_key
875
;Version_FileBrowser	dd aVersion_FileBrowser
478 Ghost 876
 
1621 mario79 877
;PathShow_prepare	dd sz_PathShow_prepare
878
;PathShow_draw		dd sz_PathShow_draw
879
;Version_path_show	dd szVersion_path_show
880
			dd 0
881
			dd 0
478 Ghost 882
 
1621 mario79 883
;a_init			db 'lib_init',0
884
;a_version		db 'version',0
386 mikedld 885
 
1621 mario79 886
aEdit_box_draw		db 'edit_box',0
887
aEdit_box_key		db 'edit_box_key',0
888
aEdit_box_mouse		db 'edit_box_mouse',0
889
;aVersion_ed		db 'version_ed',0
386 mikedld 890
 
1621 mario79 891
;aCheck_box_draw	db 'check_box_draw',0
892
;aCheck_box_mouse	db 'check_box_mouse',0
893
;aVersion_ch		db 'version_ch',0
386 mikedld 894
 
1621 mario79 895
;aOption_box_draw	db 'option_box_draw',0
896
;aOption_box_mouse	db 'option_box_mouse',0
897
;aVersion_op		db 'version_op',0
386 mikedld 898
 
1621 mario79 899
;aScrollbar_ver_draw	db 'scrollbar_v_draw',0
900
;aScrollbar_ver_mouse	db 'scrollbar_v_mouse',0
901
;aScrollbar_hor_draw	db 'scrollbar_h_draw',0
902
;aScrollbar_hor_mouse	db 'scrollbar_h_mouse',0
903
;aVersion_scrollbar	db 'version_scrollbar',0
386 mikedld 904
 
1621 mario79 905
;aDbutton_draw		db 'dbutton_draw',0
906
;aDbutton_mouse		db 'dbutton_mouse',0
907
;aVersion_dbutton	db 'version_dbutton',0
386 mikedld 908
 
1621 mario79 909
;aMenu_bar_draw		db 'menu_bar_draw',0
910
;aMenu_bar_mouse		db 'menu_bar_mouse',0
911
;aMenu_bar_activate	db 'menu_bar_activate',0
912
;aVersion_menu_bar	db 'version_menu_bar',0
386 mikedld 913
 
1621 mario79 914
;aFileBrowser_draw	db 'FileBrowser_draw',0
915
;aFileBrowser_mouse	db 'FileBrowser_mouse',0
916
;aFileBrowser_key	db 'FileBrowser_key',0
917
;aVersion_FileBrowser	db 'version_FileBrowser',0
386 mikedld 918
 
1621 mario79 919
;sz_PathShow_prepare	db 'PathShow_prepare',0
920
;sz_PathShow_draw	db 'PathShow_draw',0
921
;szVersion_path_show	db 'version_PathShow',0
922
;---------------------------------------------------------------------
923
; for EDITBOX
924
align 4
925
name_editboxes:
926
edit1 edit_box 200,10,30,0xffffff,0xbbddff,0,0,0,255,comment_string_1,mouse_dd,ed_focus+ed_always_focus,0
927
name_editboxes_end:
928
;---------------------------------------------------------------------
386 mikedld 929
 
1621 mario79 930
IM_END:
3377 mario79 931
align 4
1621 mario79 932
mouse_dd	rd 1
3377 mario79 933
area_for_f36	rd 1
934
dwTestEndTime	rd 1
935
dwMainPID	rd 1
3446 mario79 936
;-----------------------------------------------------------------------------
937
start_x		rd 1
938
start_y		rd 1
939
size_x		rd 1
940
size_y		rd 1
941
offset_x	rd 1
1621 mario79 942
;---------------------------------------------------------------------
943
textarea:
944
	rb 8
945
;---------------------------------------------------------------------
946
comment_string_1:
947
	rb 44
948
;---------------------------------------------------------------------
949
comment_string_2:
950
	rb 44
951
;---------------------------------------------------------------------
952
mgb_data:
953
	rb 100
954
;---------------------------------------------------------------------
955
procinfo:
956
	rb 1024
957
;---------------------------------------------------------------------
958
cur_dir_path:
959
	rb 4096
960
;---------------------------------------------------------------------
961
library_path:
962
	rb 4096
963
;---------------------------------------------------------------------
964
temp_dir_pach:
965
	rb 4096
966
;---------------------------------------------------------------------
967
fname_buf:
968
	rb 4096
969
;---------------------------------------------------------------------
970
filename_area:
971
	rb 256
972
;---------------------------------------------------------------------
973
	rb 4096
974
thread_stack2:
975
;---------------------------------------------------------------------
976
	rb 4096
977
thread_stack1:
978
;---------------------------------------------------------------------
979
	rb 4096
3339 mario79 980
	rb 0x2884	; for F73 image size 123*90*4
1621 mario79 981
stacktop:
3628 fedesco 982
I_END: