home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 569a.lha / EdPlayer_v1.1 / EdP.history.README.pp / EdP.history.README
Text File  |  1991-11-07  |  13KB  |  216 lines

  1. ----------------------------------------------------------------------------
  2. A History of changes to EdPlayer.  All previous users, PLEASE read this
  3. file to see what's new!!
  4. ----------------------------------------------------------------------------
  5. EdPlayer v1.1a: 11/03/91
  6.     Oops!!  Version 1.1 broke EdPlayer's compatability with people using
  7. OS 1.3 with an overscanned screen.  This version fixes that bug.  Also
  8. this version allows the iconified window, which stretches to the left when
  9. printing long filenames in large fonts, to also stretch to the right if
  10. it can't go any further left.
  11. ----------------------------------------------------------------------------
  12. EdPlayer v1.1:  10/25/91
  13.     This is just a minor update to 1.0.  I kinda rushed it out, because
  14. some bugs needed fixing right away.  Also some useful stuff added.
  15. * req.library added.  If EdPlayer can't open kd_freq.library, it will
  16.   look for req.library.  I'm also thinking about the posibility of asl...
  17. * powerpacker.library added.  If you were using PowerPatch for EdPlayer
  18.   alone, you can remove it from your startup-sequence, as I suspect
  19.   EdP will be much more effecient WITHOUT it.  Also you can see neat
  20.   messages like ...LOADING CRUNCHED... and ...DECRUNCHING... if you're
  21.   NOT using the patch.  A new AREXX command, "DCOL", allows setting of
  22.   the decrunch effect.
  23. * New AREXX command "ERAS" allows erasing the program.
  24. * ARexx commands are no longer case-sensitive.  I guess this is kind of
  25.   a frill, but I like it better this way.  NOTE: the "MIDL" command
  26.   still NEEDS a case-sensitive parameter for midi_dest.
  27. * Can load PP encrypted (password protected) modules.  Will bring up a
  28.   password requester when needed.  Also passwords can be entered via
  29.   ARexx, see LOAD and JUKE in the DOCs for an explanation...
  30. * Iconified window now supports bigger fonts
  31. * Iconified window now has NAME of current song!  Also scrollbar has a
  32.   new trick that puts the song name there after a scroll.
  33. * PAL/Overscanned WB screens supported better.  EdPlayer 1.0 used to open
  34.   in the NTSC, no overscan position all the time.  EdP 1.1 tries to
  35.   center itself, and appear flush with the bottom.
  36. * FADE bug fixed.... NOT!!!!  This is NOT a BUG!  PLEASE read the DOCs
  37.   in the BUTTONS section under FADE for a NEW & IMPROVED description
  38.   of why EdPlayer fades the way it does!!  The FADE code didn't change.
  39. * Slight bug in program mode made it impossible to enter songs with
  40.   European characters in the names (like ü, ä, etc.).  This is now
  41.   fixed.  Never do signed arithmetic on ASCII bytes...  >127 looks neg :-)
  42. Hmm, now that I look at it, it doesn't seem like such a "minor" update
  43. after all...  oh well...
  44. ----------------------------------------------------------------------------
  45. WISH LIST:
  46.      Before reporting a suggestion, please make sure it's not in the wish
  47. list.  If it's not, then report it!
  48. The following is a wish list of features that MIGHT OR might NOT appear in
  49. a future version of EdPlayer:
  50.  
  51. * I wish EdP supported ASL.library
  52. * I wish EdP could override the audio filter
  53. * I wish EdP had FastForward/Rewind buttons like IntuiTracker
  54. * I wish EdP had user-definable defaults for PAL/NTSC, FADE, etc.
  55. * I wish EdP had a random-play program mode.
  56. * I wish EdP could switch the VU meters for novice users 1234 ==> 1432
  57.                so that the left/right speakers go like:  LRRL ==> LLRR
  58. * I wish EdP worked on ALL A3000s, AAAARGH!!!
  59. * I wish EdP could support MED song+samples format $*#&^*!!!
  60. And don't forget:
  61. * I wish EdP supported ProTracker and MED 3.20!  (hint!!)  ;-> !!!!
  62. ----------------------------------------------------------------------------
  63. EdPlayer 1.0: Sometime in July 1991, I think.
  64.    New features in EdPlayer 1.0:
  65.  
  66. * All of them.
  67.  
  68. Well what did you EXPECT???  duh!
  69. ----------------------------------------------------------------------------
  70.  
  71. Well that ends the useful part of this file.  Now for the entertaining
  72. part.  Only read on if you have some time and want to hear a good story...
  73.  
  74. ============================================================================
  75.  
  76.                     THE HUNT FOR THE MEMORY MONSTER
  77.  
  78. ============================================================================
  79.  
  80.      The following is a true story of what happened to me as I tried to
  81. debug EdPlayer.  Some scenes depicted may be insutable for inexperienced
  82. programmers or sensitive coders.  Reader discretion is the recommended
  83. default configuration.
  84.  
  85.                               * * * *
  86.  
  87.      There I was, sitting at home on my summer vacation, with nothing
  88. better to do in my life than work on EdPlayer.  One of the things that
  89. prompted me to write EdPlayer in the first place was the total lack of
  90. any mod player that was RELIABLE and had ALL the features I wanted in ONE
  91. program (including ARexx).  This is probably why I was turning red and
  92. looking around for a nice brick that would fit in my monitor.
  93.      EdPlayer was not working.
  94.      All the features I really hated -- the way IntuiTracker crashes during
  95. serial port activity, the way XTPlay fragments the memory beyond belief
  96. after playing an unknown number of modules -- ALL of these features were
  97. things I NEVER wanted to see in one of MY programs.  They were some of the
  98. main reasons I was writing EdPlayer, after all!  And yet, there they were.
  99. They were just sitting there in EdPlayer v0.8, fragmenting my CHIP RAM down
  100. to 2K blocks if I played the MegaBall high score tune, GURUing my machine
  101. if I used the modem, and really annoying me like no bug had annoyed before.
  102.      But I had been CAREFUL!!  I checked and double-checked all my
  103. allocations and de-allocations.  So I loaded the thing into my debugger. 
  104. The bug refused to happen in trace mode, so I tried running it with
  105. breakpoints in it.  Still the bug didn't appear.  So I just ran the thing
  106. with no breakpoints and no stopping...  The bug appeared!  "AHA!  Now I've
  107. got you!!" I yelled at the hex dump on my screen.  I rebooted (the bug
  108. forced me to do that... it kinda gurus!)  I tried the breakpoints again
  109. without success.  Then I tried it no stopping again.  The bug was GONE!  It
  110. wouldn't appear anymore!  "It's FIXED!!!" my brother cheered, but I told
  111. him that I hadn't done ANYTHING, and the bug was STILL THERE.  I
  112. demonstrated outside of the debugger.  Yup, still there.
  113.      A few days of letting the debugger tourture me just made things worse.
  114. Every now and then, the bug would appear briefly, and when I moved the
  115. debugger in for the kill, screaming "AHA!  Now I've got you!!" at every
  116. chance, the bug would disappear like magic.  Worse yet, the bug was making
  117. its appearences less and less frequently, as if it were "learning" how to
  118. avoid me.  I know it sounds unreal, but it felt real enough...
  119.      I couldn't look directly AT the bug.  But maybe I could see its
  120. footprints in the system...  I wrote down the GURU number and address,
  121. which turned out to be the SAME each time the bug struck.  It was always an
  122. unaligned address error, at the same ROM location every time.  Was EdPlayer
  123. misusing an OS function?  Nope.  The bug struck OTHER programs, and didn't
  124. even affect EdPlayer!  "Maybe it's not EdPlayer's fault," my mom suggested.
  125. But by now I had stopped using the debugger, and from CLI, I was able to
  126. generate LOADs of bugs, rebooting after each one.  I showed my mom the
  127. basic pattern:  Open a shell.  RUN EDPLAYER.  Type "avail".  See your
  128. free memory.  LOAD a song into EdPlayer.  Type avail, see memory.  Press
  129. PLAY, and quickly type avail again.  See avail's opening banner.  See
  130. SOFTWARE FAILURE -- TASK HELD.  EdPlayer continues to function, as if
  131. nothing were wrong.  The gadgets work and all.  EdPlayer 0.8 was a task
  132. masher!
  133.      A few weeks of this got me really steamed.  I had disassembled the
  134. area of ROM in question down to the bare bits.  It turned out to be Exec's
  135. AvailMem() command, which was natural since "avail" was dying all the time.
  136. I don't know the legal technicalities of disassembling ROMs, but I figured
  137. since I wasn't giving it to anyone, it was OK.  It turned out that as
  138. AvailMem() tried to compute the LARGEST free block of CHIP mem, it has to
  139. ride down a chain of MemChunks, and hits an unaligned chunk at 0xffffffff!
  140.      But it GETS WORSE...  I wrote a little prog to find the LARGEST CHIP
  141. block without using AvailMem(), by directly following the MemChunks and
  142. testing each one for odd addresses, printing them all out when it's done.
  143. (I'm _NOT_ distributing this program, as it looks a bit too similar to
  144. those ROMs...)  Anyway, now I could issue "myavail" at a CLI and not worry
  145. about a GURU.  Here comes the scary part folks!
  146.      The Amiga's memory list is GLOBAL.  That is, there is only ONE list
  147. for the ENTIRE machine.  But I opened two shells and ran EdP 0.8 from one
  148. of them, and tried myavail in both shells, and then I saw it.  I couldn't
  149. believe my eyes!!  The myavail in EdPlayer's shell clearly showed the
  150. mangled, unaligned chunks.  The myavail in the OTHER shell showed a
  151. perfectly clean memory list!  I tried typing the command in both shells,
  152. over and over, in random order.  I tried rebooting dozens of times.  The
  153. results were the same:  The GLOBAL memory list looked DIFFERENT depending
  154. on which dos process looked at it, with the same viewing program!!!!  One
  155. list was destroyed, and the other was fine!  But there's ONLY ONE LIST!!!!!
  156. #include <twilight_zone.music>
  157.      The BUG had earned itself the nickname of "The Memory Monster."  It
  158. was driving me nuts.  I was going out of my mind.  "Why don't you just
  159. release EdPlayer?" my brother asked.  I looked at him, horrified.  "Lots of
  160. module players do weird things with the CHIP ram," he explained.  I was
  161. about to tell him what I thought of his comment, when suddenly I thought
  162. about his comment:  "LOTS of module players"... HMMMMMM............
  163.      That was it.  It was SO obvious.  There was no bug in *MY* code! 
  164. There was some kind of major flaw in the actual module-playing code that is
  165. used by LOTS of module players!  "AHA!  Now I've got you!!"
  166.      Several more weeks went by as I heaped on more and more debugging and
  167. monitoring code to the player routines, mostly mt_init since the problem
  168. appears at the start of a song.  By this time I was taking a summer math
  169. course at Lehigh, but luckily I had my Amiga with me so I didn't go insane
  170. (well, not completely insane, anyway).  I had mt_init keep a table of
  171. memory writes.  First in the table was the module's starting address, and
  172. next was the ending address (start+size).  All the entries after that
  173. were places in memory that mt_init was writing, which I was hoping would be
  174. out-of-bounds at some point.  I was hoping to do some REALLY slick code to
  175. keep mt_init from going out-of-bounds.  But I was in for more torture:  The
  176. table didn't seem to have any illegal entries!!  So where was my Monster???
  177.      I had to put it aside for a few days.  I just couldn't take it.  I had
  178. been chasing this thing for so long, and at EVERY step of the way, the
  179. Monster seemed to learn new tricks and find new places to hide.
  180.      Then, right in the middle of class one day, an idea poped into my
  181. head.  It was a last chance, but I had a good feeling about it.  After
  182. class, I came straight home.  I approached the Amiga.
  183. #define SPEED (slow_motion)
  184.      My hard drive whined as it gained speed and saw the size of my
  185. startup-seqence.  I calmly waited for a chance to launch the debugger.
  186. #include <terminator_style.music>
  187.      I looked again, much more closely, at the list of mt_init memory
  188. writes.  In particular, I examined the last entry in the list.  The last
  189. entry exactly MATCHED the module ending address.  But the so-called ending
  190. address was computed with (start+size), a computation that produces the
  191. first memory location AFTER the real end of the module.  There it was: 
  192. mt_init was writing JUST past the end of the mod, in a very camouflaged
  193. way.  I stood there, looking at my much-hunted foe for the first time.  A
  194. slight grin flickered across my face.
  195. #include <hasta_la_vista_baby.8SVX>
  196.      The Memory Monster never had a clue what hit it.  It was dead before
  197. it could say "GURU."  It was a quick and painless death, and when the smoke
  198. and dust had cleared, I was just a little bit disappointed.  I had been
  199. hoping to do some really fancy code to kill the monster.  Instead, all I
  200. got to do was allocate 4 more bytes of mem than the module size needed, to
  201. hold the extra memory write (which I assume is important for something, and
  202. therefore I should allocate mem to catch it).  Well, I allocated 8 bytes
  203. just to be on the safe side, but it was still a bit of a let down.
  204.      But what was I sad about?  The Memory Monster, after months of
  205. torturing me, was finally dead at my feet.  The memory fragmenting, the
  206. serial port crashes, ALL the weirdness disappeared.  All of those
  207. "different" bugs were merely the many manifestations of the Memory Monster.
  208. It was all behind me now, all fixed.  I felt pretty good.  EdPlayer's
  209. version number was bumped up to 0.9, and after some finishing touches, it
  210. became 1.0 and got released.
  211. #include <standing_ovation.h>
  212. ============================================================================
  213. EdPlayer v1.0 got me a whopping total of $30 in donations.  yippie
  214.  
  215.                                                   --Ed.
  216.