home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 4 / DATAFILE_PDCD4.iso / utilities / utilst / texturgdn / !TexturGdn / Docs / Extensions < prev    next >
Encoding:
Text File  |  1996-09-28  |  23.3 KB  |  634 lines

  1.  
  2.                         Language Extensions
  3.                         ===================
  4.  
  5. 1.0 Introduction
  6. 2.0 The RMStore directory
  7. 3.0 Structure
  8. 4.0 Resources
  9. 5.0 Coding
  10. 6.0 Calling internal commands
  11.  
  12. 1.0 Introduction
  13. ~~~~~~~~~~~~~~~~
  14. This document describes how to write language-extensions to the texture
  15. generation language used in the Texture Garden program, reasons why you might
  16. be interested in doing this and information about installing other people's
  17. extension modules.
  18.  
  19. Commands may be included, but functions (refer to the "Language" file for the
  20. differences between these) may not currently be implemented by third parties.
  21.  
  22. Example source code using the BASIC assembler is available.  Although this
  23. code is distributed as freeware (i.e. copyright is retained) the author
  24. expresses every intention of approving use of my code where it is
  25. incorporated into modules intended for my program, so please do not hesitate
  26. to steal and butcher it; if this was objected to no source code would have
  27. been distributed.
  28.  
  29. 2.0 The RMStore directory
  30. ~~~~~~~~~~~~~~~~~~~~~~~~~
  31. This is a directory immediately inside the "!TexturGdn" directory.  The
  32. location is usually "<TextureGdn$Dir>.RMStore".  The precise location is held
  33. in the system variable <TextureGdnRMStore$Dir> which is usually set up in the
  34. !Run file.
  35.  
  36. This directory should always contain a text file called "Index".  This file
  37. has a simple format:
  38.  
  39. Any line starting with a "|" is considered to be a comment. The end of the
  40. file is marked by the "End" token. Any other lines are considered as paths
  41. from <TextureGdnRMStore$Dir> to files containing language extensions.
  42.  
  43. The file "Kernel" should always be present in the directory.  It contains all
  44. the commands implemented as the core of the language.  There may also be
  45. other files.
  46.  
  47. The files may be of any type.  Conventionally, they are "Modules"
  48. (Type &FFA).  Though they are not loaded as such by the program this enables
  49. them to conveniently contain a version number and help text.
  50.  
  51. When adding extension modules to the program the relevant file should be
  52. added to the "RMStore" directory and the twig of its path inserted into the
  53. "Index" file.
  54.  
  55. 3.0 Structure
  56. ~~~~~~~~~~~~~
  57. Language extensions should all conform to the following structure:
  58.  
  59. Bytes:        Description...
  60. &0000-&002B   Header (Undefined bytes)
  61. &002C-&XXXX   Command Table index
  62. &XXXX-&YYYY   Command Table
  63. &YYYY-&ZZZZ   Command code
  64.  
  65. The Command Table index has the following format:
  66.  
  67. Offset bytes: Description...
  68. &0000           Command index entry 0
  69. &000C          Command index entry 1
  70. &0018          Command index entry 2
  71. -             -
  72. n x &C        Command index entry n
  73. -             -
  74. &UUUU         End of table marker.
  75.  
  76. The End of table marker is represented by the three consecutive words 
  77. -1,-1 and -1.
  78.  
  79. Command index entry n consists of three words
  80.  
  81. Word 0: Offset from start of file to the text of command n.
  82. Word 1: Offset from start of file to the entry point of the code to perform
  83.         the command.
  84. Word 2: Various flags
  85.  
  86. The Various flags are considered as &ABCDEFGH where &A is the number of
  87. parameters the command accepts (0-15), &B is a code advising how the command
  88. should be treated by the mutator (the "Mutation Options"), and &CDEFGH
  89. contain other miscellaneous bit-flags to mark specific command types.
  90.  
  91. These bit-flags have the following meanings:
  92.  
  93. &000003 :                                           (Reserved)
  94. &00000C : See immeadiately below:
  95.      &4 : Command ends an indentation
  96.      &8 : Command starts an indentation
  97. &0000F0 :                                           (Reserved)
  98. &00FF00 : As follows:
  99.   &0C00 : Command is an "endif"                     (Reserved)
  100.   &0200 : Command starts mutation                   (Reserved)
  101.   &0300 : Command stops  mutation                   (Reserved)
  102.   &0400 : Command is a  "Define"                    (Reserved)
  103.   &0500 : Command is a  "Goto"                      (Reserved)
  104.   &0600 : Command is a  "Call"                      (Reserved)
  105.   &0700 : Command is a  "Return"                    (Reserved)
  106.   &0800 : Command is an "End"                         (Reserved)
  107.   &0900 : Command is an "If"                         (Reserved)
  108.   &0A00 : Command is an "Then"                      (Reserved)
  109.   &0B00 : Command is an "Else"                      (Reserved)
  110.   &0100 : Command is a  "comment" ("|")             (Reserved)
  111.   &0D00 : Command ends the colour definition        (Reserved)
  112.   &0E00 : Command starts the colour definition      (Reserved)
  113.   &0F00 : Command is a  "CreateOneDiensionalFilter" (Reserved)
  114.   &1000 : Command is a  "CreateTwoDiensionalFilter" (Reserved)
  115.   &1100 : Command is an "Until"                     (Reserved)
  116.   &1200 : Command is a  "Resize"                    (Reserved)
  117.   &1300 : Command is a  "ResizeSprite"              (Reserved)
  118.   &1400 : Command is a  "MakeSprite"                (Reserved)
  119.   &1500 : Command is an "AddToSprite"               (Reserved)
  120.   &1600 - &FF00 For expansion                       (Reserved)
  121. &FF0000 : Bits all for expansion.                   (Reserved)
  122.  
  123. "Reserved" means that most users should not need to mess with it.
  124.  
  125. The "Command Table" contains the entries pointed to by word 0 of the Command
  126. index entry.  These are mixed case strings terminated by a single ASCII 13
  127. character.  They need not be word aligned.
  128.  
  129. The "Command code" contains the code pointed to by word 1 of the Command
  130. index entry.  These are ARM code subroutines called at the appropriate moment
  131. in the generation of the textures.  Any workspace may also be stored here,
  132. rather than claimed from the system, if it is small enough.  The location of
  133. the "Command code" relative to the "Command table" is arbitrary.
  134.  
  135. Mutation Options
  136. ~~~~~~~~~~~~~~~~
  137. This specifies how any following parameters are treated by the mutator.
  138. 0 - Completely ignore.
  139. 1 - Treat as unsigned 16-bit logarithmic number (reserved for functions)
  140. 2 - Very occasionally add or subtract one (used for "Shear")
  141. 3 - Occasionally completely randomize (used for "Seed")
  142. 4 - Treat as unsigned 16-bit logarithmic number
  143. 5 - Reserved...
  144.  
  145. 4.0 Resources
  146. ~~~~~~~~~~~~~
  147. When a code fragment is called in the generation of a texture it may interact
  148. with the main program and share its data in a number of ways.
  149.  
  150. On entry to the routine the following register conventions are used:
  151.  
  152. R14 - return address
  153. R13 - system stack
  154. R12 - pointer to Texture Garden main data structure
  155. R11 - pointer to current point in texture program execution
  156.  
  157. On exit R0 - R10, R12 and R14 may be corrupted.  R11 should normally be
  158. incremented to the start of the next expected command.  R13 should normally
  159. be preserved in the normal manner.
  160.  
  161. R11 contains a pointer to the next item in the texture program's execution.
  162. This will always be the next item after the code representing the currently
  163. called command.  Note that the program is not held internally as a textfile,
  164. but in an internal format.
  165.  
  166. Each command, parameter or function is coded for by one word.  Parameters are
  167. coded for by their values.  Commands and functions are coded bu an internal
  168. number, the complete details of which are not specified, but which always has
  169. bit 31 set.  The end of the file is coded as -1.  This need not normally be
  170. checked for.
  171.  
  172. R12 contains a pointer to a data structure which has the following structure:
  173.  
  174. Brief list:
  175.  
  176. Routines
  177. ~~~~~~~~
  178. &0000 : TG_getrnd - routine returning 32bit random number in R3
  179. &0004 : TG_getrnd2 - routine returning 32bit random number in R3
  180. &0008 : TG_getparameter - routine returning the value of the next parameter
  181. &000C : TG_cstable - location of sin and cosine table.
  182. &0010 : TG_astable - location of arcsin table.
  183. &0014 : TG_forstac - location of stack of for addresses
  184. &0018 : TG_forcoun - location of stack of for addresses
  185. &001C : TG_itisthecodebank - location of 16 words of ARM code for "Combine"
  186. &0020 : TG_onedimensionalfixsta - routine to start one-dimensional routines
  187. &0024 : TG_onedimensionalfixend - routine to end one-dimensional routines
  188. &0028 : TG_colourconversion - routine to perform conversion from 24-bit
  189. &002C : TG_mcheap_get - allocate memory from heap
  190. &0030 : TG_mcheap_release - deallocate memory in heap
  191. &0034 : TG_reporterror - routine to report texture errors to the user
  192. &0038 : TG_executesinglecommand - Single command execution routine
  193. &003C : TG_convertcommandname - Converts pointer to command name
  194. &0040 : TG_miscop - perform a variety of operations.
  195. &0044 : Reserved
  196.  
  197. Data
  198. ~~~~
  199. &0048 : TG_mainworkspaceaddress - the two-dimensional buffer
  200. &004C : TG_totalsize - the size of the two-dimensional buffer
  201. &0050 : TG_totalsizeminusone - the size of the two-dimensional buffer - 1
  202. &0054 : TG_powertwo - Log to the base two of the size of the main buffer
  203. &0058 : TG_powertwo_1D - Log to the base two of the 1D buffer size (10).
  204. &005C : TG_dat - temp storage
  205. &0060 : TG_stack_temp - temp storage
  206. &0064 : TG_cnd - temp storage
  207. &0068 : TG_scrapaddress - address of a temp storage bank
  208. &006C : TG_actualphase - Current phase to be used in FFTs
  209. &0070 : TG_actualnoise - Amplitude of noise to be filtered
  210. &0074 : TG_cosamag - Cosine artefacts magnitude
  211. &0078 : TG_sinamag - Sine artefacts magnitude
  212. &007C : TG_precultflags - flags for FFT
  213. &0080 : TG_tempb - temp storage
  214. &0084 : TG_tempb2 - temp storage
  215. &0088 : TG_onedeebuffertwo - the secondary two-dimensional buffer
  216. &008C : TG_onedeebufferone - the primary two-dimensional buffer
  217. &0090 : TG_onedeebuffer - the two-dimensional buffer
  218. &0094 : TG_forcntr - the depth of the current for nesting
  219. &0098 : TG_dithering - Dithering
  220. &009C : TG_ditheringOne - DitheringOne
  221. &00A0 : TG_ditheringTwo - DitheringTwo
  222. &00A4 : TG_resultoftestpar - internal communications
  223. &00A8 : TG_resultoftestparP4 - internal communications
  224. &00AC : TG_seed - Seed (Low word)
  225. &00B0 : TG_seedP4 - Seed (High word)
  226. &00B4 : TG_seedTwo - Seed Two (Low word)
  227. &00B8 : TG_seedTwoP4 - Seed Two (High word)
  228. &00BC : TG_aframesmem% - Number of current animation frame
  229. &00C0 : TG_aframetype% - Address of table of 1024 nibbles animation type
  230. &00C4 : TG_areweanimating - Flag
  231. &00C8 : TG_blockmem% - address of a temp storage bank
  232. &00CC : TG_block2mem% - address of a temp storage bank
  233. &00D0 : TG_spriteaddress - address of the current sprite
  234. &00D4 : TG_spritearea - address of the main sprite area
  235. &00D8 : TG_spritepaladdress - address of the current palette sprite
  236. &00DC : TG_spriteXoriginal - used in resizing sprite
  237. &00E0 : TG_spriteYoriginal - used in resizing sprite
  238. &00E4 : TG_spriteXactual - used in resizing sprite
  239. &00E8 : TG_spriteYactual - used in resizing sprite
  240. &00EC : TG_modenumber - Number of current mode
  241. &00F0 : TG_log2BPP - Log to the base two of the number of bits per pixel
  242. &00F4 : TG_XEigenFactor - The X Eigen Factor of the mode
  243. &00F8 : TG_YEigenFactor - The Y Eigen Factor of the mode
  244. &00FC : TG_cmd_ifmem - Number to detect "If"s with
  245. &0100 : TG_cmd_elsemem - Number to detect "Else"s with
  246. &0104 : TG_cmd_endifmem - Number to detect "Endif"s with
  247. &0108 : TG_cmd_define - Number to detect "Define"s with
  248. &010C : TG_cmd_ifyetq - Flag to detect if there has been an if on the line
  249. &0110 : TG_colourmapcorrupt - Set if TG_colourconversion has been called
  250. &0114 : TG_AddressOfSolidBlock - Address of last DefineSolidBlock command
  251. &0118 : TG_memorystoreone - Address of claimed memory to be released
  252. &011C : TG_memorystoretwo - Address of claimed memory to be released
  253. &0120 : TG_FirstDefinition - zero of address of first "Define" command
  254. &0124 : TG_CallStackMem - Not used
  255. &0128 : TG_customresize - Set if resizing is not done with "ResizeSprite"
  256.  
  257. Those "Routines" in the above list which may be called can be reached by
  258. using the following code:
  259.  
  260. MOV    R14,PC
  261. LDR    PC,[R12,#TG_routineoffset]
  262.  
  263. In the examples this is a macro called "calltg".
  264.  
  265. Descriptive list:
  266.  
  267. Routines
  268. ~~~~~~~~
  269. TG_getrnd (&0000)
  270.   Entry : none
  271.   Exit  : corrupts R4 returns 32bit random number in R3.
  272.  
  273. TG_getrnd2 (&0004)
  274.   Entry : none
  275.   Exit  : corrupts R0 returns 32bit random number in R3.
  276.   Notes : This command uses a different seed to the one above.
  277.  
  278. TG_getparameter (&0008)
  279.   Entry : R11 points to current mark in program.
  280.   Exit  : R10 returns the value of the next parameter.
  281.           R11 updated to point to next point in program.
  282.  
  283. TG_cstable (&000C)
  284. Location of sin and cosine table.  2048 words, format as follows:
  285.   Word0    : Cosine(2*PI/1024 x 0) x 2^15
  286.   Word1    :   Sine(2*PI/1024 x 0) x 2^15
  287.   Word2    : Cosine(2*PI/1024 x 1) x 2^15
  288.   Word3    :   Sine(2*PI/1024 x 1) x 2^15
  289.   Word4    : Cosine(2*PI/1024 x 2) x 2^15
  290.   Word5    :   Sine(2*PI/1024 x 2) x 2^15
  291.   ...      : ...
  292.   Word2046 : Cosine(2*PI/1024 x 1023) x 2^15
  293.   Word2047 :   Sine(2*PI/1024 x 1023) x 2^15
  294.  
  295. TG_astable (&0010)
  296.   Arcsin table.  256 bytes.
  297.  
  298. TG_forstac (&0014)
  299.   Location of stack of for addresses.
  300.  
  301. TG_forcoun (&0018)
  302.   Location of stack of for addresses.
  303.  
  304. TG_itisthecodebank (&001C)
  305.   Location of 16 words of ARM code for "Combine"
  306.   The words are as follows:
  307.  
  308.     &0 : CMP   A,#&10000
  309.     &1 : MOVS  A,A,LSR #16
  310.     &2 : MOVS  A,A,LSL #16
  311.     &3 : EorS  A,A,#&8000
  312.     &4 : ADDS  A,A,9
  313.     &5 : CMP   A,9
  314.     &6 : SUBS  A,A,9
  315.     &7 : MOVCS A,#&10000
  316.     &8 : RSBCS A,A,#&20000
  317.     &9 : RSBMI A,A,#&0
  318.     &A : MOVMI A,#&0
  319.     &B : MOVCC A,9
  320.     &C : MOVCS A,9
  321.     &D : SUBCS A,A,#1
  322.     &E : MOVS  A,A,LSR #1
  323.     &F : MULS  A,9,A
  324.  
  325. TG_onedimensionalfixsta (&0020)
  326.   Routine to start one-dimensional routines.
  327.  
  328. TG_onedimensionalfixend (&0024)
  329.   Routine to end one-dimensional routines.
  330.  
  331. TG_colourconversion (&0028)
  332.   Routine to perform conversion of the palette from 24-bit colour in the
  333.   format &RRGGBBXX to a series of bytes representing the colour number of
  334.   the colour for the mode.
  335.  
  336. TG_mcheap_get (&002C)
  337.   This allocates memory from Texture Garden's heap
  338.   Entry : R0 contains number of bytes requested.
  339.   Exit  : R0 : 0 (an error has occurred (V is also set), or...
  340.           R0 : contains a pointer to the memory.
  341.           R1 - R7 corrupted.
  342.  
  343.   Note: this routine returns an error by setting the V flag and setting R0
  344.         to 0.
  345.  
  346. TG_mcheap_release (&0030) 
  347.   This deallocates memory which has been previously allocated from Texture
  348.   Garden's heap.
  349.   Entry : R0 contains a pointer to the memory.
  350.   Exit  : R0 : 0 : an error has occurred (V is also set), or...
  351.           R0 : 1 : sucessful.
  352.           R1 - R7 corrupted.
  353.  
  354.   Note: this routine returns an error by setting the V flag and setting R0
  355.         to 0.
  356.  
  357. TG_reporterror (&0034)
  358.   Entry : R0 points to the error string
  359.   Exit  : *** This routine does not return ***
  360.  
  361. TG_executesinglecommand (&0038) - Single command execution routine.
  362.   Entry : R11 points to the command to be executed.
  363.   Exit  : R0 - R10 and R12 are corrupted.  R11 points to immediately after
  364.           the command.
  365.  
  366. TG_convertcommandname (&003C) - Converts pointer to command name.
  367.   Entry : R0 points to the command to be converted.
  368.   Exit  : R0 contains the corresponding internal command code.
  369.  
  370. TG_miscop (&0040) - Performs a variety of miscellaneous operations.
  371.   Entry : R0 contains the reason code, see the following list:
  372.   
  373.   Entry : R0 = 0;
  374.     Allocate memory for another two dimensional buffer, if required and
  375.     return a pointer to it in R0.
  376.   Exit : R0 to R7 are corrupted.
  377.   
  378.   Entry : R0 = 1;
  379.     Allocate memory for a virtual sprite if required and return a pointer to
  380.     it in R0.
  381.   Exit : R0 to R7 are corrupted.
  382.   
  383.   All other reason codes are reserved.
  384.  
  385. 5.0 Coding
  386. ~~~~~~~~~~
  387. Example source (in the BASIC assembler) should be available in the
  388. "Library.Source.Extra" file and the "Library.Source.Kernel" file.  The latter
  389. may not be present in the distribution you have received, but should be in
  390. all registered versions.
  391.  
  392. If a command takes longer than about 0.2 seconds, then it should check the
  393. escape key at regular intervals (using an INKEY(minus) equivalent) and
  394. terminate if it is pressed.
  395.  
  396. On entry to its routine, a command usually starts by getting its relevant
  397. parameters.  These should always be checked to see if they are functions, and
  398. evaluated if this is the case.  It is recommended that the following code be
  399. used to get each one:
  400.  
  401. LDR    R10,[R11],#4
  402. TST    R10,#&80000000
  403. MOVNE  R14,PC
  404. LDRNE  PC,[R12,#TG_getparameter]
  405.  
  406. This is used so frequently that it really cries out to be a macro. 
  407. "getrecursiveparam" is its name in the examples.
  408.  
  409. The "Routine" TG_getparameter will normally preserve R0-R7, R12 and R13.  R8
  410. and R9 may be corrupted.  R10 contains the returned result of the function. 
  411. R11 is updated to point to the next word of interest.
  412.  
  413. Another command which will be used frequently relates to the implementation
  414. of the "combination type" commands.  Programmers may implement these in
  415. whatever manner they choose.  The author finds them to be best implemented
  416. using the following self-modifying code for speed, though this may cause a
  417. speed penalty for those with StrongARM chips.
  418.  
  419. In my routines, the following functions are used.
  420.  
  421. DEFFNgetaddparam(alse%)   ... corrupts R0-R3
  422. [OPT Pass%
  423.         LDR    0,[C,#TG_itisthecodebank]
  424.         ADR    1,alse%
  425.         And    2,R10,#&F
  426.         LDR    3,[0,2,ASL #2]
  427.         STR    3,[1]
  428.         MOV    R10,R10,LSR #4
  429.         And    2,R10,#&F
  430.         LDR    3,[0,2,ASL #2]
  431.         STR    3,[1,#4]
  432.         MOV    R10,R10,LSR #4
  433.         And    2,R10,#&F
  434.         LDR    3,[0,2,ASL #2]
  435.         STR    3,[1,#8]
  436.         MOV    R10,R10,LSR #4
  437.         And    2,R10,#&F
  438.         LDR    3,[0,2,ASL #2]
  439.         STR    3,[1,#12]
  440.         
  441.         MOV    0,#1
  442.         ADD    2,1,#12
  443.         SWI    &2006E ; REM XOS_SynchroniseCodeAreas
  444. ]
  445. = Pass%
  446.  
  447. DEFFNfourwords
  448. [OPT Pass%
  449.         MOV    R10,R10
  450.         MOV    R10,R10
  451.         MOV    R10,R10
  452.         MOV    R10,R10
  453. ]
  454. = Pass%
  455.  
  456. These are called as follows...
  457.  
  458. .command_entry
  459. ...
  460. OPT    FNgetrecursiveparam           ...see above
  461. OPT    FNgetaddparam(code_insertion)
  462. ...
  463. .code_insertion
  464. OPT    FNfourwords
  465. ...
  466.  
  467. The two values to be combined should be held in R9 (old) and R10 (new value)
  468. when "code_insertion" is reached.  The data table at TG_itisthecodebank
  469. contains the following pieces of code:
  470.  
  471. CMP    A,#&10000   ; 0
  472. MOVS   A,A,LSR #16 ; 1
  473. MOVS   A,A,LSL #16 ; 2
  474. EorS   A,A,#&8000  ; 3
  475. ADDS   A,A,9       ; 4
  476. CMP    A,9         ; 5
  477. SUBS   A,A,9       ; 6
  478. MOVCS  A,#&10000   ; 7
  479. RSBCS  A,A,#&20000 ; 8
  480. RSBMI  A,A,#&0     ; 9
  481. MOVMI  A,#&0       ; A
  482. MOVCC  A,9         ; B
  483. MOVCS  A,9         ; C
  484. SUBCS  A,A,#1      ; D
  485. MOVS   A,A,LSR #1  ; E
  486. MULS   A,9,A       ; F
  487.  
  488. Examination of FNgetaddparam should reveal that four values from the above
  489. table are taken according to the value of the four nibbles of the given
  490. parameter and stored at "code_insertion", least-significant nibble first.
  491.  
  492. 6.0 Calling internal commands
  493. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  494. "TG_executesinglecommand" and "TG_convertcommandname" may be used by commands
  495. to call other commands directly.  This is done in a crude manner,
  496. constructing the command in memory, and then setting the command pointer to
  497. point to it and then calling Texture Garden.
  498.  
  499. "TG_convertcommandname" should be used to convert the command name to a
  500. command code.  Commands should be stored in memory locally and followed by
  501. any parameters.  Commands may be of any case, and may be abbreviated by using
  502. the "." character (however, using this feature is very bad practise).  The
  503. current value of the command pointer (usually in R11) should then be saved,
  504. the location of the command to be executed should be loaded into R11 and
  505. "TG_executesinglecommand" should be called.  Then the command pointer should
  506. be recovered from wherever it was saved.
  507.  
  508. Note: "TG_executesinglecommand" executes one command only.  The command
  509. should not be a comment or one of "If", "Then" or "Else"; the functionality
  510. of these may be mimicked manually.
  511.  
  512. Expression evaluation may be performed using a similar method, ie. set up the
  513. expression in coded form in memory, store R11, set R11 to point to the
  514. expression, and then use FNgetrecursiveparam (or its equivalent macro - see
  515. above) to evaluate it, restoring R11 afterwards.
  516.  
  517. The only functions in Texture Garden that currently use this functionality
  518. are the "SlowRotate" commands.  These use the "TwoDimensionalPoint" function
  519. to help them with their anti-aliasing.
  520.  
  521. In principle, any commonly used subroutine may be more efficiently
  522. implemented as a hard-wired command using this technique.
  523.  
  524. Because "TG_convertcommandname" performs a slow lookup, a number of common
  525. expression evaluation functions are assigned particular code numbers.
  526.  
  527. The following command names are guaranteed to be given numbers as follows:
  528.  
  529. &80000000 - "UnknownCommand" ; please do not use.
  530. &80000001 - "Combine"
  531. &80000002 - "ScaledSignedMultiply"
  532. &80000003 - "SignedMultiply"
  533. &80000004 - "PartlyScaledSignedMultiply"
  534. &80000005 - "PartlyScaledMultiply"
  535. &80000006 - "Divide"
  536. &80000007 - "Eor"
  537. &80000008 - "And"
  538. &80000009 - "Or"
  539. &8000000A - "LogicalShiftLeft"
  540. &8000000B - "LogicalShiftRight"
  541. &8000000C - "ArithmeticShiftLeft"
  542. &8000000D - "ArithmeticShiftRight"
  543. &8000000E - "Absolute"
  544. &8000000F - "Variable"
  545. &80000010 - "Random"
  546. &80000011 - "SimpleAddition"
  547. &80000012 - "UnboundedAddition"
  548. &80000013 - "CeilingAddition"
  549. &80000014 - "HalvingAddition"
  550. &80000015 - "SimpleSubtraction"
  551. &80000016 - "UnboundedSubtraction"
  552. &80000017 - "FloorSubtraction"
  553. &80000018 - "HalvingSubtraction"
  554. &80000019 - "Maximise"
  555. &8000001A - "Minimise"
  556. &8000001B - "Overwrite"
  557. &8000001C - "PositiveOverwrite"
  558. &8000001D - "Preserve"
  559. &8000001E - "Multiplication"
  560. &8000001F - "ScaledMultiplication"
  561. &80000020 - "Zeroise"
  562. &80000021 - "True"
  563. &80000022 - "False"
  564. &80000023 - "Zero"
  565. &80000024 - "Ninety"
  566. &80000025 - "OneHundredAndEighty"
  567. &80000026 - "TwoHundredandSeventy"
  568. &80000027 - "FloydSteinberg"
  569. &80000028 - "IsLessThan"
  570. &80000029 - "IsGreaterThan"
  571. &8000002A - "IsLessThanOrEqualTo"
  572. &8000002B - "IsGreaterThanOrEqualTo"
  573. &8000002C - "SignedIsLessThan"
  574. &8000002D - "SignedIsGreaterThan"
  575. &8000002E - "SignedIsLessThanOrEqualTo"
  576. &8000002F - "SignedIsGreaterThanOrEqualTo"
  577. &80000030 - "IsEqualTo"
  578. &80000031 - "IsNotEqualTo"
  579. &80000032 - "Sin"
  580. &80000033 - "Cos"
  581. &80000034 - "SignedSin"
  582. &80000035 - "SignedCos"
  583. &80000036 - "SquareRoot"
  584. &80000037 - "Noise"
  585. &80000038 - "PinkNoise"
  586. &80000039 - "QuickNoise"
  587. &8000003A - "BandpassNoise"
  588. &8000003B - "BandpassQuickNoise"
  589. &8000003C - "FractalNoise"
  590. &8000003D - "ShiftedSymmetricNoise"
  591. &8000003E - "ShiftedSymmetricPinkNoise"
  592. &8000003F - "ShiftedNoise"
  593. &80000040 - "ShiftedPinkNoise"
  594. &80000041 - "ShiftedSymmetricQuickNoise"
  595. &80000042 - "ShiftedQuickNoise"
  596. &80000043 - "ShiftedSymmetricFractalNoise"
  597. &80000044 - "ShiftedFractalNoise"
  598. &80000045 - "TwoDimensionalPoint"
  599. &80000046 - "QuickTwoDimensionalPoint"
  600. &80000047 - "OneDimensionalPoint"
  601. &80000048 - "QuickOneDimensionalPoint"
  602. &80000049 - "OneDimensionalPointOne"
  603. &8000004A - "QuickOneDimensionalPointOne"
  604. &8000004B - "OneDimensionalPointTwo"
  605. &8000004C - "QuickOneDimensionalPointTwo"
  606. &8000004D - "X"
  607. &8000004E - "Y"
  608. &8000004F - "Z"
  609. &80000050 - "Size"
  610. &80000051 - "LogSize"
  611. &80000052 - "LogBitsPerPixel"
  612. &80000053 - "AnimationType"
  613. &80000054 - "AnimationFrameNumber"
  614.  
  615. These functions all preserve R0-R7 and return their value in R10, updating
  616. R11 according to the number of parameters they take.  They operate by
  617. evaluating their parameters recursively.
  618.  
  619. X-, Y- and Z-based functions are expecting to find their values in R2, R3 and
  620. R4 respectively, and they depend upon this for their operation.  This
  621. includes the functions from "Noise" to "ShiftedFractalNoise".  It is probably
  622. best to avoid these at the moment.
  623.  
  624. In general, different copies of Texture Garden will use different coding
  625. schemes for the numbers they assign to their commands.  It is recommended
  626. that you do not rely on the numbers given to commands other than those above
  627. as being constant.
  628.  
  629. More information relating to writing extension modes is contained in the rest
  630. of the documentation, notably the "Distribute", "Language" and "Technical"
  631. files.
  632.  
  633.  
  634.