Subversion Repositories Kolibri OS

Rev

Rev 3377 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3377 Rev 3446
Line 1... Line 1...
1
;=============================================================================
1
;=============================================================================
2
; Kolibri Graphics Benchmark 0.6
2
; Kolibri Graphics Benchmark 0.7
3
;--------------------------------------
3
;--------------------------------------
4
; MGB - Menuet Graphics Benchmark 0.3
4
; MGB - Menuet Graphics Benchmark 0.3
5
; Compile with FASM
5
; Compile with FASM
6
;
6
;
7
;=============================================================================
7
;=============================================================================
-
 
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
;---------------------------------------------------------------------
8
; version:	0.6
13
; version:	0.6
9
; last update:  14/03/2013
14
; last update:  14/03/2013
10
; written by:   Marat Zakiyanov aka Mario79, aka Mario
15
; written by:   Marat Zakiyanov aka Mario79, aka Mario
11
; changes:      benchmark f36 - read screen area
16
; changes:      benchmark f36 - read screen area
12
;---------------------------------------------------------------------
17
;---------------------------------------------------------------------
Line 54... Line 59...
54
	dd cur_dir_path
59
	dd cur_dir_path
Line 55... Line 60...
55
 
60
 
56
include '../../../config.inc'		;for nightbuild
61
include '../../../config.inc'		;for nightbuild
57
include '..\..\..\macros.inc'
62
include '..\..\..\macros.inc'
-
 
63
include '..\..\..\proc32.inc'
58
include '..\..\..\proc32.inc'
64
;include '..\..\..\debug.inc'
59
include '../../../develop/libraries/box_lib/trunk/box_lib.mac'
65
include '../../../develop/libraries/box_lib/trunk/box_lib.mac'
60
include '../../../develop/libraries/box_lib/load_lib.mac'
66
include '../../../develop/libraries/box_lib/load_lib.mac'
61
	@use_library
67
	@use_library
62
;---------------------------------------------------------------------
68
;---------------------------------------------------------------------
Line 319... Line 325...
319
	xor	ebx,ebx
325
	xor	ebx,ebx
320
	mcall	36,[area_for_f36],<90,123>,<15,33>
326
	mcall	36,[area_for_f36],<90,123>,<15,33>
321
	ret
327
	ret
322
;---------------------------------------------------------------------
328
;---------------------------------------------------------------------
323
align 4
329
align 4
-
 
330
testGetScreen_GS:
-
 
331
	push	edi
-
 
332
	mov	[start_x],15
-
 
333
	mov	[start_y],33
-
 
334
	mov	[size_x],90
-
 
335
	mov	[size_y],123
-
 
336
	mov	edi,[area_for_f36]
-
 
337
 
-
 
338
	mcall	61,2
-
 
339
	cmp	eax,24
-
 
340
	je	get_area_with_GS_24
-
 
341
;-----------------------------------------------------------------------------
-
 
342
align 4
-
 
343
get_area_with_GS_32:	
-
 
344
	mcall	61,1
-
 
345
	shr	eax,16
-
 
346
	shl	eax,2
-
 
347
	mov	[offset_x],eax
-
 
348
 
-
 
349
	mov	esi,[start_y]
-
 
350
	imul	esi,eax
-
 
351
	
-
 
352
	mov	eax,[start_x]
-
 
353
	shl	eax,2
-
 
354
	add	esi,eax
-
 
355
 
-
 
356
	mov	eax,[size_x]
-
 
357
	shl	eax,2
-
 
358
	sub	[offset_x],eax
-
 
359
	
-
 
360
	mov	edx,[size_y]
-
 
361
	mov	ebx,[offset_x]
-
 
362
	sub	esi,ebx
-
 
363
	mov	ebp,[size_x]
-
 
364
;--------------------------------------
-
 
365
align 4
-
 
366
.start_y:
-
 
367
	add	esi,ebx
-
 
368
	mov	ecx,ebp
-
 
369
;--------------------------------------
-
 
370
align 4
-
 
371
.start_x:	
-
 
372
	mov	eax,[gs:esi]
-
 
373
	mov	[edi],eax
-
 
374
	add	esi,4
-
 
375
	add	edi,3
-
 
376
	
-
 
377
        dec     ecx
-
 
378
        jnz     .start_x
-
 
379
	
-
 
380
        dec     edx
-
 
381
        jnz     .start_y
-
 
382
	
-
 
383
	pop	edi
-
 
384
	ret
-
 
385
;-----------------------------------------------------------------------------
-
 
386
align 4
-
 
387
get_area_with_GS_24:	
-
 
388
	mcall	61,1
-
 
389
	shr	eax,16
-
 
390
	lea	eax,[eax*3]
-
 
391
	mov	[offset_x],eax
-
 
392
	
-
 
393
	mov	esi,[start_y]
-
 
394
	imul	esi,eax
-
 
395
	
-
 
396
	mov	eax,[start_x]
-
 
397
	lea	eax,[eax*3]
-
 
398
	add	esi,eax
-
 
399
	
-
 
400
	mov	eax,[size_x]
-
 
401
	lea	eax,[eax*3]
-
 
402
	sub	[offset_x],eax
-
 
403
	
-
 
404
	mov	edx,[size_y]
-
 
405
	mov	ebx,[offset_x]
-
 
406
	sub	esi,ebx
-
 
407
	mov	ebp,[size_x]
-
 
408
;--------------------------------------
-
 
409
align 4
-
 
410
.start_y:
-
 
411
	add	esi,ebx
-
 
412
	mov	ecx,ebp
-
 
413
;--------------------------------------
-
 
414
align 4
-
 
415
.start_x:	
-
 
416
	mov	eax,[gs:esi]
-
 
417
	mov	[edi],eax
-
 
418
	add	esi,3
-
 
419
	add	edi,3
-
 
420
 
-
 
421
        dec     ecx
-
 
422
        jnz     .start_x
-
 
423
	
-
 
424
        dec     edx
-
 
425
        jnz     .start_y
-
 
426
 
-
 
427
	pop	edi
-
 
428
	ret
-
 
429
;-----------------------------------------------------------------------------
-
 
430
align 4
324
testDrawVertLine:
431
testDrawVertLine:
325
	mcall	38,<300,300>,<30,380>,1090207Fh
432
	mcall	38,<300,300>,<30,380>,1090207Fh
326
	ret
433
	ret
327
;---------------------------------------------------------------------
434
;---------------------------------------------------------------------
328
align 4
435
align 4
Line 560... Line 667...
560
align 4
667
align 4
561
results_table dd \
668
results_table dd \
562
	?,?,testDrawWindow,aDrawingWindow,\
669
	?,?,testDrawWindow,aDrawingWindow,\
563
	?,?,testDrawBar,aDrawingBar,\
670
	?,?,testDrawBar,aDrawingBar,\
564
	?,?,testGetScreen_f36,aGetScreenF36,\
671
	?,?,testGetScreen_f36,aGetScreenF36,\
-
 
672
	?,?,testGetScreen_GS,aGetScreen_GS,\
565
	?,?,testDrawPicture,aDrawingPicture,\
673
	?,?,testDrawPicture,aDrawingPicture,\
566
	?,?,testDrawPicture_f73,aDrawingPictF73,\
674
	?,?,testDrawPicture_f73,aDrawingPictF73,\
567
	?,?,testDrawVertLine,aDrawingVLine,\
675
	?,?,testDrawVertLine,aDrawingVLine,\
568
	?,?,testDrawHorzLine,aDrawingHLine,\
676
	?,?,testDrawHorzLine,aDrawingHLine,\
569
	?,?,testDrawFreeLine,aDrawingFLine,\
677
	?,?,testDrawFreeLine,aDrawingFLine,\
Line 579... Line 687...
579
;---------------------------------------------------------------------
687
;---------------------------------------------------------------------
580
aDrawingWindow	db 'Window Of Type #3, 325x400 px',0
688
aDrawingWindow	db 'Window Of Type #3, 325x400 px',0
581
aDrawingBar	db 'Filled Rectangle, 100x250 px',0
689
aDrawingBar	db 'Filled Rectangle, 100x250 px',0
582
aDrawingPicture db 'Picture, 90x123, px',0
690
aDrawingPicture db 'Picture, 90x123, px',0
583
aDrawingPictF73	db 'Picture for Blitter, 90x123, px',0
691
aDrawingPictF73	db 'Picture for Blitter, 90x123, px',0
584
aGetScreenF36	db 'Get a piece of screen, 90x123, px',0
692
aGetScreenF36	db 'Get a piece of screen f.36, 90x123, px',0
-
 
693
aGetScreen_GS	db 'Get a piece of screen GS, 90x123, px',0
585
aDrawingVLine	db 'Vertical Line, 350 px',0
694
aDrawingVLine	db 'Vertical Line, 350 px',0
586
aDrawingHLine	db 'Horizontal Line, 270 px',0
695
aDrawingHLine	db 'Horizontal Line, 270 px',0
587
aDrawingFLine	db 'Free-angled Line, 350 px',0
696
aDrawingFLine	db 'Free-angled Line, 350 px',0
588
aDrawingText1	db 'Fixed-width Text, 34 chars',0
697
aDrawingText1	db 'Fixed-width Text, 34 chars',0
589
aDrawingText2	db 'Proportional Text, 34 chars',0
698
aDrawingText2	db 'Proportional Text, 34 chars',0
590
aDrawingNumber	db 'Decimal Number, 8 digits',0
699
aDrawingNumber	db 'Decimal Number, 8 digits',0
591
aDrawingPixel	db 'Single Pixel',0
700
aDrawingPixel	db 'Single Pixel',0
Line 592... Line 701...
592
 
701
 
593
aTestText	db 'This is a 34-charachters test text'
702
aTestText	db 'This is a 34-charachters test text'
594
aButtonsText	db 'Test      Comment+    Pattern+      Open        Save',0
703
aButtonsText	db 'Test      Comment+    Pattern+      Open        Save',0
Line 595... Line 704...
595
aCaption	db 'Kolibri Graphical Benchmark 0.6',0
704
aCaption	db 'Kolibri Graphical Benchmark 0.7',0
596
 
705
 
Line 597... Line 706...
597
aLeft	db 'Left    :',0
706
aLeft	db 'Left    :',0
Line 790... Line 899...
790
align 4
899
align 4
791
mouse_dd	rd 1
900
mouse_dd	rd 1
792
area_for_f36	rd 1
901
area_for_f36	rd 1
793
dwTestEndTime	rd 1
902
dwTestEndTime	rd 1
794
dwMainPID	rd 1
903
dwMainPID	rd 1
-
 
904
;-----------------------------------------------------------------------------
-
 
905
start_x		rd 1
-
 
906
start_y		rd 1
-
 
907
size_x		rd 1
-
 
908
size_y		rd 1
-
 
909
offset_x	rd 1
795
;---------------------------------------------------------------------
910
;---------------------------------------------------------------------
796
textarea:
911
textarea:
797
	rb 8
912
	rb 8
798
;---------------------------------------------------------------------
913
;---------------------------------------------------------------------
799
comment_string_1:
914
comment_string_1: