NEWS ARTICLES


    What's News in the PlayBasic world ? - Find out here.



 PlayBasic V1.64P2 Retail Upgrade Released

By: Kevin Picone Added: December 29th, 2014

Category: All,Update,Upgrade





PlayBasic V1.64P2 _Retail Upgrade_ Now Available (29th, Dec, 2014)




     This release updates any version from PlayBasic V1.63w2 to PlayBasic V1.64P (retail) to the current retail version of PlayBasic V1.64P. If your current version is older than PB1.63W (pre June/July 1997), then you may need to install patch PB1.63w2 prior to this one ! (if you haven't already)


     The PlayBasic V1.64P2 package includes updates of PlayBasic Compiler, Release / Debug Runtimes, SLIBS, DOCS (HELP FILES) & IDE V1.17b.

     The V1.64P2 release is a relatively minor update to address functionality broken during the massive V1.64P update. Beyond those bug fixes, there are of course more improvements to the compiler & runtime command sets and debugger.

     The compiler / runtime time changes are generally improvements to the quality of the byte code the compiler produces within certain circumstances. One that comes to mind, was the ability to completely optimizing out literal fields when querying array structures from typed pointers. So code like the snippet bellow runs better in V1.64P2 than previous versions. Which in turn helps PlayBasic2DLL produce even faster machine code versions of such routines. So that's a big win !

PlayBasic Code:
  Type SomeStructure
         IntegerArray(16)
  EndTYpe

  dim Me as SomeStructure pointer
 
   Me = new SomeStructure

  // such field offsets are solved at compile time
   Me.Array(0) = 1
   Me.Array(2) = 1
   Me.Array(3) = 1
   Me.Array(4) = 1

   Print Me.Array(0)
   Print Me.Array(1)
   Print Me.Array(2)
   Print Me.Array(3)


COMMANDS USED: DIM | POINTER | NEW | PRINT |


     Such compile time optimizations are useful when we want to iterate through structures of data, so rather than bumping the ME pointer between integer fields, we could unroll the inner loop to process groups of integers and access fields at fixed offsets then bump the ME pointer. Which is a more efficient approach generally.


     Changes to commands sets that users will find the most useful, can be found in variable Alpha Blending situations, generally filling surface routines are now twice as fast when performing variable alpha blending in this version, there's also changes to the AFX alpha blending logic which screens the alpha channel value for pixels that are fully translucent or opaque, in either case those are handled with a special case. The performance benefit really comes down to how many pixels in the image need to be alpha blended. But the standard tests had a 10->20% improvement without change..


     In terms of Debugging, there's two new subtle changes in the compiler runtime. The first, is the new ability of the runtime to intervene when some pointer opcode attempts peek/poke from a null pointer. Which should generally return a runtime error if that occurs like in the example bellow.

PlayBasic Code:
  ; declare a ME as type Integer POinter
  DIM Me as Integer Pointer

    ; the runtime will stop before this line is execute as ME is 
    ; will be pointing at ZERO.. Which is memory your program doesn't
    ; own and would kill your program
   print *ME


   sync
   waitkey


COMMANDS USED: DIM | INTEGER | POINTER | PRINT | SYNC | WAITKEY |



     The other runtime/debugger change is a mode in the debugger to Enable/Disable automatic type creation when executing a program. The PB runtimes default behavior is to automatically allocate a type if you're writing to a structure that's currently empty. Generally this is handy behavior as it saves you some lines of code, but can be an issue when exporting your programs to DLL since PlayBasic2DLL doesn't support this behavior. So if you writing library code that you're going to build a DLL of, you'll find this invaluable !


     Don't have a retail version of PlayBasic ? and want to find out more information about PlayBasic programming > please visit the www.PlayBasic.com and download the free learning edition.





Downloads


     Download PlayBasic V1.64P2 Retail Upgrades From Forums







 

 
     
 
       

(c) Copyright 2002 / 2024 Kevin Picone , UnderwareDesign.com  - Privacy Policy   Site: V0.99a [Alpha]