It is currently Sat Dec 14, 2019 4:49 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 15 posts ] 
Author Message
 Post subject: [Done] Problem with Tailbite 1.4.6 and Windows 7 (x64)
PostPosted: Mon Jan 17, 2011 2:38 am 
Offline
Enthusiast
Enthusiast

Joined: Sat Oct 11, 2008 9:07 pm
Posts: 416
Location: Germany, Berlin > member German forum
Hi,

i have two problems with Tailbite 1.4.5, Windows 7 (x64) and i use PB 4.51(x64)

I want to use a interface, but if i create a lib the error message "Reserved_Word_Used_as_Symbol". In the assembler file you find "Extrn rax+344". rax+344 is the clear function and must be deleted in the asm file to make the lib file

Code:
Extrn rax+344
Extrn tailbite_test_p_D3DDevice


Code:
Global *D3DDevice.IDIRECT3DDEVICE9
ProcedureDLL mytest()
  If halleluja = 12  ; dummy only for testing
     *D3DDevice\Clear(0,0,0,0,0,0)
  EndIf
  ProcedureReturn 1
EndProcedure


second problem, the Remark doesnt work with the import function, the error message "duplicate name DEFINE_GUID" appears. If you delet the remarks everythink is fine.

If you need the x64 lib dxguid.lib
http://www.file-upload.net/download-313 ... d.lib.html

Code:
  Import "dxguid.lib" : EndImport

; DEFINE_GUID(GUID_SysKeyboard,$6F1D2B61,$D5A0,$11CF,$BF,$C7,$44,$45,$53,$54,$00,$00)
; DEFINE_GUID(GUID_SysMouse,   $6F1D2B60,$D5A0,$11CF,$BF,$C7,$44,$45,$53,$54,$00,$00)
 


Thanks for you good work. Hope you find the buggs, with Tailbite x86 everythinks works fine and i want to make the x64 lib for my engine too.

Michael

_________________
Working on - MP3D Library -


Last edited by mpz on Fri Jan 21, 2011 11:56 am, edited 2 times in total.

Top
 Profile  
Reply with quote  
 Post subject: Re: Problems Tailbite 1.4.5 and Windows 7 (x64)
PostPosted: Mon Jan 17, 2011 11:02 am 
Offline
Addict
Addict

Joined: Sun May 15, 2005 5:15 am
Posts: 1027
Location: Australia
I'll take a look when I get the chance.
For the 2nd snippet, does the problem occur with just that snippet?

_________________
Demonio Ardente

Currently managing Linux & OS X Tailbite
OS X TailBite now up to date with Windows!


Top
 Profile  
Reply with quote  
 Post subject: Re: Problems Tailbite 1.4.5 and Windows 7 (x64)
PostPosted: Mon Jan 17, 2011 1:21 pm 
Offline
Enthusiast
Enthusiast

Joined: Sat Oct 11, 2008 9:07 pm
Posts: 416
Location: Germany, Berlin > member German forum
Hi,

2nt. snipped: my Soucecode has over 20000 lines. If i put the "Import "dxguid.lib" : EndImport" to different places in the code some error message appears and i think the endimport is not working. I think it could be a problem with the import but i don't know it exaclty. i will write a little program to delete all "Extrn rax ******" lines in the asm files and test then to create a new lib file. I inform you if this works or not.

With tailbite 1.4.4 can make a lib file, but the lib file is not working. I get all time missing command error messages (polilink error) from missing commands. 10 commands ar not working (from 120).

If you have beta files i will test it. I think my project has very much lines to find every error...

Greetings Michael

_________________
Working on - MP3D Library -


Top
 Profile  
Reply with quote  
 Post subject: Re: Problems Tailbite 1.4.5 and Windows 7 (x64)
PostPosted: Mon Jan 17, 2011 3:35 pm 
Offline
Addict
Addict

Joined: Sun May 15, 2005 5:15 am
Posts: 1027
Location: Australia
The extrn rax error shouldn't be too difficult to nail down.
What i meant was, if I put the code within the code tags in a file and make a lib out of it, will i get the error?
If not with those 3 lines you may have to shave as much code off as possible to get a snippet that does it or PM me the code (if its not sensitive)
Comments should be ignored by TB, so I don't know what could be causing it

_________________
Demonio Ardente

Currently managing Linux & OS X Tailbite
OS X TailBite now up to date with Windows!


Top
 Profile  
Reply with quote  
 Post subject: Re: Problems Tailbite 1.4.5 and Windows 7 (x64)
PostPosted: Mon Jan 17, 2011 5:18 pm 
Offline
Enthusiast
Enthusiast

Joined: Sat Oct 11, 2008 9:07 pm
Posts: 416
Location: Germany, Berlin > member German forum
Dear lexvictory

you need only this code. I use the batch options. The error message appears. If you edit the asm file you find the " extrn rax" line. If you delete the line you can start the batch job and everything is fine...

Quote:
Global *D3DDevice.IDIRECT3DDEVICE9
ProcedureDLL mytest()
If halleluja = 12 ; dummy only for testing
*D3DDevice\Clear(0,0,0,0,0,0)
EndIf
ProcedureReturn 1
EndProcedure


bets regrads michael

_________________
Working on - MP3D Library -


Top
 Profile  
Reply with quote  
 Post subject: Re: Problems Tailbite 1.4.5 and Windows 7 (x64)
PostPosted: Tue Jan 18, 2011 12:28 am 
Offline
Enthusiast
Enthusiast

Joined: Sat Oct 11, 2008 9:07 pm
Posts: 416
Location: Germany, Berlin > member German forum
Hi,

here the next importlib error (with x86 no problem), the "extras character online" error.

Code:
 Macro DEFINE_GUID (Name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8)
    Global Name.guid
    Name\Data1 = l
    Name\Data2 = w1
    Name\Data3 = w2
    Name\Data4[0] = b1
    Name\Data4[1] = b2
    Name\Data4[2] = b3
    Name\Data4[3] = b4
    Name\Data4[4] = b5
    Name\Data4[5] = b6
    Name\Data4[6] = b7
    Name\Data4[7] = b8
  EndMacro

Import "dxguid.lib" :  EndImport

  DEFINE_GUID(GUID_Joystick   ,$6F1D2B70,$D5A0,$11CF,$BF,$C7,$44,$45,$53,$54,$00,$00)
  DEFINE_GUID(GUID_SysKeyboard,$6F1D2B61,$D5A0,$11CF,$BF,$C7,$44,$45,$53,$54,$00,$00)
  DEFINE_GUID(GUID_SysMouse,   $6F1D2B60,$D5A0,$11CF,$BF,$C7,$44,$45,$53,$54,$00,$00)
 
 ProcedureDLL MyGuid (var)
   
   If var = 0     
     ProcedureReturn GUID_Joystick\Data1
   ElseIf var = 1
     ProcedureReturn GUID_Joystick\Data2
   ElseIf var = 2
     ProcedureReturn GUID_Joystick\Data3
   ElseIf var = 3
     ProcedureReturn GUID_Joystick\Data4
   EndIf 
     
 EndProcedure
 
 Debug MyGuid (1)

_________________
Working on - MP3D Library -


Top
 Profile  
Reply with quote  
 Post subject: Re: Problems Tailbite 1.4.5 and Windows 7 (x64)
PostPosted: Tue Jan 18, 2011 1:14 am 
Offline
Addict
Addict

Joined: Sun May 15, 2005 5:15 am
Posts: 1027
Location: Australia
ok, with the 2nd code, i had an idea:
Try taking out the : character (putting EndImport on another line), and see if it works. If it works doing that then it narrows the problem down to an easier fix

_________________
Demonio Ardente

Currently managing Linux & OS X Tailbite
OS X TailBite now up to date with Windows!


Top
 Profile  
Reply with quote  
 Post subject: Re: Problems Tailbite 1.4.5 and Windows 7 (x64)
PostPosted: Tue Jan 18, 2011 1:50 am 
Offline
Enthusiast
Enthusiast

Joined: Sat Oct 11, 2008 9:07 pm
Posts: 416
Location: Germany, Berlin > member German forum
Hi lexvictory,

the import function, if you use

Code:
Import "dxguid.lib"
EndImport


works.

For the "Extrn rax+" problem have i written the program to delet the false lines:

Code:
 Directory$ =  GetCurrentDirectory() ; Listet alle Einträge auf C:\ auf (ohne die Inhalte aus Unterverzeichnissen)
  If ExamineDirectory(0, Directory$, "*.asm") 
    While NextDirectoryEntry(0)
      Text$ = ""
      FileName$ = DirectoryEntryName(0)
      If DirectoryEntryType(0) = #PB_DirectoryEntry_File
         If ReadFile(0, FileName$ )   ; wenn die Datei geöffnet werden konnte, setzen wir fort...
           While Eof(0) = 0           ; sich wiederholende Schleife bis das Ende der Datei ("end of file") erreicht ist
           find$ = ReadString(0)
              If Left(find$,9) <> "Extrn rax"
                 Text$ + find$ +Chr(13)+Chr(10)     
              EndIf
           Wend
           CloseFile(0)               ; schließen der zuvor geöffneten Datei
         EndIf
          DeleteFile(FileName$ )

         If OpenFile(0, FileName$ )   ; wenn die Datei geöffnet werden konnte, setzen wir fort...
              WriteString(0, Text$ )
         EndIf
      EndIf
    Wend
    FinishDirectory(0)
  EndIf


With this tricks i can make a lib file but i get then a polilink error with 24 commands. I will make an example for that, but not now (i must sleep). It is also an "Extrn " problem of a import function. i check the assembler files. Perhaps i found the problem an we found a solution...

Grretings michael

_________________
Working on - MP3D Library -


Top
 Profile  
Reply with quote  
 Post subject: Re: Problems Tailbite 1.4.5 and Windows 7 (x64)
PostPosted: Tue Jan 18, 2011 1:53 am 
Offline
Addict
Addict

Joined: Sun May 15, 2005 5:15 am
Posts: 1027
Location: Australia
Don't worry, I know where to look for the bugs now, will get onto it when i have a moment to spare

_________________
Demonio Ardente

Currently managing Linux & OS X Tailbite
OS X TailBite now up to date with Windows!


Top
 Profile  
Reply with quote  
 Post subject: Re: Problems Tailbite 1.4.5 and Windows 7 (x64)
PostPosted: Wed Jan 19, 2011 2:30 am 
Offline
Enthusiast
Enthusiast

Joined: Sat Oct 11, 2008 9:07 pm
Posts: 416
Location: Germany, Berlin > member German forum
Hi,

Here comes a test code for both import problems and to solve them:

file Libx64.pb
Code:
Structure D3DXMATRIX
      _11.f
      _12.f
      _13.f
      _14.f
      _21.f
      _22.f
      _23.f
      _24.f
      _31.f
      _32.f
      _33.f
      _34.f
      _41.f
      _42.f
      _43.f
      _44.f
EndStructure

Import "d3dx9.lib"

     D3DXMatrixRotationX (*pOut.D3DXMATRIX, Angle.f)
     
EndImport   

ProcedureDLL OneX (*Test.D3DXMATRIX, Angle.f)
 
  ProcedureReturn D3DXMatrixRotationX (Test, Angle)
   
EndProcedure

Global *D3DDevice.IDIRECT3DDEVICE9


ProcedureDLL mytest()
 
  *D3DDevice.IDIRECT3DDEVICE9
  *D3DDevice\Clear(0,0,0,0,0,0)
 
  ProcedureReturn 1
 
EndProcedure

;OneX (*Test.D3DXMATRIX, 10)


First problem the interface -> procedure problem
If you look to the asm code x86 you see in mytest.asm
Code:
format MS COFF

Public PB_mytest


Extrn Libx64_p_D3DDevice


section '.text' code readable executable


in the x64 mytest.asm you see the "Extrn rax+344" if you delete them the asm file works

Code:
format MS64 COFF

Public PB_mytest


Extrn rax+344
Extrn Libx64_p_D3DDevice


section '.text' code readable executable


now the second problem, the wrong import name problem
If you look to the asm code x86 you see in OneX.asm
Code:
format MS COFF

Public PB_OneX


Extrn _D3DXMatrixRotationX@8  ( -> this is the correct importname from the dx9 "d3dx9.lib")

section '.text' code readable executable


in the x64 OneX.asm you see a wrong function name. If you delete "Libx64_" in the the asm file it works, if not you cant use the OneX (*Test.D3DXMATRIX, 10) command, the Polilink error (command name not found) appears. "Libx64" is the name of the pb file

Code:
format MS64 COFF

Public PB_OneX


Extrn Libx64_D3DXMatrixRotationX  ( the correct importname is D3DXMatrixRotationX, you must change it to "Extrn D3DXMatrixRotationX"


section '.text' code readable executable


my workaround is the "Wrong line ins ASM Killer programm"

Code:
;Wrong line ins ASM Killer programm

kill.s = "Libx64"
 Directory$ =  GetCurrentDirectory() ; Listet alle Einträge auf C:\ auf (ohne die Inhalte aus Unterverzeichnissen)
  If ExamineDirectory(0, Directory$, "*.asm") 
    While NextDirectoryEntry(0)
      Text$ = ""
      FileName$ = DirectoryEntryName(0)
      If DirectoryEntryType(0) = #PB_DirectoryEntry_File
         If ReadFile(0, FileName$ )   ; wenn die Datei geöffnet werden konnte, setzen wir fort...
           While Eof(0) = 0           ; sich wiederholende Schleife bis das Ende der Datei ("end of file") erreicht ist
              find$ = ReadString(0)
             
              find$ = ReplaceString(find$, kill + "_D3DX","D3DX")
             
              If Left(find$,9) <> "Extrn rax"
                 Text$ + find$ +Chr(13)+Chr(10)     
              EndIf
           Wend
           CloseFile(0)               ; schließen der zuvor geöffneten Datei
         EndIf
          DeleteFile(FileName$ )

         If OpenFile(0, FileName$ )   ; wenn die Datei geöffnet werden konnte, setzen wir fort...
              WriteString(0, Text$ )
         EndIf
      EndIf
    Wend
    FinishDirectory(0)
  EndIf


with this workaround i can make my lib...
i hope this help
Michael

_________________
Working on - MP3D Library -


Top
 Profile  
Reply with quote  
 Post subject: Re: Problems Tailbite 1.4.5 and Windows 7 (x64)
PostPosted: Thu Jan 20, 2011 8:03 am 
Offline
Addict
Addict

Joined: Sun May 15, 2005 5:15 am
Posts: 1027
Location: Australia
Fixed : http://sourceforge.net/projects/tailbit ... e/download

Also, using Import "some.lib" : EndImport has been added to the known issues; its not easily fixable due to the way TB scans through the asm.

_________________
Demonio Ardente

Currently managing Linux & OS X Tailbite
OS X TailBite now up to date with Windows!


Top
 Profile  
Reply with quote  
 Post subject: Re: [done] Problems Tailbite 1.4.5 and Windows 7 (x64)
PostPosted: Thu Jan 20, 2011 10:21 pm 
Offline
Enthusiast
Enthusiast

Joined: Sat Oct 11, 2008 9:07 pm
Posts: 416
Location: Germany, Berlin > member German forum
Dear lexvictory,

great work and much thanks! Now everything works fine. The first test lib works and i am working myselve to fix bugs :).

The > Import "some.lib" : EndImport < problem ist easy to solve and so not important to fix.

Greetings Michael

_________________
Working on - MP3D Library -


Top
 Profile  
Reply with quote  
 Post subject: Re: [done] Problems Tailbite 1.4.5 and Windows 7 (x64)
PostPosted: Thu Jan 20, 2011 10:41 pm 
Offline
Enthusiast
Enthusiast

Joined: Sat Oct 11, 2008 9:07 pm
Posts: 416
Location: Germany, Berlin > member German forum
Oh,

i think i found the next problem. If you make a float procedure you get only integer numbers back. Please test the following code:

Code:
ProcedureDLL.f MP_RandomFloat(fMin.f, fMax.f) ; Random Float from fMin.f to fMax.f
  Protected fRandNum.f = Random(100000) / 100000
  ProcedureReturn fMin + (fMax - fMin) * fRandNum
EndProcedure


Code:
For n = 0 To 10
 
  Debug  MP_RandomFloat(-1, 1)
 
Next


with taibite only -1 and in Pb x64 = random floats...

My solution, to make a double from it:

Code:
ProcedureDLL.d MP_RandomFloat(fMin.f, fMax.f) ; Erzeugt einen Zufallswert zwischen fMin.f und fMax.f
  Protected fRandNum.f = Random(100000) / 100000
  Double.d = fMin + (fMax - fMin) * fRandNum
  ProcedureReturn Double
EndProcedure



Greeting Michael

_________________
Working on - MP3D Library -


Top
 Profile  
Reply with quote  
 Post subject: Re: Next Problem with Tailbite 1.4.6 and Windows 7 (x64)
PostPosted: Fri Jan 21, 2011 2:43 am 
Offline
Addict
Addict

Joined: Sun May 15, 2005 5:15 am
Posts: 1027
Location: Australia
I sincerely doubt this is a TB problem:
Code:
Protected fRandNum.f = Random(100000) / 100000

This returns 0!
one of the numbers on the right have side must be a float/double, or it is done as integer division and then converted to a float on assignment

Also, please do NOT post to a topic with an unrelated problem, especially after it has been marked done!

_________________
Demonio Ardente

Currently managing Linux & OS X Tailbite
OS X TailBite now up to date with Windows!


Top
 Profile  
Reply with quote  
 Post subject: Re: [Done] Problem with Tailbite 1.4.6 and Windows 7 (x64)
PostPosted: Fri Jan 21, 2011 12:02 pm 
Offline
Enthusiast
Enthusiast

Joined: Sat Oct 11, 2008 9:07 pm
Posts: 416
Location: Germany, Berlin > member German forum
Dear lexvictory,

if have set it to [Done] again. Sorry for that fault.

The Procedure works in pb, but not with tailbite and so i thought it is a problem. I will check it and will change the prcoedure a little bit, see what happens

Greetings Michael

_________________
Working on - MP3D Library -


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 15 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 2 guests


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

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye