home *** CD-ROM | disk | FTP | other *** search
- ************
- Topic 3 Mon Oct 21, 1991
- H.HERMAN1 (Forwarded)
- Sub: miscellany...
-
- I couldn't think of any other place where I could put this.
- 82 message(s) total.
- ************
- ------------
- Category 5, Topic 3
- Message 1 Mon Oct 21, 1991
- H.HERMAN1 (Forwarded)
-
- I've run into a problem with the type-in program listed on page G-24 in the
- November Gazette edition of Compute.
-
- I was very careful, and meticulously typed in EVERYTHING exactly as it
- appeared. I then saved everything to disk, and then entered RUN.
-
- Nothing happened... I waited and tried again... RUN. RUN RUN!!!!!
-
- Still nothing....
-
- Did I miss something? :)
-
- Howie
- ------------
- Category 5, Topic 3
- Message 2 Tue Oct 22, 1991
- C128.JBEE [* Sysop *] (Forwarded)
-
- Do they have a checksum program and did you use it?
- ------------
- Category 5, Topic 3
- Message 3 Tue Oct 22, 1991
- H.HERMAN1 (Forwarded)
-
- JBEE, did you see the program... :?
-
- ------------
- Category 5, Topic 3
- Message 4 Tue Oct 22, 1991
- H.HERMAN1 (Forwarded)
-
- Well... Let me explain...
-
- It seems Compute goofed BIG.
-
- Page G-24 is a three column page, with two columns describing waves, and how
- to get waves on some older model 64's. A few extra pokes...
-
- Then we come to column three. NOTHING!!! It is BLANK.
-
- Obviously someone was supposed to paste some program into that space, but
- forgot. Can you imagine. Two columns describing a routine, and then
- forgetting to put it into your magazine! :(
-
- Howie
- ------------
- Category 5, Topic 3
- Message 5 Tue Oct 22, 1991
- C128.JBEE [* Sysop *] (Forwarded)
-
- I haven't seen Gazette since they dropped the G section from their news
- stand edition.
-
- Yea, that is pretty terrible for a multimillion dollar magazine. I wonder
- if it was a goof or maybe the program as printed wouldn't run and they
- deemed it better to leave it out until the next issue so they wouldnt
- receive 100s of calls about why it wouldnt run?
-
- Either way whoever the proofreader was is in deep trouble. Either that or
- the pasted on section fell off and noone noticed while taking the shots.
-
- ------------
- Category 5, Topic 3
- Message 6 Thu Oct 24, 1991
- HOWIE-CBM [H.HERMAN1] (Forwarded)
-
- JBEE,
-
- You might want to take another look at Compute at the newstand.
-
- I don't know the full story, but shortly after Compute removed the Gazette
- edition from newstand copies, they reversed themselves.
-
- So, as far as I know (I get the subscription edition which includes the
- Gazette) the newstand edition would include all the inserts now.
-
- Howie
- ------------
- Category 5, Topic 3
- Message 7 Thu Oct 24, 1991
- C128.JBEE [* Sysop *] (Forwarded)
-
- It doesn't. I checked it out when I picked up the Dec91 issue of Run.
- Or at least I couldn't find the G section listed in the table of contents.
- ------------
- Category 5, Topic 3
- Message 8 Fri Oct 25, 1991
- C128-BILL [Bill] (Forwarded)
-
- Howie, I saw the missing column last night. Had to chuckle a bit!
-
- ------------
- Category 5, Topic 3
- Message 9 Fri Oct 25, 1991
- HOWIE-CBM [H.HERMAN1] (Forwarded)
-
- JBEE,
-
- The table of contents for Gazette appears on page G-1, and I suspect the same
- for the other insert. Only the main body and ms/dos are up front.
-
- Everything should be in there. In fact, it should be pretty easy to locate
- the Gazette portion. Just look for that page with the blank column 3. :)
-
- Howie
- ------------
- Category 5, Topic 3
- Message 10 Fri Oct 25, 1991
- HOWIE-CBM [H.HERMAN1] (Forwarded)
-
- Oooops....
-
- That's what happens when I post my messages willy nilly, and don't look to see
- what's been happening first... :)
-
- Howie
- ------------
- Category 5, Topic 3
- Message 11 Fri Oct 25, 1991
- C128.JBEE [* Sysop *] (Forwarded)
-
- I will have to go down the bookstore and check again!
- ------------
- Category 5, Topic 3
- Message 12 Sun Jun 21, 1992
- M.MCCORMIC10 [Mike Mc-] (Forwarded)
-
- I have a program that I DL'ed many years ago from "Q".It has a few bugs but it
- is one of the better
- genealogy programs.I wrote to the shareware address ,but my letter was
- returned.The name was ERO
- Systems,in CA.The author was listed as Dennis Davis in Cherry Hill,NJ.He
- doesn't live there anymore.
-
- If anybody wants to try to get the bugs out of this program,I will E-MAIL it
- to them.It is 5 SDA's.
-
- You need 2 discs.
-
- I would really like for somebody to make this compatable with Ramlink,but
- first let's just get it
- running properly.The instructions are a little confusing.
-
- If anybody can contact"railbird" on "Q" I think he had something to do with
- this program.
-
-
- Mike Mc-
- ------------
- Category 5, Topic 3
- Message 13 Thu Jul 16, 1992
- G.BIRECKI3 (Forwarded)
-
- Hiall,
- I am writing a program that is menu driven, I am having a problem with the
- menu system.
-
- I would like a menu that highlights each choice as you scroll through them.
- I have written a sample program that is rather lengthy, and cumbersome, but
- gets the job done. Any suggestions?
-
- I'll upload my sample to the library if anyone would like to see it.
-
- Also, is there a command which moves the cursor up and down, instead of side
- to side like TAB AND SPC ?
- Thanks for any help you can give.
-
- Eric
- ------------
- Category 5, Topic 3
- Message 14 Fri Jul 17, 1992
- C128.JBEE [* Sysop *] (Forwarded)
-
- You could always position the cursor with the "char" command and use a
- simple getkey test to determine if you should increase or decrease the "y"
- value in the "char" command.
-
- If the menu choices are contained within a string array you could open a
- "reversed" window, print the string, and position the string at the "top"
- of the one line window. If the person presses a key telling you to move
- up or down you then open a window over the current one (unreversed using the
- fg/bg colors which should be a variable), print the string, then go to your
- routine to open a window in reversed colors, print the string that should
- go at that location etc etc.
-
- One small point ... turn off the screen scrolling (forget the poke ...)
- and using the "char" place all the menu choices on screen and then go to your
- cursor/selection routines.
-
- Describing it takes longer than the code :)
- If you are reading in menu choices from a scrolling directory just read
- the choices into the array again as you keep scrolling the current choices.
-
- Since the number of menu choices on screen are probably going to be finite
- it wouldn't be a bad idea to DIM the string variable at the beginning
- of your program. That way you could offer the user the ability to go back
- in the menu to pick previous passed over choices.
- ------------
- Category 5, Topic 3
- Message 15 Sat Jul 18, 1992
- G.BIRECKI3 (Forwarded)
-
- If you could dig up the poke for no screen scrolling, I'd really appreciate
- it.
- also, what is the format for the CHR command.
-
- One more thing, when you say 'open a window', do you mean just printing a
- line in reverse?
-
- Eric
- ------------
- Category 5, Topic 3
- Message 16 Sat Jul 18, 1992
- M.MCCORMIC10 [Mike Mc-] (Forwarded)
-
- Eric-
-
- I got your e-mail.I do not want to upload a program with bugs.
-
- The error message I am receiving is "string too long error in 5997",how do I
- fix it? If any body wants to play with this genealogy program,I probably could
- upload directly to them. It has 5 ARC programs and many modules.It looks like
- it is a good program once it is de-bugged.
-
- The docs that come with it look like they are from "Q".I am not on that
- system.
-
- Mike Mc-
- ------------
- Category 5, Topic 3
- Message 17 Sat Jul 18, 1992
- CBM-ED [e.g.bell] (Forwarded)
-
- This is in response to the request for a highlighting menu program... Are you
- doing this on a C64 or a C128. The address you want to turn off screen
- scrolling can be accomplished on the 128 by sending ESC-M ESC-L toggles.
- Forget which one does what, but whichever one turns it off, the other one
- turns it on.
-
- WRT the 'string too long' error, you are building a string in your program
- that becomes longer than 255 characters. This is an easy mistake to make when
- building things in GET loops, but that is not a good practice there anyway
- because of garbage collection.
-
- My recommendation wrt the menu hilighter would be to do the routine in ML, if
- possible. That is the fastest, and most bulletproof, way to do that kind of
- routine. Isn't the source to my Catalog program somewhere in the library. I
- have just such a routine, for the C64 of course, tho.
- ------------
- Category 5, Topic 3
- Message 18 Tue Jul 21, 1992
- M.MCCORMIC10 [Mike Mc-] (Forwarded)
-
- CBM ED-
-
- The "string too long"error is in a program that I have downloaded a while
- ago.Here is how it works, maybe you can tell me how to correct it.I have NEVER
- programmed before.
-
- This is a genealogy program and you can search for and display various family
- charts. The error appears to only happen when searching for chart #2.The other
- charts run fine.
-
- This is on a 64C.
-
- Mike Mc-
- ------------
- Category 5, Topic 3
- Message 19 Wed Jul 22, 1992
- C128.JBEE [* Sysop *] (Forwarded)
-
- If the program is in Basic you should upload it to the Flagship library
- so people can take a look at it. If the code isn't too messy it should only
- take someone 20-30 minutes to find the error and fix it.
- ------------
- Category 5, Topic 3
- Message 20 Wed Jul 22, 1992
- CBM-ED [e.g.bell] (Forwarded)
-
- Famous last words.... hehehehe
-
- Actually, JBEE is right, Mike. The problem must be in a string building loop
- or a file read, and if it is in BASIC, it should be easy to find. If it is
- compiled BASIC, it may be impossible to find cuz the references to line
- numbers are bogus. But upload it. I'll take a look.
- ------------
- Category 5, Topic 3
- Message 21 Thu Jul 23, 1992
- C128.JBEE [* Sysop *] (Forwarded)
-
- This is in response to the "scrolling" question and also a few other
- tips thrown in:
- ======================
- 100 rem dsave"db.v0.012.bas"
- 110 bank15:poke(47),0:poke(48),153:clr:rem set up bank1 - variables start
- 120 rem at 1020 to 39015 = total space
- 130 rem available = 37995 byte
- 140 bank15:graphic 1,1:rem reserved bitmap and clear it
- 150 :
- 160 lo=1:hi=64
- 170 bank15:poke(45),lo:poke(46),hi:rem set start of basic at $4000
- 180 bank15:poke(lo+256*hi)-1,0:rem basic prgs starts with a zero
- 190 graphic clr:rem get rid of bitmap and clear
- 200 graphic 5:rem pick the 80 column screen
- 210 :
- 220 poke 248,128:rem stop screen scrolling
- 230 :
- 240 fast:printchr$(14)
- 250 key5,"fast:list"+chr$(13)
- 260 key6,"fast:run"+chr$(13)
- 270 key7,"fast:list1700-"+chr$(13)
- 280 key8,"fast:renumber100,10,0"+chr$(13)
- 290 :
- 300 rem - skip over these pointers -------------------------------------------
- --
-
- 310 goto 440
- 320 gosub 590:rem reserve all character strings
- 330 gosub 1660:rem routine to print help screens
- 340 gosub 1820:rem routine to print 1st input screens f01-f27
- 350 gosub 2130:rem routine to print 2nd input screens f28-f63
- 360 gosub 2520:rem routine to print 3rd input screens f64-f81
- 370 gosub 2720:rem routine to clear input screens
- 380 gosub 2770:rem getkey a$ - blank key press routine
- 390 :
- ======================
- line 100 - I always keep the name in a rem statement, when I change the
- version I change the rem statement, hit return to enter the line, cursor
- up erase the rem statement and save the file to disk with the name in the rem
- statement.
-
- line 140-200
- A way of having the start of Basic stay that way after stopping a program
- so the data you store in the hires bitmap area doesn't get nuked.
- This works great with the Abacus 128 compliler when you reserve memory.
- The idea is to let the graphic command move all your data/basic for you.
-
- line 220 - STOP screen scrolling ;)
-
- line 240-280
- I like to redefine my Fkeys and once your program starts to grow you want
- the line command to start where you currently are in the program.
-
- line 310-
- I program by making everything a subroutine. When reading a Basic program
- later it is easier to follow. The trouble is you can end up with over a 100
- subroutines and keeping track of them on what line number after renumbering
- your program umpteem times is tough. This way you list them all in gosub
- commands with liberal REM statements.
-
- Once you build up a library of routines you can reuse them in all your Basic
- programs!
- ------------
- Category 5, Topic 3
- Message 22 Thu Jul 23, 1992
- CBM-ED [e.g.bell] (Forwarded)
-
- I can add a couple of suggestions to yours JBEE. In your first line, with
- the dsave, I always precede that with a scratch command and follow it with
- a dverify command. But after the REM, I put a quotation mark followed by
- enough deletes to pull all but the command back to the start of the line
- and delete the REM and the line number. I usually include an 'x=08' or
- something as the first statement on the line, and a ,u(x) after the
- 'scratch', 'dsave', and 'dverify', so that I can easily change device
- numbers in all 3 commands with 1 or 2 keystrokes. It usually works out
- to about 8 deletes after the quotes. *note* this will *NOT* work if your
- filenames have upper case letters in them.
-
- I do something similar w/my routines, but I renumber them just before I
- save them to disk, then incorporate the first number into the file name.
- For example, if I have a routine to display a directory, I might
- renumber it starting with line 1000 in increments of 1 line number. then
- when I save the file, I'll call it 1000 directory. I have a COMBINE
- command built into my C128 chips, and use that to build up a foundation
- of routines for new programs. Just renumber when I'm finished.
- Each routine on the 'routine disk' starts with a different group of line
- numbers, which is why I can combine them w/o fear of overwriting anything,
- and since I renumber in increments of 1, I have a *lot* of space to
- maneuver.
-
-
- BTW, that inclusion of deletes can work for any line you use to clean things
- up with after a test run. I use one to restore the character set pointer
- and one also with the FIND command, also in my C128 chipset.
-
- Your suggestion about the routines reminded me of the disk I have dedicated
- to that purpose from TotalRecall that speeded up development of the support
- programs. It is a source of much of what I have entered into that Snippits
- topic in Cat 21.
-
- ------------
- Category 5, Topic 3
- Message 23 Fri Jul 24, 1992
- C128.JBEE [* Sysop *] (Forwarded)
-
- The only thing I don't like about scratching old files is sometimes I need
- them :D Also, I keep a time and date log of all the files created both for
- development, legal, and accounting purposes. So it literally doesn't pay
- for me to scratch them :)
- Of course if you are using a 1541/71 and saving 140+ block files every
- ten minutes scratching the old ones will probably save a ton of disk space.
- Even at $0.25 a piece you could go through some dollars fast :)
-
- The combine command sounds pretty interesting, did you burn your own
- routine into a ROM?
- ------------
- Category 5, Topic 3
- Message 24 Fri Jul 24, 1992
- HOWIE-CBM (Forwarded)
-
- JBEE,
-
- The Basic program listing, and structure is terrific! You have several
- features that I will now incorporate into my template for use with new
- projects.
-
- They all seem so easy to implement. I don't know why I never thought of
- them. Very helpful info! :)
-
- Howie
- ------------
- Category 5, Topic 3
- Message 25 Fri Jul 24, 1992
- HOWIE-CBM (Forwarded)
-
- Ed,
-
- Yes! Tell us more about your custom chips!! And especially COMBINE. :)
-
- For short combines, I've used that ole: LIST, LOAD, and enter <CR>'s.
-
- For big combines, and where something gets inserted into the middle of
- something else, BTP's buffer. :)
-
- Howie
- ------------
- Category 5, Topic 3
- Message 26 Fri Jul 24, 1992
- CBM-ED [e.g.bell] (Forwarded)
-
- John: get ready to blush. The COMBINE command in my C128 is indeed from a
- set of custom chips from Free Spirit, a ROM replacement that I was sold on
- when I read the review many years ago in TC128. Course, you were not the
- publisher then. The chips also have a FIND, CHANGE, and MERGE. The MERGE
- gets a little flakey sometimes, not sure why. I have a Super Chip (ha!) from
- I forget who that is really a piece of gabage. Anyway, the COMBINE function
- just appends programs to the end of whatever program is in memory. Then I
- just renumber the file. It's great. as a matter of fact, I use FIND and
- CHANGE so much, I don't think I'll get JIFFY DOS any time soon cuz I would
- lose that in their chip upgrade. The chipset also fixes some bugs like the
- shift-q, and I believe the relative coordinates in the graphics commands.
- There are other commands I have long since forgotten because I don't use
- them. I think there is also a numeric base conversion function but since I
- have that in the BASIC language, the MLM, and probably my Mach 128, I"m not
- sure about that. I believe there is also a nice set of FKEY definitions,but
- there is some contention among chips in my C128 so I"m not sure which chipset
- has the priority in that regard. Know the ones I like are not the ones I
- have, but it is a nice chip set. At $50, it was not cheap though, and I
- don't know if it is still available, but for the FIND and CHANGE alone, it was
- worth every penny!
- ------------
- Category 5, Topic 3
- Message 27 Sat Jul 25, 1992
- C128.JBEE [* Sysop *] (Forwarded)
-
- Yea, I remember that review ;)
- ------------
- Category 5, Topic 3
- Message 28 Sat Jul 25, 1992
- M.MCCORMIC10 [Mike Mc-] (Forwarded)
-
- I have uploaded the genealogy prigram that we are discussing and started a
- topic for it in Cat.3,Topic #27.
-
- The files are #'s 9900,9901,9902,9903,9904,9905. All are SDA.
-
- Mike Mc-
- ------------
- Category 5, Topic 3
- Message 29 Sun Jul 26, 1992
- CBM-ED [e.g.bell] (Forwarded)
-
- I grabbed them yesterday Mike. They dissolved ok, but file 3, I believe, has
- a couple of duplicate files at least. I started over on a separate disk
- after 2 failures for that reason. The filenames as uploaded don't reflect
- the fact that they are SDA's either, for general info. I didn't have time to
- run the prgs, and will now have to move them around on disks first. >>sigh<<
- but this is a *massive* program in terms of support file count, etc. Can you
- give me some kind of idea what files I *need* to run the prog and duplicate
- the problem. I'd rather not have to deal with all of those files if I don't
- have to.
- ------------
- Category 5, Topic 3
- Message 30 Sat Oct 31, 1992
- M.MCCORMIC10 [Mike Mc-] at 07:29 EST
-
- Ed-
-
- I didn't realize that you had also answered my question in this topic.You can
- eliminate; overlay,notewriter,and files that have those names.
-
- I will repeat the problem.This program will do all that I ask "EXCEPT"create a
- record or chart for the first great grandfather person # 8. That is where I
- get "string to long"error.All the great grandparents work fine. Could there be
- a missing module?
-
- This is everything that I have.
-
- Mike Mc-
- ------------
- Category 5, Topic 3
- Message 31 Sat Oct 31, 1992
- CBM-ED [e.g.bell] at 08:53 EST
-
- I just posted a long answer to your other post, Mike. See my post and then
- we can go from there. I have to dig up my copies of all those files. When
- dissolving them, I found at least 1 or 2 duplicate files in different archives
- and was never sure if they were different, or what. Also, this puts another
- thing into the equation. Your data. Could you drop a copy of what you are
- entering here or in my mailbox (CBM-ED) so I can enter things exactly as you
- are entering them. I may or may not be able to duplicate your results if I am
- not using the same data. But let me see what I can do... and give me every
- detail of what you have done. I've never used a genealogy program so I am
- starting from square one on every front.
-
- ------------
- Category 5, Topic 3
- Message 33 Tue Jan 19, 1993
- R.KNOP1 [Rob Knop] at 00:43 EST
-
- I echo Bruce's sentiment that the Hacking Magazine is a good place to see
- source code. Some of the articles there are pretty technical, and useful even
- for folks who are old hands at ML. Recently, the editor, Craig Taylor,
- started up a series where he's writing a "Space Invasion" game, which looks
- like it could be very useful for someone who knows the basics of ML but is
- unsure how to do anything with it.
-
- Another good place for source code with explanations are the old Transactor
- magazines!
-
- -Rob
- ------------
- Category 5, Topic 3
- Message 34 Sun Jun 06, 1993
- GULLIBLE [Jon] at 16:53 EDT
-
- Can't think of a better place to put this...
-
- I'm working on a sequel to my PI DEMO. A demo which has the first 18,000
- digits of PI in the scroll.
-
- I now have a file listing the first 1.25 Million digits of PI and I would like
- to come up with a compression method that will let me put as many digits
- possible in available memory...probably about 40K.
-
- So far, the best I can get is a 2.4:1 compress ratio. It works like this:
- Take the sequence:
- 123456789012
- 123 = 0001111011
- 456 = 0111001000
- 789 = 1100010101
- 012 = 0000001100
- These 40 bits equal 5 bytes:
- 00011110 11011100 10001100 01010100 00001100
- Thus, 12 digits in 5 bytes or 2.4:1
-
- Can anyone think of a better compression method? The reason I ask is that 0-9
- is only 10 different characters and there are 256 in a byte. 25:1???
-
- I know this is a weird request... :) But, I'd appreciate any help or
- suggestions. Thanks.
- ------------
- Category 5, Topic 3
- Message 35 Sun Jun 13, 1993
- C128.JBEE at 09:01 EDT
-
- Gullible,
- I have been thinking this over and believe I have found a solution, short
- of compression, that might work, especially with a series of numbers such
- as PI. Which is special in the way the numbers are (not;) sequenced.
-
- It takes 3 bits to represent a digit 0-9, but how about representing the
- difference from one digit to another instead of using a trinary solution?
-
- Example:
- Start the data flow with the first number
- then start reading everything in according to bits
-
- If the first bit is zero it means to use the next bit to add or subtract
- 1 from the number in the A,X, or Y register. Then display that number.
-
- 0000 0000 -> first bit=0 so use the next bit to determine if you should
- add or subtract, it is zero so subtract -1 from the A reg
-
- 0000 0010 -> first bit=0 so use the next bit to determine if you should
- add or subtract, it is one so add +1 to the A reg
-
- If you have a zero following the nine you would add one but write a zero
- to the register. So you would have to sacrifice speed for compression by
- doing comparisons to a table of rules that says if A is greater than nine
- (CMP) then A = 0
-
- If you have a sequence of numbers such as 4345 that would require 12 bits
- at least but using this method only 8 bits!
-
- Now what happens if the first bit encountered is a 1? Then use the
- next three bits to branch to a table that keeps spliting the table of
- remaining numbers in half. 01x3x56789
-
- 0135 6789
-
- Bit #2
- true false
- 0135 6789
- / /
- Bit #3 =1 Bit #3 =0
- true false true false
- 01 35 67 89
- / / / /
- Bit #4 =1 Bit #4 =0 Bit #4=1 Bit#4
- true false true false true false true flase
- 0 1 3 5 6 7 8 9
-
-
- The only draw back is the size of the table vs compression gained and the
- logic needed to keep track of where you are in the current byte (bit
- wise). I am not even sure it would compress the file better than using
- your method. But this is all I could think of taking into account the
- way PI is represented and not knowing the odds of a digit having or not
- having a number lower or higher than it, following it. Though I am sure
- the occurance of such is probably high. Hey, that in itself would make
- an interesting project :)
- ------------
- Category 5, Topic 3
- Message 36 Sun Jun 13, 1993
- GULLIBLE [Jon] at 15:58 EDT
-
- Thanks for the response. I hadn't thought about using a difference method. I
- am a bit confused as to how 4345 can be represented as 8 bits. If you have two
- bits that say subtract 1, then how do you know if those two bits mean subtract
- one or are the first two bits of a 3-4 bit sequence?
-
- I will look over your post in greater detail. I do believe that using math
- will yield the best results.
- ------------
- Category 5, Topic 3
- Message 37 Sun Jun 13, 1993
- C128.JBEE at 23:17 EDT
-
- If the first bit is unset (0), you know you are going to add or subtract
- with the bit following it. If the following bit is set you add one,
- if it is unset (0) you subtract one.
-
- So a sequence of numbers such as 4345 (remember we started with a number
- three) only requires two bits per digit because we are representing the
- change, not the digit. Since the sequence 4 3 4 5
- | | | |
- up one ____| | | |___ up one
- down one ______| |______ up one
-
- looks like that it would be represented in binary as
- 10100010
- -|-|-|-|(4 up one)
- | | |(3 down one)
- | |(4 up one)
- |(5 up one)
-
- 8 bits!
-
- You use the first bit to determine if you are going to be using two bits
- or four bits to determine the next number. So you will always have at
- least a 2x compression over the storing of just the numbers is ASCII
- form.
- ------------
- Category 5, Topic 3
- Message 38 Wed Aug 25, 1993
- T.RUTTER2 [Troy Rutter] at 19:17 EDT
-
- Hi again people, well, its time to jump on the bandwagon and TRY (crossing
- fingers) to finish my SIDplayer. As many of you have followed through the
- Ultrasid Player topic under Sight & Sound, my SID player plays the individual
- parts of the sid archives, msw, pil, wpl, sal, slr, etc... without having to
- dissolve them. The only thing holding me back is the words display. Right
- now the conversion time from in memory to display is awfully sloooooooow.
- Heres the scoop:
-
- For some odd reason, the creators of Singalong songs (Kermit and Joe I think?)
- decided to store the word files in standard ASCII instead of PETSCII. So...
- heres what happens in my program as it stands now. (Simplified of course) Im
- doing this as a basic source around ML subroutine... so bear with me...
-
- get location of words file, assign this to variable: WD
- create array wd$
- get character from memory
- compare - does it need to be converted?
- If so, convert
- If not, store as is in WD$(x)
- if peek(wd)=carraige return then x=x+1:go start over
- if peek(wd)=0 then start music, start wds display.
-
- This takes forever. I have also tried two other ways: 1) The "Index table"
- as it is referred to by ML experts. This works... but still bothers me...
- slow, plus i have no idea what im doing. 2) Display without storing in wd$.
- This is faster, but it is not guaranteed to display fast enough to keep in
- time with the mus flags.
-
- If anybody can take a look at some SID player source code and help me out, i
- would appreciate being enlightened on how to display the words. It seems like
- most sidplayers do some kind of banking so its automatic. I dunno. I have
- the source and object code in PAL (i think) of sidpic 3.4 if that would help.
- I REALLY want to get this sucker done before the next SID-Fest.
-
- Thanks,
- Troy
-
- ------------
- Category 5, Topic 3
- Message 39 Wed Aug 25, 1993
- CBM-ED [e.g.bell] at 21:26 EDT
-
- Troy:
- TR> I have also tried two other ways: 1) The "Index table" as it
- TR> is referred to by ML experts. This works... but still bothers
- TR> me... slow, plus i have no idea what im doing. 2) Display
- TR> without storing in wd$.
-
- If you are insistent on doing this display in BASIC, the 'Index Table'
- is the fastest possible if done correctly. What you are doing is
- creating a lookup table for conversion from ASCII to PETSCII. You use
- the numeric value of the ASCII character as an index into the table,
- which eliminates all IF statements, the REAL time hogs in a BASIC
- program, from the equation entirely.
-
- I would recommend doing the whole operation in ML, which would
- assure the needed speed, and if you shelled to it from BASIC, you would
- still be in control of the timing of the display. An added plus is
- that it would take far less memory to do in ML than it would in BASIC,
- particularly when you consider the elimination of the arrays, another
- BASIC time hog.
-
- TR> If anybody can take a look at some SID player source code and
- TR> help me out, i would appreciate being enlightened on how to
- TR> display the words. It seems like most sidplayers do some kind
- TR> of banking so its automatic. I dunno. I have the source and
- TR> object code in PAL (i think) of sidpic 3.4
-
- I will be happy to do that for the opportunity to get hold of the
- sid player source code. What you are requesting seems to me to be
- an extremely easy thing to do. However, when is the SID-Fest. I will
- have to get your source code quickly to get it done for you because
- I am leaving for vacation tomorrow night. On the upside, I can't
- imagine what you want taking any more than about 5 minutes to code
- once I have the source code. If you can't work with this time-frame,
- I hope you will still share the SID Player source code, which I've been
- looking for for a long time. I'm not planning anything that would
- 'compete' with your work, and not for the C64 at all. But how does all
- of this sound? I already have the lookup-tables in files from other
- programs.... You get the code uploaded tonight I may be able to have
- your solution first thing in the morning when I get home from work.
-
- (The above assumes we are talking ML source code, tho your mention of
- PAL format pretty much indicates that)
- ------------
- Category 5, Topic 3
- Message 40 Wed Aug 25, 1993
- R.KNOP1 [Rob Knop] at 22:25 EDT
-
- 5-3
-
- Troy- what exactly is done in the "compare" step where you decide if the
- string needs to be converted? Is this something that detects whether the
- string is PETSCII or ASCII, or is it done on a character-by-character basis?
-
- One thing that will help is to write a short ML subroutine to do your
- conversion for you... this will tend to make things faster. Once in ML, my
- favorite way to do these things it the "Index Table" method. Basically, you
- need to build a 256 byte table. Let AV be the ASCII value (known) of the
- character, and PV be the PETSCII value (desired) of the character. Then, the
- AV'th byte in the table is PV, assuming a properly built table. In other
- words:
-
- ldx #AV ; or wherever you find the ASCII value, put that in .X
- lda table,x
-
- At this point, .A will hold the PETSCII value, and you can stick it wherever
- you want it.
-
- -Rob
-