spacer
January 30, 2013: Alchemy opcodes reclassified as non-premium :)
From the Adobe FAQ:

What are the XC APIs?
The XC APIs are the combination of domain memory APIs and Stage3D hardware acceleration APIs. These cross-compilation APIs allow a 3rd party ecosystem of game development tools to target Flash Player, including languages such as C/C++ and tools like Unity, as well as the Adobe Flash C++ Compiler (flascc) cross-compiler.

What is the status of the XC APIs?
As of January 2013, the XC APIs are no longer classified as a Premium Feature and access no longer requires a separate license from Adobe, nor royalties. The use of Stage 3D APIs in conjunction with the fast-memory opcodes via the domainMemory API will be available as a standard feature without requiring that content creators enter into a separate license agreement with Adobe.

Developers and publishers that have published content using the XC APIs do not need to make any changes to their content to reflect the change in status for the XC APIs and licensing terms.

Why is Adobe changing the licensing requirements for the XC APIs?
Based on feedback from developers, Adobe has decided to change the licensing terms for the XC APIs and classify these capabilities as a standard feature. The XC APIs are no longer part of the Flash Player Premium Feature tier and do not require a separate license nor royalties.

December 4, 2012: Adobe released Alchemny as FlasCC.
Today, Adobe Flash C++ Compiler codenamed Alchemy was released as part of the Game Developer tools as FlasCC 1.0.

March 28, 2012: Adobe introduced Premium Flash Player features :(
From the Adobe FAQ:

What are the premium features?
The initial version of premium features includes the ability to use domain memory in combination with Stage3D hardware acceleration in Flash Player.

What is NOT considered part of the premium features?
The following uses are NOT considered premium and there is no revenue share required for these uses:
  • Use of domain memory alone,
  • Use of hardware accelerated Stage3D features alone,
  • Use of software rendering of Stage3D, or
  • Use of these features within Flash content packaged as apps using AIR

How do the terms apply to tools that leverage the premium capabilities such as like HAXE, Azoth and Apparat?
If developers create content using 3rd party tools that leverage the premium capabilities, the content will need to have a license from Adobe to run correctly in Flash Player after August 1, 2012. Otherwise, the content is unaffected.

July 28, 2011: AZOTH version 1.05 released!
Yay!
September 30, 2010: FlashDevelop has Azoth extension...
Thanks to makc and FlashDevelop guys...
April 24, 2010: Azoth has a blog!
Mainly to enable public comments, Azoth now has a blog at mgazoth.wordpress.com

What is AZOTH?spacer
Azoth is a Windows console (Win32 command-line) application, for AS3 Flash programming, that lets you replace method calls to a certain AS3 class (included with Azoth) with equivalent Alchemy opcodes in a SWF file. This provides superior performance for accessing a ByteArray as memory, than you can achieve with AS3 alone.
 
Adobe introduced additional opcodes to AVM2 in Flash Player 10 for Alchemy (C to AS3 conversion magic). These optimized opcodes are not accessible using standard AS3. Azoth provides a simple way for using them.
 
Alchemy opcodes work on a ByteArray and provide fast access to it as 'memory'.
 
You can use the provided fastmem.as for emulating functionality of Alchemy opcodes. Then, using Azoth executable, you can replace calls to the methods of the class in the SWF file with inlined Alchemy opcodes (inject Alchemy opcodes).
 
Azoth is free to use (at your own risk), you cannot distribute it or link directly to the download. All rights other than granted here belong to Manitu Group.
 
Linking to this page is welcome. [www.buraks.com/azoth].
 
 Notes
  • Nicolas Cannasse's Haxe supports Alchemy opcodes. Our fastmem.as interface is intentionally made similar to Haxe flash.Memory API (Unfortunately the order of parameters for set methods are reversed).
  • Joa Ebert also has some tools with similar functionality as Azoth and more.
How to use AZOTH?
 General
  1. Use fastmem class in your project.
    • Copy the class AS file/folders to a folder where you can include it in your project. (For Flash, you can copy the fastmem.as file to com\buraks\utils\ folder to the folder you have your FLA file).
    • import com.buraks.utils.fastmem
    • You must be able to target at least SWF version 10. (For Flash, this is CS4 or later).
  2. Select a ByteArray using fastSelectMem method. Access the ByteArray as 'memory', using fastmem methods. Use fastDeselectMem when you are finished.
    • Length of the ByteArray must be at least ApplicationDomain.MIN_DOMAIN_MEMORY_LENGTH (1024 bytes).
    • Make sure to select the ByteArray each time before a body of actions that access the ByteArray as memory. Deselect the ByteArray when you are done. Select and Deselect calls should be coupled.
    • Access to the ByteArray is little endian. You can select a big endian ByteArray and use it as long as you are aware of this fact, for example when copying some data, where this can be safely ignored.
    • The performance benefits are achieved by using only one ByteArray at a time. It's not a good idea to make use of several ByteArrays, selecting each and copying data between them. With a single ByteArray, you may need to do your own memory management.
  3. Compile your SWF file.
  4. Use Azoth.exe to inject Alchemy opcodes.
    • You can run Azoth from the command-line. For this, start/run cmd, use it like azoth yourswf.swf. If you can afford not to see the result, you can simply drag and drop your SWF onto azoth.exe.
 fastmem Class Details
List of fastmem methods:
 
function fastSelectMem(mem:flash.utils.ByteArray):void//selects a ByteArray
function fastDeselectMem():void//deselects selected ByteArray (new in v1.03)
function fastGetByte(address:int):int//reads an unsigned byte
function fastGetUI16(address:int):int//reads an unsigned 16-bit integer
function fastGetI32(address:int):int//reads a signed 32-bit integer
function fastGetFloat(address:int):Number//reads a 32-bit floating-point number
function fastGetDouble(address:int):Number//reads a 64-bit floating-point number
function fastSetByte(value:int,address:int):void//writes a byte
function fastSetI16(value:int,address:int):void//Writes a 16-bit integer
function fastSetI32(value:int,address:int):void//Writes a 32-bit integer
function fastSetFloat(value:Number,address:int):void//writes a 32-bit floating-point number
function fastSetDouble(value:Number,address:int):void//writes a 64-bit floating-point number
function fastSignExtend1(value:int):int//sign extends a 1-bit integer
function fastSignExtend8(value:int):int//sign extends an 8-bit integer
function fastSignExtend16(value:int):int//sign extends a 16-bit integer
 
function fastSelectMem102(mem:flash.utils.ByteArray):void//Old version for compatibility
 
Usage example:
	/***********************************
	 Regular ByteArray usage
	***********************************/
	//mem is a ByteArray, at least 1024 bytes, little endian
	var mem = new ByteArray();
	mem.length=1024;
	mem.endian = Endian.LITTLE_ENDIAN;
	
	//write 1234 at postion 555
	mem.position=555;
	mem.writeInt(1234);
	
	//write 5678 at postion 999
	mem.position=999;
	mem.writeInt(5678);
		
	/***********************************
	 ByteArray Usage via fastmem class
	***********************************/
	//use fastmem class
	import com.buraks.utils.fastmem;
	
	//mem is a ByteArray, at least 1024 bytes, little endian
	var mem = new ByteArray();
	mem.length=1024;
	mem.endian = Endian.LITTLE_ENDIAN;
	
	//No need to create a fastmem instance, all methods are static
	
	//select the ByteArray
	fastmem.fastSelectMem(mem);
	
	//write 1234 at postion 555
	fastmem.fastSetI32(1234,555);
	
	//write 5678 at postion 999
	fastmem.fastSetI32(5678,999);
	
	//Deselect the ByteArray
	fastmem.fastDeselectMem();
 Change log
Version 1.05 (July 28, 2011)
Azoth now supports LZMA compression (SWF 13).
 
A bug where 'for certain SWF files Azoth would save the SWF uncompressed' is fixed. Azoth now always uses the Best compression setting for ZLIB compressed SWFs.
 
Azoth will now check its own integrity before running and will not run if it is modified/corrupted.
 
Version 1.04 (September 30, 2010)
Missing return type void added to fastDeselectMem method. (Thanks to makc).
 
Return code 10 (no opcodes modified warning) removed.
 
Version 1.03 (August 6, 2010)
With this version, you need to couple calls to SelectMem with calls to DeselectMem. This has a few benefits, most importantly when using other code (library SWCs etc.) that make use of Alchemy, this will make sure fastMem and other code work together OK.
 
If you need to update a project using v1.02 or earlier and you don't want to change your code for some reason, a compatibility version of selectMem is included (named: fastSelectMem102). You can just rename SelectMem calls.
 
 Azoth.exe Details
Azoth.exe takes parameters from the command line. Usage is:
 
    azoth InFile [OutFile]
 
inFile is your existing SWF file, which makes use of fastmem class.
outFile is the SWF file that will be saved with Alchemy opcodes injected. Specifying outFile is optional. When not specified azoth will save a file with _azoth appended to the name of inFile; for example, for 'sample.swf', the name will be 'sample_azoth.swf'. If outFile exists, azoth will overwrite the file.
 
spacer
 
Azoth.exe will return the following exit codes:
Value Meaning
0 Injection completed successfully. Azoth will display number of opcodes injected.
1 Parameter count error. Azoth 1.01 expects at least 1, at most 2 parameters.
2 InFile not found. Make sure the file exists and you have specified it correctly. If InFile has spaces, make sure you use quotes.
4 An error occured while loading the InFile SWF.
5 An error occured while processing the InFile SWF.
6 An error occured while saving the OutFile SWF.
9 Generic error. Try again... If you can consistently reproduce this, we will appreciate if you can let us know the steps necessary.

 
More Info
Current Status
Version 1.05. No known bugs.
 
Version 1.0x Known issues:
  • When using Flash CS4 or CS5, in AS3 publish settings, Strict Mode must be selected. (FOL - no change planned).
Downloads
    spacer  Azoth 1.05 (azoth105.zip 353KB)
Includes azoth.exe, fastmem.as and a sample CS4 FLA file with compiled and injected SWFs.
MD5 checksum of azoth105.zip is 04505A6043530CDCF9452C35773AF419.
 
Links
AS3 Fast memory access without Alchemy by Philippe Elsass [May 3, 2010]
Free online (and offline) Chromatic Guitar Tuner by Manitu Group [August 19, 2010]
HOW TO: Integrate FlashDevelop with Azoth by Makc [September 30, 2010]
FlashDevelop is a free and open source (MIT license) source code editor.
spacer

Azoth Extension for FlashDevelop is available [September 30, 2010].
Supercharge your ByteArray operations using Azoth by Jaaq Jorissen [January 10, 2011]
 
You need to submit your link in order to be listed in this section. We reserve the right to reject/accept any link submitted.
 
Thanks
 For direct or indirect help in the making of Azoth
Philippe Elsass - philippe.elsass.me/
Makc - twitter.com/makc3d
Mika Palmu - FlashDevelop
Vjacheslav Moskalev
 
 For spreading the word
spacer spacer spacer spacer spacer spacer spacer spacer spacer spacer spacer spacer spacer spacer spacer spacer spacer spacer spacer spacer spacer
 
 Acknowledgements
Application icon by www.oxygen-icons.org/
Some graphics/icons by www.pixel-mixer.com/
Some graphics/icons by An Phan Van

FAQ
I get a black window pop up and disappear when I run Azoth.exe. What's going on?
This is expected behavior. Azoth is a command-line console application.
 
How much performance gain can I expect?
In our raw read/write tests, the performance gain was 10x to 20x, but real world performance gain will be lower.
 

 
Sample included with Azoth gained ~3x fps boost in our tests. Obviously this depends on how much time is spent on memory access and other parts of the script.
 
Can you provide me a custom AZOTH build to include in my application?
Yes, please contact us with your specific need. (This is about distributing Azoth. Using fastmem class and injecting Alchemy opcodes using Azoth is completely free).
 
I love Azoth so much. How can I help with further development of Azoth?
Thank you! You can consider purchasing Manitu Group products to support us...
 
Is it true that the Molehill (Stage 3D) demo Zombie Tycoon (by Frima Studio, revealed at Adobe MAX 2010) made use of Azoth?
Yes.
 
Support
Azoth is not an officially supported product. But you'll most likely receive a response when you write to azoth@buraks.com, if you also mention azoth in the subject line (otherwise we may miss your email). Please let us know your experience and about bugs, suggestions are always welcome.
 
Azoth also has a blog at mgazoth.wordpress.com where you can leave a comment.
 
spacer spacer
 

 
Copyright © 2010-2012 Manitu Group, Istanbul, Turkey. All rights reserved. All trademarks acknowledged.
General Privacy Policy of Manitu Group
gipoco.com is neither affiliated with the authors of this page nor responsible for its contents. This is a safe-cache copy of the original web site.