home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 198.lha / Flip / flip.readme < prev    next >
Encoding:
Text File  |  1988-12-27  |  6.5 KB  |  106 lines

  1. Let's see now, where do I begin:
  2.  
  3. First of all, I designed this program to conceal itself after it starts
  4. running so as soon as you set the two time variables to your liking and
  5. then hit the Start gadget, the control window is whisked away.  It should
  6. now be, and on my Amiga is, located directly on top of the Workbench
  7. Screen front/back gadgets.  In fact, the shrunk Flip control window matches
  8. the size of these gadgets exactly, and it is quite impossible to access
  9. the Workbench gadgets using the mouse.  Unfortunately, when it is in the con-
  10. cealed position there is not much you can do with it execpt resize it in the
  11. up/down direction.  There is a way out of this dilemma.  Just make sure that
  12. the flip window is active (click on what appear to be the Workbench  
  13. front/back gadgets) and access the flip menu using the right mouse button.
  14. You'll see an item labeled Enlarge Window.  Selecting this item will
  15. expand the window to it's original size.  From there you can start or stop
  16. the timing process, play with the time variables, or quit the program if
  17. you wish.  I decided to set it up this way in order to make it possible
  18. for the program to run in the background in a concealed fashion.
  19. You can therefore start it running and if you sit a friend of yours in
  20. front of your Amiga and let him or her start to play, every so often the
  21. screen will flip, and it will be very difficult for this person to figure
  22. out what in the heck is going on.  It shouldn't eat much CPU time while
  23. this is going on since the timer is the only thing that is functioning.
  24.  
  25. Warnings:  There are a large number of potential problems when an ignorant
  26. programmer like myself tries messing around where he probably shouldn't
  27. be messing around.  I warn you, this program has not been extensively
  28. tested for bugs and is therefore likely to cause system crashes when
  29. operating in non-standard environments.  I've checked it out with a cli
  30. window opened on the Workbench Screen and it seems to work fine there.
  31. I've tested it with a large # of other programs and it seems to flip almost
  32. any screen without crashing the system.  HAM screens are obviously not
  33. very fun to look at in this manner but there wasn't much I could do about
  34. that.  Even terminal programs seem to flip ok.  I was online the other
  35. day with Access and flip was running in the background, and the Access
  36. screen was flipping every five minutes or so with no problems.
  37. If it causes you problems, throw it in the trashcan and don't
  38. complain to me.  Oh well, you can, but there won't be much I'll be
  39. willing to do to help.
  40.  
  41. Observations:  My only previous experience in programming was a short
  42. class in C offered by our User Group.  I don't know what possessed me
  43. to jump into assembly language but I guess that's not too important.
  44. From my viewpoint, it seems that assembly language is a heck of a lot
  45. easier in many ways than C.  I say this cautiously since I realize that
  46. my perspective is that of a novice.  Given that, I will say that the old
  47. "Is it a pointer or isn't it?" question is quite maddening to the new
  48. student in C.  This is much less of a problem in assembler.  Pointers
  49. and addresses are much easier to keep distinct.  I suppose where I ran
  50. into the most trouble with assembly was in the debugging.  A C compiler
  51. will filter out a lot of programmer stupidity mistakes that will slip
  52. right through the assembler.  Unfortunately, the way you find out about
  53. these is through a message from you friendly neighborhood wise man.  Not
  54. a pleasant way to get the message.  The Metascope debugger proved invaluable
  55. in this respect and for those of you just starting to learn assembly
  56. language I heartily recommend it.  I also recommend Structure Browser.  You
  57. can use this gem to snake through a considerable number of structures and
  58. find out the values of the members.  Very helpful in picturing how the
  59. internal variables are arranged.
  60.  
  61. I've included the source code in case anyone wants to add, subtract, or
  62. butcher this.  It comes in two pieces, flip.asm and ud.asm.  Flip is the
  63. main portion of the program and contains the code for the parent process
  64. and the child task which does the timing.  Ud is the subroutine that
  65. actually flips the screen.  I would have split it up into smaller pieces
  66. but every time I tried that I ended up with graphical data being sent to
  67. the twilight zone of fast mem, and an invisible gadget.  Fixhunk didn't
  68. seem to help, and I have no idea where to get hold of ATOM which I gather
  69. is the proper way to deal with this, at least according to the RKM's.
  70.  
  71. And, by the way, I seem to remember someone else writing a program that
  72. flips the screen just like this one.  I've searched my collection of
  73. screen hacks and can't find it.  If this is true, now there are two of
  74. them out there and perhaps more.  I'm sure we've got a ways to go before
  75. we match to terminal program count, not to mention the Directory Utility
  76. count.
  77.  
  78. I created one nasty little bug while I was writing this thing and I'll
  79. mention it here in the hope of preventing others from running into it.
  80. Quite stupid actually, but it had me scratching my head for a while.
  81. What I was trying to do was remove the system sizing gadget from the console
  82. windows that the program opens to display the text.  It was necessary to
  83. do this since the console display is lost if the user shrinks the window.
  84. So I figured I'd get smart and remove the sizing gadget.  I remember reading
  85. somewhere that this was not allowed, but I'm brave, I went ahead and tried.
  86. Seemed to work out just fine.  I'd do a RemoveGadget followed by a
  87. RefreshWindowFrame and all seemed well.  Gomf didn't like this too much,
  88. smart program that it is, but it let me recover just fine.  Then I realized
  89. that every time I'd open a con window I'd lose #fh_SIZEOF bytes of memory.
  90. Then it all clicked and I realized what a stupid thing I'd done and went
  91. ahead and just turned off the sizing gadget.  Now I'm happy and so is
  92. AmigaDos.  What was particularly nasty about this was that it really didn't
  93. cause a Guru, so it slipped by me for quite a while.  I guess AmigaDos is
  94. smart enough to deal with this in a semi-intelligent manner but I'll bet
  95. it ends up being a trap for a Guru later on down the line.  I guess the
  96. message is DON'T MESS WITH THE SYSTEM STRUCTURES.  Perhaps you can but
  97. you'd better be prepared to repair the damage that you will invariably cause.
  98.  
  99. If you find any other bugs please let me know.
  100. If you like the program, let me know.  You might end up convincing me
  101. to write something useful.
  102.                 Charles J. Besecker
  103.                 CIS 75226,1266
  104.                 People Link - ops433
  105.                 CA-AUG BBS 216-581-2284
  106.