Subversion Repositories Kolibri OS

Rev

Rev 5058 | Blame | Last modification | View Log | Download | RSS feed

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