flat assembler
Message board for the users of flat assembler.

Index > Windows > FASM Neural Network

Goto page Previous  1, 2
Author
Thread Post new topic Reply to topic
Madis731



Joined: 25 Sep 2003
Posts: 2139
Location: Estonia
Madis731 19 Feb 2007, 12:12
XP is maybe too insecure - 2003 Server doesn't allow this way of writing PE-formatted files. And working is one thing, 12MB versus 0.0073MB executable is another topic Wink
Post 19 Feb 2007, 12:12
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger Reply with quote
ohara



Joined: 13 Oct 2006
Posts: 20
ohara 24 Feb 2007, 23:16
Thank you madis731 this is a great help!
Post 24 Feb 2007, 23:16
View user's profile Send private message Reply with quote
ohara



Joined: 13 Oct 2006
Posts: 20
ohara 17 Mar 2007, 09:19
Here is the neural network software converted to 64-bit windows. This works well now on my windows 64-bit Vista and nvidia graphics card. This was relatively straightforward to convert using the windows 64 mandel example.
I have found only a 10% speed increase in the program in win64, and this is probably due to more efficient writing to the screen. The only real difference is addressing in 64 bits, which I suppose is the same speed as 32-bit. There was no real requirement for all the extra registers, and if I go to SSE2 I would only get 2 operations per instruction rather than the current 4.
As all the connection and neuron structures contain addresses, I decided to keep them 32-bit, and use them as offsets. Otherwise the memory required would double for no foreseeable gain.


Description:
Download
Filename: Vista64net.zip
Filesize: 23.33 KB
Downloaded: 496 Time(s)

Post 17 Mar 2007, 09:19
View user's profile Send private message Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid 17 Mar 2007, 11:41
nice job, too bad i can't try it Smile
Post 17 Mar 2007, 11:41
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
Madis731



Joined: 25 Sep 2003
Posts: 2139
Location: Estonia
Madis731 22 Mar 2007, 12:32
Hmm,
800x600 resolution:
http://www.tud.ttu.ee/~t060429/Up/80060032.png
desktop resolution:
http://www.tud.ttu.ee/~t060429/Up/1400105032.png

There seems to be some width/height calculation issues, but I don't know where. Its an integrated Intel graphics card on a HP nc6320 laptop.

Its strange that many people still have includes like this:
include '%fasminc%/win64a.inc'
I always reduce them to include 'win64a.inc' to get it to compile Sad
Very Happy but that's just my whine, it doesn't affect the outcome and there's definitely something wrong in the code, just can't put my finger on it.
Post 22 Mar 2007, 12:32
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid 22 Mar 2007, 12:43
Quote:
include 'win64a.inc'

this wouldn't be problem if FASM had command line option to add include directory. But having FASM search my C includes, and C compilers to search FASM includes isn't what i like.
Post 22 Mar 2007, 12:43
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
Madis731



Joined: 25 Sep 2003
Posts: 2139
Location: Estonia
Madis731 22 Mar 2007, 12:55
Maybe the way its coded can cause it to work only on one system and not on many others Sad Sorry, I don't know enough DDraw to fix this error quite just now...
Post 22 Mar 2007, 12:55
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger Reply with quote
Xorpd!



Joined: 21 Dec 2006
Posts: 161
Xorpd! 22 Mar 2007, 16:31
Yeah, if that program uses DDRAW64.INC as in the MANDEL example, it's gonna be toast. [url="http://xorpd.home.comcast.net/KMB_V0.57_MT.ZIP"]I have an example[/url] which corrects at least one of the mistakes of that file. I haven't gone back and compared to see if there was more than one discrepancy. Cleary "lPitch" is a long, not a pointer, so it should remain "dd" rather than get promoted to "dq". BTW, if you have a machine that can run the executables in that example, could you post some results to the Mandelbrot thread?
Post 22 Mar 2007, 16:31
View user's profile Send private message Visit poster's website Reply with quote
ohara



Joined: 13 Oct 2006
Posts: 20
ohara 22 Mar 2007, 20:55
When I ran the mandel example on my win 64 vista, it crashed. I found that although the program was giving a correct pointer to the top left of my screen in
mov rdi,[ddsd.lpSurface]
the actual drawing code following this had a problem.
I then found that if I inserted my network drawing code in here, I got an incorrect picture similar to madis731 picture http://www.tud.ttu.ee/~t060429/Up/80060032.png.
I got my picture to work correctly by assuming that the width of my display line was 3584 bytes. See the line
add rdi, 154112 ;go down 43 lines (3584 per line)
in showfloats.inc.
Note that although I am using 600x800 32-bit mode, 3584 bytes is actually 896 pixels.
It seems that my windows vista is forcing a display line to a 128 dword boundry. Is this different for different machines?
Post 22 Mar 2007, 20:55
View user's profile Send private message Reply with quote
ohara



Joined: 13 Oct 2006
Posts: 20
ohara 26 Mar 2007, 19:10
I have integrated the variable iPitch into this now, and I would be interested to know if it now works on other peoples 64-bit windows.
Incidently, although this works fine on my PC, I found that if I changed the iPitch or the lpSurface in DDSURFACEDESC in ddraw64.inc from dq to dd I got a directdraw initialisation error in vista, although according to the windows site, they are supposed to be dds.


Description:
Download
Filename: Vista64net2.zip
Filesize: 23.7 KB
Downloaded: 517 Time(s)

Post 26 Mar 2007, 19:10
View user's profile Send private message Reply with quote
Xorpd!



Joined: 21 Dec 2006
Posts: 161
Xorpd! 26 Mar 2007, 23:23
Have you tried just copying and pasting what works for me?
Code:
struct DDSURFACEDESC
   dwSize            dd ?
   dwFlags           dd ?
   dwHeight          dd ?
   dwWidth           dd ?
 union
   lPitch            dd ?
   dwLinearSize      dd ?
 ends
   dwBackBufferCount dd ?
 union
   dwMipMapCount     dd ?
   dwZBufferBitDepth dd ?
   dwRefreshRate     dd ?
 ends
   dwAlphaBitDepth   dd ?
   dwReserved        dd ?
                     dd ? ; Added this for alignment
   lpSurface         dq ?
   ddckCKDestOverlay DDCOLORKEY
   ddckCKDestBlt     DDCOLORKEY
   ddckCKSrcOverlay  DDCOLORKEY
   ddckCKSrcBlt      DDCOLORKEY
   ddpfPixelFormat   DDPIXELFORMAT
   ddsCaps           DDSCAPS
                     dd ? ; Added this for alignment
ends
    

Also make sure that this structure is aligned 0 mod 8 in memory, because it contains oword members. Besides the stuff in Microsoft's SWConventions.doc which should probably have gotten installed on your hard disk in the same directory as ml64.exe, I have found Jeremy Gordon's notes on how to handle the conversion to 64-bit to be exceptional in their clarity. What entry in ddraw.h led you to conclude that lpSurface should be a dword instead of an oword?
Post 26 Mar 2007, 23:23
View user's profile Send private message Visit poster's website Reply with quote
r22



Joined: 27 Dec 2004
Posts: 805
r22 27 Mar 2007, 01:21
Neither version works on my XP 64 bit, is it Vista64 only?

XP 64bit Graphics:Nvidia 6800
Post 27 Mar 2007, 01:21
View user's profile Send private message AIM Address Yahoo Messenger Reply with quote
realcr



Joined: 02 Apr 2007
Posts: 39
realcr 28 Apr 2007, 00:01
Works fine on my 32 bit xp , However I join vid's questions about what does that program calculates and how the network learns.
Post 28 Apr 2007, 00:01
View user's profile Send private message Visit poster's website MSN Messenger ICQ Number Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  
Goto page Previous  1, 2

< 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.