flat assembler
Message board for the users of flat assembler.

Index > Windows > ddraw example modify

Author
Thread Post new topic Reply to topic
pabloreda



Joined: 24 Jan 2007
Posts: 116
Location: Argentina
pabloreda 31 Jan 2007, 20:34
Hi
I try to modify the ddraw example
The .exe works but when exit crash (only the app)

anyone can helpme?


Description: .asm and .exe files
Download
Filename: fasm.zip
Filesize: 3.04 KB
Downloaded: 285 Time(s)

Post 31 Jan 2007, 20:34
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 31 Jan 2007, 22:28
After looking at the Dr. Watson crash dump, seems to be crashing right
where the arrow (->) indicates. Also, when clearing the surface, you should use "ddsd.lPitch" to get to the next scan line.
Code:
SYSREDRAW:
        push edi esi eax
;       cominvk DDSPrimary,LockSurface,NULL,ddsd,DDLOCK_WAIT,NULL
        [*HERE*] -> cominvk DDSBack,LockSurface,NULL,ddsd,DDLOCK_WAIT,NULL  
        ;       DDINVOKE        WaitForVerticalBlank, lpDD, DDWAITVB_BLOCKBEGIN, NULL
    mov   edi, [ddsd.lpSurface]         ;--- copy vframe->video
    mov   esi, SYSFRAME
    mov   ecx, $c0000
    cld
    rep movsd
;       cominvk DDSPrimary,UnlockSurface,NULL
        cominvk DDSBack,UnlockSurface,NULL      

        ;cominvk DDSPrimary,Blt,0,DDSBack,0,DDBLT_WAIT,0
        cominvk DDSPrimary,Flip,0,DDFLIP_WAIT
        pop eax esi edi
        ret
    

[/code]
Post 31 Jan 2007, 22:28
View user's profile Send private message Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid 31 Jan 2007, 23:35
pabloreda: always after calling procedure, check manuals if it can return error, and if it can then CHECK IT!!!!!!!!!!
Post 31 Jan 2007, 23:35
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
pabloreda



Joined: 24 Jan 2007
Posts: 116
Location: Argentina
pabloreda 31 Jan 2007, 23:38
Thanks...

I not like waste cpu clock !!
I pay to windows to check !!! Smile
I need speed...

@madmat but the prg work !!
Post 31 Jan 2007, 23:38
View user's profile Send private message Visit poster's website Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid 01 Feb 2007, 06:09
pabloreda: this doesn't cost you much. users don't see any difference. But instead, if there is an error and goes uncatched, your app will likely crash, and then users WILL see the difference
Post 01 Feb 2007, 06:09
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
pabloreda



Joined: 24 Jan 2007
Posts: 116
Location: Argentina
pabloreda 01 Feb 2007, 16:02
ok, now work,

Any know documentation about win event loop, messages ?
Post 01 Feb 2007, 16:02
View user's profile Send private message Visit poster's website 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-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.