home *** CD-ROM | disk | FTP | other *** search
/ Amiga Developer CD 2.1 / Amiga Developer CD v2.1.iso / Reference / DevCon / Washington_1988 / DevCon88.1 / JimmDemos / ReadMe < prev    next >
Encoding:
Text File  |  1992-08-27  |  7.2 KB  |  165 lines

  1.  Amiga Developer Conference Demos by Jim Mackraz, April, 1988
  2.  
  3.    Copyright (c) 1988, I and I Computing, and Commodore-Amiga, Inc.
  4.  
  5.   Executables based on this information may be used in software
  6.   for Commodore Amiga computers.  All other rights reserved.
  7.  
  8.   This information is provided "as is"; no warranties are made.
  9.   All use is at your own risk, and no liability or responsibility is assumed.
  10.  
  11.  
  12. These directories contain source code and executable files for example
  13. and demonstration programs to accompany several lectures at the 1988 Amiga
  14. Developers' Conference.  This file describes the programs and the source
  15. files individually.
  16.  
  17. Several techniques for "taking over from Intuition" are presented in the
  18. DView example.  These include shutting off input, turning it on in a
  19. synchronized way for a seamless transition into menus, and stealing sprite
  20. zero.  These are just some of the first main steps to using Intuition
  21. resources in a compatible way.
  22.  
  23. Please refer to the papers accompanying the talks for much more information
  24. on each subject.
  25.  
  26. All of these programs are to be run from the CLI and  accept command-line
  27. arguments parsed by a routine of my own named 'getargs().'  They typically
  28. spit out an argument usage summary when you say "foo -?" or "foo -z" (or any
  29. other unused argument).
  30.  
  31. All programs are developed under small-model Aztec C.  Several situations
  32. require special handling for this model:
  33.    - Aztec register conventions don't match the system code
  34.    - small-model requires base-register A4 to be set up
  35.    - input handlers receive parameters in registers, which need to be
  36.      pushed onto the stack for use by C routines.
  37.  
  38. It turns out that I save and restore too many registers at times.  You can
  39. do better in your programs.  All program files were created using tabstops
  40. set every 4 character positions.
  41.  
  42. I'd like to acknowledge the assistance, suggestions, and motivation provided
  43. by the Commodore-Amiga system software and technical support teams. 
  44. Additionally, many ideas from BIX and Usenet found their way into the
  45. programs.  These programs by no means represent the final word of knowledge
  46. on any of the subjects. I hope the active developers' community can pick up
  47. the ball from here and post corrections, enhancements, and discussions about
  48. these techniques.
  49.  
  50. Most of all, I hope these examples help flatten out the learning curve for
  51. programmers wanting to get at the guts of the the Amiga, and that we find,
  52. as I suspect, that the wildest Amiga software is yet to come.
  53.  
  54. One last point:  As usual, I use the Workbench screen as my guinea pig.
  55. No wild techniques should be applied to the Workbench in a real application. 
  56. There are things coming which these programs will blow up, so use these
  57. demos as examples only, for routines working on custom screens and bitmaps.
  58.  
  59. --------
  60.  
  61. UCop
  62.    A demonstration of a couple of user copper list techniques.
  63.    Not so interesting, but quite useful, since the documentation
  64.    on user copper lists is sketchy, and the CINIT() code is kind
  65.    of broken.
  66.  
  67.    A command-line option selects a demo from:
  68.    - change background color every line
  69.    - visualize time required by MOVE and WAIT instructions
  70.    - copper change of bitplane pointers on the fly
  71.  
  72.    cpr.c  -- main source code for demo
  73.  
  74. BuildReq
  75.    A demonstration of a routine to algorithmically build an AutoRequest
  76.    from a simple description, taking into account the effective font
  77.    metric.  An example of the type of font-sensitive calculations that
  78.    will be necessary as we allow new sizes and types of system default
  79.    fonts.
  80.  
  81.    Options of the demo include requesters with very short, normal, and
  82.    user specified strings.
  83.  
  84.    buildreq.c -- the AutoRequest builder subroutine
  85.    buildt.c -- test caller for the above
  86.  
  87. DCop
  88.    An enhancement of Scott Evernden's copper disassembler.
  89.    It disassembles (and comments, decoding the weird format of some of
  90.    the display controller registers) the active view hardware copper lists,
  91.    the intermediate (including User) copper lists for the active view's
  92.    first viewport, and the secret graphics copinit copper header.
  93.  
  94.    dcop.c -- self-contained source module, includes useful (and soon to
  95.       obsolete) names for Amiga custom registers.
  96.  
  97. DView
  98.    This program demonstrates the best method of double-buffering displays
  99.    I can think of without disabling Graphics' vertical blank interrupt
  100.    handler (which pokes it's idea of the active copper list every frame).
  101.  
  102.    Once you figure out how to allocate views and viewports, the
  103.    hard part is synchronizing the display of newly prepared buffers
  104.    with the "safe moment" to begin rendering in the offscreen
  105.    buffer.  As I will indicate in the lecture, neither WaitTOF(),
  106.    nor WaitBOVP() is a suitable synchronization method (even if
  107.    WaitBOVP() did not busy-wait).
  108.  
  109.    This program, in replacing the system View structure, 
  110.    also serves as an example for "taking over the system from Intuition."
  111.    As such, it goes a little further than necessary for just the
  112.    example, and demonstrates:
  113.    - how to use a custom input handler to shut off input to Intuition
  114.    - how to seamlessly return input to Intuition for transitions
  115.      into menus
  116.    - synchronization methods between the handler and the application
  117.    - how to steal, use,  and return Intuition's sprite zero
  118.      (and other sprites)
  119.    - a useful technique for rendering into a sprite using normal graphics
  120.      function calls
  121.  
  122.    dview.h -- contains definitions, include the DoubleView control structure
  123.    dview.c -- setup, utility, and disposal subroutines for DoubleView scheme
  124.    dvdemo.c -- example using copies of the Workbench screen
  125.    ucop.c -- user Copper list setup for Copper interrupt synchronization
  126.    vint.c -- video (Copper) interrupt handler installation and removal
  127.    vhdlr.a68 -- small Copper interrupt handler
  128.    steali.c -- steals the input food chain from Intuition with custom
  129.       input device handler
  130.    spr.h -- definitions for easy sprite handling
  131.    spr.c -- sprite allocation, stealing, and rendering setup and disposal
  132.  
  133. OScan
  134.    An example of techniques for displaying an overscanned screen or
  135.    viewport.  Demonstrates a supported method of displaying large screens
  136.    but with limited mouse travel.  Also includes demonstration of
  137.    unsupportable technique for freeing mouse limits, which will not
  138.    continue to work under future versions of Intuition.  See accompanying
  139.    paper for more discussion.
  140.  
  141.    String gadgets are used to input values for View->DxOffset and
  142.    View->DyOffset.  Menu selections are used to go in and out of
  143.    "overscan mode" using the specified offset values.
  144.  
  145.    oscan.h -- just contains constants for huge dimensions
  146.    oscan.c -- overscan demonstration
  147.    huge.c -- sets up huge experimental bitmap
  148.    oscreen.c -- handles screen, window, menus, and gadgets for demo.
  149.  
  150. MISC. TOOLS
  151.    These utility subroutine files are used by several of the demos.
  152.    These are part of a personal tools library used in developing the example
  153.    programs.
  154.  
  155.    getargs.h -- command line argument parsing 
  156.    getargs.c
  157.  
  158.    awindow.c -- finds the address of the active window
  159.  
  160.    openg.c -- open graphics.library
  161.    openi.c -- open intuition.library
  162.    sysall.h -- every system include file used for all demos,
  163.       used to create a pre-compiled include file under Aztec C
  164.  
  165.