home *** CD-ROM | disk | FTP | other *** search
/ Science & Nature: Materials / Acorn_YITM_ScienceAndNature2_Materials.iso / _sci2 / _armovie / documents / progif < prev    next >
Text File  |  1994-02-22  |  31KB  |  768 lines

  1.                       The programmer's view of Acorn Replay
  2.                       =====================================
  3.  
  4. Introduction
  5. ------------
  6.  
  7. The software for replaying movies resides in the directory !ARMovie (think
  8. of it like a rather large system directory - currently about 640KBytes). The
  9. !Boot file for !ARMovie sets up the computer to play movies:
  10.  
  11. - loads the iconsprites for the AE7 filetype
  12. - sets File$Type for AE7
  13. - sets the RunType alias for AE7 to point to the Player program
  14.  
  15. - sets ARMovie$Dir so that the Player program knows where it is
  16.   (there are dither tables and sound code in the directory)
  17.  
  18. - ensures the computer has ColourTrans loaded (in the RISC OS ROM or from
  19.   the system directory - any version will do)
  20.  
  21. After this, double clicking on an Acorn Replay Movie will play the movie on
  22. the desktop. Just running the program at the cli will play it. A program can
  23. do:
  24.  
  25. SYS"Wimp_StartTask","/"+"movie file name"
  26.  
  27. to play the movie.
  28.  
  29. The program !ARPlayer is a desktop viewer for replay files - it can display
  30. the helpful sprite and allows desktop control of a few of the capabilities
  31. of the Acorn Replay Player program. See the section on ARMovie$Dir below for
  32. information on how to treat !ARMovie.
  33.  
  34. Note that the !ARMovie.Player program has to take over the entire machine in
  35. order to get its work done. It consists of independent interrupt run
  36. processes:
  37.  
  38. - file chunk loader
  39. - master time 'conductor'
  40. - video decompressor
  41. - video frame refresh and dither
  42. - sound player
  43. - mouse event handler
  44.  
  45. The video sections of this code are custom assembled to suit the particular
  46. screen mode etc.
  47.  
  48. The interrupt run processes are communicating using shared memory in the
  49. ordinary virtual address space - a wimp task swap would be fatal... A large
  50. amount is memory is required:
  51.  
  52. - double buffer for the file I/O (odd and even chunk size given in the
  53.   AE7 file header)
  54. - double buffered queue of decompressed frames
  55. - queue of sound chunks
  56.  
  57. The amount of memory required is at least:
  58.  
  59.   "odd" chunk size + "even" chunk size + 320K 
  60.   + 48K (or more) if sound is to be played
  61.   + 128K for dithering tables
  62.   (the video compressor program gives an accurate value)
  63.  
  64. The Player program can use more memory if it is available! It will (by
  65. default) return with a textual error if there isn't enough memory.
  66.  
  67. A major limitation of the video frame refresh and dither section of the
  68. program is that it uses word addressing in order to paint on the screen:
  69. this results in the displayed section being somewhat to the left or right of
  70. the desired position. With 32bpp it is accurate, but with 16bpp it can be 2
  71. pixels out, 8 bpp 4 pixels, 4bpp 8 pixels, 2bpp 16 pixels, 1bpp 8 pixels.
  72. The program rounds the pixel address to the word address to minimise the
  73. total effect, thus making it 16bpp +/- 1 pixel etc.
  74.  
  75. ADPCM sound is Copyright 1992 by Stichting Mathematisch Centrum, Amsterdam,
  76. The Netherlands. See notice at the end.
  77.  
  78. Simple Control
  79. --------------
  80.  
  81. The Player program has some default controls in it:
  82.  
  83. Esc
  84.    
  85.    The Esc key terminates a display sequence.
  86.  
  87. Menu (Mouse middle button)
  88.  
  89.    The Menu button (also) terminates a display sequence.
  90.  
  91. Adjust (Mouse right button)
  92.  
  93.    The Adjust button pauses video and sound while it is held down.
  94.  
  95. Other capabilities may be provided as icons by the calling program.
  96.  
  97. Parameters
  98. ----------
  99.  
  100. The Player program also accepts a list of parameters on the command line
  101. after the Acorn Replay movie file. These are
  102.  
  103. -At <Number>,<Number>
  104.  
  105.    Specifies the position of the bottom left corner of the replayed movie in
  106.    OS units x,y. Player will move the output display such that it is
  107.    entirely on screen, and may clip the bottom of the movie if it is still
  108.    too large. Note the comments above about precision of positioning the
  109.    output.
  110.  
  111. -Big
  112.  
  113.    The Player program will try to make the movie as large as possible. It uses
  114.    the value in ARMovie$PrefBigMode to find an appropriate mode for playing
  115.    the movie. If ARMovie$PrefBigMode is not set, then it assumes "13;49;28".
  116.  
  117.    Appropriate modes have eigx=eigy, 8 or more bpp OR eigx=2, eigy=1, 8 or more
  118.    bpp OR eigx=1, eigy=0, 8 or more bpp. An appropriate mode must exist in
  119.    ARMovie$PrefBigMode.
  120.  
  121.    eigx=eigy=1 or 2: magnification 2
  122.    eigx=eigy=0:      magnification 1
  123.    eigx=2, eigy=1:   magnification 2x, 4y
  124.    eigx=1, eigy=0:   magnification 1x, 2y
  125.  
  126.    Larger magnification factors are more expensive in CPU terms, but may give
  127.    a better picture (for example, in combination with interpolation).
  128.  
  129.    The -nomenu flag is overridden when -big is asserted.
  130.  
  131. -Explode <Dir$>
  132.  
  133.    Player decompresses the specified section of the movie (-startat and
  134.    -playfor) and places the result as a sequence of frames in the directory
  135.    Dir$ with the following name for each frame:
  136.  
  137.       FNZNUM(frame%DIV75DIV77)+"."+FNZNUM(frame%DIV75 MOD77)+"."+FNZNUM(frame%MOD75)
  138.       DEF FNZNUM(A)=RIGHT$("0"+STR$(A),2)
  139.  
  140.    Frames start at zero. An RGB frame is stored as a p15 file (textual header
  141.    plus 5,5,5 R,G,B data held as uncompressed 16 bit values with R as bits
  142.    0-4, G as bits 5-9, B as bits 10-14). A YUV frame is stored as a p13 file
  143.    (textual header plus 5,5,5 Y,U,V data). This can take quite a while!
  144.  
  145. -Follow <file name> or "<file name>",<Number>
  146.  
  147.    Specifies a "trajectory" file and optional trajectory step rate (which
  148.    overrides the rate specified in the file). The file contains a list of
  149.    origin positions which move the -at position in real time while the movie is
  150.    being played. The format of the file is:
  151.  
  152.    ARMovie Trajectory 1
  153.    Comment line describing the trajectory
  154.    10 steps per second
  155.    M shapes
  156.    <shape description file names>
  157.    N instances
  158.    <instances>
  159.  
  160.    M represents the number of shapes referred to in the trajectory. If is
  161.    non zero, then the following lines contain shape file names. Shapes are
  162.    referenced by integer numbers in the order they are referred to in the
  163.    trajectory file. Shape 0 is the default rectangle and does not need to be
  164.    defined.
  165.  
  166.    N provides instances of the selected frame shape at a particular position,
  167.    for a given number of frame times. It is followed by N lines containing
  168.    this information:
  169.  
  170.    <x>,<y>:<frame shape>;<repeat count>
  171.  
  172.    as textual decimal numbers. <x> and <y> are in RISC OS graphics
  173.    coordinates and represent offsets from the -at position. <repeat count>
  174.    may be omitted in which case the line is used once only. <frame shape>
  175.    may be omitted if there is no list of shapes. The movie is played in each
  176.    shape at each position (positions changing at the step rate) until the
  177.    end of the list is reached when it restarts at the start of the list.
  178.  
  179.    If the "file name" (of the trajectory file or of the shape) is not found,
  180.    then it will be looked for in the ARMovie directory.
  181.  
  182.    Example: :6.armovie.fred -at "circle",50
  183.  
  184. -Leave
  185.  
  186.    By default, Player removes the output from the display. If -Leave is
  187.    specified it will leave the output on the display when the program is
  188.    left (either by getting to the end or Escape/Menu). Leave state is forced
  189.    if the user exits by clicking on the CAPTURE/EXIT button.
  190.  
  191. -Loop
  192.  
  193.    Player will loop back to the start of the movie when it gets to the end,
  194.    thus playing for ever. This overrides -playfor.
  195.  
  196. -Loop <number>
  197.  
  198.    Player will loop back to the start of the movie when it gets to the end,
  199.    for the specified number of times.
  200.  
  201.    Note that both forms of loop may have problems on a CD-ROM where access
  202.    time to move the head from finish to start might cause a break in the
  203.    sequence.
  204.  
  205. -Mode <number>|<string>
  206.  
  207.    Player will change to this screen mode before playing (see also -Big,
  208.    ARMovie$PrefBigMode and ARMovie$PrefMode). On RISC OS 3.50, the mode may
  209.    be defined as a string of the following form:
  210.  
  211.    -mode X320,Y256,C256,F60,EX2,EY2
  212.  
  213.    X plus resolution, Y plus resolution are always required.
  214.  
  215.    C plus number of colours (C2, C4, C16, C256, C32T, C16M) is optional and
  216.    defaults to C32T (16bpp) if not specified.
  217.  
  218.    F plus frame rate: fastest available rate if not specified.
  219.  
  220.    EX plus External to Internal Graphics X value (eigx),
  221.    EY plus External to Internal Graphics Y value (eigy), default to RISC OS
  222.    supplied values for the mode if not specified.
  223.  
  224.    The , delimiter above can be any character other than <space> (even
  225.    <space> may be used when defining ARMovie$PrefMode or ARMovie$PrefBigMode).
  226.    No delimiter at all is also allowable. Parameters can be given in any order.
  227.  
  228. -Mouse <file>|<decimal address>
  229.  
  230.    Player will call a supplied routine after a mouse initiated change. The
  231.    value supplied is checked to see if it is a valid decimal number (VALx$>0)
  232.    or it is treated as a position independent file which is loaded into memory
  233.    by Player at some quad word aligned address (determined at run time). The
  234.    routine is called immediately after a frame has been painted; the CPU is
  235.    in interrupt mode and the routine is entered with a BL. The registers
  236.    contain:
  237.  
  238.      r0: address of state bits word:
  239.          bit 0: true if paused
  240.          bit 1: true if sound muted
  241.          bit 2: true if exiting
  242.          bit 3: true if single frame advance (which doesn't last long!)
  243.          bit 4: true if capture class exit (bit 2 true too)
  244.          bit 5: true if playing invisible frames (i.e. don't change screen)
  245.          bit 6: true if end of loop
  246.      r1: mouse x
  247.      r2: mouse y
  248.      r3: mouse buttons
  249.      r4: mouse button which changed (bit set for each button which changed)
  250.      r5: points to: nx
  251.                     ny
  252.                     number of colours
  253.                     screen base address
  254.                     rowbytes
  255.                     number of rows
  256.                     vertical expansion ratio
  257.                     movie x
  258.                     movie y
  259.                     frames per second*100
  260.      r6: points to button data structure:
  261.          4 words per button being: left x, bottom y, right x, top y
  262.          buttons ordered: pause, exit, capture, single frame advance,
  263.                           ffwd, half speed, quiet, loud, mute
  264.      r7..r12: nothing
  265.     r13: RISC OS Irq stack
  266.     r14: return address
  267.  
  268.    If interrupts are to be reenabled, the routine *must* worry about being
  269.    called recursively. Returning as soon as possible is advised - playing
  270.    a movie can be quite short of processor time...
  271.  
  272. -Mute
  273.  
  274.    Player starts up with sound initially turned off.
  275.  
  276. -NoAdjust
  277.  
  278.    Suppresses the use of Adjust for pause.
  279.  
  280. -NoError
  281.  
  282.    Suppresses all possible textual errors from the Player program. The
  283.    variable ARMovie$ReturnCode will contain the error.
  284.  
  285. -NoMenu
  286.  
  287.    Suppresses the use of Menu for exit.
  288.  
  289. -Paint <file>|<decimal address>
  290.  
  291.    Player will call a supplied routine after painting each frame. The value
  292.    supplied is checked to see if it is a valid decimal number (VALx$>0) or
  293.    it is treated as a position independent file which is loaded into memory
  294.    by Player at some quad word aligned address (determined at run time). The
  295.    routine is called immediately after a frame has been painted; the CPU is
  296.    in interrupt mode and the routine is entered with a BL. The registers
  297.    contain:
  298.  
  299.      r0: points to: nx
  300.                     ny
  301.                     number of colours
  302.                     screen base address
  303.                     rowbytes
  304.                     number of rows
  305.                     vertical expansion ratio
  306.                     movie x
  307.                     movie y
  308.                     frames per second*100
  309.      r1: movie base address on screen
  310.      r2: frame number of just painted frame
  311.      r3..r12: nothing
  312.     r13: RISC OS Irq stack
  313.     r14: return address
  314.  
  315.    If interrupts are to be reenabled, the routine need not worry about being
  316.    called recursively - Player is in a semaphored area which will not be
  317.    reentered until this thread terminates. Returning as soon as possible is
  318.    advised - playing a movie can be quite short of processor time... Note that
  319.    the routine is only called when a frame is actually painted and this does
  320.    not happen if processor time is running short.
  321.  
  322. -Paused
  323.  
  324.    Player starts up in paused state. It paints the first available frame in
  325.    order to show what's going on, but this isn't the frame indicated by
  326.    -startat (its actually the first frame of the same video chunk). If
  327.    -startat has been used there may be a short pause between the first
  328.    press of the pause button (or left mouse button) and anything actually
  329.    happening.
  330.  
  331. -PlayFor <Number>
  332.  
  333.    <Number> represents a time in centiseconds: this amount of the movie is
  334.    played and the program exits. Note that Pause, fast forward, half speed
  335.    etc. do not affect this time limit - it represents a duration in frames
  336.    (or feet of the original film) rather than a time in the future.
  337.  
  338.    If the number is zero, then just the initial frame is displayed, no sound
  339.    is played and double buffer reads are disabled.
  340.  
  341. -Quiet
  342.  
  343.    Disables the sound permanently. (Unlike -Mute it cannot be turned back on
  344.    with the controls if they are provided)
  345.  
  346. -Relative
  347.  
  348.    Changes button definitions such that the origin is relative to the -at
  349.    value rather than absolute.
  350.  
  351. -Shape <filename>
  352.  
  353.    Describes a shape other than a rectangle for the output to appear in. The
  354.    format of the file is:
  355.  
  356.       ARMovie Shape 1
  357.       A comment line to describe the shape
  358.       800 640 OS unit size of the shape (0,0,x,y)
  359.  
  360.    Followed immediately by the entries, each of the form:
  361.  
  362.    entry header:
  363.       byte 0: low 8 bits of dest X OS coord
  364.       byte 1: bottom 4 bits: high 4 bits of dest X OS coord
  365.               top 4 bits: low 4 bits of dest Y OS coord
  366.       byte 2: high 8 bits of dest Y OS coord
  367.           *Must* resolve to a mode 13 pixel (i.e. multiples of 4)
  368.           bottom left of dest = 0
  369.       byte 3: N: number of replay pixels to copy 0-255
  370.  
  371.       followed by N entries of the form:
  372.  
  373.       byte 0: low byte source X replay pixel
  374.       byte 1: high byte source X replay pixel
  375.       byte 2: low byte source Y replay pixel
  376.       byte 3: high byte source Y replay pixel
  377.               top left of source image = 0
  378.  
  379.    There should be no surplus junk at the end of the file...
  380.  
  381.    Replay source pixel (X,Y)s are black if the pixel doesn't exist in the
  382.    movie (e.g. because the movie is smaller than the shape). If Y=-1, then
  383.    X=-1 will be black and X=-2 will be white.
  384.  
  385.    Replay always paints a mode 13 size pixel, so the destination OS coordinates
  386.    should be multiples of 4. The image position will be controlled by -at, so,
  387.    if you want a circle in the centre of the screen, the shape file should have
  388.    a circle whose minimum x and y is 0 and maximum the diameter.
  389.  
  390. -Silent
  391.  
  392.    Starts playing with sound initially disabled.
  393.  
  394. -Small
  395.  
  396.    If eigx=eigy=1, and there are 8 or more bits per pixel, -small plays the
  397.    movie without the normal 2:1 scale up.
  398.  
  399. -Speed <Number>
  400.  
  401.    <Number> represents a speed up ratio: the movie is played faster or
  402.    slower than normal. For example -speed 2 or -speed 0.5 for twice speed
  403.    or half speed play. It is recommended that -mute is used at the same time
  404.    as -speed... No attempt is made to enforce speed ratios that the computer
  405.    can actually decompress, so use with care!
  406.  
  407. -Startat <Number>
  408.  
  409.    <Number> represents a time in centiseconds: the movie is played from this
  410.    point. It can be very time consuming to reach a random point in a none
  411.    key frame movie, but Player can do it if necessary. Key frame movies
  412.    should only take a few seconds to start playing at any point.
  413.  
  414. -Track <Number>
  415.  
  416.    <Number> selects which of the multiple sound tracks in the ARMovie file is
  417.    played. The track must exist.
  418.  
  419. In addition to those parameters, the calling program can specify the positions
  420. of control buttons on screen. The Player program caters for buttons with the
  421. following functions:
  422.  
  423.    exit
  424.    capture exit (exactly like exit, but leaves pixel map on screen)
  425.    pause
  426.    single frame advance when in pause mode
  427.    fast forward
  428.    half speed
  429.    quiet (no sound)
  430.    loud (sound back on)
  431.    mute (toggle sound)
  432.  
  433. By default no button definitions exist except for pause, defined as the
  434. whole screen: so by default a left click will pause the movie and another
  435. will restart it. Buttons are defined with the initial character followed by
  436. the bottom left corner i.e. E10,40 - this gives a default sized button of 32
  437. OS units. E10,40,50 gives a square button of 50 OS units. E10,40,50,25 gives
  438. a rectangular button 50 OS units wide, 25 tall. (-relative makes button
  439. definitions relative to the -at position). Defining any button position will
  440. remove the effect of the default pause button; use -NoMenu and -NoAdjust if
  441. you need to prevent the other mouse buttons.
  442.  
  443. A typical command line might be:
  444.  
  445. <movie name> -loop -leave -startat 2000 -playfor 2000 -quiet E640,512 P0,0
  446.  
  447. case is irrelevant.
  448.  
  449. System Variables
  450. ----------------
  451.  
  452. There are several system variables which affect the Acorn Replay player
  453. program:
  454.  
  455. ARMovie$ColourMethod
  456.  
  457.    Normally the Player program finds the number of colours by reading the OS
  458.    Mode Variable 3 (NColour): values acceptable are 1, 3, 15, 63, 255,
  459.    65535, -1 signifying 1, 2, 4, 8 (fixed palette), 8 (variable palette), 16
  460.    and 32 bit per pixel modes. All is well for modes up to 8 bits per pixel,
  461.    however a RISC OS 3.1x (or earlier) with an externally upgraded graphics
  462.    system (such as the Computer Concepts ColourCard or State Machine G8) is
  463.    incapable of returning 65535 from this call: the programmers of the 16
  464.    bit screen modes of these cards have adopted a variety of approaches to
  465.    the problem(!). If NColour is less than 256, then Player checks Mode
  466.    Variable 9 (Log2BPP) and if this is greater than 3, uses it to compute
  467.    the 'correct' value of NColour. This method doesn't work for the Computer
  468.    Concepts ColourCard (it returns 3, i.e. 8 bit), so the !Boot file of
  469.    !ARMovie alters the check to Mode Variable 10 (Log2BPC). This area is
  470.    extremely nasty, but other checks may be possible by arrangement with
  471.    Acorn.
  472.  
  473. ARMovie$Dir
  474.  
  475.    This is set by the !ARMovie application so that Player can get at its
  476.    resources - Player won't work without this variable! Applications should
  477.    only set this variable if it is not already set: for example, suppose you
  478.    wish to play a movie on filer_boot of your application and therefore need
  479.    to have Player work and have therefore included a copy of !ARMovie on your
  480.    disc. You should do:
  481.  
  482.    IF "<ARMovie$Dir>"="" THEN Run <My$Dir>.!ARMovie.!Boot
  483.  
  484.    This allows for new versions of the !ARMovie application to replace the one
  485.    on your disc by being seen first. IT WILL BE NECESSARY FOR THIS TO HAPPEN:
  486.    FOR EXAMPLE, NEW VIDEO HARDWARE WILL NEED NEW VERSIONS OF !ARMovie AND
  487.    Player.
  488.  
  489. ARMovie$ExtraArgs
  490.  
  491.    Command strings to the Player program can exceed the 256 character limit,
  492.    so an additional set of arguments of up to 256 characters can be placed
  493.    in this system variable. After the Player program has read the value and
  494.    used it, it sets it to a null string.
  495.  
  496. ARMovie$Interpolate
  497.  
  498.    This variable controls the Player interpolating missing pixels in 8, 16 and
  499.    32 bit per pixel screen modes. There are three possible forms for setting
  500.    the variable:
  501.  
  502.    (a) set to a string containing limit numbers: a,b. The number a is the
  503.        maximum number of pixels per second which can be bilinearly interpolated
  504.        on the machine; the number b is the maximum number of pixels per
  505.        second which can be horizontally only linear interpolated on the
  506.        machine. For example 'Set ARMovie$Interpolate 256000,512000'
  507.        This allows the interpolation setting to depend on the movie being
  508.        played. All interpolation can be turned off by setting 0,0.
  509.  
  510.    (b) set to a single character. This is equivalent to setting the
  511.        value to '1024000,2048000' (if the bpp is 16 or 32) or '256000,512000'
  512.        (for 8bpp). In 16 or 32 bpp, for most movies bilinear interpolation will
  513.        be used (up to 320x256x12.5fps) and then horizontal only will be used
  514.        (up to 320x256x25fps). For 8bpp only small/slow movies will get bilinear
  515.        interpolation. For example 'Set ARMovie$Interpolate .'
  516.  
  517.    (c) unset (i.e. the default for the machine) or set to no characters. 
  518.        This is equivalent to setting the value to '128000,512000'. For
  519.        very small or slow movies bilinear interpolation will be used, but
  520.        for most movies (up to 160x128x25fps) horizontal only will be
  521.        used.
  522.  
  523.    The following interpolation routines are available:
  524.  
  525.    In 8 bit modes, if xeig=yeig=1 or -big is used (i.e. mode 28 or -big)
  526.    when playing YUV movies (of any compression format), then bilinear
  527.    interpolation of the Y channel can be done. This uses a lot of cpu power, so
  528.    this feature should only be used on more powerful machines playing slower
  529.    movies.
  530.  
  531.    In 16 bit modes, if xeig=yeig=1 *or* xeig=yeig=2 with -big *or*
  532.    xeig=2,yeig=1 with -big *or* xeig=1 and yeig=2, horizontal only
  533.    interpolation can be done (and is on by default), whatever the colour space
  534.    of the movie and whatever compression method is used (it costs a small
  535.    amount [5 F cycles per interpolated pixel] to do it at 16bpp). Bilinear
  536.    interpolation can be done whatever colour space and compression method the
  537.    movie has.
  538.  
  539.    In 24 bit modes, if xeig=yeig=1 *or* xeig=yeig=2 with -big *or*
  540.    xeig=2,yeig=1 with -big *or* xeig=1 and yeig=2, horizontal only
  541.    interpolation can be done (and is on by default), whatever the colour space
  542.    of the movie and whatever compression method is used (it costs very little
  543.    [1 F cycle per interpolated pixel] to do it at 24bpp). Bilinear
  544.    interpolation can be done whatever colour space and compression method the
  545.    movie has.
  546.  
  547.    Interpolation is not available for -shape definitions (and thus for some
  548.    -follow trajectories).
  549.  
  550. ARMovie$Place
  551.  
  552.    Contains the position on screen where the player will put the movie as
  553.    <leftx> <bottomy> - for example *set ARMovie$Place 640 512
  554.  
  555.    Controlling programs must set this immediately before running the movie.
  556.  
  557.    Value is only used if -At parameter is not given.
  558.  
  559.    Use of this method is deprecated in favour of using -at.
  560.  
  561. ARMovie$PrefMode
  562.  
  563.    Used by the machine's owner to get the movie to display in a different
  564.    mode to the current one. For example, a user may like working in a very
  565.    high resolution mode with a low number of colours. Player can display
  566.    movies in such modes but they don't look good, so the user can set
  567.    ARMovie$PrefMode to an alternative mode. Note that the user won't be able
  568.    to see the buttons.
  569.  
  570.    See -mode for a description of the after RISC OS 3.50 syntax.
  571.  
  572. ARMovie$PrefBigMode
  573.  
  574.    Used by the machine's owner to set a list of modes to use the -big
  575.    display. The modes must be in order of ascending magnified size in
  576.    the X direction - the first mode whose magnified number of X pixels is >=
  577.    to the number required by the movie will be used, or the last mode of
  578.    all. Each mode has to have square pixels: eigx=eigy; or have eigx=2,
  579.    eigy=1, or eigx=1, eigy=0 (see -big for list of magnification factors for
  580.    particular eig values). It can be 8, 16 or 32 bpp and can be any size.
  581.    The list is separated by ';' characters.
  582.  
  583.    The best setting for ARMovie$PrefBigMode depends on your machine. See
  584.    'PrefBig' for a more detailed (but by no means exhaustive) list. The
  585.    default setting is "13;49;28".
  586.  
  587.    See -mode for a description of the after RISC OS 3.50 syntax.
  588.  
  589.    Before RISC OS 3.50 example setting:
  590.  
  591.    *set ARMovie$PrefBigMode 49;28
  592.  
  593.    After RISC OS 3.50 example settings:
  594.  
  595.    (TV standard monitor)
  596.  
  597.    *set ARMovie$PrefBigMode x320,y256,c32t,ex2,ey2;x384,y288,c32t
  598.  
  599.    (VGA monitor)
  600.  
  601.    *set ARMovie$PrefBigMode x320,y480,c16m,ex2,ey1;x480,y352,c16m;x640,y480,c32k
  602.  
  603. ARMovie$Suffix
  604.  
  605.    Used by the machine's owner to preselect different versions of the
  606.    movie if they are available. For example, if one knows that one's machine
  607.    can only manage 12.5fps movies, *set ARMovie$Suffix to 2 and Player will
  608.    preferentially play the 12.5fps movies. See the file on AE7 file naming
  609.    conventions.
  610.  
  611. ARMovie$4Colour
  612.  
  613.    If this variable is defined, then square pixel hi-resolution (e.g. mode 27)
  614.    displays will be done in colour, provided a lookup table has been defined.
  615.    The quality of this is not wonderful, particularly in the red/magenta area
  616.    of the colour space, because these colours are missing from the default
  617.    RISC OS colour palette.
  618.  
  619.    The program 'Make4col11', in the !ARMovie.MovingLine directory, will make
  620.    the appropriate lookup tables for the current palette: this does take
  621.    some time... The !ARMovie directory needs to be on a writeable file
  622.    system in order for the extra files to be written to it.
  623.  
  624.    The program 'Make8Col11', in the !ARMovie.MovingLine directory, will make
  625.    the appropriate lookup tables for the current palette of a 256 colour mode
  626.    and takes even longer... If the Player cannot find the palette information
  627.    for an unknown set of 256 colours, it will play in monochrome.
  628.  
  629. Some system variables are used by Player to return information to the calling
  630. programs:
  631.  
  632. ARMovie$Pause
  633.  
  634.    Player sets this to 0 if the movie was playing when it exited, 1 if it is
  635.    paused on exit. This, plus the use of -paused, allows pause state to be
  636.    preserved between the applications and the Player program.
  637.  
  638. ARMovie$Return
  639.  
  640.    Player sets this to the actual position on screen of the video information.
  641.    If -leave has been set or use user has exitted Player using the CAPTURE/EXIT
  642.    button, this is the section that has been 'dirtied' and should be repainted
  643.    by the window manager. It is set to
  644.  
  645.    <leftx> <bottomy> <rightx> <topy> <C>
  646.  
  647.    where the <C> is present only if the user has pressed CAPTURE/EXIT.
  648.  
  649. ARMovie$ReturnCode
  650.  
  651.    If -NoError has been set, this will contain the textual error message.
  652.    It will not exist if there was no error.
  653.  
  654. ARMovie$Sound
  655.  
  656.    Player sets this to 0 if the sound has been disabled by clicking on
  657.    one of the icons, 1 if it is enabled. This, plus the use of -mute,
  658.    allows sound on/off state to be preserved between the applications and
  659.    the Player program.
  660.  
  661. ARMovie$Time
  662.  
  663.    Player sets this to the number of centiseconds of movie which have been
  664.    played. Note that (like -playfor) this refers strictly to the amount of
  665.    the movie, not the total elapsed time: playing a movie and playing the
  666.    movie pausing every frame for an hour will end up with the same value
  667.    for ARMovie$Time.
  668.  
  669. ARMovie$Version
  670.  
  671.    Player sets this to its version number and date string.
  672.  
  673. Acorn Replay Icons
  674. ------------------
  675.  
  676. The !ARMovie application has already *iconsprite'd the icons for the AE7
  677. filetype into the window manager's icon pool - you should not include them
  678. (or any other system icons...) in your application's own !Sprite files.
  679.  
  680. A standard set of icons is made available for the buttons used to control
  681. the player. They are in <ARMovie$Dir>.Sprites (plus Sprites22 and Sprites23
  682. using the RISC OS 3.00 discipline for alternative resolutions). This gives
  683. all eight buttons with names 'exit' 'pause' 'single' 'fast' 'half' 'quiet'
  684. 'loud' and 'mute'. In addition, there are 'play', 'pplay' (pushed play) and
  685. 'playbig' buttons to complete a control panel.
  686.  
  687. Applications wishing to use the button set should load (check for failure)
  688. the sprite file into their own sprite area (rather than *iconsprite'ing
  689. it - the definitions use up quite a bit of memory).
  690.  
  691. If you wish to use your own icons for control buttons (for example, you
  692. want the buttons to be a different size) then please ensure that the
  693. buttons appearance (especially the shape of the glyph design) is close to
  694. the standard ones.
  695.  
  696. The sprite file <ARMovie$Dir>.Default contains the default sprite used by
  697. the !ARMovie program to indicate that an ARMovie file can be dragged there.
  698.  
  699. Not done yet
  700. ------------
  701.  
  702. The player does not, in fact, respond to double speed and half speed play
  703. buttons (h and f).
  704.  
  705. File IO Access Resource file
  706. ----------------------------
  707.  
  708. The method by which the Player program accesses the ARMovie file can be
  709. altered. The file "<ARMovie$Dir>.Access" contains a list of the file root
  710. pathnames and an associated access method. For example:
  711.  
  712. ADFS::HardDisc4   32
  713. CDFS:             0
  714. SCSI:             1
  715. SCSI::Fred        64
  716.  
  717. The text, up to the first space, is matched against the left of the filename
  718. - if it is identical (including case) then the access method specified is
  719. used. Note that this allows the different access methods for different discs
  720. on the same filing system and for different sections of the same disc. 0 is
  721. used by default. There can be any number of spaces between the string and
  722. the access method.
  723.  
  724. The access methods defined so far are:
  725.  
  726. 0: double chunks if possible, single chunks if not enough RAM
  727. 1: single chunks
  728. 2-256: n K sub blocks of single chunks
  729. 257-512: ditto, but rounded up to 2K values
  730. 513-1024: ditto, but rounded up to 4K values
  731. 1025: next different method
  732.  
  733. Note that access methods 1-1024 produce faster start up times (since only a
  734. single chunk is read) and use less memory (note that 2-1024 use the same amount
  735. of memory as 1 since the whole chunk must still be read). But they do require
  736. much faster access times - access=2 especially - compared with 0. The
  737. supplied default file is:
  738.  
  739. SCSI: 1
  740. ADFS: 128
  741.  
  742. ADPCM sound copyright notice
  743. ----------------------------
  744.  
  745. ADPCM sound code was implemented by Mark Taunton of Acorn Computers using
  746. original code supplied with the following notice:
  747.  
  748. Copyright 1992 by Stichting Mathematisch Centrum, Amsterdam, The
  749. Netherlands.
  750.  
  751.                         All Rights Reserved
  752.  
  753. Permission to use, copy, modify, and distribute this software and its 
  754. documentation for any purpose and without fee is hereby granted, 
  755. provided that the above copyright notice appear in all copies and that
  756. both that copyright notice and this permission notice appear in 
  757. supporting documentation, and that the names of Stichting Mathematisch
  758. Centrum or CWI not be used in advertising or publicity pertaining to
  759. distribution of the software without specific, written prior permission.
  760.  
  761. STICHTING MATHEMATISCH CENTRUM DISCLAIMS ALL WARRANTIES WITH REGARD TO
  762. THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
  763. FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH CENTRUM BE LIABLE
  764. FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  765. WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
  766. ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
  767. OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  768.