Date: Thu, 12 Feb 1998 22:14:50 -0500 From: Ajay Nath <AjayNath@compuserve.com> To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it> Subject: Valentines day present I got this email & thought other Fantasm users could benfit from it. >> In honor of Valentines Day we would like to give our customer's an extra 10% off of our already low prices. To qualify for the 10% off is easy, you only need to order via e-mail, fax, or on our convenient web site. So hurry and pay us a visit at <http://www.devdepot.com> and take advantage of our Valentines' Day Sale, its a limited time offer! (Orders must be received by midnight, February 16, 1998 to qualify) So don't forget to visit us this Valentines' Day weekend! And, as always its easy to order from Developer Depot when you order via any of the catalog's easy ordering channels. You can order via telephone (Toll Free at 800-MACDEV-1), email, fax, or on the online shopping basket which has 24-hour accessibility (via a continually updated website <http://www.devdepot.com>). Due to the overwhelming response expected, we cannot take phone orders at the discount price. If you need to speak to us by phone, send us an e-mail with your phone number and we will call you -- and you will still qualify for the discount. <<
Date: Fri, 13 Feb 1998 15:59:25 +0100 From: robot@writeme.com (Alok) To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it> Subject: Alok Hi, Well I have started to code a FireWorks simulation. It might be in the beginner's guide since it demands graphics, physics, etc.. but is at my level. I have just one question: I need to have a table, but I don't know how big it will be. I know it will be between 80 and 140 elements (each element being few words). For now on I'm using a 140 elements table, and my program works fine. But I would like to know just for my general knowledge, if there is a way of not wasting space. *********** If anybody got Inside Mac QD near by, where are the window coordinates (height) saved? (Else I'll go and get my books, but I must go now..) *********** Over here, what is the correct command? lwz alok(`bss) or lbz alok(`bss) alok: ds.b 1 ********* My main problems are arrising with Signed numbers and loading and saving them.... PLS HELP ME !!! THX A LOT Thx, Alok. email: robot@writeme.com
Date: Sat, 14 Feb 1998 06:14:23 +1000 From: mrwhippy@pac.com.au (Paul) To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it> Subject: Re: Alok Alok wrote: >Over here, what is the correct command? > lwz alok(`bss) >or lbz alok(`bss) > >alok: ds.b 1 neither. If you're going to use "alok: ds.b 1" then you should use "lbz r3,alok(rtoc)" If you want to use "(`bss)",then you should use "alok: rs.b 1" Paul
Date: Fri, 13 Feb 1998 17:30:38 -0600 From: ukulele <ukalele@huckel.cm.utexas.edu> To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it> Subject: (No subject) hi, i am new to fantasm and was given a task to transverse a string and add each character to a set, one at a time, ... i was wondering if someone would give me some clues??? that would be greatly appreciated. =) uku
Date: 13 Feb 98 15:58:13 -0800 From: Cliff Harris <cliff_harris@orangemicro.com> To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it> Subject: RE: (No subject) ukulele wrote: >hi, i am new to fantasm and was given a task to transverse a string and add >each character to a set, one at a time, ... Is the string in Pascal (length byte at beginning) or C format (zero terminated)?
Date: Sun, 05 Oct 1997 11:02:56 +0000 From: Paul <mrwhippy@pac.com.au> To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it> Subject: Re: (No subject) At 05:30 PM 2/13/98 -0600, you wrote: >hi, i am new to fantasm and was given a task to transverse a string and add >each character to a set, one at a time, ... >i was wondering if someone would give me some clues??? >that would be greatly appreciated. =) "given a task"? Might this be homework? Do you mean take a string and write it into a buffer in reverse order (1 byte at a time)? Paul
Date: Sat, 14 Feb 1998 01:58:39 +0100 From: bondard <bondard@ens.fr> To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it> Subject: Re: Valentines day present // developer depot problem Ajay Nath wrote: > > I got this email & thought other Fantasm users could benfit from it. >> >> To qualify for the 10% off is easy, you only need to order >> >> So hurry and pay us a visit at <http://www.devdepot.com> and take advantage >> of our Valentines' Day Sale, its a limited time offer! (Orders must be >>received by midnight, February 16, 1998 to qualify) >> Thank you for this information.. and perhaps I should give you also a bit of friendly info, about my experience with developer depot. (turn down the lights, pump up the volume) Some months ago I bought a lot of software from them, one of the most important being an UPGRADE, that is a low-priced new version of some software. They specifically requested proof of my ownership for the original software. I did not check their prices, believing they are a reference source for developers, therefore serious and honest (which goes to prove some developers *can* be pretty stupid, like I have been.) The very week after I paid them, I accidentally discovered they charged me the FULL price, not the much lower upgrade price. And what was the price difference ? The difference was ... (are you sitting down?).. it was ... well ... 200 hundred dollars! (yes, a two followed by two zeros, I'm not talking about being robbed of 2 dollars). These friendly guys overcharged $200. Well, I protested, wrote, flamed and tried to deal with them: they finally wrote saying they "are not habilitated to sell upgrades" (but they did call it "upgrade" in their price quote, and they did request proof of ownership for my original, so they clearly wanted me to *believe* I was buying an upgrade). (is it the end of the story already? perhaps not, maybe other people have had problems too) Well, that was developer depot, the friendly and honest developers' heaven. So now you're warned. Of course, since then, I buy elsewhere. But maybe this will help someone avoid the same problem, by being less trusting... ----------------- Daniel Bondard bondard@ens.fr -----------------
Date: Sat, 14 Feb 1998 11:13:44 +0000 From: Benny Ronnhager <benny.ronnhager@soderhamn.mail.telia.com> To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it> Subject: SCSI! Hi! I wonder where I can get some information about SCSI? Some sourcecode in 68000 assembler would be fine. Benny -- MIDI Universe Welcome to my little world in Cyberspace... http://w1.270.telia.com/~u27002261
Date: Sat, 14 Feb 1998 11:45:02 -0500 From: Stuart Ball <lightsoft@compuserve.com> To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it> Subject: NftT 14 Feb 98 News From the Tower 14th Feb '98. --------------------------------- Here's another one of those rather irregular news posts we put out from time to time, letting you know what's happening and coming up. These go out fairly infrequently so it's not exactly spam city, but if you do find this mail annoying, please get thee hence to <http://www.tau.it/lightsoft/links.html> where you may unsubscribe from this list. ------------ A. New test software B. Additions to WWW pages. C. Misc. ------------ A. New test software will be posted today to the public testing area as patches to the tools from the Fantasm 5 CD. This is hopefully the last alpha test. Please note that although this is the final alpha version, and the previous one appeared quite stable, this version has a large quantity of new code that may not work as advertized. We have tested it internally on both PCI and Non-PCI PowerMacs and find no problems. ***As always with test software, please make backups and use only on copies of your work.*** Assuming no errors/omissions with this build, the next version will be beta 1. Please send your feedback and bugs regarding this build to lightsoft@compuserve.com Changes since last weekend include: ANVIL a20 1. Installed Anvil's custom font. No longer uses Monaco. 2. Moving a window no longer affects the last modified date of that file (bug introduced in a16). 3. If using an external editor, it is now made the front application when Anvil requests it to open a file(s). a21 - bug fix - less "ghost" carats. a22 - bug fix - The error window was handled incorrectly if Anvil was in the background and building. a23 1. Anvil now accepts four apple events to control building and running a project remotely. Scripts are provided (compiled as apps). 2. "Hide status bar in BG" general pref changed to Hide Log and Status bar. You may not want the log window hidden if driving Anvil from an external editor. 3. Added "Cursor Depth Cue" to general prefs. When on and the mouse cursor isn't over the frontmost window (or something clickable, like the menu bar), the cursor will cast a shadow to show that whatever it is over is behind the frontmost object. 4. Fixed bug in native version of CCP call: A_get_ind_file Result is that the plug Assm_count_lines now works with native Anvil. 5. Major change: New tool unloader completed. Some tools and plugs now unload after use. 6. Changes for Fant 510 made to Anvil's "Directive help" file (available from the Help menu). Now indexed via a jumpable index. a25 1. A very minor but useful change. When Anvil is coming into the foreground, we now flush all keyboard related events (down, up and repeat). This prevents the very annoying problem of developing a program that does not call flushevents before quitting, and you have pressed a few keys whilst it is executing (and the app doesn't accept events). What would happen is the keys you have pressed would appear in your current source file in Anvil. Doesn't happen anymore. 2. Fixed save project template not working. 3. Stress-o-meter now requires far less processing time than before. FANTASM a20 Re-installed the Stall Warning Generator (SWG) and floating point definition directives df.s, df.d, dfsin.s and dfsin.d These now live in the same fragment as Fantasm rather than being loaded from a resource. This leads to faster operation. LXT LXT has been upgraded to V1.02 and includes some bug fixes and additional OS calls. All projects being translated with LXT should be upgraded and rebuilt with this new version. ------------------------------------ B. Additions to WWW pages this week include... 1. Mailing list archives to February posted. 2. Beginners Guide to PPC assembly language chapter 5 posted. ------------------------------------ C. Misc. 1. Antoine Rosset has made available the C source code for the PlayerPro library (a module player) in the PlayerPro 4.6 dev kit as a CWPro2 project. You can get the DevKit from <http://www.quadmation.com/pphome.htm> . If you don't have CW you can open the source files from within Anvil and set their language to C to get chroma coding. (Note, Anvil's C chroma coder is not officially supported at thimproper coloring - although it's not bad, it does have glitches). End Lightsoft 1645140298 GMT
Date: Sat, 14 Feb 1998 15:20:44 -0600 From: ukulele <chia.ccc@mail.utexas.edu> To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it> Subject: Re: (No subject) >At 05:30 PM 2/13/98 -0600, you wrote: >>hi, i am new to fantasm and was given a task to transverse a string and add >>each character to a set, one at a time, ... >>i was wondering if someone would give me some clues??? >>that would be greatly appreciated. =) > >"given a task"? Might this be homework? Do you mean take a string and write >it into a buffer in reverse order (1 byte at a time)? >> > >Paul > > nope, we were just having tooo much free time thus we would like to learn about fantasm, well, frankly speaking,yes, i guess what was obvious? well, the task also says that after the user inputs two strings, we need to output a union and an intersection of the two, or comparing the characters. can you give me some insights or codes or hints or something like that?
Date: Sat, 14 Feb 1998 15:28:21 -0600 From: ukulele <chia.ccc@mail.utexas.edu> To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it> Subject: RE: (No subject) >ukulele wrote: >>hi, i am new to fantasm and was given a task to transverse a string and >add >>each character to a set, one at a time, ... > >Is the string in Pascal (length byte at beginning) or C format (zero >terminated)? >> i think it is the pascal format, well, it would just be a >string that user inputs from the keyboard. The task says that after the >user enters two strings, we were to compare and contrast and print out >the union and the intersection of the two.well, the bigger problem that we >are having, besides coming with the correct codes, is how to do the shift >thing. can you give us some clues? appreciated.
Date: Thu, 10 Oct 1996 18:22:25 +0000 From: Paul <mrwhippy@pac.com.au> To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it> Subject: Frustration... As this is a forum for programmers (Fantasm,of course),many of whom possibly are or aspire to be - shareware authors,I feel this is an appropriate place to vent my spleen... <Rant Mode On> I don't know about you,but I am *well and truly* p-ed off with the amount of damn-useless shareware available on the internet.I'm not talking about those stupid apps that keep track of how many peanuts there are in a packet.I mean those time limited demos that are already invalid before you download them. When I eventually release some shareware,I'm going to cripple it so badly that it only fires up,then quits straight away without letting you do *anything*. I'll also put a time block on it,so it only works between 5:00am and 5:03am on some Tuesday morning 4 years ago.Then I'll write some spiel for the download site that makes it sound really good,and so it makes 1000s of people download it - only then will I feel justified to release a version to paying members that actually works. The biggest laugh will be on the paying mugs when they realise the app sucks anyway... <Rant Mode Off> Thanks, Paul
Date: Sun, 15 Feb 1998 11:35:40 -0500 (EST) From: Tim Humphrey <humphret@ruby.winthrop.edu> To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it> Subject: Re: Frustration... On Thu, 10 Oct 1996, Paul wrote: < Rantings on shareware > I guess since I'm officially a shareware author now I'll post my views on the subject of crippling, demos, etc. In regards to crippling I think that it should be done, but not so much that the program is totally useless until you register. Crippling the software should be done to convince potential buyers to buy the software, so certain functionality should be removed to promote this. Not being able to save from a graphics program is a good example. As to gutting core features I think you're shooting yourself in the foot as people won't be able to accurately evaluate your software and will just toss it. I also think that the programmers time shouldn't be spent trying to create some massively complex registration code system. Eventually some hacker is going to figure it out and will post the results on the Internet; alternativley, a customer will post his registration code on the Internet and thereby circumvent the protection the registration code is supposed to provide. Eliminating registration codes altogether and just distributing demos doesn't protect a program from hackers. When you release the full version to a person they could upload it to a newsgroup or on the Internet. (I've seen full versions of commercial programs on the Internet, sometimes as large as 33 megs!) In my opinion protection just serves to convince honest people to pay. If a person doesn't want to pay then they _will_ find other means to unlock the program. I personally won't cripple Mousigator too badly because I know how important shareware is to a computing community. To this day virtually all the software on my computer is shareware. Why, because I just can't afford to pay for all the commercial stuff out there. At the same time I want to be productive with my computer, so I end up downloading shareware programs to do my daily tasks. Sadly, I haven't even paid for all my shareware. Why, because I just can't afford to pay for all the shareware stuff out there. Luckily I don't have to because the shareware isn't so crippled that I can't use it, and thus it stays on my hard drive. Shareware lets more people, ordinary people without tons-o-dollars, use their computers productively. If all shareware crippled itself so that it lost its functionality then most people would be stuck with the bundled software that came with their computers. They would never be able to fully utilize their computers. Oh the software would be out there, but beyond their reach. That's why I became a programmer in the first place. Because my family couldn't afford to get a lot of software for my Apple //c when I was kid -- not after shelling out $2000 for the computer -- I learned how to program so that I could make my own software. I was really lucky that BASIC came free on the //c, otherwise that computer would have probably never been used -- and I wouldn't be a programmer today. This is why I value functional shareware and freeware. It provides an opportunity for people to use their computers in ways that they otherwise couldn't. I know this might sound sickingly optimistic to some people, but it's the way I feel. On the other hand, hopefully people who can afford to pay for shareware do. After all, it didn't just fall out of the sky from nowhere, someone had to write the program. Anyway, that's my opinion. ..._Tim_... --=[I know everything...just not at the same time.]=-- http://www.shack.org/zzhumphreyt zzhumphreyt@kagi.com
Date: Mon, 16 Feb 1998 06:18:24 +1000 From: mrwhippy@pac.com.au (Paul) To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it> Subject: Re: Frustration... Tim wrote: > >In regards to crippling I think that it should be done, but not so much >that the program is totally useless until you register. I agree entirely.With some time crippled demos I've found,they're out of date before I get them,and I'm just greeted with a message telling me to buy the shareware version if I want to use it.Without testing it first? Not likely! (BTW- I *was* joking about crippling my software that badly.It would be just a touch hypocritical :) >Crippling the >software should be done to convince potential buyers to buy the >software, so certain functionality should be removed to promote this. Yes.Live Picture did that and it was good because you could really *use* the program first.I still can't afford to buy it,but at least I know it's worthy if I ever find a bag of money washed up on the beach ;) >Not >being able to save from a graphics program is a good example. As to >gutting core features I think you're shooting yourself in the foot as >people won't be able to accurately evaluate your software and will just >toss it. Been there.Done that. >I also think that the programmers time shouldn't be spent trying to create >some massively complex registration code system. True - it's a waste of time anyway! "save-crippling" is probably the best way,because as you said,it encourages honest people to register.Dishonest people won't register it no matter how much protection you wrap it up in. >When you release the full >version to a person they could upload it to a newsgroup or on the >Internet. (I've seen full versions of commercial programs on the >Internet, sometimes as large as 33 megs!) I recently found a Photoshop 4.0 zip file on a web site at 54Mb.Like you'd bother trying to download it anyway.The site's so popular the transfer speeds are probably around 10b/s... Paul
Date: Sun, 15 Feb 1998 13:34:12 -0600 From: Santiago <oxygen@mail.utexas.edu> To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it> Subject: Re: Frustration... I've never really observed the problem of pathetically crippled or expired shareware. Most of the shareware that I use is system extensions, like the ever-useful Snitch, and these generally work on the principle of what I call "Annoyware". No functionality is missing from an unregistered copy, but it'll harass you on startup everytime with a pesky dialog. Applications as well sometimes use this principle, like GraphicConverter and DropStuff with Expander Enhancer for StuffIt. On the whole, I would say that this is a good compromise, allowing people to evaluate the product at full strength, but still providing and in-your-face incentive to pay. Especially in an environment where others can see your screen clearly, like an office, this can lead to shaming the user into ponying up the dough. As to people attempting to "crack" programs, I've always wondered why someone who is willing to waste hours on end trying to open up someone else's program and twiddle it isn't willing to just write their own. Then again, most of these individuals are probably "kewl warez doods" who have gigabytes of pirated software that they never even use and only keep around to brag to their friends with. And, most ironic of all, is that these individuals who refuse to pay for expensive software generally have already bought expensive CD-R devices to store it on. All in all, a rather strange and pointless situation. Just my 2 cents (or pence), Santiago
Date: Mon, 16 Feb 1998 22:47:56 -0500 From: Stuart Ball <lightsoft@compuserve.com> To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it> Subject: LS: VERY IMPORTANT MESSAGE Hello all, Just a short, but important note - DO NOT RELEASE ANYTHING ASSEMBLED WITH ALPHA VERSIONS OF FANTASM 5.1. Here's why: We validate the PPC assembler with a test file called f32val.s - this contains a list of 32 bit PPC instructions and valid addressing modes for each instruction. We assemble it, log it, print it out and compare the source with the assembled code (takes a while!). We fix the errors and then the assembler is revalidated until it passes. Fantasm V5.10 Alpha IS NOT VALIDATED. Only beta and release versions are validated. We do it right at the end of development for obvious reasons. 510b1 is due this weekend and will be validated. Stu.
Date: 17 Feb 98 07:25:09 -0800 From: Cliff Harris <cliff_harris@orangemicro.com> To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it> Subject: RE: (No subject) ukulele wrote: >>the bigger problem that we >>are having, besides coming with the correct codes, is how to do the shift >>thing. can you give us some clues? Don't try to shift. Use a counter as an index/offset into the string. You add the index to the pointer to the string to look at an individual character.
Date: 17 Feb 98 07:36:21 -0800 From: Cliff Harris <cliff_harris@orangemicro.com> To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it> Subject: Re: Frustration... Years ago I released an application as shareware. I never got even one cent, even though it was downloaded many hundreds of times. Since then I made everything I write freeware to help promote and aid the Mac community. I do get something financial out of my efforts, though. I have gotten several CD-ROMs with my stuff on them for free or very low cost. For example, I paid $5.00 for the latest AMUG BBS in a Box set of 4 CDs because of my contributions.
Date: Wed, 18 Feb 1998 12:14:46 +1000 From: mrwhippy@pac.com.au (Paul) To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it> Subject: Mouse down? Hello again, This works for the Button function,but ignores the StillDown call.Why? What's wrong with this? Loop: Xcall Button cmpwi r3,0 beq Loop Loop2: Xcall StillDown cmpwi r3,1 beq Loop2 Could someone point out what is no doubt a really simple error? :) Thanks in advance Paul
Date: Tue, 17 Feb 1998 23:53:35 -0500 From: Stuart Ball <lightsoft@compuserve.com> To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it> Subject: Mouse down? Hi Paul, StillDown checks if the mouse button has been continuously pressed since the most recent mousedown event (allegedly). Try this: Loop2: Xcall StillDown cmpwi r3,0 bne Loop2 Note the subtle difference for a true check. True is defined a NOT false in most systems which means the inverse of zero, or all ones. Although in the MacOS we have seen lots of variation on true being returned from various functions. This we figure because of the mixture of C, Pascal and assembler in the OS leading to true being 1, -1 or something that isn't zero. And of course the differences between a Pascal boolean and a C boolean (C is sometimes 16 or 8 bit (depends if there was any glue code in the way) , whereas in Pascal it can be (no, it is) a single bit (as it can in C of course if the programmer was thinking that way at the time). Best go for not zero=true. If this doesn't work, err, get another mouse :) Stu.
Date: Wed, 18 Feb 1998 00:30:10 -0500 (EST) From: Tim Humphrey <humphret@ruby.winthrop.edu> To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it> Subject: Re: Mouse down? On Wed, 18 Feb 1998, Paul wrote: > This works for the Button function,but ignores the StillDown call.Why? > What's wrong with this? > > Loop: > Xcall Button > cmpwi r3,0 > beq Loop > > Loop2: > Xcall StillDown > cmpwi r3,1 > beq Loop2 Are you trying to break out of loop2 when the user releases the mouse button? If so then what you wrote should work. Maybe if you explained a little more about what you're trying to do I, or someone else, could help more. ..._Tim_... --=[I know everything...just not at the same time.]=-- http://www.shack.org/zzhumphreyt zzhumphreyt@kagi.com
Date: Wed, 18 Feb 1998 19:33:22 +0000 From: Paul <mrwhippy@pac.com.au> To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it> Subject: Re:Re: Mouse down? Tim wrote: >Are you trying to break out of loop2 when the user releases the mouse >button? If so then what you wrote should work. Maybe if you explained a >little more about what you're trying to do I, or someone else, could help >more. Yes,that's what I was wanted to do,but it doesn't work.I'm going to heed Stu's comments (in an earlier reply to this list) and everything should be fine :) Thanks for the replies, Stu and Tim! Paul
Date: Wed, 18 Feb 1998 19:42:18 +0000 From: Paul <mrwhippy@pac.com.au> To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it> Subject: Sine/cosine etc Hello, Does anyone have,know of,or feel God-like enough to write some kind of tutorial about how to do sine and cosine stuff in assembler? I've heard the fastest way (but not perfect) is to use look up tables,but from there on - I'm lost :) It's something I'd really like to learn,but the only information I've found so far has been unnecessarily over technical - and thus not a lot of fun to wade through :( Paul
Date: 18 Feb 98 13:54:57 -0800 From: Cliff Harris <cliff_harris@orangemicro.com> To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it> Subject: RE: Sine/cosine etc Paul wrote: >I've heard the >fastest way (but not perfect) is to use look up tables The problem with lookup tables for something like this is that they are either small and "grainy" (low resolution) or BIG and accurate. The usual way is to calculate the values to put in the table during startup so that you can use the pre-calculated values later when you need the speed. I suppose you could also calculate the values externally and then put them in a resource or separate file. You can avoid the size problem somewhat by being smart about what values get put in the tables. For example, the negative values are the same as the positive values because the function is symmetrical about the x axis, so you can do some simple math to shift the x value before looking it up in the table. Also you may not need every value because of your usage. For example, if you plan on rotating an object and need to calculate the positions of the vertexes (vertici?) you can limit the angular resolution to 5 degrees per rotation so you only need to calculate the function for each 5 degree multiple. Just some thoughts. I've never had to do anything like this so I may have overlooked something obvious.
Date: Thu, 19 Feb 1998 14:03:46 +1300 From: Steven Brown <sgb@wave.co.nz> To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it> Subject: Re: Sine/cosine etc >Hello, > >Does anyone have,know of,or feel God-like enough to write some kind of >tutorial about how to do sine and cosine stuff in assembler? I've heard the >fastest way (but not perfect) is to use look up tables,but from there on - >I'm lost :) It's something I'd really like to learn,but the only information >I've found so far has been unnecessarily over technical - and thus not a lot >of fun to wade through :( > >Paul > > The main example for 'MOPS' (object oriented FORTH) (http://www.netaxs.com/~jayfar/mops.html) starts off with implementing a lookup table for SIN (IIRR). The discussion in the manual (a separate download from the MOPS system) should be detailed enough to allow you to do the same sort of thing in Fantasm. I'm not sure whether the example source comes with the manual or the other. Hope this helps, Steven
Date: Wed, 18 Feb 1998 20:28:45 -0500 From: Stuart Ball <lightsoft@compuserve.com> To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it> Subject: RE: Sine/cosine etc >I've heard the >fastest way (but not perfect) is to use look up tables Hi Paul, Further to Cliff's comments, if you do want a table, then you have a choice of two: In the source to the 68K maths library you will find a 16 bit integer sine table for values between 0 and 359 and a function called sin/cos that will return sin and cos of an angle in the range 0-359. If you want a floating point table of sines (PPC only), use the dfsin directives - you can create either a single or double sized table with dfsin.s or dfsin.d - both of these take a single parameter - an angle in degrees. I think the code for a complete floating point table using a repeat until loop is in one of the Fant manuals somewhere. Looks something like: float_sin_table: data angle: set 0 repeat dfsin.s angle angle: set angle+1 until_eq 360-angle To get cos from a sin table, take the input angle and sub 90 and if < 0, add 359 (it may be add - I can never remember if cos lags sin!) then do the look-up. Stu.
Date: Sat, 21 Feb 1998 16:06:37 +0000 From: Paul <mrwhippy@pac.com.au> To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it> Subject: Mouse down (again) Hello, I still can't get the Button/StillDown combination to work properly :( If I use StillDown first (wrong,I know),it acts the same as the Button function. The Button function immediately following the StillDown function in my code is then ignored.It doesn't seem to matter which order I put them in - one of them always gets ignored :( What seemed like a simple task,is slowly turning into a two week odyssey :) All I want to do,is draw a line with the mouse - like every drawing app for a thousand miles.This necessitates the Button/StillDown combination. I made the change that Stu suggested,but still no luck :( I even tried using a different mouse,but that didn't make any difference.Should I buy a rat instead? Any help or suggestions very happily received! Thanks in advance, Paul
Date: Sat, 21 Feb 1998 15:06:15 +0100 From: bondard <bondard@ens.fr> To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it> Subject: Re: Mouse down (again) Paul wrote: > All I want to do,is draw a line with the mouse - like every drawing app for > What seemed like a simple task,is slowly turning into a two week odyssey :) Hello Paul, I think your problem is incorrect usage of toolbox functions. The Button toolbox call returns the actual current state of the mouse button. You may think of it as a harware state. The StillDown toolbox call is very different: it implicitly refers to the last event the system recorded, since it reads the system event queue. It works in conjunction with WaitNextEvent for example. Think of it as a logical state of the system event queue. I do *not* recommend mixing the two, that's really asking for trouble ! You might do something like this (in pseudocode for readability): if Button then ; start drawing record the line starting point (using GetMouse) ; and now the loop you have problems with: while Button get the line ending point (using GetMouse) erase previous line (except the first time) draw line using the new line ending point ; end of the while loop ; end of the whole drawing routine: now there is a line ; on your screen Be aware that when doing this, you are not giving any time to the system, so the other programs are frozen. Cheers ----------------- Daniel Bondard bondard@ens.fr ----------------- Never believe that you know the last thing about any human heart Henry James
Date: Sat, 21 Feb 1998 09:06:14 -0500 (EST) From: Tim Humphrey <humphret@ruby.winthrop.edu> To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it> Subject: Re: Mouse down (again) On Sat, 21 Feb 1998, Paul wrote: > I still can't get the Button/StillDown combination to work properly :( On the StillDown part are you looping in response to a true from StillDown? I'm guessing that you know how to use the functions but I really don't know what else to say. I'm not sure about PPC assembly but can you step through your code to actually see what's going on? Maybe something isn't acting the way its supposed to. ..._Tim_... --=[I know everything...just not at the same time.]=-- http://www.shack.org/zzhumphreyt zzhumphreyt@kagi.com
Date: Sat, 21 Feb 1998 16:45:32 +0000 From: Benny Ronnhager <benny.ronnhager@soderhamn.mail.telia.com> To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it> Subject: I get strange link errors! HELP ME! Hi! I have a problem with Fantasm 5. I am working on a 68000 projekt. When I build this I get a 2 error's. 'METERINHIGH' and 'METERINWAIT' is declared as extern in the file 'Rxmidia.s', and is declared as global in the library that they belong to. Why am I getting link error's??? I don't understand! I have worked on this projekt every day for a couple of weeks and everything is working fine, but not this. I also have a file with the labels 'METEROUTHIGH' and 'METEROUTWAIT' and this file is treated in exactly the same way as the file with the labels 'METERINHIGH' and 'METERINWAIT'. The only difference as that it actually works without link error's. STRANGE! I hope you understand what I am writing. Here is the Log: Best regards Benny BUILD You can stop Build by holding down the ctrl+alt+apple keys. Anvil> Loading client: "DDBACC". DDBACC V1.00 LSA0017 17:09 on 28/9/97 DDBACC Installed. Phase 3 Checking for changes/dependencies... Anvil> Loading client: "A6868L". Assembling (A6868L) rxmidia.s Good assembly. Checking for more changes... Assembling (A6868L) txmidia.s Good assembly. Checking for more changes... Phase 3 end. Phase 4 Anvil> Loading client: "L68Lxx". Link68k V3.00 Build #487 1714 280997. CLightsoft 1994-1997 Link68k V3.00 Build #487 1714 280997. CLightsoft 1994-1997 Starting link. ***ERROR*** Rxmidia.s.o wants to link with METERINHIGH - but the reference doesn't exist. ***ERROR*** Rxmidia.s.o wants to link with METERINWAIT - but the reference doesn't exist. **Link errors** Link68K finished. Phase 4 end. Build finished. E R R O R S Took 13.51 seconds. -- MIDI Universe Welcome to my little world in Cyberspace... http://w1.270.telia.com/~u27002261 Benny Ronnhager benny.ronnhager@soderhamn.mail.telia.com 'The Dream Is Always The Same...'
Date: Sun, 22 Feb 1998 12:26:21 +0000 From: Paul <mrwhippy@pac.com.au> To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it> Subject: VBL tasks? Hello, Has anyone here got a PPC <VInstall> or <SlotVInstall> procedure that they would be prepared to share? I've looked over it a few times and I'm starting to think it's just a bit over my head.I'm trying to scroll a sprite around,and there's just too much flicker :( I'm plotting the pixels via a floating point register, but I really need a "wait for retrace" type procedure to get it smooth :) My biggest headache is filling out the VBLTaskRecord.It's a bit of a nightmare trying to understand this first time round :) Any help most welcome :) Thanks in advance, Paul
Date: Sun, 22 Feb 1998 06:42:26 +0000 From: Benny Ronnhager <benny.ronnhager@soderhamn.mail.telia.com> To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it> Subject: Re: VBL tasks? Hi Paul! Here is my vbl routine in 68000 code! I would suggest that you increase a number in the vbl routine and let the mainloop track if this number have changed. Then it's time to do some processing. If you have to much going on in the vbl routine it is going to be problems for the other vbl routines. Use as little time as possible in the vbl routine! Installvbl: Removevbl: vbl: Best regards Benny ;---------------------------------------------------------------------- _GetVideoDefault EQU $A080 _SlotVInstall EQU $A06F Installvbl: LEA vbl(PC),A0 ; Get address of my vbl routine LEA vblAddr(PC),A1 ; Get address of storage MOVE.L A0,(A1) ; Store it! LEA GetVideoDefault(PC),A0 MOVE.L A0,-(SP) DC.W _GetVideoDefault ADDQ.L #4,SP ; Correct stack pointer LEA GetVideoDefault(PC),A0 MOVE.W (A0),-(SP) LEA vblTask(PC),A0 MOVE.L A0,-(SP) DC.W _SlotVInstall ; install the vertical retrace task ADDQ.L #6,SP ; Correct stack pointer RTS vblTask: qLink: DC.L 0 qType: DC.W 1 vblAddr: DC.L 0 vblCount: DC.W 1 vblPhase: DC.W 0 GetVideoDefault: DC.W 0 ;----------------------------------------------------------------------- _SlotVRemove EQU $A070 Removevbl: LEA GetVideoDefault(PC),A0 MOVE.W (A0),-(SP) LEA vblTask(PC),A0 MOVE.L A0,-(SP) DC.W _SlotVRemove ; remove the vertical retrace task ADDQ.L #6,SP RTS ;---------------------------------------------------------------------- vbl: LEA vblCount(PC),A0 MOVE.W #1,(A0) ; no request: re-run -- MIDI Universe Welcome to my little world in Cyberspace... http://w1.270.telia.com/~u27002261
Date: Sun, 22 Feb 1998 09:36:42 +0000 From: Benny Ronnhager <benny.ronnhager@soderhamn.mail.telia.com> To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it> Subject: Re: VBL tasks? Hi again Paul! The reason you should use SlotVInstall instead of VInstall is the following. When you use VInstall you get an interrupt rate of 60 Hz, almost! Was it 60.15 Hz? That would not be so good if your monitor refresh rate is another. But with SlotVInstall the interrupt is coming every time the raster is at the bottom of the screen regardless of what the refresh rate is. And this is what you want, I think. Please correct me if a am wrong. :-) Thanks Ajay Nath for your exellent article in Mactech. Best regards Benny -- MIDI Universe Welcome to my little world in Cyberspace... http://w1.270.telia.com/~u27002261
Date: Sun, 22 Feb 1998 22:29:19 +0000 From: Paul <mrwhippy@pac.com.au> To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it> Subject: Re: VBL tasks? Benny wrote: >The reason you should use SlotVInstall instead of VInstall is the >following. When you use VInstall you get an interrupt rate of 60 Hz, >almost! Was it 60.15 Hz? That would not be so good if your monitor >refresh rate is another. Yes.SlotVInstall is the one I want - a kind of one size fits all thing :) Many thanks for the routines,Benny! Paul
Date: Sun, 22 Feb 1998 15:42:55 -0500 From: Ajay Nath <AjayNath@compuserve.com> To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it> Subject: Re: VBL tasks? >> Thanks Ajay Nath for your exellent article in Mactech. You are very welcome. The point of SlotVInstall vs VInstall was this. When Macs started to have video cards it was no longer true that the retrace of the screen might be every 60th of a second. Indeed nowadays most monitors refresh at a higher rate. So SlotVInstall lets you sync code to the monitors (video cards) refresh rate. Macs now have specific hardware which provides the old style "heartbeat" that the old Macs had & you can sync routines using this hardware reliably (as opposed to the "Slot" call).
Date: 23 Feb 98 12:17:18 -0800 From: Cliff Harris <cliff_harris@orangemicro.com> To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it> Subject: (No) colored text problem solved I found out that I couldn't get colored text because I had TextMode set to srcXor instead of srcOr. srcXor ALWAYS sets the pixel to black (on a white background) no matter what characteristics the source pixel has.
Date: Mon, 23 Feb 1998 21:22:37 +0100 From: j.w.hoop@mail1.remote.uva.nl To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it> Subject: re: link errors hi benny I'm not using fant 5 but my guess is that you have a typo in your build control file you link with Rxmidia.s.o wich you probably want to be Rxmidia.o best of luck jw
Date: Mon, 23 Feb 1998 19:28:16 -0600 From: chia.ccc@mail.utexas.edu (ukulele) To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it> Subject: bad link error hi, i have this bad link error for three days and i couldn't figure out why, i mean i when i built the source file, and fantasam said it is good assembly, but when i assembled it , fantasm told me that it has a bad link error, i checked the .bcf file too, but i didn't see anything wrong with it, so, can anyone who knows gives me some hint/ help? appreciated chia
Date: Tue, 24 Feb 1998 12:10:06 +0530 From: "N.K. Ambwani" <ambwani@giasbm01.vsnl.net.in> To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it> Subject: Re: Mouse down (again) Hi, I'm now spending some holidays in India, so I can't check out what I'm not sure about what I'm saying... I think that by checking the mouse state, you are removing it from the queue, so the OS can't detect a still down. BTW stepping through a program that checks for the mouse is very hard with macsbugs... They should improve that.... Alok (reply robot@writeme.com)
Date: Wed, 25 Feb 1998 10:38:56 +0530 From: "N.K. Ambwani" <ambwani@giasbm01.vsnl.net.in> To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it> Subject: Cards game Hi, I would like to write few cards games, but before I would like to create few functions so that others can also use it (for eg: detect click on card, move card, hide card (show the back side of it), shuffle cards, sort hand, etc..) I would like to know if anybody here is interested in helping me. Bye, Alok Reply robot@writeme.com (Suggestions are welcome).
Date: Wed, 25 Feb 1998 05:45:52 -0500 From: Stuart Ball <lightsoft@compuserve.com> To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it> Subject: News from the tower - 25 Feb 98 News From the Tower 25th Feb '98. --------------------------------- Here's another one of those rather irregular news posts we put out from time to time, letting you know what's happening and coming up. These go out fairly infrequently so it's not exactly spam-o-rama, but if you do find this mail annoying, please get thee hence to <http://www.tau.it/lightsoft/links.html> where you may unsubscribe from this list. --------------------------------------------------------------------------- - 1. Fantasm 5.10.0 Beta 1 2. Linking (all you ever wanted to know) 3. When contacting us... (a plea from Fluffy) --------------------------------------------------------------------------- - 1. Fantasm 5.10 beta 1 will be posted within a few days. Since the last alpha release some new features have been added and some bugs removed. People using the alpha versions of Fantasm 510 should note that the alpha versions of the PPC assembler would not produce correct code for move from/to special purpose registers. All other instructions were found to be correct when tested. Changes and additions from the last alpha to beta 1 as follows: Fantasm510b1: 1. If Fantasm runs out of memory whilst processing a macro, an error will be thrown rather than a crash. Increase Anvil's partition to cure. 2. Fixed mtspr and mfspr instructions which were not working in previous alphas. (via f32val.s) 3. Fixed a _very_ long standing bug in 68K assembler (since V1 actually!). Sometimes, the very first build of the day would produce this error: "Code size on pass 1 is different to code size on pass 2 error". It would assemble fine on subsequent builds. This was finally traced and fixed. (Well, we think it's fixed, but we've thought that before :-)). Additional instructions added: 4a. Floating Square Root fsqrt[s][.] is now accepted. fsqrt fx,fy This is an optional instruction not supported on all PPC processors. 601's for example do not support this instruction. Can be dotted. Can work with single sized data by appending an "s" to the mnemonic. b). Floating Reciprocal Estimate Single fres[.] is now accepted fres fx,fy This is an optional instruction not supported on all PPC processors. 601's for example do not support this instruction. Can be dotted. This instruction only works with single sized data. c). Floating Reciprocal Square Root Estimate frsqrte[.] is now accepted frsqrte fx,fy This is an optional instruction not supported on all PPC processors. 601's for example do not support this instruction. Can be dotted. This instruction only works with double sized data. Anvil2b1: 1. External editors are now launched if not running at the time Anvil wants to open a file. Place an alias to a text editor in Anvil's tools folder. Call the item "Editor". 2. When Anvil is being switched into the background, the cursor is now made the standard Mac black arrow. 3. Fixed colour sets. The data within a colour set was reversed in the PPC version. 4. More stringent checking of project integrity before writing a project to disk. If the project is deemed corrupt, Anvil will let you know and ask if you want to save any changed files before calling ExitToShell. The normal exit code will not be run as Anvil needs to quit as soon as possible. Saving any changed files should only be carried out if really necessary because if the project has become corrupt, then the possibility of other corrupt data (and code in 68K version) is high which may lead to a crash and corrupt files. 5. Ever wonder why we've never used APPLE J as a command key... Misc. menu>Jump to error - APPLE [J]. If Build produces errors or warnings that appear in the error window, you may use this menu command to step serially through (i.e. jump to) the errors. When you get to the end of the errors Anvil will beep once to indicate end of list. If you have "status bar to log" selected in your general prefs, you'll also get a message in the log window that there are no more errors. Note that this command works independently of clicking an error with the mouse. It starts at error #1 and every time you use it, it increments the error number until it gets to the end of the error list. When you get to the end, there is no way of resetting the count. This command saves a great deal of mouse clicking and swapping between error window and source windows! Especially handy for final builds of 68K projects with short forward branch advice enabled. Ex-Devpac users will recognize the command key :-) 5a. When jumping to an error from the error window, Anvil now displays the error string in the status bar. This status bar is locked (i.e. no other messages will be shown) until either: a). You press the mouse button. b). You close a window. Starting a Build will automatically close the error window and so unlock the status bar. 6. Change to the routine that calculates the machine speed rating. Now calls a few memory manager, quickdraw and timing functions during the test loop. ---------------------------------------- 2. Over the past week or so we have received a few questions about linking, hence here is an idiots guide to linking. All you ever wanted to know and then a little bit more... Q: What does a linker do? A: It takes the machine code generated from your source files, looks at them for "holes", tries to fill the holes, and then write one big chunk of code (your program) to disk. Q: Where do these holes come from? A: These holes are left there by the assembler. It leaves holes when it doesn't have enough information to fill the hole correctly. Consider this simple line: bsr fred This tells the assembler to generate a bsr instruction and fill in the address of (in the case of a branch, it's an offset from "here" to) fred. The assembler can do this easily if the label fred is defined in this file. On pass 2 the assembler knows the addresses (relative to zero) of all code labels - so it takes the difference between here and fred and puts that in the instruction. Now assume that fred was not defined in this file, but in some other file. On pass 2 the assembler looks for fred and doesn't find it. How can it fill the hole in? It can't. So it'll throw an error - something like "The label fred is not defined in this file and has not been declared as an extern". We need to fix the error. This can be done by "declaring" fred as "external to this file". We do this with the extern directive: extern fred Now the assembler knows fred isn't in this file, so leaves the hole blank and adds the label fred to an internal list that gets put in the object file which says: "address x needs to be filled with the offset to fred please". Where x is the assembled address of the bsr instruction. Basically, the assembler has shunted the responsibility to something else - the linker. But, the file will be assembled with no errors. We haven't got an executable yet, but we also have no errors :-) The linker then reads this object file and scans the list generated by the assembler. It sees that address x needs to be filled with an offset to fred, so it starts searching another list looking for fred. If it finds it, it can plug the original hole. If it doesn't find it it will throw an error like "the file xyz wants to link with fred but the reference can't be found". This other list it searches is filled by the linker as it reads files in. The list is generated from all the "global" definitions found in the object files. For a label to "link up" correctly, it must be declared as: extern in the file that wants access to it and global in the file that contains the label. This will keep the linker (and Rob :)) happy. In 68K that's basically it - you can "link to" either code or data. As long as the label is declared as global in the file that contains it, and extern in the file that wants to reference it, all will be fine. In PPC it's slightly different, in that to "link to" data, the data has to be declared with an extern_data directive in the file that wants to access the data, and again, global in the file that contains it. (Note, because of the inherent commenting value of this directive, Fantasm 5.1 allows you to use extern_data in 68K too). If you don't like the directives global and extern, there are aliases for these such as public, xref etc. See the user manual. But you may ask, what about libraries? Yep, good question. Normally, linking with these is trouble free, but a particular problem can crop up that you need to be aware of. Our linkers when linking with a library do not just read the _whole_ library and merge it in with your program. People write some big libraries and including what may be many tens of K of code just to use one measly function is not a "good move". Imagine you have written a big string library - say 70K (yep, thats a big, nay, huge library), and in your program you just use StrCpy which is some 50 bytes, you really don't want your program growing by 70k just to use one function. So, our linkers "extract" functions from libraries as you call them. Functions not called are not included. This is generally considered as being a "good thing". Apart from in one case (and this is a very important "must know"): If you try to link to data contained in a library function _before_ you call that function, the link will fail and if you don't know what's going on, it can be very frustrating. The link will fail because the function containing the data you are trying to link to hasn't been extracted from the library yet - it's only extracted when you 'call" the function. i.e. the linkers don't check if they need to extract a function on a data reference, only on a code reference. If necessary you can get the function "in-scope" with a dummy bsr or bl instruction. Just put it in the source file where it won't be run. Or you can change your link order (see LSA0005) so the function is called before the data is referenced. Finally, do not use the Librarian to create libraries with - it is mainly designed for viewing libraries. And whilst it can create libraries and add functions, you are really wasting your time. Just create a project and set LibMake68K or LibmakePPC (as appropriate) as the linker. The librarian will dissappear within the next few releases. ------------------ 3. We always love getting mail from our users. Below you'll find some simple information which will help when you email us. Please try to include as much of the following information as possible: a) Name (Amazing how many people forget this - it saves us a search of the database which is not normally readily available (means making sure ethernet string is plugged in, switching machines on, mounting disks etc)). Figuring out a name from an email address is sometimes difficult. Being human, we like to be able to say "Hi Fred" rather than a generic "Hello!". b) Registration number if available. Not too important though. c) Basic machine details - Mac or PowerMac is sufficient. This helps us a great deal if you are reporting a bug. It's tempting to just think we know who you are, and in ma but now we have hundreds of users all over the world and it is getting harder to remember details. Please, at least your name is very helpful. Thanks In Advance, Stu. Fluffy's telling me I'm begging for sarcasm from some users here :-) -------------------- End Lightsoft 10:30 250298 GMT
Date: Thu, 26 Feb 1998 18:28:18 +0000 From: Benny Ronnhager <benny.ronnhager@soderhamn.mail.telia.com> To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it> Subject: Screen memory in Macintosh computers! Hi! I have a question about screen memory's in Macintosh computers. I wonder if there are some kind of screenpointer so I can switch between 2 different screen's very fast. Benny -- MIDI Universe Welcome to my little world in Cyberspace... http://w1.270.telia.com/~u27002261
Date: Thu, 26 Feb 1998 16:24:56 -0500 From: Ajay Nath <AjayNath@compuserve.com> To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it> Subject: Screen memory in Macintosh computers! if you are trying to do some animation then you should look into using 1) the Sprite Animation Toolkit (SAT) you can find a link to it at http://www.wwu.edu/%7En9145339/progmac.html which is a mac game programmers page or 2) DrawSprocket by Apple
Date: Fri, 27 Feb 1998 01:27:34 +0100 From: "Allan Jensen" <maccoder@post6.tele.dk> To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it> Subject: Re: Screen memory in Macintosh computers! I've seen it done. I think it was Brollo who in 640*480 resolution made such a double-buffer. As far as I know the examples are still on the Lightsoft WWW-page. HOWEVER, it's probably very illegal, and give you more trouble than it's worth. But don't give up and switch to c-libraries (Sprite Animation Toolkit). Can't you reach an acceptable speed by splatting the screen with the FPU. The double-buffer routine in the lightsoft example game has always worked nicely for me. Allan
Date: Sat, 28 Feb 1998 21:33:02 -0500 From: Stuart Ball <lightsoft@compuserve.com> To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it> Subject: Fant510b1 Hello all, In the notes for the 510beta1 released today, we requested feedback on a bug we were unable to reproduce regarding equating a floating point register to a label. For example: fred: reg f1 A user (Yves Anciant) has sent in a project which causes the failure on our Macs, hence we no longer require feedback on this one. It should be fixed in the next beta version. Stu. Stuart Ball, Lightsoft.
Date: Mon, 2 Mar 1998 15:15:40 +1000 From: mrwhippy@pac.com.au (Paul) To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it> Subject: Quickview? Hello All, I've just downloaded a QuickView document but I can't open it :( I've had a look through various apple sites,but I can't seem to find the QuickView app anywhere. The closest I've got is a document explaining how to install it... Could someone tell me if this is free/shareware and a URL where to find it? Thanks in advance, Paul
Date: 02 Mar 98 07:44:31 -0800 From: Cliff Harris <cliff_harris@orangemicro.com> To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it> Subject: RE: Quickview? mrwhippy wrote: >I've just downloaded a QuickView document but I can't open it :( I've had a > >Could someone tell me if this is free/shareware and a URL where to find it? > The QuickView I have on my hard drive came with CodeWarrior. Get Info shows that it was written by Jordan Zimmerman with a copright by Altura Software, Inc.
Date: Mon, 2 Mar 1998 18:45:14 +0100 From: robot@writeme.com (Alok) To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it> Subject: Alok's competition Hi, Well I haven't recieved anything for my competition and the date I had set is pasted (28/2/98). Well I wouldn't mind if some of you send me something, else we wait for some time and I'll organise something in a better way, getting other people to download the Fantasm Demo to participate in my competition... Bye, Alok email: robot@writeme.com
Date: Mon, 2 Mar 1998 20:06:44 +0100 From: robot@writeme.com (Alok) To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it> Subject: Re: Quickview? >Hello All, > >I've just downloaded a QuickView document but I can't open it :( I've had a >look through various apple sites,but I can't seem to find the QuickView app >anywhere. The closest I've got is a document explaining how to install >it... > >Could someone tell me if this is free/shareware and a URL where to find it? > >Thanks in advance, >Paul You're lucky: http://www.jumbo.com/pages/programming/mac/languages/quickedit2.7.sit.hqx.do wnload.htp email: robot@writeme.com
Date: Tue, 03 Mar 1998 08:46:29 +0000 From: Paul <mrwhippy@pac.com.au> To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it> Subject: Re:re QuickView Hello, Thanks to Cliff and Alok for the replies re QuickView. I checked out the Url you suggested Alok,but it's not the right QuickView app :( Cliff has the right one :) I need it to read some of the newer apple tech manuals.I don't know why they didn't stick with pdf or docviewer format like the old ones :( If it's not too big,could someone send me a copy via Stuffit (not binhexed)? I don't have a C compiler,and I can't find a copy of the Toolbox helper CD thing from Apple in any of the shops I've been to :( I'd be happy to wing something back in exchange... Many thanks in advance, Paul
Date: 04 Mar 98 13:02:23 -0800 From: Cliff Harris <cliff_harris@orangemicro.com> To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it> Subject: Modal Dialog FilterProc I am implementing the keyboard equivalents to clicking the OK and Cancel buttons in a modal dialog box. For years I have used InvertRoundRect in my FilterProc to change the appearance of the button after the keypress. Now I find with Apple's new platinum appearance in OS 8 that the button turns yellow (ugly) instead of black. I have tried all kinds of things, like SetControlColor with an appropriate 'cctb' (didn't do anything that I could see), etc. I just want my button to turn dark gray when I press the appropriate key. I see that everybody else seems to be able to do this, why not me? I have been reading a new book called "Mac Programming FAQs", and found mention of a routine called GetStdFilterProc. Supposedly this will return a FilterProc UPP that will handle <esc>, <return>, <enter> and Cmd-period, which is just what I want. GetStdFilterProc is an undocumented routine, but it *IS* in the Anvil dialogs.def file. Unfortunately, you're supposed to use CallModalFilterProc to use the StdFilterProc routine. This call is NOT in the Anvil defs. I tried to use the StdFilterProc UPP in my call to ModalDialog, but that didn't work. My question is: how do I get StdFilterProc to do its thing in my application?
Date: Wed, 4 Mar 1998 17:15:45 -0500 From: Ajay Nath <AjayNath@compuserve.com> To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it> Subject: Modal Dialog FilterProc To learn about how to implement dialog filter procs using PPC code take a look at the files dialog dialogCode.s & dialogFilterCode.s in the code for my app URLtility. They show one way of doing it that has worked fine for me. The following routines are in Sys 7 & greater & help one to implement the default dialog box interface: SetDialogDefaultItem, SetDialogCancelItem, SetDialogTracksCursor These routines tell the system which items to use as the default items. Then the system will handle things like hilighting the OK button & handling key events like the "esc" key or cmd-period. Its all in the source code...take a look.
Date: 04 Mar 98 16:00:28 -0800 From: Cliff Harris <cliff_harris@orangemicro.com> To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it> Subject: RE: Modal Dialog FilterProc Ajay Nath wrote: >To learn about how to implement dialog filter procs using PPC code take a >look at the files dialog dialogCode.s & dialogFilterCode.s in the code for >my app URLtility. They show one way of doing it that has worked fine for >me. > >The following routines are in Sys 7 & greater & help one to implement the >default dialog box interface: > >SetDialogDefaultItem, SetDialogCancelItem, SetDialogTracksCursor I don't need these guys because I defined my OK button as item 1 and my Cancel button as item 2 in my DITL resource. I'll check out your code. Thanks for the info.
Date: Wed, 4 Mar 1998 21:51:47 -0500 (EST) From: Tim Humphrey <humphret@ruby.winthrop.edu> To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it> Subject: Re: Modal Dialog FilterProc On 4 Mar 1998, Cliff Harris wrote: > I am implementing the keyboard equivalents to clicking the OK and Cancel > buttons in a modal dialog box. For years I have used InvertRoundRect in > my FilterProc to change the appearance of the button after the keypress. > Now I find with Apple's new platinum appearance in OS 8 that the button > turns yellow (ugly) instead of black. Why not use _HiliteControl to hilite your button? Not only will it be compatible with the Appearance Manager, and Kaleidoscope, but also standard System 7; the button will change to the appropriate color. To implement a dialog filter procedure you just have to pass its address to a dialog creation routine -- _StopAlert, _NoteAlert, etc. It is called as a pascal function like this: function eventFilter(the dialog: dialogPtr; VAR theEvent: eventRecord; VAR itemHit: integer): boolean This comes from Inside Mac: Macintosh Toolbox Essentials page 6-145 Once called you can test for keydown events, mouse clicks, the standard events. ..._Tim_... --=[I know everything...just not at the same time.]=-- http://www.shack.org/zzhumphreyt zzhumphreyt@kagi.com
Date: Wed, 4 Mar 1998 22:44:04 -0500 From: Ajay Nath <AjayNath@compuserve.com> To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it> Subject: RE: Modal Dialog FilterProc >> >SetDialogDefaultItem, SetDialogCancelItem, SetDialogTracksCursor I don't need these guys because I defined my OK button as item 1 and my Cancel button as item 2 in my DITL resource. << Yes but then the system will automatically hilite the item you tell it is the "OK" button & it will automatically handle the esc button & cmd-period & such. It will even track the cursor & change it into an IBeam when it is in an editable text item. If all you want is the border around your "OK" button then you do indeed want to call these routines so that the system does the work & does the right things (handle events in a standard way - for example some old apps dont handle the "esc" key..if they had used SetDialogCancelItem the system would handle them properly).
Date: Wed, 4 Mar 1998 22:52:04 -0500 From: Ajay Nath <AjayNath@compuserve.com> To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it> Subject: Re: Modal Dialog FilterProc >> To implement a dialog filter procedure you just have to pass its address to a dialog creation routine << It isn't that easy in PPC code though as you have to actually create a universal procedure pointer to your filter procedure & then pass it to these routines. Just look at my source code & then ask me any further questions.
Date: 05 Mar 98 08:03:43 -0800 From: Cliff Harris <cliff_harris@orangemicro.com> To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it> Subject: Re: Modal Dialog FilterProc Tim Humphrey wrote: > Why not use _HiliteControl to hilite your button? HiliteControl will *DIM* the button. What I want to do is have it go to the dark gray state that you see if you click and hold down the mouse button in the button. I'll even settle for plain dark gray. OS 8 gives a graduated gray with hilites along the bottom and right edge that gives the button a 3D look. Ajay Nath wrote: >some old apps dont handle the "esc" key..if they had used SetDialogCancelItem the system would handle them properly). The old apps didn't use SetDialogCancelItem because it wasn't available then. I am explicitly using InsetRect and FrameRoundRect to delimit the default button, which is required to be compatible with older systems. OS 8 then erases the button and draws its own 3D button in its place. As i said earlier, I have been hiliting the button for years with InvertRoundRect. This changes the white button with black text to a black button with white text. The problem is that the "platinum" look when inverted turns out to be yellowish. You can also see this if you drag items on the desktop. You'll get yellow outlines of your windows or multiple icon selections. So Apple hasn't fully handled this problem either. My current situation is that I have implemented GetStdFilterProc and used CallUniversalProc. What happens is that the dialog box gets dismissed immediately after hitting the <esc> key. There is no hiliting or delay. I tried SetDialogDefaultItem and SetDialogCancelItem, but that didn't help. I have snooped around with MacsBug a little and see that the dialog pointer I am passing to StdFilterProc is not correct. I stashed it on a stack frame on entry and am loading it into the register from there so I don't understand the problem yet. When StdFilterProc returns the result is FALSE, meaning the keypress wasn't handled. I'll be looking into this later today.
Date: Thu, 05 Mar 1998 18:41:50 +0000 From: Benny Ronnhager <benny.ronnhager@soderhamn.mail.telia.com> To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it> Subject: Macsbug problems! Hi! Two questions today! 1. I wonder how I should use Macsbug in PowerPC assembler? I use the illegal macro to enter macsbug, that works. Then I use pc=pc+4 to jump over the illegal instruction. That works. But when I step the first instruction my Mac 6100/60 locks, every time! The instruction I am trying to step is this: ---------- Lvl2DT: EQU $1B2 entry start_up illegal li r10,Lvl2DT ---------- 2. Is there some kind of application that I can use to test the ram memory in my Mac? Benny -- MIDI Universe Welcome to my little world in Cyberspace... http://w1.270.telia.com/~u27002261
Date: Thu, 5 Mar 1998 14:27:17 -0500 (EST) From: Figaro Tea <humphret@ruby.winthrop.edu> To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it> Subject: Re: Modal Dialog FilterProc On 5 Mar 1998, Cliff Harris wrote: > HiliteControl will *DIM* the button. What I want to do is have it go to > the dark gray state that you see if you click and hold down the mouse > button in the button. I'll even settle for plain dark gray. OS 8 gives a > graduated gray with hilites along the bottom and right edge that gives the > button a 3D look. Are you sure HiliteControl doesn't work. I've used it and it works. I don't have access to my computer at the moment but I think that you can pass different values to the function to make it hilite different things, i.e. one value to highlight the control, another to dim it, another to un-dim it. The function does work though, trust me! ..._Tim_...
Date: 05 Mar 98 13:25:04 -0800 From: Cliff Harris <cliff_harris@orangemicro.com> To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it> Subject: Re: Modal Dialgo FilterProc I solved the problem kinda sorta. I found out that GetStdFilterProc was trashing my DialogPtr on my stack frame. I don't know if I didn't do the stack frame correctly or what. I worked around it by using my dialog pointer from `bss, which I had put in the dialog record refCon. I also found out that I do have to use SetDialogDefaultItem and SetDialogCancelItem to get the system to do the hiliting. The stack frame thing still bothers me, so I'll look into that later. Just out of curiosity, aren't the two SetDialogxxxItem calls part of System 7.x? And doesn't the PowerPC require System 7.x? If those two questions are answered in the affirmative, then I will be safe in using these routines in PPC native code, right?
Date: 05 Mar 98 14:06:56 -0800 From: Cliff Harris <cliff_harris@orangemicro.com> To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it> Subject: Re: Modal Dialog FilterProc Figaro Tea wrote: >Are you sure HiliteControl doesn't work. I've used it and it works. I >don't have access to my computer at the moment but I think that you can >pass different values to the function to make it hilite different things, >i.e. one value to highlight the control, another to dim it, another to >un-dim it. The function does work though, trust me! > The only "legal" values for a button are zero and 255. I never tried any other values on a button. I suppose you could write a loop that would go through all the values with a time delay between each one so you could see what is happening. Gee, I think I sense an experiment coming on!
Date: Thu, 5 Mar 1998 17:15:13 -0500 From: Ajay Nath <AjayNath@compuserve.com> To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it> Subject: Re: Modal Dialog FilterProc >> I am explicitly using InsetRect and FrameRoundRect to delimit the default button A lazy way to do this is to just call SetDialogDefaultItem & have the system do it for you. An old trick that I used to do was to go into a paint program & then draw a rounded rectangle. Then I pasted it into my apps resource fork as a PICT. Then when I wanted to have the ok button look outlined I just put the pict around it in resedit. This won't really work right anymore because the new Platinum look uses a different way of outlining the default OK button. Did you make sure to declare your filterproc as a TOC routine (in PPC asm)? Did you construct a fake transition vector for it in your globals? Did you remember to create a Universal procedure pointer to it? Did you remember that you have to restore your `bss reg value in PPC asm if your filter proc is going to call other routines in your app? Did you remember that the filter proc has to return -1 as a true value (not $0100)? There are lots of gotchas to dialog filter procs! It will be a lot easier to just look at my source code & then ask me questions about it.
Date: Thu, 5 Mar 1998 23:19:44 +0100 From: MoonDark <moondark@enter.it> To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it> Subject: Re: Macsbug problems! On 05/03/1998 19:41 Benny Rnnhager at benny.ronnhager@soderhamn.mail.telia.com >1. I wonder how I should use Macsbug in PowerPC assembler? I use the >illegal macro to enter macsbug, that works Use XCall Debugger, it's better >2. Is there some kind of application that I can use to test the ram >memory in my Mac? Spotlight is a good memory debugger, sorry if that wasn't what you were asking about. Mario
Date: Thu, 5 Mar 1998 17:18:57 -0500 From: Ajay Nath <AjayNath@compuserve.com> To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it> Subject: Macsbug problems! To make your app enter into macsbug: 1) first make sure that macsbug is installed properly & that you have the latest version (mine is 6.5.4a3c1 & works on my PPC with sys 8) 2) use the Debugger toolbox call just do: Xcall Debugger this is the cleanest way of getting into macsbug at a specific point in your program
Date: Thu, 5 Mar 1998 22:21:38 -0800 From: Kevin Avila <kevin@cache-computing.com> To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it> Subject: Re: Macsbug problems! >Spotlight is a good memory debugger, sorry if that wasn't what you were >asking about. mmmm. Spotlight. Anyone who does not have this, your missing out. Matt Slot @ Ambrosia SW talked me into getting it, and, well, it's my new best friend....but it don't work with Fantasm, gotta use MPW or the like the creates a .xSYM debugger image. You can get more info from http://www.onyx-tech.com/ +--------------------------+-----------------------------------+ | Kevin Avila | Cache Computing | | Developer Theoretician | kevin@cache-computing.com | | | http://www.cache-computing.com/ | +--------------------------+-----------------------------------+
X-Listserver: Macjordomo 1.1a23 - Macintosh Listserver by Michele Fuortes Date: 06 Mar 98 07:37:10 -0800 From: Cliff Harris <cliff_harris@orangemicro.com> To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it> Subject: Re: Modal Dialog FilterProc Ajay Nath wrote: >>> I am explicitly using InsetRect and FrameRoundRect to delimit the >default button > >Did you make sure to declare your filterproc as a TOC routine (in PPC asm)? Yes >Did you construct a fake transition vector for it in your globals? Yes >Did you remember to create a Universal procedure pointer to it? Yes >Did you remember that you have to restore your `bss reg value in PPC asm if Yes >your filter proc is going to call other routines in your app? Yes >Did you remember that the filter proc has to return -1 as a true value (not >$0100)? Yes I took out the FrameRoundRect because the OS was taking care of it. Now I find that the button is not getting framed on my PowerBook 5300cs running 7.6.1 so the FrameRoundRect is going back in. I found out that my stack frame was all messed up, OS-wise. I assumed that the stack pointer and everything above it was sacred. Now I find that there is this 56 byte area that I have to add in. The article on PPC assembly language in develop magazine says the stack pointer has to be 8-byte aligned and Kacmarcik says it must be 16-byte aligned. Who do you believe? I'm going to look into the stack frame situation further because I don't yet understand all the ramifications here. My code is now working fine as long as I don't make my stack frame larger than 76 bytes. Anything over that and I get a crash at EmToNatEndMoveParams+20, before the system even gets to my FilterProc.
Date: 06 Mar 98 07:38:45 -0800 From: Cliff Harris <cliff_harris@orangemicro.com> To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it> Subject: Re: Macsbug problems! MoonDark wrote: > >Use XCall Debugger, it's better > The problem with Xcall Debugger is that it stomps on r3, so you have to allow for that in your code or place the Xcall where it won't matter.
Date: Fri, 06 Mar 1998 18:11:27 +0000 From: Benny Ronnhager <benny.ronnhager@soderhamn.mail.telia.com> To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it> Subject: Translate! Hi! I want to translate this 68000 code to PowerPC code. I have tried so many ways but It does not work. I NEED HELP! Benny ------------------------------ Here is my 68000 code that works. ; Interrupt vector equates Lvl1DT: EQU $192 ; 6522 equates VIA: EQU $1D4 vT1CH: EQU $A00 vT1L: EQU $C00 vACR: EQU $1600 vIER: EQU $1C00 MOVE.L #Lvl1DT,A0 ; Point to level1 dispatch table LEA CounterIntHand(PC),A1 ; Point to new interrupt handler MOVE.L A1,24(A0) ; Put it in the dispatch table MOVE.L VIA,A1 ; Point to the 6522 chip ORI.B #$40,vACR(A1) ; Set the timer to free run mode MOVE.B #$C0,vIER(A1) ; Enable timer interrupts MOVE.B #$FF,vT1L(A1) ; Set timer lobyte MOVE.B #$FF,vT1CH(A1) ; Set timer hibyte 1: BRA 1 CounterIntHand: ------------------------------ Here is my PowerPC code that does not work. ; Interrupt vector equates Lvl1DT: EQU $192 ; 6522 equates VIA: EQU $1D4 vT1CH: EQU $A00 vT1L: EQU $C00 vACR: EQU $1600 vIER: EQU $1C00 li r10,Lvl2DT la r11,CounterIntHand(rtoc) stw r11,24(r10) li r11,VIA lwz r11,(r11) lbz r16,vACR(r11) ori r16,r16,$40 stb r16,vACR(r11) li r16,$C0 stb r16,vIER(r11) li r16,$FF stb r16,vT1L(r11) stb r16,vT1CH(r11) 1: b 1 CounterIntHand: -- MIDI Universe Welcome to my little world in Cyberspace... http://w1.270.telia.com/~u27002261 Benny Ronnhager benny.ronnhager@soderhamn.mail.telia.com 'The Dream Is Always The Same...'
Date: 06 Mar 98 11:53:10 -0800 From: Cliff Harris <cliff_harris@orangemicro.com> To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it> Subject: Re:re QuickView Try this one: ftp://dev.apple.com/devworld/./Technical_Documentation/Toolbox_Assistant_U pdates/
Date: Fri, 6 Mar 1998 21:31:37 +0100 From: MoonDark <moondark@enter.it> To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it> Subject: Re: Macsbug problems! On 06/03/1998 16:38 Cliff Harris at cliff_harris@orangemicro.com >The problem with Xcall Debugger is that it stomps on r3, so you have to >allow for that in your code or place the Xcall where it won't matter. Exactly, though whenever I need to use it I keep in mind that it's just a trap like any other and then it is necessary to take adeguate register backup measures, in any case, the "Debug" directive (not the case, unlike the 68k one) also works, though I'm not sure what it translates to and whether it saves r3 or not, I'll check. Mario
Date: Fri, 6 Mar 1998 15:49:57 -0500 From: Stuart Ball <lightsoft@compuserve.com> To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it> Subject: Macsbug problems! Benny wrote.. >1. I wonder how I should use Macsbug in PowerPC assembler? I use the >illegal macro to enter macsbug, that works. Then I use pc=pc+4 to jump >over the illegal instruction. That works. But when I step the first >instruction my Mac 6100/60 locks, every time! Hi Benny, It may be that the version of the OS you are using (7.1.2?) and the version of MacsBug is incompatible? I would suggest you upgrade your OS to at least 7.5.5. (steer very clear of 7.5.3) I do remember that for 7.5.2 and below we used Macsbug 6.2.2 with no problems. You can download OS updates to 7.5.5 from Apple on the WWW. Currently we run os8.1 and Macsbug 6.5.4a3c1 no problems (apart from once you switch "heap scrambling" on, it won't switch off again - you have to reboot!) Probably the simplest solution is to upgrade your OS. Then either: illegal or stdx r1,r2,r3 *a 64 bit instruction, so will break into macsbug *and is what the illegal macro currently *translates to or Xcall Debugger will get you into Macsbug. Also Xcall DebugStr will break into MacsBug and print the pascal string pointed to by r3 if you need it - sometimes very handy. Stu.
Date: Fri, 6 Mar 1998 22:00:05 +0100 From: robot@writeme.com (Alok) To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it> Subject: Re: Macsbug problems! Hi, I have written a guide to macsbug. Perhaps you are interested? I'll add at the end of it, the Xcall Debugger command. Bye, Alok email: robot@writeme.com
Date: Fri, 6 Mar 1998 22:04:39 +0100 From: robot@writeme.com (Alok) To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it> Subject: Sprites Hi, I'm writting a cards game. What is the best way of doing the sprites? I think offscreen should be the most convienent for me?! Bye, Alok email: robot@writeme.com
Date: Fri, 6 Mar 1998 16:33:26 -0500 From: Ajay Nath <AjayNath@compuserve.com> To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it> Subject: Re: Modal Dialog FilterProc >> I assumed that the stack pointer and everything above it was sacred. Now I find that there is this 56 byte area that I have to add in. Part of this is the so called parameter area & this is mentioned in IM-PowerPC System Software, if your procedure calls any other procs then it MUST have it. It also says in this volume that the stack must be 8 bytes aligned...but in IM: MacOS Runtime Architectures (available at Apples Developer web site in pdf form) it says that the stack must be 16 bytes aligned..best to use 8 bytes alignment for now. Make sure that you pass $00000FE0 as the magic number in r4 to NewRoutineDescriptor when you create your UPP to your filterproc. To make sure that the filterproc has the correct `bss value I call GetNewDialog & then set the refcon value of the OK button = to my `bss. Then early in the filterproc I get the refcon value from the OK button & then store it into the `bss reg...it works without any problems. If you look at the source code in the file called "dialogFilterCode.s" you will see the source for a filterproc that adds handling for the "Don't Save" button & it does call Hilitecontrol without any problems...you also have to call "Delay" so that the user gets to see the hiliting before you change the button back to its unhilited state
Date: Sat, 7 Mar 1998 12:18:58 +1000 From: mrwhippy@pac.com.au (Paul) To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it> Subject: Last re: QuickView Hello, *Many* thanks for the URL,cliff! The only problem is that it doesn't work.I don't know if you got it from an old bookmark or something,but the "." directory doesn't exist.The new URL is... ftp://dev.apple.com/devworld/Technical_Documentation/Toolbox_Assistant_Updates/ If the site is slow,there's also a mirror site at.... ftp://ftp.apple.com/devworld/Technical_Documentation/Toolbox_Assistant_Updates/ Thanks again!! Paul
Date: Sat, 7 Mar 1998 12:25:26 +1000 From: mrwhippy@pac.com.au (Paul) To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it> Subject: Re: Macsbug problems! Stu wrote: >Hi Benny, >It may be that the version of the OS you are using (7.1.2?) and the version >of MacsBug is incompatible? I would suggest you upgrade your OS to at least >7.5.5. (steer very clear of 7.5.3) Hey! I use 7.5.3 on my PPC and it is *VERY* stable - Macsbug doesn't cause me any problems at all with it - Unlike some later versions :( And as a bonus,I have a nice OS8 frisbee ;) Paul
Date: Fri, 6 Mar 1998 20:37:52 -0500 From: Stuart Ball <lightsoft@compuserve.com> To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it> Subject: LS: Fantasm v5.1.0. beta 2 available Beta 2 of Fantasm version 5.1.0 is now available for download from our world wide web pages. Changes since beta 1 as follows: Bugs fixed: FANTASM Floating point register equates now work. pause directive works again. beep directive works again. ANVIL Cutting a word from a line (with APPLE X) no longer erases the rest of the line. A_play_sound CCP call works again. Additions: ANVIL: "No header" option for new and existing projects. Affects 68K projects only. Prevents the system from putting a 64 byte header at the start of 68K code. Useful for 68K code resources - e.g. init's. This change also affects Build and Link68K Toolbar open/closed status now saved in prefs and previous state is honoured shortly after boot-up. Check when booting if disk is locked and alert user if so. The software will not run off a locked disk. Various other minor tweaks and optimizations performed. Details are included on the WWW pages and complete change notes from version 5.0.0 can be found in the update archive. Please report bugs in Fantasm v5.1.0 beta 2 to <mailto:lightsoft@compuserve.com>. Thank you. END Lightsoft 0132 070398 GMT
Date: Sat, 07 Mar 1998 06:14:50 +0100 From: bondard <bondard@ens.fr> To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it> Subject: Re: Macsbug problems! Alok wrote: > > Hi, > > I have written a guide to macsbug. Perhaps you are interested? > > I'll add at the end of it, the Xcall Debugger command. > > Bye, Alok > > email: robot@writeme.com > > Yes! Thanks in advance ----------------- Daniel Bondard bondard@ens.fr -----------------
Date: Sat, 7 Mar 1998 13:55:06 +0100 From: robot@writeme.com (Alok) To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it> Subject: HELP NEEDED with windowptr. Hi, Given a windowPtr, how do I find it's position (up left/bottom right corners) or at least it's height and width. Thx, Alok
Date: Sat, 7 Mar 1998 11:34:26 -0500 From: Ajay Nath <AjayNath@compuserve.com> To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it> Subject: Sprites >> What is the best way of doing the sprites? The EASIEST way of doing sprite stuff that is probably the MOST compatible across different hardware/software is to use either Apples DrawSprocket or the Sprite Animation Toollkit library (SAT). You can find a link to SAT & lots of other game programming related stuff at: http://www.wwu.edu/%7En9145339/progmac.html which is the Mac Games Programming Page
Date: Sat, 7 Mar 1998 11:41:42 -0500 From: Ajay Nath <AjayNath@compuserve.com> To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it> Subject: HELP NEEDED with windowptr. >> Given a windowPtr, how do I find it's position (up left/bottom right corners) or at least it's height and width. << Make the following equates ; quickdraw consts top EQU 0 left EQU 2 bottom EQU 4 right EQU 6 ; window mgr consts kPortRectOffset EQU 16 ; gMainWPtr(`bss) is a global WindowPtr lwz r3,gMainWPtr(`bss) ; r3 = WindowPtr la r3,kPortRectOffset(r3) ; r3 = ptr to portRect lbz r4,right(r3) ; r4 = right coord = window width lbz r5,bottom(r3) ; r5 = bottom coord = window height
Date: Sat, 7 Mar 1998 20:26:21 +0100 From: Per Hjeltman <leahjn96@student.umu.se> To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it> Subject: Re: Sprites >The EASIEST way of doing sprite stuff that is probably the MOST compatible >across different hardware/software is to use either Apples DrawSprocket or >the Sprite Animation Toollkit library (SAT). You can find a link to SAT & >lots of other game programming related stuff at: But don't you think this is a pretty stupid advise to give on a Mac assembly programming list? IMHO, writing your game in assembly and then using DrawSprocket for blitting does not make sence. Also, DrawSprocket games tend to be awfully slow on low-end computers (such as the Performa 5200.) I have yet to play a DSprocket using game that is fast on my computer. -------------------------------------------------------------------------- | Per Hjeltman | IB Student: http://www.ibo.org | Ad astra per aspera | -------------------------------------------------------------------------- | Whatever you can do or dream you can, begin it. Boldness has genius, | | power and magic in it. Begin it now. | | -- Johann Wolfgang von Goethe (1749-1832) | --------------------------------------------------------------------------
Date: Sun, 8 Mar 1998 11:30:05 +0100 From: robot@writeme.com (Alok) To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it> Subject: Re: Macsbug problems! Hi, Here is my MacsBug guide... Bye, Alok <SNIPPED 93K>
Date: Sun, 8 Mar 1998 11:32:26 +0100 From: robot@writeme.com (Alok) To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it> Subject: I'm very sorry Hi, I'm very sorry for my last msg to this list which wasn't suppose to land here. Hope this will never ever happen again, Alok email: robot@writeme.com
Date: Sun, 8 Mar 1998 06:45:06 -0500 From: Ajay Nath <AjayNath@compuserve.com> To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it> Subject: HELP NEEDED with windowptr. Oops! The instructions to load the coordinates from a rect variable should have used the lhz instruction, not the lbz instructions...sorry if this confused anyone
Date: Sun, 8 Mar 1998 06:55:11 -0500 From: Ajay Nath <AjayNath@compuserve.com> To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it> Subject: Re: Sprites >> But don't you think this is a pretty stupid advise to give on a Mac assembly programming list? IMHO, writing your game in assembly and then using DrawSprocket for blitting does not make sence. Also, DrawSprocket games tend to be awfully slow on low-end computers (such as the Performa 5200.) I have yet to play a DSprocket using game that is fast on my computer. << Well let me answer your points 1 at a time: 1) Is it stupid to use SAT or DrawSprocket. Not at all. If you want a fast prototype of your game you can use these libraries to get you started & then optimise if you need to. Also you can look at the source code for SAT & learn how it works & then it will help you write your asm routines. 2) Writing your game in assembly and then using DrawSprocket for blitting does not make sence Wrong again...what if your app does not need fast animation? If you remember Alok said he was working on a card game....ever played solitaire on your mac? Don't you think SAT or DrawSprocket are fast enough to do the simple animation for this game? 3) As for the speed problems on lower end machines it is true that DrawSprocket will be slower on slower machines...but it DOES work & if you want simple animation that works on all the modern Apple machines DrawSprocket is good enough. 4) I have yet to play a DSprocket using game that is fast on my computer. Well my friend has one of the first PPC macs & he can play WarCraft & Commmand & Conquer on it without problems & they both seem to be using DrawSprocket. The point is that it does not make sense to "reinvent the wheel" if you don't have to...to make a simple card game SAT or DrawSprocket should be enough...also they help one to get some code working...later on if they aren't good enough then after the game is WORKING then asm routines can be written to replace them.
Date: Sun, 8 Mar 1998 13:17:39 -0500 From: Stuart Ball <lightsoft@compuserve.com> To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it> Subject: Extraordinary update to Fantasm beta 3 A small patch has been generated which takes Fantasm to beta 3, all other items are at beta 2. The change fixes an inaccuracy bug present in the df.d and dfsin.d directives. This patch is available from our preview area as a 125K stuffed ResCompare patch. A final candidate version of all changed items will be available within a few days.
Date: Sun, 8 Mar 1998 20:35:43 +0100 From: Per Hjeltman <leahjn96@student.umu.se> To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it> Subject: Re: Sprites >1) It is stupid to use SAT or DrawSprocket. I didn't say that, but I do think it is pretty corny to write everything in assembly only to rely on a HLL for time critical tasks. Nothing can make me change that view. If we're talking about a card game, the situation is different. >2) Writing your game in assembly and then using DrawSprocket for blitting >does not make sence > >Wrong again...what if your app does not need fast animation? If you >remember Alok said he was working on a card game....ever played solitaire >on your mac? Don't you think SAT or DrawSprocket are fast enough to do the >simple animation for this game? Oops, my mistake! But then, I wouldn't use assembly to write a card game either. Oh well. >3) As for the speed problems on lower end machines it is true that >DrawSprocket will be slower on slower machines...but it DOES work & if you >want simple animation that works on all the modern Apple machines >DrawSprocket is good enough. Okay, I can agree with that. >Well my friend has one of the first PPC macs & he can play WarCraft & >Commmand & Conquer on it without problems & they both seem to be using >DrawSprocket. Warcraft II uses SoundSprocket, but not DrawSprocket. BTW, SoundSprocket rocks! It is true that Command&Conquer uses DrawSprocket but the performance is less then stellar on my 603 @ 75 MHz, (it is, in fact, slower then on most 486 based PC computers.) -------------------------------------------------------------------------- | Per Hjeltman | IB Student: http://www.ibo.org | Ad astra per aspera | -------------------------------------------------------------------------- | Whatever you can do or dream you can, begin it. Boldness has genius, | | power and magic in it. Begin it now. | | -- Johann Wolfgang von Goethe (1749-1832) | --------------------------------------------------------------------------
Date: Sun, 08 Mar 1998 23:22:13 +0100 From: "Allan Jensen" <maccoder@post6.tele.dk> To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it> Subject: Re: Sprites >>1) It is stupid to use SAT or DrawSprocket. (lot's of stuff) I'm gonna side with Per on this one. When you're using assembler you have pretty much already decided that reinventing the wheel is what you want to do. It's debatable if asm is the best language to write cardgames in, but if you had to make it using a mixture of c and asm, the graphics-parts are probably the ones you'd write in assembler, so you might as well do it at once instead of prototyping with SAT. Compatibility-wise Ajay might well be on to something. But the bottomline is: if big parts of your program use c-libraries for timeconsuming parts, then why not write the entire thing in c. In any case, I can certainly see why Per was puzzled by the suggestion. Use a c-library in an asmprogram to draw sprites? It's almost sagriligeous. I guess we need a pure asm SAT or SpriteWorld. Any takers? Oh, and as to Aloks problem: I'd definitely use SAT. Allan
Date: Mon, 09 Mar 1998 06:45:47 +0100 From: bondard <bondard@ens.fr> To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it> Subject: Re: Macsbug problems! Paul wrote: > > Stu wrote: > >Hi Benny, > >It may be that the version of the OS you are using (7.1.2?) and the version > >of MacsBug is incompatible? I would suggest you upgrade your OS to at least > >7.5.5. (steer very clear of 7.5.3) > > Hey! I use 7.5.3 on my PPC and it is *VERY* stable - Macsbug doesn't cause > me any problems at all with it - Unlike some later versions :( And as a > bonus,I have a nice OS8 frisbee ;) > > Paul > Paul, I have had a different experience: 7.5.3 is the only version which, a few months ago, destroyed my whole file system on a rather full 1 gigabyte disk... Cost me several days to restore. Now I use system 8 with absolutely no problems. ----------------- Daniel Bondard bondard@ens.fr ----------------- Never believe that you know the last thing about any human heart Henry James
Date: Mon, 9 Mar 1998 08:47:49 -0500 From: Ajay Nath <AjayNath@compuserve.com> To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it> Subject: Re: Sprites >> I do think it is pretty corny to write everything in assembly only to rely on a HLL for time critical tasks. Nothing can make me change that view. << But we asm mac programmers rely on HLL code ALL the time! Since System 7 most of the mac system software has been written in C! Now it is true that most apps don't use more than ~ 100 or so toolbox routines but most of the execution time is spent in those routines.
Date: Mon, 9 Mar 1998 08:52:18 -0500 From: Ajay Nath <AjayNath@compuserve.com> To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it> Subject: Re: Sprites >> Use a c-library in an asmprogram to draw sprites? It's almost sagriligeous. I guess we need a pure asm SAT or SpriteWorld. Any takers? << Well of course now the entire Mac toolbox on the PPC is nothing more than a c-library! As for a pure asm SAT...old estimates were that the speed increase in going to a pure ASM SAT would be < 10% which MIGHT not be worth it... Now recompiling SAT with an aggressive optimiser like K&Ps or MrC (from motorola) would probably result in a bit of speed improvement which might be worth it if all it takes is a recompile.
Date: 09 Mar 98 07:20:48 -0800 From: Cliff Harris <cliff_harris@orangemicro.com> To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it> Subject: RE: HELP NEEDED with windowptr. Ajay Nath wrote: >>> Given a windowPtr, how do I find it's position (up left/bottom right >corners) or at least it's height and width. > > lbz r4,right(r3) ; r4 = right coord = window width > lbz r5,bottom(r3) ; r5 = bottom coord = window height > Those should be "lhz". For my own usage I have also defined: topLeft EQU 0 bottomRight EQU 4 height EQU 4 width EQU 6
Date: 09 Mar 98 07:30:30 -0800 From: Cliff Harris <cliff_harris@orangemicro.com> To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it> Subject: RE: Translate! Benny Ronnhager wrote: >Hi! > >I want to translate this 68000 code to PowerPC code. I have tried so >many ways but It does >not work. I NEED HELP! > >Here is my PowerPC code that does not work. > >; Interrupt vector equates >Lvl1DT: EQU $192 > >; 6522 equates >VIA: EQU $1D4 >vT1CH: EQU $A00 >vT1L: EQU $C00 >vACR: EQU $1600 >vIER: EQU $1C00 > > li r10,Lvl2DT > la r11,CounterIntHand(rtoc) > stw r11,24(r10) > li r11,VIA > lwz r11,(r11) > lbz r16,vACR(r11) > ori r16,r16,$40 > stb r16,vACR(r11) > li r16,$C0 > stb r16,vIER(r11) > li r16,$FF > stb r16,vT1L(r11) > stb r16,vT1CH(r11) >1: > b 1 >CounterIntHand: > I assume you're declaring CounterIntHand as a toc_routine. I suggest going through the code step by step with MacsBug and making sure all the addresses and data are what they should be. The only thing that I see that might be a problem is possibly that Lvl1DT (by the way the code shows Lvl2DT) and VIA are pointers rather than the beginning of a structure/record. In that case you need to dereference them.
Date: Mon, 9 Mar 1998 17:32:37 +0100 From: robot@writeme.com (Alok) To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it> Subject: Re: Sprites >Oops, my mistake! But then, I wouldn't use assembly to write a card game >either. Oh well. If I'm using assembly to write games, it not because I want to reenvent the wheel, nor because I need speed. The first rewason is price. The second compatibility (some of my Pascal games don't work on some machine, but again, it's because I have a cheap compiler). When I asked you which is the best methode for sprites, I wasn't asking for such a long debat... All I wanted to know is wheter off screen drawing will be good. Or if I should just redraw the portion of screen that was modified. Or if I can redraw each card directly to the screen without suffering from blinks. Or even just do some copy & paste from Lightsoft's demo game (I don't know how the game is programmed.) Bye, Alok email: robot@writeme.com
Date: Mon, 09 Mar 1998 20:12:53 +0100 From: "Allan Jensen" <maccoder@post6.tele.dk> To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it> Subject: Re: Sprites >As for a pure asm SAT...old estimates were that the speed increase in going >to a pure ASM SAT would be < 10% which MIGHT not be worth it... > >Now recompiling SAT with an aggressive optimiser like K&Ps or MrC (from >motorola) would probably result in a bit of speed improvement which might >be worth it if all it takes is a recompile. > Less than 10%? That would depend on how you coded it. Algorithms and so forth. Assuming that SAT is a masterpiece of programming that cannot be optimized, then I'll buy the 10%. Otherwise it's just a question of good ideas, good algorithms and clever assembler tricks. In any case, we're in the buisness of using assembler, hence the suggestion to use pure asm. I'll agree in principle, Ajay, SAT might be a good idea. But I still prefer assembler. Because it sounds cool, naturally ;) Allan
Date: Mon, 09 Mar 1998 22:37:10 +0100 From: "Allan Jensen" <maccoder@post6.tele.dk> To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it> Subject: Re: Sprites >When I asked you which is the best methode for sprites, I wasn't asking for >such a long debat... Yeah, sorry about that Alok. Almost forgot the question. >All I wanted to know is wheter off screen drawing will be good. Or if I >should just redraw the portion of screen that was modified. Or if I can >redraw each card directly to the screen without suffering from blinks. Or >even just do some copy & paste from Lightsoft's demo game (I don't know how >the game is programmed.) You can indeed do some copy and pasting from the demo game. Use the screen-splatter routine, and draw all the cards offscreen. You'll avoid any flickering, and should you be in the mood for animating the cards or whatever, well, you'll be on the right track for that too. Being a card game you could probably get away with drawing directly to the screen, but flickering might still occur. Since cards are rectangular you can probably avoid masking too. For a system-friendly, menu-based, showing-the-os-from-its-best-side kind of thing, you might want to look into Quicktime-drawing or indeed SAT or Drawsprocket ;) I'd go for option 1 (hardcore offscreen), but then I like being close to the metal so to speak. Or rather: it's all I know how to do ;) If you want, I'll only be too happy to together a little example with a card being splatted to the screen (as long as it's PPC ;). Drop me a note. Allan
X-Listserver: Macjordomo 1.1a23 - Macintosh Listserver by Michele Fuortes Date: Tue, 10 Mar 1998 08:41:36 +1000 From: mrwhippy@pac.com.au (Paul) To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it> Subject: Re: Sprites Alok wrote: >All I wanted to know is wheter off screen drawing will be good. Or if I >should just redraw the portion of screen that was modified. Or if I can >redraw each card directly to the screen without suffering from blinks. If you only need to redraw a small portion now and then - then do that,rather than redrawing the whole lot each time anything changes.As always though,have your data in a buffer somewhere and use the FPU to transfer it to screen. Hope that's what you wanted, Paul
Date: 09 Mar 98 14:15:26 -0800 From: Cliff Harris <cliff_harris@orangemicro.com> To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it> Subject: Re: Sprites Gee, folks, before criticizing the choice of C vs. assembly maybe we should look at the reason for the project. If it's just a learning experience then the debate is moot.
Date: 09 Mar 98 15:15:41 -0800 From: Cliff Harris <cliff_harris@orangemicro.com> To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it> Subject: Re: Sprites robot wrote: > >All I wanted to know is wheter off screen drawing will be good. Or if I >should just redraw the portion of screen that was modified. Or if I can >redraw each card directly to the screen without suffering from blinks. Or >even just do some copy & paste from Lightsoft's demo game (I don't know how >the game is programmed.) > One way to do this is to draw all the cards offscreen during initialization and then copy them onto the screen as needed. You just need to keep track of where they are located offscreen so that you can copy the card that you need.
Date: Tue, 10 Mar 1998 08:41:27 +0100 From: robot@writeme.com (Alok) To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it> Subject: Alok, misc Hi, ***** A ***** Try this: li r3,5 Xcall Debugger li r3,10 "Surprise" (<- for me), when you enter the debugger, r3 has lost it's value. But then if you step, r3 won't loose it's value ! ***** B ***** Thx Ajay Nath for you help, I think that my window size is now correct (I get to invert it, but I haven't yet tried to get the positions). ***** C ***** I'm writting some routines that will be used by other (or at least I hope others use them :)) So I think it would be a good idea not to destroy registers. What is the easiest methode: a)Save the register on enter: Saver: dc.w 16 b)Us the stack (how do you do that? Yes I know it's there in Ajay's (or maybe someone else's) application on the lightsoft web page... But I'm lazzy, and reading others code takes me a hell lot of time). Bye, Alok Hi Ajay... I still can get the coordinates :( I'll send you my source tomorrow... Bye, Alok email: robot@writeme.com
Date: Tue, 10 Mar 1998 15:11:44 +0100 From: MoonDark <moondark@enter.it> To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it> Subject: Re: Alok, misc On 10/03/1998 08:41 Alok at robot@writeme.com >"Surprise" (<- for me), when you enter the debugger, r3 has lost it's >value. But then if you step, r3 won't loose it's value ! Yeah, cause the _Debugger calls obviously drops in the debugger after it's been executed Mario
Date: Tue, 10 Mar 1998 17:31:24 +0100 From: robot@writeme.com (Alok) To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it> Subject: Re: Sprites Hi, Well I think that best will be to use copybits. Is offscreen the same as copybit? Anyways, now I have other problems comming in: - How do I load my graphics from the PICT ressource into memory, before copying it to the screen? - Can I have some source code please. (documented). BTW I checked out SAT. It deosn't say anything about assembly, so is it easy to use it with PowerFantasm? Bye, Alok email: robot@writeme.com
Date: Tue, 10 Mar 1998 17:31:28 +0100 From: robot@writeme.com (Alok) To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it> Subject: rs/ds Hi, What's the difference between rs and ds ? I guess the answer to this should figure in the next version of the beginner's guide ?! (Except if I'm blind, and didn't see it's already in there). Alok. email: robot@writeme.com
Date: Tue, 10 Mar 1998 17:31:31 +0100 From: robot@writeme.com (Alok) To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it> Subject: Alok: Ploting Pict's Hi, I'm calling 5 PICT's which are in ressource (I'm first saving them in a ds.w 5) and something very strange is happening: Pict 0 is fine Pict 1 is fine 2 is fine 3 doesn't work (nothing happens, the computer doesn't crash) 4 works fine. WHat can be the origine of my error? My source code is 140k (PPC) so if anybody wants to have a look at it... (it's quite well documented). Thx, Alok email: robot@writeme.com