PlayBASIC2DLL V0.99 Commercial Edition released!

Started by kevin, June 03, 2014, 06:16:44 AM

Previous topic - Next topic

kevin

  
PlayBASIC2DLL V0.99 Commercial Edition released!


      Yes it's here... Finally...after more than few marathon nights the first fully fledged version of PlayBASIC2DLL is available to the community.  PlayBASIC2DLL brings the power of native code to the PlayBASIC developer,  all we can say is welcome back to the machine code age.  

      This initial release has been discounted for the community down to $27.50 (US) from it's regular $49.99 US


 
What's PlayBASIC2DLL ?


       It's a companion tool to the PlayBASIC programming language. The tool converts PlayBASIC Source code into machine code DLL's.  Allowing the programmer to fully harness the process of their computers cpu.

       The tool has been in development for the best part 8 months now so rather than me crudely attempt to paraphrase the blogs, I recommend you read the PlayBASIC2DLL blogs and check out some of the examples.     ( 1,000,000 Vertex cube  - Water Demo
 


 
FAQ PlayBASIC2DLL


      It's very important you read the PlayBASIC2DLL FAQ carefully.    This is tool specifically designed for use with only certain versions of PlayBASIC retail editions.      

      Read FAQ / Development BLOG



 
Order Now


        This software is being released for FREE (MAY 2019)


kevin

 
 PlayBASIC To Dll V0.99d  Released


    Here's the second revision for the PB2DLL package.   The main changes are two fold, firstly it's  is built using the latest edition PlayBASIC V1.64P (Beta 41),  and it in includes more math function solvers to in line common PlayBASIC math functions.  



 Download:


     To download use the link that was assigned to you from your registration email.   That link will always return the latest edition of PB2DLL to you.  




 History


 
V0.99c   May,2014  -7th,June, 2014  

Code Generation:
- COSRADIUS & SINRADIUS resolved directly on FPU
- COSNewValue & SinNEwValue resolved directly on FPU

Fixes:

                 - Re-Tweaked the rego field screening :(
                 


V0.99a   May,2014  -6th,June, 2014  

Code Generation:

- RgbAlphaAnd(), RgbAlphaOr() & RgbAlphaXor() functions are now trapped and inlined
 on demand.  

- GetDistance2D(X1,y1,x2,y2) is trapped and placed in line for the FPU.
 The call is about 50% less code when passing floats to the function and probably
 75% less code when passing integers in.  Speed wise it bench marks up to 15 times  faster.  

- Cos/Sin functions are resolved now directly in line on the FPU for you.


Fixes:

- Sqrt() & ABS() decoders didn't move the PC correctly causing the parser to get
out of alignment... Throwing a bunch of bogus errors after those statements

                 - Tweaked the rego field screening to only accept characters between ASCII 32 to 128
                 

 




kevin

  PlayBASIC To Dll V0.99g  Released and Available For Download (30th,June,2014)

     Here's revision G of PB2DLL V0.99 package.    This revision is focuses on bugs and the more improvements to code generation engine.  The main bug that this update fixes is the possible freeze when attempting to load a PBA that's has no exportable functions in it.   It was a strange issue, caused by the Replace$() function in PB, but that's been solved now.    So if you select a source that has no exports, you should get an error message, rather than it hanging. 


   
  Code Generation:

      Just like the previous builds I've been working on improving it's detection and abilities to solve sequences of byte code operations in order and with in CPU registers.  The solver can support integer and float data types mainly. So it's looking for sequences of integer or float operations that stack up in sequence.  When it finds one, it short cuts this series of instructions.   

      The Integer solver has three main additions, it support equality tests (= and <>) ,  Compare/Branches as well as better support for Left/Right hand operators.   The latter allows it to better track where which side of the temp data came from, then remap the operator accordingly. 

       On the float side, the changes are a little different,  the float solver can handle recasting results and some limited single parameter functions like Sqrt(), ABS() as well as the normal addition/subtraction/Divide/Multiplies. 


  Download:

      To download use the link that was assigned to you from your registration email.   That link will always return the latest edition of PB2DLL to you. 


  History

 


V0.99g  23rd,June, 2014  - 30th,June,2014

Fixes:
- The import library list would break when there's more than one
  library that needed to be imported/exported

- Reading from typed fields was exporting UTD pointer.

- DLL entry code now screens for caller actions.  Which seems to fix
  the crash on exit stuff that's been happening. 
 
- Seemed to be passing the wrong 'temp variable' in the integer serialer     

Code Generation:

- Parser better detects when an  AND/ON/XOR opcode is at the start
  possible run of serialized opcodes

- Integer serializer can handle equal and not equal compare
  operations. 
 
- Integer serializer  can handle compare with branch opcodes.

- Testing some single param float functions (Sqrt/ABS) to the float
  solver.  Seems to work well !
 
 
V0.99e/f  13th,June, 2014  -14th,June, 2014

Code Generation:

- Added serialized solver for runs of INTEGER opcodes. 
  The solver currently supports  ADD, SUB, MULT, DIV
  / AND / OR / XOR / shift << and shift >> operators

                    eg.
                          result = 10*A +B - C <<2 >> 8   
                         
- Added serialized solver for runs of FLOAT opcodes. 
  The solver currently supports  ADD, SUB, MULT, DIV

                    eg.
                          result = 10*A# +B# - C#
                         


V0.99e   13th,June, 2014  -14th,June, 2014

Code Generation:

- Added serialized solver for runs of INTEGER opcodes. 
  The solver currently supports  ADD, SUB, MULT, DIV
  / AND/OR/XOR/ shifts << and shift >> operators

                    eg.
                          result = 10*A +B - C <<2 >> 8   
                         
- Added serialized solver for runs of FLOAT opcodes. 
  The solver currently supports  ADD, SUB, MULT, DIV

                    eg.
                          result = 10*A# +B# - C#



V0.99c/d   May,2014  -7th,June, 2014 

Code Generation:
- COSRADIUS & SINRADIUS resolved directly on FPU
- COSNewValue & SinNEwValue resolved directly on FPU

Fixes:

                  - Re-Tweaked the rego field screening :(




V0.99a   May,2014  -6th,June, 2014 

Code Generation:

- RgbAlphaAnd(), RgbAlphaOr() & RgbAlphaXor() functions are now trapped and inlined
  on demand. 

- GetDistance2D(X1,y1,x2,y2) is trapped and placed in line for the FPU.
  The call is about 50% less code when passing floats to the function and probably
  75% less code when passing integers in.  Speed wise it bench marks up to 15 times  faster. 

- Cos/Sin functions are resolved now directly in line on the FPU for you.


Fixes:

- Sqrt() & ABS() decoders didn't move the PC correctly causing the parser to get
out of alignment... Throwing a bunch of bogus errors after those statements

                  - Tweaked the rego field screening to only accept characters between ASCII 32 to 128
                 

 


kevin

#3
 PlayBASIC To Dll V0.99h  Released and Available For Download (11th,July,2014)

    Here's revision H of PB2DLL V0.99 package.    This revision continues to focus on finding those left over core instructions that weren't supported by the translation engine,  as well as improving the quality of the machine code it is producing.   One of the operations that was missing was reading a typed handle from a type variable/array structure.  This is important, as we can use this to detect what cells within an array are populated are what ones aren't.  

    eg.

PlayBASIC Code: [Select]
     For lp=0 to 100

if Alien(lp) ; here we're reading the typed handle at this position within the array. If the value there is zero, then it's empty, otherwise it exists.

Alien(lp).x+=Alien(lp).SpeedX
Alien(lp).y+=Alien(lp).Speedy

endif

next




 
 Code Generation:

     This version supports better stream lining of expressions of core instructions onto the CPU from both the integer and floating point sides.  The goal of such changes it avoid hitting memory were possible as well as replacing common operations where it makes sense.  One of the recent additions can now trap temp registers that appear following internal command set function calls.  So if you called some internal command function that returned a floating point value, the generator will try and sequentially solve any following instructions.    

      Eg.

      x#  =GetSpriteX(SomeSPRITE) /  GridWidth

     So some code like this now leaves the result of the function call on the fpu and performs the division on the fpu also.    Which gets rid of some temporary memory thrashing that the runtimes have to do, but our machine code dll's don't.    This means that generally if your expression stacks well, you'll get very solid performance from it.


 Download:

     To download use the link that was assigned to you from your registration email.   That link will always return the latest edition of PB2DLL to you.  


 History

 

V0.99h  30th,June,2014  - 10th,July,2014

Added:

- ReadTypeCell byte code was being decoded, but didn't export
 any assembly. Making those programs fail

Code Generation Changes:

- Added COS/SIN single float functions  to the float solver.
- added Let to integer solver.  
- Integer solver now supports the less than, less than equal operators
- Float solver has better support to follow temps or left/right
 side of math operators.
- Integer solver supports RGBA(),RGBR(),RGBG(),RGBB()
- Tweaked internal command set caller to watch for the serialized returns
 from operations that return Integers and Floats
- RANGE() can start a serialized sequence.  Allowing code like
 IF RANGE(a,b,c) to solve on chip.
- Shift & roll functions now support integer sequences after them.
- Integer bit operations can now solve integer sequences after them
- String compares functions now support integer sequences after them

Fixes:

- Both Int & Flt serial solvers could look past the end of sequence when
  the first opcode didn't return a temp register.
- return parameters for 'bound' functions didn't seem export working code
- RANGE() wasn't allowing fields to be anything other than integer
- Integer serial solver didn't check if the return type when it ran into a
assignment statement.  Which would break is the expression was an integer
being written to a float.



V0.99g  23rd,June, 2014  - 30th,June,2014

Fixes:
- The import library list would break when there's more than one
 library that needed to be imported/exported

- Reading from typed fields was exporting UTD pointer.

- DLL entry code now screens for caller actions.  Which seems to fix
 the crash on exit stuff that's been happening.  
 
- Seemed to be passing the wrong 'temp variable' in the integer serialize    

Code Generation:

- Parser better detects when an  AND/ON/XOR opcode is at the start
 possible run of serialized opcodes

- Integer serialize can handle equal and not equal compare
 operations.  
 
- Integer serialize can handle compare with branch opcodes.

- Testing some single param float functions (Sqrt/ABS) to the float
 solver.  Seems to work well !
 
 
V0.99e/f  13th,June, 2014  -14th,June, 2014

Code Generation:

- Added serialized solver for runs of INTEGER opcodes.  
 The solver currently supports  ADD, SUB, MULT, DIV
 / AND / OR / XOR / shift << and shift >> operators

                   eg.
                         result = 10*A +B - C <<2 >> 8    
                         
- Added serialized solver for runs of FLOAT opcodes.  
 The solver currently supports  ADD, SUB, MULT, DIV

                   eg.
                         result = 10*A# +B# - C#
                         


V0.99e   13th,June, 2014  -14th,June, 2014

Code Generation:

- Added serialized solver for runs of INTEGER opcodes.  
 The solver currently supports  ADD, SUB, MULT, DIV
 / AND/OR/XOR/ shifts << and shift >> operators

                   eg.
                         result = 10*A +B - C <<2 >> 8    
                         
- Added serialized solver for runs of FLOAT opcodes.  
 The solver currently supports  ADD, SUB, MULT, DIV

                   eg.
                         result = 10*A# +B# - C#



V0.99c/d   May,2014  -7th,June, 2014  

Code Generation:
- COSRADIUS & SINRADIUS resolved directly on FPU
- COSNewValue & SinNEwValue resolved directly on FPU

Fixes:

                 - Re-Tweaked the rego field screening :(




V0.99a   May,2014  -6th,June, 2014  

Code Generation:

- RgbAlphaAnd(), RgbAlphaOr() & RgbAlphaXor() functions are now trapped and inlined
 on demand.  

- GetDistance2D(X1,y1,x2,y2) is trapped and placed in line for the FPU.
 The call is about 50% less code when passing floats to the function and probably
 75% less code when passing integers in.  Speed wise it bench marks up to 15 times  faster.  

- Cos/Sin functions are resolved now directly in line on the FPU for you.


Fixes:

- Sqrt() & ABS() decoders didn't move the PC correctly causing the parser to get
out of alignment... Throwing a bunch of bogus errors after those statements

                 - Tweaked the rego field screening to only accept characters between ASCII 32 to 128
                 

 

kevin

#4
 PlayBASIC To Dll V0.99i  Released and Available For Download (13th,Jan,2015)

    Here's revision I of PlayBASIC2DLL V0.99 package.    This revision furthers more improvement to the machine code generation as well continuing to iron any hidden instructions that weren't supported by the translation engine.  

    In terms of code generation this version seem focuses mainly on pointer operations, in particular  when reading / writing from a user defined typed pointer is used within an expression, as well as arithmetic and assignment operations on between pointers or between a pointer and integer.  

    Example:
PlayBASIC Code: [Select]
      type TestType
x#,y#,z#
EndTYpe


Dim Src as testtype pointer
Dim Dest as testtype pointer

Src = new testtype
Dest = new testtype


; write some integer values into these float fields..
; this type of type mismatch is now auto recast at compile time
Src.x = 1111
Src.y = 2222
Src.z = 3333


; copy a field to another within the same type
; The op
Src.x=Src.Y

; copy fieldds between different types
Dest.x=Src.x

; copy a field and add 100 to it
Dest.y=Src.y+100

; copy a field and mult it by 2
Dest.z=Src.z*2

print Dest.x
print Dest.y
print Dest.z


Sync
waitkey






   This tool is intended to be used with PlayBASIC V1.64P2 retail update. !


   Reminder: Always read the development BLOG's carefully for information on the in's and outs of any upgrade !


 Download:

     To download, use your unique link that was assigned to you in your registration email.   That link will always return the latest edition of PlayBASIC2DLL to you.  



 History

 
V0.99i  19th,Nov,2014  - 13th,Jan,2015

Fixes:
- Call function was missing support for pointer as parameter fields
- On GOTO would output code with clashing labels in it.

Code Generation Changes:
- Integer solver now supports integer/byte/word typed pointer read
 accesses.    Eg  result = Me.X + SomeInteger
 
- Integer solver supports pointer additions
 
- Integer solver supports INT() function on pointers

- Integer solver supports MoveToPrr in INT() function on pointers

- Integer solver supports Pointer Additions Int/Word & Byte

- Float Solver support runs that write to integer/float pointers.
eg  UserDefinedTypePointer.SomeFloat#  = A#+B#+C
eg  UserDefinedTypePointer.SomeInteger = A#+B#+C   (auto cast when written)

- Solver can trap move pointers/ pointer casts and serialize them

- Float solver support runs from Peeked floats
- Float solver can short cut moves between float fields without loading to FPU
 eg    You.X# = Me.X#   - If ME & YOU are UDT pointer, then this just moves
 the memory, rather than loading to FPU and writing back


V0.99h  30th,June,2014  - 10th,July,2014

Added:

- ReadTypeCell byte code was being decoded, but didn't export
 any assembly. Making those programs fail

Code Generation Changes:

- Added COS/SIN single float functions  to the float solver.
- added Let to integer solver.  
- Integer solver now supports the less than, less than equal operators
- Float solver has better support to follow temps or left/right
 side of math operators.
- Integer solver supports RGBA(),RGBR(),RGBG(),RGBB()
- Tweaked internal command set caller to watch for the serialized returns
 from operations that return Integers and Floats
- RANGE() can start a serialized sequence.  Allowing code like
 IF RANGE(a,b,c) to solve on chip.
- Shift & roll functions now support integer sequences after them.
- Integer bit operations can now solve integer sequences after them
- String compares functions now support integer sequences after them

Fixes:

- Both Int & Flt serial solvers could look past the end of sequence when
  the first opcode didn't return a temp register.
- return parameters for 'bound' functions didn't seem export working code
- RANGE() wasn't allowing fields to be anything other than integer
- Integer serial solver didn't check if the return type when it ran into a
assignment statement.  Which would break if the expression was an integer
being written to a float.
 

V0.99g  23rd,June, 2014  - 30th,June,2014

Fixes:
- The import library list would break when there's more than one
 library that needed to be imported/exported

- Reading from typed fields wasn't exporting UTD pointer.

- DLL entry code now screens for caller actions.  Which seems to fix
 the crash on exit stuff that's been happening.  
 
- Seemed to be passing the wrong 'temp variable' in the integer serialer    

Code Generation:

- Parser better detects when an  AND/ON/XOR opcode is at the start
 possible run of serialized opcodes

- Integer serializer can handle equal and not equal compare
 operations.  
 
- Integer serializer can handle comparewith branch opcodes.

- Testing some single param float functions (Sqrt/ABS) to the float
 solver.  Seems to work well !
 
 
V0.99e/f  13th,June, 2014  -14th,June, 2014

Code Generation:

- Added serialized solver for runs of INTEGER opcodes.  
 The solver currently supports  ADD, SUB, MULT, DIV
 / AND / OR / XOR / shift << and shift >> operators

                   eg.
                         result = 10*A +B - C <<2 >> 8    
                         
- Added serialized solver for runs of FLOAT opcodes.  
 The solver currently supports  ADD, SUB, MULT, DIV

                   eg.
                         result = 10*A# +B# - C#
                         


V0.99c/d   May,2014  -7th,June, 2014  

Code Generation:
- COSRADIUS & SINRADIUS resolved directly on FPU
- COSNewValue & SinNEwValue resolved directly on FPU

Fixes:

                 - Re-Tweaked the rego field screening :(
                 


V0.99a   May,2014  -6th,June, 2014  

Code Generation:

- RgbAlphaAnd(), RgbAlphaOr() & RgbAlphaXor() functions are now trapped and inlined
 on demand.  

- GetDistance2D(X1,y1,x2,y2) is trapped and inlined onto the FPU for.
 The call is about 50% less code when passing floats to the function and probably
 75% less code when passing integers in.  Speed wise it bench marks at 15 times
 faster.  

- COS & SIN resolved directly onto FPU

Fixes:

- Sqrt() & ABS() decoders didn't move the PC correctly causing the parser to get
out of alignment and throw a bunch of bogus errors after those statements

               - Tweaked the rego field screening to only accept characters between ASCII 32 to 128
                 

 

kevin

#5
 PlayBASIC2DLL V0.99J BETA #02  (27th, May, 2015)

     Beta #02 contains the latest code generation updates for PlayBASIC2DLL tool.  This release corrects some more calling conventions in the machine code generation.   Older versions are missing code to handle passing Pointer fields to PB functions and bound functions from other DLL's.


     For use the most UP-TO-DATE information about PlayBASIC2DLL

     Read The PlayBASIC2DLL Update Work In Progress gallery




Download



       Obsolete file removed, newer builds bellow



kevin

 PlayBASIC To Dll V0.99k  Released and Available For Download (24th,Nov,2015)

     Here's revision K of PlayBASIC2DLL V0.99 package.    This update address a few minor issues with the machine code generation and includes a few new command sets that were overlooked in previous builds.

    This tool is intended to be used with PlayBASIC V1.64P3 retail update. !


    Reminder: Always read the development BLOG's carefully for information on the in's and outs of any upgrade !


  Download:

      To download, use your unique link that was assigned to you in your registration email.   That link will always return the latest edition of PlayBASIC2DLL to you. 



  History

 
V0.99k  29th,Sep,2015   - 8th,Nov,2015

Code Generation Changes:
- Added support for the Date & Time function command set to PB2DLL

- Added some alignment to loop structures.

Fixes:
- Updated the Square Root parser. 



V0.99j  14th,Jan,2015  - 24th,May,2015

Fixes:
- external function calling was missing support for pointer parameters
- integer function calling was missing support for pointer parameters
making command calls like GetSpriteRect() fail in the DLL




V0.99i  19th,Nov,2014  - 13th,Jan,2015

Fixes:
- Call function was missing support for pointer as parameter fields
- On GOTO would output code with clashing labels in it.

Code Generation Changes:
- Integer solver now supports integer/byte/word typed pointer read
  accesses.    Eg  result = Me.X + SomeInteger
 
- Integer solver supports pointer additions
 
- Integer solver supports INT() function on pointers

- Integer solver supports MoveToPrr in INT() function on pointers

- Integer solver supports Pointer Additions Int/Word & Byte

- Float Solver support runs that write to integer/float pointers.
eg  UserDefinedTypePointer.SomeFloat#  = A#+B#+C
eg  UserDefinedTypePointer.SomeInteger = A#+B#+C   (auto cast when written)

- Solver can trap move pointers/ pointer casts and serialize them

- Float solver support runs from Peeked floats
- Float solver can short cut moves between float fields without loading to FPU
  eg    You.X# = Me.X#   - If ME & YOU are UDT pointer, then this just moves
  the memory, rather than loading to FPU and writing back


V0.99h  30th,June,2014  - 10th,July,2014

Added:

- ReadTypeCell byte code was being decoded, but didn't export
  any assembly. Making those programs fail

Code Generation Changes:

- Added COS/SIN single float functions  to the float solver.
- added Let to integer solver. 
- Integer solver now supports the less than, less than equal operators
- Float solver has better support to follow temps or left/right
  side of math operators.
- Integer solver supports RGBA(),RGBR(),RGBG(),RGBB()
- Tweaked internal command set caller to watch for the serialized returns
  from operations that return Integers and Floats
- RANGE() can start a serialized sequence.  Allowing code like
  IF RANGE(a,b,c) to solve on chip.
- Shift & roll functions now support integer sequences after them.
- Integer bit operations can now solve integer sequences after them
- String compares functions now support integer sequences after them

Fixes:

- Both Int & Flt serial solvers could look past the end of sequence when
   the first opcode didn't return a temp register.
- return parameters for 'bound' functions didn't seem export working code
- RANGE() wasn't allowing fields to be anything other than integer
- Integer serial solver didn't check if the return type when it ran into a
assignment statement.  Which would break if the expression was an integer
being written to a float.
 

V0.99g  23rd,June, 2014  - 30th,June,2014

Fixes:
- The import library list would break when there's more than one
  library that needed to be imported/exported

- Reading from typed fields wasn't exporting UTD pointer.

- DLL entry code now screens for caller actions.  Which seems to fix
  the crash on exit stuff that's been happening. 
 
- Seemed to be passing the wrong 'temp variable' in the integer serialer     

Code Generation:

- Parser better detects when an  AND/ON/XOR opcode is at the start
  possible run of serialized opcodes

- Integer serializer can handle equal and not equal compare
  operations. 
 
- Integer serializer can handle comparewith branch opcodes.

- Testing some single param float functions (Sqrt/ABS) to the float
  solver.  Seems to work well !
 
 
V0.99e/f  13th,June, 2014  -14th,June, 2014

Code Generation:

- Added serialized solver for runs of INTEGER opcodes. 
  The solver currently supports  ADD, SUB, MULT, DIV
  / AND / OR / XOR / shift << and shift >> operators

                    eg.
                          result = 10*A +B - C <<2 >> 8   
                         
- Added serialized solver for runs of FLOAT opcodes. 
  The solver currently supports  ADD, SUB, MULT, DIV

                    eg.
                          result = 10*A# +B# - C#
                         


V0.99c/d   May,2014  -7th,June, 2014 

Code Generation:
- COSRADIUS & SINRADIUS resolved directly on FPU
- COSNewValue & SinNEwValue resolved directly on FPU

Fixes:

                  - Re-Tweaked the rego field screening :(
                 


V0.99a   May,2014  -6th,June, 2014 

Code Generation:

- RgbAlphaAnd(), RgbAlphaOr() & RgbAlphaXor() functions are now trapped and inlined
  on demand. 

- GetDistance2D(X1,y1,x2,y2) is trapped and inlined onto the FPU for.
  The call is about 50% less code when passing floats to the function and probably
  75% less code when passing integers in.  Speed wise it bench marks at 15 times
  faster. 

- COS & SIN resolved directly onto FPU

Fixes:

- Sqrt() & ABS() decoders didn't move the PC correctly causing the parser to get
out of alignment and throw a bunch of bogus errors after those statements

                - Tweaked the rego field screening to only accept characters between ASCII 32 to 128
                 

 

kevin

#7
 PlayBASIC To Dll V0.99l  Released and Available For Download (24th,May,2019)

    Here's revision L of PlayBASIC2DLL V0.99 package.    This update removes the need for the retail key making the software FREE.

   This tool is intended to be used with PlayBASIC V1.64P4 retail update. !


   Reminder: Always read the development BLOG's carefully for information on the in's and outs of any upgrade !




Download




  Download  PlayBASIC2DLL - FREE EDITION (login required)




History



 
         Built FREE EDITION