flat assembler
Message board for the users of flat assembler.
Index
> Windows > FASM Neural Network Goto page Previous 1, 2 |
Author |
|
ohara 24 Feb 2007, 23:16
Thank you madis731 this is a great help!
|
|||
24 Feb 2007, 23:16 |
|
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.
|
|||||||||||
17 Mar 2007, 09:19 |
|
vid 17 Mar 2007, 11:41
nice job, too bad i can't try it
|
|||
17 Mar 2007, 11:41 |
|
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 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. |
|||
22 Mar 2007, 12:32 |
|
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. |
|||
22 Mar 2007, 12:43 |
|
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 Sorry, I don't know enough DDraw to fix this error quite just now...
|
|||
22 Mar 2007, 12:55 |
|
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?
|
|||
22 Mar 2007, 16:31 |
|
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? |
|||
22 Mar 2007, 20:55 |
|
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.
|
|||||||||||
26 Mar 2007, 19:10 |
|
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? |
|||
26 Mar 2007, 23:23 |
|
r22 27 Mar 2007, 01:21
Neither version works on my XP 64 bit, is it Vista64 only?
XP 64bit Graphics:Nvidia 6800 |
|||
27 Mar 2007, 01:21 |
|
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.
|
|||
28 Apr 2007, 00:01 |
|
Goto page Previous 1, 2 < Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.