home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 294.lha / copdis_v0.0a / README < prev    next >
Text File  |  1989-10-08  |  4KB  |  86 lines

  1.  
  2.  
  3. copdis - copper disassembler  0.0a  6/29/89  (alpha release)
  4.  
  5.  
  6. OVERVIEW
  7.  
  8. Greetings.  The intrepid Amiga hacker, seeking to gain knowledge in the
  9. intricacies of the video coprocessor, or copper, may find use in this 
  10. program: a copper list disassembler.
  11.  
  12. The copper is a source of unspeakable power and it must be studied.
  13.  
  14. The copper is a programmable processor, capable of executing a very simple
  15. set of instructions that allow it to control much of the Amiga hardware,
  16. including all of the display characteristics and functions, audio functions,
  17. the blitter, serial port and even the floppy disk drives.
  18.  
  19. The copper has the capability of synchronizing its operations with the
  20. drawing of the display.  Copper programs can use this to do specific
  21. things to specific portions of the screen such as alter color registers, 
  22. change display resolutions, etc.  It can also use this capability to
  23. provide a precision timer by which its operations can be precisely ordered, 
  24. for example, for using the copper to play music without the intervention
  25. of the 68000 processor.
  26.  
  27. The copper has a particularly interesting, but little used, capability by
  28. which a currently executing copper program (Copper programs basically must
  29. complete within about 1/60th of a second.) can set up another address for
  30. the copper to begin executing at.  The copper would normally begin executing
  31. at that address at the start of the next video field.  It can be forced to
  32. begin executing it immediately with an additional instruction.
  33.  
  34. As there are two copper "program counters," it is possible to have a
  35. one-deep subroutine calling capability whereby programs execute running
  36. copper PC 1 and call subroutines by loading their addresses into copper
  37. PC 2 and strobing the location to causes the coppper to start executing
  38. the "subroutine."  At the completion of the subroutine, it strobes the
  39. address that causes the copper to execute using PC 1, which resumes
  40. the caller -- UNTESTED
  41.  
  42. If that works, a deeper interrupt nesting scheme can be created, if
  43. necessary, involving the copper interrupting the 68000 and getting it
  44. to handle a stack and such.  (kink value == maximum)
  45.  
  46. USING COPDIS
  47.  
  48. There are two ways to use copdis.  One is to execute the copdis program.
  49. This goes out and finds various presumably interesting copper lists and
  50. prints them out for you.
  51.  
  52. The other way to use copdis is to call it directly from your C program.
  53. Simply link copdis.o (after compiling it from copdis.c for the memory
  54. model you're using) in with your program, and call the subroutine 'copdis'
  55. with a pointer to a copper instruction list.  Note that structures such 
  56. as "struct cprlist" are not pointers to instruction lists but pointer
  57. to structures that point to instruction lists or point to something that
  58. points to an instruction list.  I think the calls in main are correct,
  59. but I'm not promising *anything.*
  60.  
  61. BUGS
  62.  
  63. This program is in a primitive state.  Right now it doesn't take a length
  64. and if it gets passed a bogus address (i.e., not an address of a real
  65. and properly terminated copper list), it can run on and on.  For all I
  66. know, it may even get lost doing OK lists, but I haven't seen that happen,
  67. at least not for a while.  It really ought to do a sanity check on the
  68. size of the list, like stop after an absurd number of instructions go
  69. by, but you can always control-C anyway.
  70.  
  71. Note also that I'm not a copper expert so any of the information in the
  72. README here could be wrong as well.
  73.  
  74.  
  75. Regards, Karl Lehenbauer @ The Hacker's Haven
  76.  
  77.  Hackercorp
  78.  3918 Panorama
  79.  Missouri City, TX  77459
  80.  
  81.  (713) 274-5184
  82.  usenet: uunet!sugar!karl
  83.  Internet & BITNET: karl@sugar.hackercorp.com
  84.  BIX: karl (rarely)
  85.  
  86.