home *** CD-ROM | disk | FTP | other *** search
/ 8bitfiles.net/archives / archives.tar / archives / genie-commodore-file-library / Information / 00CAT5MSGS.SFX / 00cat5msgs next >
Encoding:
Text File  |  1990-02-12  |  31.0 KB  |  802 lines

  1.  ************
  2. Topic 3         Mon Oct 21, 1991
  3. H.HERMAN1                    (Forwarded) 
  4. Sub: miscellany...                          
  5.  
  6. I couldn't think of any other place where I could put this.
  7. 82 message(s) total.
  8.  ************
  9.  ------------
  10. Category 5,  Topic 3
  11. Message 1         Mon Oct 21, 1991
  12. H.HERMAN1                    (Forwarded) 
  13.  
  14. I've run into a problem with the type-in program listed on page G-24 in the 
  15. November Gazette edition of Compute.
  16.  
  17. I was very careful, and meticulously typed in EVERYTHING exactly as it 
  18. appeared.  I then saved everything to disk, and then entered RUN.
  19.  
  20. Nothing happened...  I waited and tried again...  RUN.  RUN RUN!!!!!
  21.  
  22. Still nothing....
  23.  
  24. Did I miss something?     :)
  25.  
  26. Howie
  27.  ------------
  28. Category 5,  Topic 3
  29. Message 2         Tue Oct 22, 1991
  30. C128.JBEE [* Sysop *]        (Forwarded) 
  31.  
  32.  Do they have a checksum program and did you use it?
  33.  ------------
  34. Category 5,  Topic 3
  35. Message 3         Tue Oct 22, 1991
  36. H.HERMAN1                    (Forwarded) 
  37.  
  38. JBEE, did you see the program...    :?
  39.  
  40.  ------------
  41. Category 5,  Topic 3
  42. Message 4         Tue Oct 22, 1991
  43. H.HERMAN1                    (Forwarded) 
  44.  
  45. Well...  Let me explain...
  46.  
  47. It seems Compute goofed BIG.
  48.  
  49. Page G-24 is a three column page, with two columns describing waves, and how
  50. to get waves on some older model 64's.  A few extra pokes...
  51.  
  52. Then we come to column three.  NOTHING!!!  It is BLANK.
  53.  
  54. Obviously someone was supposed to paste some program into that space, but
  55. forgot.  Can you imagine.  Two columns describing a routine, and then
  56. forgetting to put it into your magazine!   :(
  57.  
  58. Howie
  59.  ------------
  60. Category 5,  Topic 3
  61. Message 5         Tue Oct 22, 1991
  62. C128.JBEE [* Sysop *]        (Forwarded) 
  63.  
  64.  I haven't seen Gazette since they dropped the G section from their news
  65.  stand edition.
  66.  
  67.  Yea, that is pretty terrible for a multimillion dollar magazine.  I wonder
  68.  if it was a goof or maybe the program as printed wouldn't run and they
  69.  deemed it better to leave it out until the next issue so they wouldnt
  70.  receive 100s of calls about why it wouldnt run?
  71.  
  72.  Either way whoever the proofreader was is in deep trouble.  Either that or
  73.  the pasted on section fell off and noone noticed while taking the shots.
  74.  
  75.  ------------
  76. Category 5,  Topic 3
  77. Message 6         Thu Oct 24, 1991
  78. HOWIE-CBM [H.HERMAN1]        (Forwarded) 
  79.  
  80. JBEE,
  81.  
  82. You might want to take another look at Compute at the newstand.
  83.  
  84. I don't know the full story, but shortly after Compute removed the Gazette
  85. edition from newstand copies, they reversed themselves.
  86.  
  87. So, as far as I know (I get the subscription edition which includes the
  88. Gazette) the newstand edition would include all the inserts now.
  89.  
  90. Howie
  91.  ------------
  92. Category 5,  Topic 3
  93. Message 7         Thu Oct 24, 1991
  94. C128.JBEE [* Sysop *]        (Forwarded) 
  95.  
  96.  It doesn't.  I checked it out when I picked up the Dec91 issue of Run.
  97.  Or at least I couldn't find the G section listed in the table of contents.
  98.  ------------
  99. Category 5,  Topic 3
  100. Message 8         Fri Oct 25, 1991
  101. C128-BILL [Bill]             (Forwarded) 
  102.  
  103. Howie, I saw the missing column last night.  Had to chuckle a bit!
  104.  
  105.  ------------
  106. Category 5,  Topic 3
  107. Message 9         Fri Oct 25, 1991
  108. HOWIE-CBM [H.HERMAN1]        (Forwarded) 
  109.  
  110. JBEE,
  111.  
  112. The table of contents for Gazette appears on page G-1, and I suspect the same
  113. for the other insert.  Only the main body and ms/dos are up front.
  114.  
  115. Everything should be in there.  In fact, it should be pretty easy to locate
  116. the Gazette portion.  Just look for that page with the blank column 3.   :)
  117.  
  118. Howie
  119.  ------------
  120. Category 5,  Topic 3
  121. Message 10        Fri Oct 25, 1991
  122. HOWIE-CBM [H.HERMAN1]        (Forwarded) 
  123.  
  124. Oooops....   
  125.  
  126. That's what happens when I post my messages willy nilly, and don't look to see
  127. what's been happening first...   :)
  128.  
  129. Howie
  130.  ------------
  131. Category 5,  Topic 3
  132. Message 11        Fri Oct 25, 1991
  133. C128.JBEE [* Sysop *]        (Forwarded) 
  134.  
  135. I will have to go down the bookstore and check again!
  136.  ------------
  137. Category 5,  Topic 3
  138. Message 12        Sun Jun 21, 1992
  139. M.MCCORMIC10 [Mike Mc-]      (Forwarded) 
  140.  
  141. I have a program that I DL'ed many years ago from "Q".It has a few bugs but it
  142. is one of the better
  143.  genealogy programs.I wrote to the shareware address ,but my letter was
  144. returned.The name was ERO
  145.  Systems,in CA.The author was listed as Dennis Davis in Cherry Hill,NJ.He
  146. doesn't live there anymore.
  147.  
  148. If anybody wants to try to get the bugs out of this program,I will E-MAIL it
  149. to them.It is 5 SDA's.
  150.  
  151. You need 2 discs.
  152.  
  153. I would really like for somebody to make this compatable with Ramlink,but
  154. first let's just get it
  155.  running properly.The instructions are a little confusing.
  156.  
  157. If anybody can contact"railbird" on "Q" I think he had something to do with
  158. this program.
  159.  
  160.  
  161. Mike Mc-
  162.  ------------
  163. Category 5,  Topic 3
  164. Message 13        Thu Jul 16, 1992
  165. G.BIRECKI3                   (Forwarded) 
  166.  
  167.  Hiall,
  168.  I am writing a program that is menu driven,  I am having a problem with the
  169. menu system.
  170.  
  171.  I would like a menu that highlights each choice as you scroll through them.
  172.  I have written a sample program that is rather lengthy, and cumbersome, but
  173. gets the job done.  Any suggestions?
  174.  
  175.  I'll upload my sample to the library if anyone would like to see it.
  176.  
  177.  Also, is there a command which moves the cursor up and down, instead of side
  178. to side like TAB AND SPC ?
  179.  Thanks for any help you can give.
  180.  
  181.                         Eric
  182.  ------------
  183. Category 5,  Topic 3
  184. Message 14        Fri Jul 17, 1992
  185. C128.JBEE [* Sysop *]        (Forwarded) 
  186.  
  187.  You could always position the cursor with the "char" command and use a
  188.  simple getkey test to determine if you should increase or decrease the "y"
  189.  value in the "char" command.
  190.  
  191.  If the menu choices are contained within a string array you could open a
  192.  "reversed" window, print the string, and position the string at the "top"
  193.  of the one line window.  If the person presses a key telling you to move
  194.  up or down you then open a window over the current one (unreversed using the
  195.  fg/bg colors which should be a variable), print the string, then go to your
  196.  routine to open a window in reversed colors, print the string that should
  197.  go at that location etc etc.
  198.  
  199.  One small point ... turn off the screen scrolling (forget the poke ...)
  200.  and using the "char" place all the menu choices on screen and then go to your
  201.  cursor/selection routines.
  202.  
  203.  Describing it takes longer than the code :)
  204.  If you are reading in menu choices from a scrolling directory just read
  205.  the choices into the array again as you keep scrolling the current choices.
  206.  
  207.  Since the number of menu choices on screen are probably going to be finite
  208.  it wouldn't be a bad idea to DIM the string variable at the beginning
  209.  of your program.  That way you could offer the user the ability to go back
  210.  in the menu to pick previous passed over choices.
  211.  ------------
  212. Category 5,  Topic 3
  213. Message 15        Sat Jul 18, 1992
  214. G.BIRECKI3                   (Forwarded) 
  215.  
  216.  If you could dig up the poke for no screen scrolling, I'd really appreciate
  217. it.
  218.  also, what is the format for the CHR command.
  219.  
  220.  One more thing, when you say 'open a window', do you mean just printing a
  221. line in reverse?
  222.  
  223.                        Eric
  224.  ------------
  225. Category 5,  Topic 3
  226. Message 16        Sat Jul 18, 1992
  227. M.MCCORMIC10 [Mike Mc-]      (Forwarded) 
  228.  
  229. Eric-
  230.  
  231. I got your e-mail.I do not want to upload a program with bugs.
  232.  
  233. The error message I am receiving is "string too long error in 5997",how do I
  234. fix it? If any body wants to play with this genealogy program,I probably could
  235. upload directly to them. It has 5 ARC programs and many modules.It looks like
  236. it is a good program once it is de-bugged.
  237.  
  238. The docs that come with it look like they are from "Q".I am not on that
  239. system.
  240.  
  241. Mike Mc-
  242.  ------------
  243. Category 5,  Topic 3
  244. Message 17        Sat Jul 18, 1992
  245. CBM-ED [e.g.bell]            (Forwarded) 
  246.  
  247. This is in response to the request for a highlighting menu program... Are you
  248. doing this on a C64 or a C128.  The address you want to turn  off screen
  249. scrolling can be accomplished on the 128 by sending ESC-M ESC-L toggles. 
  250. Forget which one does what, but whichever one turns it off, the other one
  251. turns it on.
  252.  
  253. WRT the 'string too long' error, you are building a string in your  program
  254. that becomes longer than 255 characters.  This is an easy mistake to make when
  255. building things in GET loops, but that is not a good practice there anyway
  256. because of garbage collection.
  257.  
  258. My recommendation wrt the menu hilighter would be to do the routine in ML, if
  259. possible.  That is the fastest, and most bulletproof, way to do that kind of
  260. routine.  Isn't the source to my Catalog program somewhere in the library.  I
  261. have just such a routine, for the C64 of course, tho.
  262.  ------------
  263. Category 5,  Topic 3
  264. Message 18        Tue Jul 21, 1992
  265. M.MCCORMIC10 [Mike Mc-]      (Forwarded) 
  266.  
  267. CBM ED-
  268.  
  269. The "string too long"error is in a program that I have downloaded a while
  270. ago.Here is how it works, maybe you can tell me how to correct it.I have NEVER
  271. programmed before.
  272.  
  273. This is a genealogy program and you can search for and display various family
  274. charts. The error appears to only happen when searching for chart #2.The other
  275. charts run fine.
  276.  
  277. This is on a 64C.
  278.  
  279. Mike Mc-
  280.  ------------
  281. Category 5,  Topic 3
  282. Message 19        Wed Jul 22, 1992
  283. C128.JBEE [* Sysop *]        (Forwarded) 
  284.  
  285.  If the program is in Basic you should upload it to the Flagship library
  286.  so people can take a look at it.  If the code isn't too messy it should only
  287.  take someone 20-30 minutes to find the error and fix it.
  288.  ------------
  289. Category 5,  Topic 3
  290. Message 20        Wed Jul 22, 1992
  291. CBM-ED [e.g.bell]            (Forwarded) 
  292.  
  293. Famous last words....  hehehehe
  294.  
  295. Actually, JBEE is right, Mike.  The problem must be in a string building loop
  296. or a file read, and if it is in BASIC, it should be easy to find. If it is
  297. compiled BASIC, it may be impossible to find cuz the references to line
  298. numbers are bogus.  But upload it.  I'll take a look.
  299.  ------------
  300. Category 5,  Topic 3
  301. Message 21        Thu Jul 23, 1992
  302. C128.JBEE [* Sysop *]        (Forwarded) 
  303.  
  304.  This is in response to the "scrolling" question and also a few other
  305.  tips thrown in:
  306.  ======================
  307.  100 rem   dsave"db.v0.012.bas"
  308.  110 bank15:poke(47),0:poke(48),153:clr:rem    set up bank1 - variables start
  309.  120 rem                                       at 1020 to 39015 = total space
  310.  130 rem                                       available = 37995 byte
  311.  140 bank15:graphic 1,1:rem                    reserved bitmap and clear it
  312.  150 :
  313.  160 lo=1:hi=64
  314.  170 bank15:poke(45),lo:poke(46),hi:rem        set start of basic at $4000
  315.  180 bank15:poke(lo+256*hi)-1,0:rem            basic prgs starts with a zero
  316.  190 graphic clr:rem                           get rid of bitmap and clear
  317.  200 graphic 5:rem                             pick the 80 column screen
  318.  210 :
  319.  220 poke 248,128:rem                         stop screen scrolling
  320.  230 :
  321.  240 fast:printchr$(14)
  322.  250 key5,"fast:list"+chr$(13)
  323.  260 key6,"fast:run"+chr$(13)
  324.  270 key7,"fast:list1700-"+chr$(13)
  325.  280 key8,"fast:renumber100,10,0"+chr$(13)
  326.  290 :
  327.  300 rem - skip over these pointers -------------------------------------------
  328. --
  329.  
  330.  310 goto 440
  331.  320 gosub 590:rem                 reserve all character strings
  332.  330 gosub 1660:rem                 routine to print help screens
  333.  340 gosub 1820:rem                 routine to print 1st input screens f01-f27
  334.  350 gosub 2130:rem                 routine to print 2nd input screens f28-f63
  335.  360 gosub 2520:rem                 routine to print 3rd input screens f64-f81
  336.  370 gosub 2720:rem                 routine to clear input screens
  337.  380 gosub 2770:rem                 getkey a$ - blank key press routine
  338.  390 :
  339.  ======================
  340.  line 100  - I always keep the name in a rem statement, when I change the
  341.  version I change the rem statement, hit return to enter the line, cursor
  342.  up erase the rem statement and save the file to disk with the name in the rem
  343.  statement.
  344.  
  345.  line 140-200
  346.  A way of having the start of Basic stay that way after stopping a program
  347.  so the data you store in the hires bitmap area doesn't get nuked.
  348.  This works great with the Abacus 128 compliler when you reserve memory.
  349.  The idea is to let the graphic command move all your data/basic for you.
  350.  
  351.  line 220 - STOP screen scrolling ;)
  352.  
  353.  line 240-280
  354.  I like to redefine my Fkeys and once your program starts to grow you want
  355.  the line command to start where you currently are in the program.
  356.  
  357.  line 310-
  358.  I program by making everything a subroutine.  When reading a Basic program
  359.  later it is easier to follow.  The trouble is you can end up with over a 100
  360.  subroutines and keeping track of them on what line number after renumbering
  361.  your program umpteem times is tough.  This way you list them all in gosub
  362.  commands with liberal REM statements.
  363.  
  364.  Once you build up a library of routines you can reuse them in all your Basic
  365.  programs!
  366.  ------------
  367. Category 5,  Topic 3
  368. Message 22        Thu Jul 23, 1992
  369. CBM-ED [e.g.bell]            (Forwarded) 
  370.  
  371.  I can add a couple of suggestions to yours JBEE. In your first line, with
  372.  the dsave, I always precede that with a scratch command and follow it with
  373.  a dverify command.  But after the REM, I put a quotation mark followed by
  374.  enough deletes to pull all but the command back to the start of the line
  375.  and delete the REM and the line number.  I usually include an 'x=08' or
  376.  something as the first statement on the line, and a ,u(x) after the 
  377.  'scratch', 'dsave', and 'dverify', so that I can easily change device 
  378.  numbers in all 3 commands with 1 or 2 keystrokes.  It usually works out
  379.  to about 8 deletes after the quotes.  *note* this will *NOT* work if your
  380.  filenames have upper case letters in them.
  381.  
  382.  I do something similar w/my routines, but I renumber them just before I 
  383.  save them to disk, then incorporate the first number into the file name.
  384.  For example, if I have a routine to display a directory, I might
  385.  renumber it starting with line 1000 in increments of 1 line number.  then
  386.  when I save the file, I'll call it     1000 directory.   I have a COMBINE
  387.  command built into my C128 chips, and use that to build up a foundation
  388.  of routines for new programs.  Just renumber when I'm finished.
  389.  Each routine on the 'routine disk'  starts with a different group of line 
  390.  numbers, which is why I can combine them w/o fear of overwriting anything,
  391.  and since I renumber in increments of 1, I have a *lot* of space to 
  392.  maneuver.
  393.  
  394.  
  395.  BTW, that inclusion of deletes can work for any line you use to clean things
  396.  up with after a test run.  I use one to restore the character set pointer
  397.  and one also with the FIND command, also in my C128 chipset.
  398.  
  399.  Your suggestion about the routines reminded me of the disk I have dedicated
  400.  to that purpose from TotalRecall that speeded up development of the support
  401.  programs.  It is a source of much of what I have entered into that Snippits
  402.  topic in Cat 21.
  403.  
  404.  ------------
  405. Category 5,  Topic 3
  406. Message 23        Fri Jul 24, 1992
  407. C128.JBEE [* Sysop *]        (Forwarded) 
  408.  
  409.  The only thing I don't like about scratching old files is sometimes I need
  410.  them :D  Also, I keep a time and date log of all the files created both for
  411.  development, legal, and accounting purposes.  So it literally doesn't pay
  412.  for me to scratch them :)
  413.  Of course if you are using a 1541/71 and saving 140+ block files every
  414.  ten minutes scratching the old ones will probably save a ton of disk space.
  415.  Even at $0.25 a piece you could go through some dollars fast :)
  416.  
  417.  The combine command sounds pretty interesting, did you burn your own
  418.  routine into a ROM?
  419.  ------------
  420. Category 5,  Topic 3
  421. Message 24        Fri Jul 24, 1992
  422. HOWIE-CBM                    (Forwarded) 
  423.  
  424.  JBEE,
  425.  
  426.  The Basic program listing, and structure is terrific!  You have several 
  427.  features that I will now incorporate into my template for use with new 
  428.  projects.
  429.  
  430.  They all seem so easy to implement.  I don't know why I never thought of 
  431.  them.   Very helpful info!  :)
  432.  
  433.  Howie
  434.  ------------
  435. Category 5,  Topic 3
  436. Message 25        Fri Jul 24, 1992
  437. HOWIE-CBM                    (Forwarded) 
  438.  
  439.  Ed,
  440.  
  441.  Yes!  Tell us more about your custom chips!!  And especially COMBINE.  :)
  442.  
  443.  For short combines, I've used that ole:  LIST, LOAD, and enter <CR>'s.
  444.  
  445.  For big combines, and where something gets inserted into the middle of
  446.  something else, BTP's buffer.  :)
  447.  
  448.  Howie
  449.  ------------
  450. Category 5,  Topic 3
  451. Message 26        Fri Jul 24, 1992
  452. CBM-ED [e.g.bell]            (Forwarded) 
  453.  
  454. John:  get ready to blush.  The COMBINE command in my C128 is indeed from a
  455. set of custom chips from Free Spirit, a ROM replacement that I was sold on
  456. when I read the review many years ago in TC128.  Course, you were not the
  457. publisher then.  The chips also have a FIND, CHANGE, and MERGE.   The MERGE
  458. gets a little flakey sometimes, not sure why.  I have a Super Chip (ha!) from
  459. I forget who that is really a piece of gabage. Anyway, the COMBINE function
  460. just appends programs to the end of whatever program is in memory.  Then I
  461. just renumber the file.  It's great.  as a matter of fact, I use FIND and
  462. CHANGE so much, I don't think I'll get  JIFFY DOS any time soon cuz I would
  463. lose that in their chip upgrade.  The chipset also fixes some bugs like the
  464. shift-q, and I believe the relative coordinates in the graphics commands. 
  465. There are other commands I have  long since forgotten because I don't use
  466. them.   I think there is also a numeric base conversion function but since I
  467. have that in the BASIC  language, the MLM, and probably my Mach 128, I"m not
  468. sure about that.  I believe there is also a nice set of FKEY definitions,but
  469. there is some  contention among chips in my C128 so I"m not sure which chipset
  470. has the priority in that regard.  Know the ones I like are not the ones I
  471. have,  but it is a nice chip set.  At $50, it was not cheap though, and I
  472. don't know if it is still available, but for the FIND and CHANGE alone, it was
  473. worth every penny!
  474.  ------------
  475. Category 5,  Topic 3
  476. Message 27        Sat Jul 25, 1992
  477. C128.JBEE [* Sysop *]        (Forwarded) 
  478.  
  479.  Yea, I remember that review ;)
  480.  ------------
  481. Category 5,  Topic 3
  482. Message 28        Sat Jul 25, 1992
  483. M.MCCORMIC10 [Mike Mc-]      (Forwarded) 
  484.  
  485. I have uploaded the genealogy prigram that we are discussing and started a
  486. topic for it in Cat.3,Topic #27.
  487.  
  488. The files are #'s 9900,9901,9902,9903,9904,9905. All are SDA.
  489.  
  490. Mike Mc-
  491.  ------------
  492. Category 5,  Topic 3
  493. Message 29        Sun Jul 26, 1992
  494. CBM-ED [e.g.bell]            (Forwarded) 
  495.  
  496. I grabbed them yesterday Mike.  They dissolved ok, but file 3, I believe, has
  497. a couple of duplicate files at least.  I started over on a separate  disk
  498. after 2 failures for that reason.  The filenames as uploaded don't  reflect
  499. the fact that they are SDA's either, for general info.  I didn't have time to
  500. run the prgs, and will now have to move them around on disks first.  >>sigh<<
  501. but this is a *massive* program in terms of support file count, etc.  Can you
  502. give me some kind of idea what files I  *need* to run the prog and duplicate
  503. the problem.  I'd rather not have to deal with all of those files if I don't
  504. have to.
  505.  ------------
  506. Category 5,  Topic 3
  507. Message 30        Sat Oct 31, 1992
  508. M.MCCORMIC10 [Mike Mc-]      at 07:29 EST
  509.  
  510. Ed-
  511.  
  512. I didn't realize that you had also answered my question in this topic.You can
  513. eliminate; overlay,notewriter,and files that have those names.
  514.  
  515. I will repeat the problem.This program will do all that I ask "EXCEPT"create a
  516. record or chart for  the first great grandfather person # 8. That is where I
  517. get "string to long"error.All the great grandparents work fine. Could there be
  518. a missing module?
  519.  
  520. This is everything that I have.
  521.  
  522. Mike Mc-
  523.  ------------
  524. Category 5,  Topic 3
  525. Message 31        Sat Oct 31, 1992
  526. CBM-ED [e.g.bell]            at 08:53 EST
  527.  
  528. I just posted a  long answer to your other post, Mike.  See my post and  then
  529. we can go from there.  I have to dig up my copies of all those  files.  When
  530. dissolving them, I found at least 1 or 2 duplicate files in different archives
  531. and was never sure if they were different, or what. Also, this puts another
  532. thing into the equation.  Your data.  Could you drop a copy of what you are
  533. entering here or in my mailbox (CBM-ED) so I can enter things exactly as you
  534. are entering them.  I may or may not be able to duplicate your results if I am
  535. not using the same data.  But let me see what I can do... and give me every
  536. detail of what you have done. I've never used a genealogy program so I am
  537. starting from square one on  every front.
  538.  
  539.  ------------
  540. Category 5,  Topic 3
  541. Message 33        Tue Jan 19, 1993
  542. R.KNOP1 [Rob Knop]           at 00:43 EST
  543.  
  544. I echo Bruce's sentiment that the Hacking Magazine is a good place to see
  545. source code.  Some of the articles there are pretty technical, and useful even
  546. for folks who are old hands at ML.  Recently, the editor, Craig Taylor,
  547. started up a series where he's writing a "Space Invasion" game, which looks
  548. like it could be very useful for someone who knows the basics of ML but is
  549. unsure how to do anything with it.
  550.  
  551. Another good place for source code with explanations are the old Transactor
  552. magazines!
  553.  
  554. -Rob
  555.  ------------
  556. Category 5,  Topic 3
  557. Message 34        Sun Jun 06, 1993
  558. GULLIBLE [Jon]               at 16:53 EDT
  559.  
  560. Can't think of a better place to put this...
  561.  
  562. I'm working on a sequel to my PI DEMO. A demo which has the first 18,000
  563. digits of PI in the scroll.
  564.  
  565. I now have a file listing the first 1.25 Million digits of PI and I would like
  566. to come up with a compression method that will let me put as many digits
  567. possible in available memory...probably about 40K.
  568.  
  569. So far, the best I can get is a 2.4:1 compress ratio. It works like this:
  570.  Take the sequence:
  571.  123456789012
  572.  123 = 0001111011
  573.  456 = 0111001000
  574.  789 = 1100010101
  575.  012 = 0000001100
  576.  These 40 bits equal 5 bytes:
  577.  00011110 11011100 10001100 01010100 00001100
  578.  Thus, 12 digits in 5 bytes or 2.4:1
  579.  
  580. Can anyone think of a better compression method? The reason I ask is that 0-9
  581. is only 10 different characters and there are 256 in a byte. 25:1???
  582.  
  583. I know this is a weird request... :) But, I'd appreciate any help or
  584. suggestions. Thanks.
  585.  ------------
  586. Category 5,  Topic 3
  587. Message 35        Sun Jun 13, 1993
  588. C128.JBEE                    at 09:01 EDT
  589.  
  590.  Gullible,
  591.  I have been thinking this over and believe I have found a solution, short
  592.  of compression, that might work, especially with a series of numbers such
  593.  as PI.  Which is special in the way the numbers are (not;) sequenced.
  594.  
  595.  It takes 3 bits to represent a digit 0-9, but how about representing the
  596.  difference from one digit to another instead of using a trinary solution?
  597.  
  598.  Example:
  599.  Start the data flow with the first number
  600.  then start reading everything in according to bits
  601.  
  602.  If the first bit is zero it means to use the next bit to add or subtract
  603.  1 from the number in the A,X, or Y register.  Then display that number.
  604.  
  605.  0000 0000 -> first bit=0 so use the next bit to determine if you should
  606.               add or subtract, it is zero so subtract -1 from the A reg
  607.  
  608.  0000 0010 -> first bit=0 so use the next bit to determine if you should
  609.               add or subtract, it is one so add +1 to the A reg
  610.  
  611.  If you have a zero following the nine you would add one but write a zero
  612.  to the register.  So you would have to sacrifice speed for compression by
  613.  doing comparisons to a table of rules that says if A is greater than nine
  614.  (CMP) then A = 0
  615.  
  616.  If you have a sequence of numbers such as 4345 that would require 12 bits
  617.  at least but using this method only 8 bits!
  618.  
  619.  Now what happens if the first bit encountered is a 1?  Then use the
  620.  next three bits to branch to a table that keeps spliting the table of
  621.  remaining numbers in half.  01x3x56789
  622.  
  623.                           0135 6789
  624.  
  625.                            Bit #2
  626.                            true false
  627.                            0135 6789
  628.                          /         /
  629.                  Bit #3 =1         Bit #3 =0
  630.                  true false        true false
  631.                  01   35           67     89
  632.                 /   /             /       /
  633.        Bit #4 =1   Bit #4 =0   Bit #4=1   Bit#4
  634.        true false  true false  true false true flase
  635.        0     1     3    5      6    7     8    9
  636.  
  637.  
  638.  The only draw back is the size of the table vs compression gained and the
  639.  logic needed to keep track of where you are in the current byte (bit
  640.  wise).  I am not even sure it would compress the file better than using
  641.  your method.  But this is all I could think of taking into account the
  642.  way PI is represented and not knowing the odds of a digit having or not
  643.  having a number lower or higher than it, following it.  Though I am sure
  644.  the occurance of such is probably high.  Hey, that in itself would make
  645.  an interesting project :)
  646.  ------------
  647. Category 5,  Topic 3
  648. Message 36        Sun Jun 13, 1993
  649. GULLIBLE [Jon]               at 15:58 EDT
  650.  
  651. Thanks for the response. I hadn't thought about using a difference method. I
  652. am a bit confused as to how 4345 can be represented as 8 bits. If you have two
  653. bits that say subtract 1, then how do you know if those two bits mean subtract
  654. one or are the first two bits of a 3-4 bit sequence?
  655.  
  656. I will look over your post in greater detail. I do believe that using math
  657. will yield the best results. 
  658.  ------------
  659. Category 5,  Topic 3
  660. Message 37        Sun Jun 13, 1993
  661. C128.JBEE                    at 23:17 EDT
  662.  
  663.  If the first bit is unset (0), you know you are going to add or subtract
  664.  with the bit following it.  If the following bit is set you add one,
  665.  if it is unset (0) you subtract one.
  666.  
  667.  So a sequence of numbers such as 4345 (remember we started with a number
  668.  three) only requires two bits per digit because we are representing the
  669.  change, not the digit.  Since the sequence 4 3 4 5
  670.                                             | | | |
  671.                                 up one  ____| | | |___  up one
  672.                               down one  ______| |______ up one
  673.  
  674.  looks like that it would be represented in binary as
  675.  10100010
  676.  -|-|-|-|(4 up one)
  677.   | | |(3 down one)
  678.   | |(4 up one)
  679.   |(5 up one)
  680.  
  681.  8 bits!
  682.  
  683.  You use the first bit to determine if you are going to be using two bits
  684.  or four bits to determine the next number.  So you will always have at
  685.  least a 2x compression over the storing of just the numbers is ASCII
  686.  form.
  687.  ------------
  688. Category 5,  Topic 3
  689. Message 38        Wed Aug 25, 1993
  690. T.RUTTER2 [Troy Rutter]      at 19:17 EDT
  691.  
  692. Hi again people, well, its time to jump on the bandwagon and TRY (crossing
  693. fingers)  to finish my SIDplayer.  As many of you have followed through the
  694. Ultrasid Player topic under Sight & Sound, my SID player plays the individual
  695. parts of the sid archives, msw, pil, wpl, sal, slr, etc... without having to
  696. dissolve them.  The only thing holding me back is the words display.  Right
  697. now the conversion time from in memory to display is awfully sloooooooow. 
  698. Heres the scoop:
  699.  
  700. For some odd reason, the creators of Singalong songs (Kermit and Joe I think?)
  701. decided to store the word files in standard ASCII instead of PETSCII.  So...
  702. heres what happens in my program as it stands now. (Simplified of course)  Im
  703. doing this as a basic source around ML subroutine... so bear with me...
  704.  
  705. get location of words file, assign this to variable: WD
  706.  create array wd$
  707.  get character from memory
  708.         compare - does it need to be converted?
  709.         If so, convert
  710.         If not, store as is in WD$(x)
  711.  if peek(wd)=carraige return then x=x+1:go start over
  712.  if peek(wd)=0 then start music, start wds display.
  713.  
  714. This takes forever.  I have also tried two other ways:  1)  The "Index table"
  715. as it is referred to by ML experts.  This works... but still bothers me...
  716. slow, plus i have no idea what im doing.  2) Display without storing in wd$. 
  717. This is faster, but it is not guaranteed to display fast enough to keep in
  718. time with the mus flags.
  719.  
  720. If anybody can take a look at some SID player source code and help me out, i
  721. would appreciate being enlightened on how to display the words.  It seems like
  722. most sidplayers do some kind of banking so its automatic.   I dunno.  I have
  723. the source and object code in PAL (i think) of sidpic 3.4 if that would help. 
  724. I REALLY want to get this sucker done before the next SID-Fest.
  725.  
  726. Thanks,
  727.  Troy
  728.  
  729.  ------------
  730. Category 5,  Topic 3
  731. Message 39        Wed Aug 25, 1993
  732. CBM-ED [e.g.bell]            at 21:26 EDT
  733.  
  734.  Troy:
  735.   TR> I have also tried two other ways:  1)  The "Index table" as it
  736.   TR> is referred to by ML experts.  This works... but still bothers
  737.   TR> me... slow, plus i have no idea what im doing.  2) Display
  738.   TR> without storing in wd$. 
  739.  
  740.  If you are insistent on doing this display in BASIC, the 'Index Table'
  741.  is the fastest possible if done correctly.  What you are doing is
  742.  creating a lookup table for conversion from ASCII to PETSCII.  You use
  743.  the numeric value of the ASCII character as an index into the table,
  744.  which eliminates all IF statements, the REAL time hogs in a BASIC 
  745.  program, from the equation entirely.
  746.  
  747.  I would recommend doing the whole operation in ML,  which would 
  748.  assure the needed speed, and if you shelled to it from BASIC, you would
  749.  still be in control of the timing of the display.  An added plus is 
  750.  that it would take far less memory to do in ML than it would in BASIC,
  751.  particularly when you consider the elimination of the arrays, another
  752.  BASIC time hog.
  753.  
  754.   TR> If anybody can take a look at some SID player source code and
  755.   TR> help me out, i would appreciate being enlightened on how to
  756.   TR> display the words.  It seems like most sidplayers do some kind
  757.   TR> of banking so its automatic.   I dunno.  I have the source and
  758.   TR> object code in PAL (i think) of sidpic 3.4
  759.  
  760.  I will be happy to do that for the opportunity to get hold of the 
  761.  sid player source code.  What you are requesting seems to me to be
  762.  an extremely easy thing to do.  However, when is the SID-Fest.  I will
  763.  have to get your source code quickly to get it done for you because
  764.  I am leaving for vacation tomorrow night.  On the upside, I can't 
  765.  imagine what you want taking any more than about 5 minutes to code
  766.  once I have the source code.  If you can't work with this time-frame,
  767.  I hope you will still share the SID Player source code, which I've been
  768.  looking for for a long time.  I'm not planning anything that would 
  769.  'compete' with your work, and not for the C64 at all. But how does all
  770.  of this sound?  I already have the lookup-tables in files from other 
  771.  programs....  You get the code uploaded tonight I may be able to have
  772.  your solution first thing in the morning when I get home from work.
  773.  
  774.  (The above assumes we are talking ML source code, tho your mention of
  775.  PAL format pretty much indicates that)
  776.  ------------
  777. Category 5,  Topic 3
  778. Message 40        Wed Aug 25, 1993
  779. R.KNOP1 [Rob Knop]           at 22:25 EDT
  780.  
  781. 5-3
  782.  
  783. Troy- what exactly is done in the "compare" step where you decide if the
  784. string needs to be converted?  Is this something that detects whether the
  785. string is PETSCII or ASCII, or is it done on a character-by-character basis?
  786.  
  787. One thing that will help is to write a short ML subroutine to do your
  788. conversion for you... this will tend to make things faster.  Once in ML, my
  789. favorite way to do these things it the "Index Table" method.  Basically, you
  790. need to build a 256 byte table.  Let AV be the ASCII value (known) of the
  791. character, and PV be the PETSCII value (desired) of the character.  Then, the
  792. AV'th byte in the table is PV, assuming a properly built table.  In other
  793. words:
  794.  
  795.   ldx   #AV   ; or wherever you find the ASCII value, put that in .X
  796.   lda   table,x
  797.  
  798. At this point, .A will hold the PETSCII value, and you can stick it wherever
  799. you want it.
  800.  
  801. -Rob
  802.