flat assembler
Message board for the users of flat assembler.

Index > Windows > Need help testing my directdraw assembly library

Author
Thread Post new topic Reply to topic
madmatt



Joined: 07 Oct 2003
Posts: 1045
Location: Michigan, USA
madmatt
If anyone has time maybe you could run this example below and let me know if this works on your system. It requires Directx 8.1 or greater, a pentium II processor to run. I've inluded the documentation in case anyones curious.
Thanks
MadMatt


Last edited by madmatt on 25 Jan 2007, 01:05; edited 4 times in total
Post 24 Jan 2007, 18:17
View user's profile Send private message Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid
just tried to download during your updating Smile))
Post 24 Jan 2007, 18:49
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid
it crashed for me. I couldn't find more info about error because of fullscreen.

great to see some error checking, but doesn't these return error too?
Code:
     ;set clip rectangle of Directdraw commands
     invoke  DDSetClipRectangles, screenrect, 1
     invoke  DDSetSoftClipRegion, 0, 0, SCREENWIDTH, SCREENHEIGHT
     invoke  DDSetDrawMode8, 0

     ;load in tile graphics
     invoke  DDCreatePlainFromBmp, TILESURFACE, "Tiles.bmp", DDVIDEOSURFACE, 0
     invoke  DDFillBack, 0
     invoke  DDFlipNV
     invoke  DDFillBack, 0

     ;DDCreateNewFont required for fonts not in the Windows font folder
     invoke  DDCreateNewFont, 0, FW_SEMIBOLD, 32, 64, 0, 0, "Black Chancery"
    
Post 24 Jan 2007, 18:52
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
madmatt



Joined: 07 Oct 2003
Posts: 1045
Location: Michigan, USA
madmatt
I'll put in better error checking, should have done this before I uploaded!
Post 24 Jan 2007, 19:11
View user's profile Send private message Reply with quote
LocoDelAssembly
Your code has a bug


Joined: 06 May 2005
Posts: 4633
Location: Argentina
LocoDelAssembly
Worked for me.
Post 24 Jan 2007, 19:18
View user's profile Send private message Reply with quote
madmatt



Joined: 07 Oct 2003
Posts: 1045
Location: Michigan, USA
madmatt
Thanks, locodelassembly, by the way is anyone using Windows Vista yet?
Post 24 Jan 2007, 19:32
View user's profile Send private message Reply with quote
cubeoid



Joined: 22 Jan 2007
Posts: 19
cubeoid
i have a 32bit version

EDIT: and it runs fine
Post 24 Jan 2007, 21:37
View user's profile Send private message Reply with quote
madmatt



Joined: 07 Oct 2003
Posts: 1045
Location: Michigan, USA
madmatt
Thanks cubeoid, so far so good. Is it still crashing on your system vid?
Post 24 Jan 2007, 21:50
View user's profile Send private message Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid
1. if i delete ttf, app still runs and look little weird...
2. if i delete bmp, app crashes. (that was probably the original reason - i tried without bmp)

madmatt: you must check error after EVERY procedure which can return error (including ReadFile, CloseFile, etc... ALL), and if you are in procedure, return the error. Also you then check error after every call of such procedure.
Post 24 Jan 2007, 22:11
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
madmatt



Joined: 07 Oct 2003
Posts: 1045
Location: Michigan, USA
madmatt
vid, what OS/Directx version are you using?
Post 25 Jan 2007, 00:13
View user's profile Send private message Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid
winXP, no idea about directX version.

i said: app crashes, if i delete BMP.

Problem is in DDCreatePlainFromBMP, exactly the one i stated before:
Quote:
Also you then check error after every call of such procedure.
.

In your case, it's the call of first function (don't know it's name) in "DDCreatePlainFromBMP", which returns -1 if file doesn't exist. This goes unchecked. Following function calls are all unchecked too.

again: go through entire your sources, and check EVERY call there that can return error. I bet 96% of them do.

PS: Sorry to reverse your DLL.
Post 25 Jan 2007, 00:29
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
madmatt



Joined: 07 Oct 2003
Posts: 1045
Location: Michigan, USA
madmatt
Wow, figured all that out be reversing my dll?

Quote:
PS: Sorry to reverse your DLL.

No problem. Wow, figured all that out by reversing my dll, your dangerous! Laughing
Your not supposed to delete the bmp, does it work if you don't? also added a 15bit and 16bit version. I'm not able to test the 15bit version so let me know if this works. I'll take care of all the error checking in the next update, right now have other things to do.
Post 25 Jan 2007, 01:04
View user's profile Send private message Reply with quote
rugxulo



Joined: 09 Aug 2005
Posts: 2341
Location: Usono (aka, USA)
rugxulo
vid wrote:
winXP, no idea about directX version.


Start ... Run ... dxdiag.exe

Quote:

DirectX Version: DirectX 9.0c (4.09.0000.0904)


I hear that DirectX 10 will be exclusive to Vista (dunno why, though).

EDIT: I didn't test this because I didn't think you'd need testing on such a common machine as my P4/2.52 Ghz Win XP Home SP2 DirectX 9.0c cpu. (Tell me if I'm wrong, though!)
Post 25 Jan 2007, 01:54
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
Quote:
Wow, figured all that out be reversing my dll?
Didn't take a minute. I just looked in your .asm which function takes name of BMP as arg (DDCreatePlainFromBMP), looked in DLL at that function, didn't saw no CreateFile, so i looked into function called in it, and there it was. If CreateFile fails, -1 is returned, and it was unchecked by caller.

EDIT: yes, with BMP it works. But i keep seeing windows's "hourglass" cursor, too much cooperative mode?.
Post 25 Jan 2007, 07:32
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
madmatt



Joined: 07 Oct 2003
Posts: 1045
Location: Michigan, USA
madmatt
rugxulo: go ahead, the more reports the better.

vid: Look's like i forgot to make the cursor disapear. It uses exclusive mode which is full speed ahead, but also set the "allow_reboot" flag.

I'm working on V2.0 that will fix all of these problems, and more.
Post 25 Jan 2007, 09:03
View user's profile Send private message Reply with quote
f0dder



Joined: 19 Feb 2004
Posts: 3170
Location: Denmark
f0dder
rugxulo wrote:

I hear that DirectX 10 will be exclusive to Vista (dunno why, though).

Other people will probably say "because it's new architecture omg!!!", but the real reason is of course that MS needs a selling point for Vista.
Post 25 Jan 2007, 09:49
View user's profile Send private message Visit poster's website Reply with quote
pabloreda



Joined: 24 Jan 2007
Posts: 104
Location: Argentina
pabloreda
in 15bits color not work
16 and 32 work OK

NVidia Gforce MX440
directx9.0c
win98
Post 25 Jan 2007, 13:42
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
fodder: found this interesting bit of info from: www.firingsquad.com
Quote:
The one thing that Microsoft has done with Vista is incorporate a subsystem that will comply with DirectX 9.0 graphics hardware due to the population of users that still own DX9-compliant hardware. This subsystem will be named none other than DirectX 9.0L. So, in short, if you have DirectX 9 hardware, you will be using DirectX 9.0L as your API in Windows Vista.

DirectX 9L will support all the fancy eye candy effects Microsoft has integrated into Vista’s Aero Glass interface, so DX9 users will still get the 3D desktop and all its effects under DirectX 9.0L. According to Microsoft, it would be difficult to port DirectX 10 to older operating systems like Windows XP due to the new driver model.


pabloreda: Thanks. Only very old cards use 15-bit graphics now. 16-bit is the norm now.
Post 25 Jan 2007, 18:26
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-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.

Website powered by rwasa.