flat assembler
Message board for the users of flat assembler.

Index > Windows > Newbie Question - Timer and Window Handling

Author
Thread Post new topic Reply to topic
Kuemmel



Joined: 30 Jan 2006
Posts: 200
Location: Stuttgart, Germany
Kuemmel 30 Jan 2006, 16:14
Hi people,

first, I got to say I'm totally new to Win32 Assembler, I did a lot of work programming ancient C64 and Acorn Risc Machines in assembly and this is my first attempt on x86 code.

I got some example for plotting random pixels in a window and I modified it to plot just the whole area with white pixels. The only thing I modified from the original code is the "plot_loop:".

As I would like later step further to program some simple fractal madelbrot routines where I would need something like the same thing, a window, the opportunity to plot pixels and finally timer to see how much time the calculation took.

At the moment I see that the program plots really slow, I think this must got something to do with the GetDC/ReleaseDC thing and the whole possible allowed user interaction. How can I get rid of this ?

The next thing is a timer implementation. For me it would be okay if the program just draws the white pixels and shows me how much time it used for it in a message box. How this could be done ?

I hope you get what I meant to do and excuse for the lame code, of course storing and loading variables for a loop is kind of stupid, but at the moment I think the registers are also used by the other invoked routines, or !?

Code:
entry start

include 'win32a.inc'
include 'macros.inc'

WINDOWWIDTH  = 800
WINDOWHEIGHT = 600

section '.data' data readable writeable

  window_x dd WINDOWWIDTH
  window_y dd WINDOWHEIGHT
  color    dd $00ffffff

  _title   db 'Plotting pixels in Windows',0
  _class   db 'FASMWIN32',0

  align 4

  mainhwnd  dd ?
  hinstance dd ?
  hdc       dd ?

  msg MSG
  wc  WNDCLASS
  ps  PAINTSTRUCT

section '.code' code readable executable

  start:

        invoke  GetModuleHandle,0
        mov     [hinstance],eax
        invoke  LoadIcon,0,IDI_APPLICATION
        mov     [wc.hIcon],eax
        invoke  LoadCursor,0,IDC_ARROW
        mov     [wc.hCursor],eax
        mov     [wc.style],0
        mov     [wc.lpfnWndProc],WindowProc
        mov     [wc.cbClsExtra],0
        mov     [wc.cbWndExtra],0
        mov     eax,[hinstance]
        mov     [wc.hInstance],eax
        invoke  GetStockObject,BLACK_BRUSH
        mov     [wc.hbrBackground],eax
        mov     [wc.lpszMenuName],0
        mov     [wc.lpszClassName],_class
        invoke  RegisterClass,wc

        invoke  CreateWindowEx,NULL,_class,_title,\
                WS_OVERLAPPEDWINDOW+WS_VISIBLE,100,30,WINDOWWIDTH,WINDOWHEIGHT,\
                NULL,NULL,[hinstance],NULL

        mov     [mainhwnd],eax

msg_loop:
        invoke  PeekMessage, msg, 0, 0, 0, PM_REMOVE
        cmp     eax,0
        jz      msg_loop
        invoke  TranslateMessage,msg
        invoke  DispatchMessage,msg
        cmp     [msg.message], WM_QUIT
        je      end_loop

        ;Main Processing goes right here

plot_loop:
        invoke  GetDC,[mainhwnd]
        mov     [hdc],eax
        invoke  SetPixel,[hdc],[window_x],[window_y],[color]
        ;release the device context
        invoke  ReleaseDC,[mainhwnd],[hdc]


        mov ebx,[window_x]
        dec ebx
        mov [window_x],ebx
        jnz plot_loop

        mov [window_x],WINDOWWIDTH

        mov ebx,[window_y]
        dec ebx
        mov [window_y],ebx
        jnz plot_loop

        mov [window_y],WINDOWHEIGHT

        jmp msg_loop

end_loop:
        ;shutdown stuff here
        invoke  ExitProcess,[msg.wParam]

proc WindowProc, hwnd,wmsg,wparam,lparam
        push    ebx esi edi
        ;check for messages wanted here
        cmp     [wmsg],WM_CLOSE
        je      wmclose

        cmp     [wmsg],WM_DESTROY
        je      wmdestroy

        cmp     [wmsg],WM_PAINT
        je      wmpaint
        ;defwndproc process all other messages that we don't want
  defwndproc:
        invoke  DefWindowProc,[hwnd],[wmsg],[wparam],[lparam]
        jmp     finish

        ;<< This is where we hadle messages that we have sorted thought above! >>
  wmclose:
        invoke  DestroyWindow,[hwnd]
        jmp     finish ;return to the windows system

  wmdestroy:
        invoke  PostQuitMessage,0
        xor     eax,eax
        jmp     finish ;return to the windows system

  wmpaint:
        invoke  BeginPaint,[hwnd],ps
        invoke  EndPaint,[hwnd],ps
        mov     eax,0

  finish:
        pop     edi esi ebx
        ret
endp

section '.idata' import data readable writeable

  library kernel,'KERNEL32.DLL',\
          user,'USER32.DLL',\
          gdi32,'GDI32.DLL',\
          fasmdx,'FASMDX.DLL'

  import kernel,\
         GetModuleHandle,'GetModuleHandleA',\
         ExitProcess,'ExitProcess'

  import user,\
         RegisterClass,'RegisterClassA',\
         CreateWindowEx,'CreateWindowExA',\
         DefWindowProc,'DefWindowProcA',\
         GetMessage,'GetMessageA',\
         PeekMessage,'PeekMessageA',\
         TranslateMessage,'TranslateMessage',\
         DispatchMessage,'DispatchMessageA',\
         LoadCursor,'LoadCursorA',\
         LoadIcon,'LoadIconA',\
         PostQuitMessage,'PostQuitMessage',\
         DestroyWindow,'DestroyWindow',\
         BeginPaint,'BeginPaint',\
         EndPaint,'EndPaint',\
         GetClientRect,'GetClientRect',\
         DrawText,'DrawTextA',\
         GetDC,'GetDC',\
         ReleaseDC,'ReleaseDC'

  import gdi32,\
         CreatePen,'CreatePen',\
         SelectObject,'SelectObject',\
         DeleteObject,'DeleteObject',\
         SetPixel,'SetPixel',\
         GetStockObject,'GetStockObject'

  import fasmdx,\
       CpuMemsetB,'CpuMemsetB',\
       CpuMemsetW,'CpuMemsetW',\
       CpuMemsetD,'CpuMemsetD',\
       CpuMemsetF,'CpuMemsetF',\
       CpuMemsetDF,'CpuMemsetDF',\
       CpuMemCopy,'CpuMemCopy',\
       CnvtItoB64,'CnvtItoB64',\
       CnvtSItoB64,'CnvtSItoB64',\
       CnvtItoA64,'CnvtItoA64',\
       CnvtSItoA64,'CnvtSItoA64',\
       CnvtItoH64,'CnvtItoH64',\
       CnvtSItoH64,'CnvtSItoH64',\
       CnvtBtoI64,'CnvtBtoI64',\
       CnvtAtoI64,'CnvtAtoI64',\
       CnvtHtoI64,'CnvtHtoI64',\
       CnvtFtoA,'CnvtFtoA',\
       StrLength,'StrLength',\
       StrCopy,'StrCopy',\
       StrCat,'StrCat',\
       RndMakeSeed,'RndMakeSeed',\
       RndInt32,'RndInt32',\
       RndInt32Range,'RndInt32Range',\
       RndFloat,'RndFloat',\
       RndSetFRange,'RndSetFRange',\
       RndFRange,'RndFRange'
                                                                                                                                  
Post 30 Jan 2006, 16:14
View user's profile Send private message Visit poster's website Reply with quote
Madis731



Joined: 25 Sep 2003
Posts: 2139
Location: Estonia
Madis731 30 Jan 2006, 18:40
The general rule is to set an offline buffer and blit it to screen when you are ready. There is no point to draw a picture pixel-by-pixel.
When GetDC takes ~5000 clocks, SetPixel 4500 and Releasing the DC 6000 clocks you take and multiply it by 800x600 pixels and you got yourself a CPU hogger.
I've posted a bunch of programs in the http://board.flatassembler.net/topic.php?t=4619 take a look. Its a bit different angle, I'm using only circles and rectangles because they are a lot faster "macrocalls" Smile
Try this also:
Code:
;        mov ebx,[window_x]
;        dec ebx
;        mov [window_x],ebx
        dec [window_x] ;decrement can work on an address also
    


Last edited by Madis731 on 31 Jan 2006, 08:31; edited 1 time in total
Post 30 Jan 2006, 18:40
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger Reply with quote
madmatt



Joined: 07 Oct 2003
Posts: 1045
Location: Michigan, USA
madmatt 31 Jan 2006, 07:09
Hi Kuemmel,
Looks like one of my old examples from the "Window's game programming for dumies book". If you want speed then you will have to use DirectDraw. I have a library that contains many functions for drawing directly to the video buffer for a huge speed increase over the windows plotting functions. I'll post some examples, my DirectX library, and some (minimal) documentation describing how to use all the functions. Hopefully, soon I'll be able to make better documentation and tutorials. I should have them posted before the day is done. Smile
MadMatt
Post 31 Jan 2006, 07:09
View user's profile Send private message Reply with quote
Kuemmel



Joined: 30 Jan 2006
Posts: 200
Location: Stuttgart, Germany
Kuemmel 31 Jan 2006, 09:43
Thanks guys !

I'll have a look at your code Madis and stay tuned for yours Madmatt.

Do you also got a clue about the timer thing ? Just some code that stores the system time in 1/100 of seconds before the time critical routine and calculates the difference to it after and puts it on a message window to benchmark the whole thing ?

Kuemmel
Post 31 Jan 2006, 09:43
View user's profile Send private message Visit poster's website Reply with quote
Madis731



Joined: 25 Sep 2003
Posts: 2139
Location: Estonia
Madis731 31 Jan 2006, 10:00
Oh, sorry about that - I forgot to answer. There are two possibilities.

When the time differences can be measured with a calendar Razz as is this case, then you can use the GetTickCount() kernel function. This gives you roughly a millisecond precision. But its not exactly 1.0ms, but something like 0.998 or so I've heard. Well, I think it doesn't make much difference.

The other trick you can use is the CPUs own tick counter. This doesn't read time, but rather the smallest increments the CPU can do. So on a 1000MHz CPU you would expect every tick to be about a pikosecond (that is 0.001nanoseconds). This comes handy if you are measuring up to 5million clock range where GetTickCount() would be imprecise.

If you look at my previous post - it talks about clocks - these I read in with RDTSC which takes about 30-45 clocks itself and posts the results in a 64-bit "register" EDX:EAX (You usually need only EAX on CPUs lower than 3GHz).
Post 31 Jan 2006, 10:00
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger Reply with quote
Kuemmel



Joined: 30 Jan 2006
Posts: 200
Location: Stuttgart, Germany
Kuemmel 31 Jan 2006, 13:08
Okay, I see. The exact clocks isn't may be too important for me, I think GetTickCount() would do it at first. So when I try to inplement it in some of the examples (the Dialog-Box one) of FlatASM it looks like this:

Code:
section '.data' data readable writeable

  timer dd 0

section '.code' code readable executable
  start:
        invoke GetTickCount
        mov [timer],eax

        .....other code....

        invoke GetTickCount
        mov ebx,[timer]
        sub eax,ebx
        mov [timer],eax

        ...conversion of 'timer' to string !?...

        invoke  MessageBox,HWND_DESKTOP,timer$,caption,[flags]
 
        ...

section '.idata' import data readable writeable

  library kernel,'KERNEL32.DLL',\
           user,'USER32.DLL'

  import kernel,\
         GetModuleHandle,'GetModuleHandleA',\
         ExitProcess,'ExitProcess',\
         GetTickCount,'GetTickCount'

    


I didn't find any routine for transforming the timer integer value in a string in the Win32Help, is there one ?
Post 31 Jan 2006, 13:08
View user's profile Send private message Visit poster's website Reply with quote
Madis731



Joined: 25 Sep 2003
Posts: 2139
Location: Estonia
Madis731 31 Jan 2006, 13:28
Well some use C-functions, but I as a hardcore guy, prefer to use some converting algorithm. The first that comes to mind is divide the hex value by 10 in a loop and collect the modulae in a buffer and then print the buffer. You'll have to do it backwards because:

0A6h%0Ah=6
then you are left with 10h
010h%0Ah=6
only 1 remaining
1 %0Ah=1

The answer is "166"

I came to the other thought recently, I think it will be faster, but because I haven't tried, I can't be sure Sad
here goes:
Code:
  fild   [integer]
  ;The only thing I'm afraid about is losing precision!!!
  fbstp [tword bcdstring]
  xor   ecx,ecx
@@:
  mov   al,[tword bcdstring+counter]
  ;convert BCD-byte into two-byte string
  ;There are infinite possibilities here...
  mov   [buffer+counter*2],ax
  inc   ecx
  j<ifend> @b
    
Post 31 Jan 2006, 13:28
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger Reply with quote
madmatt



Joined: 07 Oct 2003
Posts: 1045
Location: Michigan, USA
madmatt 31 Jan 2006, 18:03
Here's are the examples I promised

Quote:
At the moment I see that the program plots really slow, I think this must got something to do with the GetDC/ReleaseDC thing and the whole possible allowed user interaction. How can I get rid of this ?


The examples I provide here setup a directdraw video buffer and provides a much more direct (and MUCH faster) way to draw on the video screen. Also, there is an example in "Windows game programming for dummies" called 'Chapter 6 - wintimers.asm" that gives an example of how to setup a windows timer event. Not the most accurate, but fine for most purposes.

If you have any questions just post it.
MadMatt
Post 31 Jan 2006, 18:03
View user's profile Send private message Reply with quote
Kuemmel



Joined: 30 Jan 2006
Posts: 200
Location: Stuttgart, Germany
Kuemmel 01 Feb 2006, 10:51
madmatt wrote:
Here's are the examples I promised
The examples I provide here setup a directdraw video buffer and provides a much more direct (and MUCH faster) way to draw on the video screen. Also, there is an example in "Windows game programming for dummies" called 'Chapter 6 - wintimers.asm" that gives an example of how to setup a windows timer event. Not the most accurate, but fine for most purposes.

If you have any questions just post it.
MadMatt


@MadMatt: I got problems recompiling your examples (as stated, I downloaded the INCLUDE from the webpage)...first there was a memory problem, so I set the compiler to 65536, then it says 'illegal instruction' or 'invalid macro argument' at line 7 (probably the .inc file...) starting with 'IID_DirectDraw7'. The exe of the plasmas work...

@Madis731: Thanks for the hint with the division by 10. I don't like to go the C-functions-way either, so I implemented your idea and it works fine !
Post 01 Feb 2006, 10:51
View user's profile Send private message Visit poster's website Reply with quote
Kuemmel



Joined: 30 Jan 2006
Posts: 200
Location: Stuttgart, Germany
Kuemmel 01 Feb 2006, 15:02
Hi guys,

just to let you know my 'advances' on the timer thing, here's my code for the timer and the number conversion...at the moment it just times some loop, takes about 5.6 seconds on my A64 3000+. The code may be really shitty, but it works. If any optimisations come into your mind, even for single instructions, just give me a hint.

For example I remember on my Acorn computer (ARM-CPU) it was possible to do conditioned execution for all commands...think this is rare for x86, isn't it !? (still busy walking through all the endless x86 instructions of my book...)

Another thing about the timing...is there a way to tell windows that my code gets 100% of the processor power, like in a single task application in DOS ?

Code:
format PE GUI 4.0
entry start

include '%fasminc%/win32a.inc'

section '.data' data readable writeable

  flags             dd ?            ;seems to be something for the message window...
  timer             dd 0            ;to store the timer at start
  divisor           dd 1000000000   ;maximum divisor must be < 2^31...as far as I can know...
  counter           dd 10           ;this makes 10 loops for conversion...
  address_text      dd 0            ;saves the pointer to text_result
  flag_number_start dd 0            ;flag for the start of the number to get rid of leading zeros

  text_result db 'Computation time: ',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ;reserve some 13 characters for the result string including end zero
  caption     db 'Benchmark Result',0

section '.code' code readable executable

  start:

     ;Get the timer of the System

        invoke GetTickCount
        mov [timer],eax

     ;do just something that consumes time...takes about 5.6 seconds on my Athlon64 3000+
        mov eax,50000
        consume_time_loop1:
           mov ebx,100000
           consume_time_loop2:
              dec ebx
           jnz consume_time_loop2
           dec eax
        jnz consume_time_loop1

     ;Get the timer again and calculate difference...

        invoke GetTickCount
        mov ebx,[timer]
        sub eax,ebx
        mov [timer],eax

     ;Preparation for number to string conversion for the timer result

        mov eax,text_result
        add eax,18                 ;offset for the leading text
        mov [address_text],eax

     ;Conversion of number to string conversion for the timer result

  NumberToString_loop:
        mov eax,[timer]            ;get number
        xor edx,edx                ;init edx !? or what is this...got it from other source
        mov ecx,[divisor]          ;divide by divisor
        div ecx                    ;result into eax, reminder is in edx
        mov [timer],edx            ;store edx in number

        cmp eax,0                  ;test if there's a zero
        jnz go_on1                 ;if not, put it into the string
        cmp [flag_number_start],0  ;if there is a zero then test if it is a starting zero or not
        jz  go_on2                 ;if starting zero then don't plot

     go_on1:
        mov [flag_number_start],1  ;set the flag for true that there's no more leading zeros
        add eax,$30                ;offset for the numbers in ASCII code
        mov ebx,[address_text]     ;get storage address
        mov [ebx],al               ;store ascii code in text string
        inc [address_text]         ;increment storage address in string

     go_on2:
        mov eax,[divisor]          ;get divisor
        xor edx,edx                ;init edx !? or what is this...got it from other source
        mov ecx,10                 ;divide divisor by 10
        div ecx                    ;result into eax, reminder is in edx
        mov [divisor],eax


        cmp [counter],4            ;if counter = 3 then put a digit -> output string in seconds
     jne go_on3
        mov word [ebx+1],$2e       ;store a ASCII code for the '.'
        inc [address_text]         ;increment storage address in string

     go_on3:
        dec [counter]              ;decrement digit counter
        jnz NumberToString_loop    ;if not zero loop again

        mov word [ebx+1],$20       ;store a ASCII code for the >space<
        mov word [ebx+2],$73       ;store a ASCII code for the 's'

        invoke  MessageBox,HWND_DESKTOP,text_result,caption,[flags]

  exit:
        invoke  ExitProcess,0

section '.idata' import data readable writeable

  library kernel,'KERNEL32.DLL',\
          user,'USER32.DLL'

  import kernel,\
         ExitProcess,'ExitProcess',\
         GetTickCount,'GetTickCount'

  import user,\
         MessageBox,'MessageBoxA'
    
Post 01 Feb 2006, 15:02
View user's profile Send private message Visit poster's website Reply with quote
madmatt



Joined: 07 Oct 2003
Posts: 1045
Location: Michigan, USA
madmatt 01 Feb 2006, 19:10
Kuemmel,
You have to be using fasmw 1.65 compiler, you also have to use the win32a.inc supplied with the includes. Also, make sure your 'fasminc=' variable is set correctly, this would be in the 'fasmw.ini' file:
[Environment]
fasminc = C:\fasmw165\include
Post 01 Feb 2006, 19:10
View user's profile Send private message Reply with quote
Madis731



Joined: 25 Sep 2003
Posts: 2139
Location: Estonia
Madis731 02 Feb 2006, 19:43
Try this code, see my comments marked with @Madis@:
Code:
format PE GUI 4.0
entry start

include 'win32a.inc'

section '.code' code readable executable

  start:

     ;Get the timer of the System
        invoke GetTickCount
        mov [timer],eax

     ;do just something that consumes time...takes about 5.6 seconds on my Athlon64 3000+
        mov eax,5000
        consume_time_loop1:
           mov ecx,100000
           consume_time_loop2:
              dec ecx
           jnz consume_time_loop2
           dec eax
        jnz consume_time_loop1

     ;Get the timer again and calculate difference...
        invoke GetTickCount
        sub eax,[timer]            ;You can subtract the memory address directly @Madis@
        mov [timer],eax

     ;Preparation for number to string conversion for the timer result
;       mov eax,text_result
;       add eax,18                 ;offset for the leading text
        mov [address_text],text_result+18 ;You can add constants together here @Madis@

     ;Conversion of number to string conversion for the timer result
    NumberToString_loop:          ;Totally rewritten @Madis@
        mov     eax,[timer]           ;Our timer is in eax and it remains there
        test    eax,eax
        jne     .overzeromilliseconds
        mov     esi,[address_text]
        mov     dword[esi],'0 s'
        jmp     .underonesecond
    .overzeromilliseconds:
        mov     edi,buffer            ;I reserved another buffer where we put our intermediate result in
        xor     ecx,ecx               ;XOR (eXclusive OR) has the property of zeroing itself
       ;You can also use:
       ;             sub  ecx,ecx
       ;             and  ecx,0
       ;             mov  ecx,0 <= The most logical
       ;             imul ecx,0 Razz
        mov     esi,10                ;Esi hold the 10 we are going to divide with
    .anotherchar:
        test    eax,eax               ;Lets test eax for zero
        je      .end                  ;We are done if it holds true
        xor     edx,edx
        div     esi                   ;divide EDX:EAX with ESI putting the result in EAX and modulo in EDX
        mov     [edi+ecx],dl          ;dl is in range 0..9
        inc     ecx                   ;increase the pointer by one
        jmp     .anotherchar
    .end:
        mov     esi,[address_text]    ;We don't need esi so we are reusing it for text pointer
        mov     eax,[edi]             ;Take the first 4 bytes from the buffer
        add     eax,"0000"            ;make them number strings
        bswap   eax                   ;swap them because they are in reverse order
                                      ;3145 will be 5413 after this instruction
        mov     al,'.'                ;We need only three numbers, the 4th is replaced with dot
        sub     ecx,3
        jnc     @f
        mov     ecx,1                 ;If ecx gets too small then correct it
    @@:
        mov     dword[esi+ecx],eax    ;We start filling from the end
        mov     word[esi+ecx+4],' s'  ;Lets add seconds too: example 'Z.123 s' Z means empty
        add     edi,3
        mov     byte[esi+ecx-1],"0"   ;Add a nice zero so we get: '0.123 s'                 <=
        test    ecx,ecx               ;If the result is under one second then skip to end
        je      .underonesecond
    .putonebyte:
        mov     al,[edi]              ;Here we take bytes from [edi]...
        add     al,"0"                ;...add 30h to them and...
        mov     [esi+ecx-1],al        ;...finally write it back to where we were 6 lines ago /\
        inc     edi                   ;This way '15.123 s' will replace '0.123 s'
        loop    .putonebyte
    .underonesecond:                ;End of rewriting @Madis@

        invoke  MessageBox,HWND_DESKTOP,text_result,caption,[flags]

  exit:
        invoke  ExitProcess,0

section '.idata' import data readable writeable

  library kernel,'KERNEL32.DLL',\
          user,'USER32.DLL'

  import kernel,\
         ExitProcess,'ExitProcess',\
         GetTickCount,'GetTickCount'

  import user,\
         MessageBox,'MessageBoxA'

;#####
; Why is always good to have data at the end of the program?
; ----------------------------------------------------------
; If you need some user input then you can expect users to be
; dumb and cause overflow and the next thing you know ther are
; writing data in your code. OR - worse - they can be hackers
; that could write code in your code Sad
;#####

  flags             dd ?            ;seems to be something for the message window...
  timer             dd 0            ;to store the timer at start
  divisor           dd 1000000000   ;maximum divisor must be < 2^31...as far as I can know...
  counter           dd 10           ;this makes 10 loops for conversion...
  address_text      dd 0            ;saves the pointer to text_result
  flag_number_start dd 0            ;flag for the start of the number to get rid of leading zeros

  buffer            rb 8
  text_result       db 'Computation time: ',0
                    rb 15           ;reserve some 13 characters for the result string including end zero
                                    ;Reserve by rb, rw, rd, etc and count to relieve typing
                                    ;dup can also be used from other syntaxes - find out from the manual @Madis@
  caption           db 'Benchmark Result',0

; If you cross this barrier here - nothing will happen
; The only thing to keep in mind is that Windows will
; be protecting its pages and might close your program.
    
Post 02 Feb 2006, 19:43
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger Reply with quote
Kuemmel



Joined: 30 Jan 2006
Posts: 200
Location: Stuttgart, Germany
Kuemmel 06 Feb 2006, 10:38
@Madis731: Thanks a lot ! This gave me a lot ideas how different x86 coding is compared to the ARM coding, where you got 16 registers but only limited instruction set...

@madmatt: With FA 165, now I could compile all your examples perfectly, but only the plasma-examples work correctly, the others go to black screen and don't show anything, only a slight flicker, when I press ESC at the end...(I'm running Athlon 3000+ and some simple ATI Radeon Graphics Card with Direct-X 9 installed)
Post 06 Feb 2006, 10:38
View user's profile Send private message Visit poster's website Reply with quote
madmatt



Joined: 07 Oct 2003
Posts: 1045
Location: Michigan, USA
madmatt 06 Feb 2006, 19:24
Kuemmel,
Don't know what the problem could be. Have you updated your drivers yet? Tell me which ones worked for you and which ones didn't. Also know that these examples use the old directdraw interface, so may not work so well with newer cards. I will be using Direct3D 9 for future development so my blitting/drawing library will be more compatible with current and newer graphics cards.
Post 06 Feb 2006, 19:24
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2023, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.