Date: Fri, 5 Dec 1997 14:43:13 +0100
From: robot@writeme.com (Alok)
To: Multiple recipients of <list-fantasm@mail.tau.it>
Subject: Simple prog
Hi,
Well I'm working on my school's web page, and I need a little script or
program written in any language that does this:
open a file.
Each line looks like this:
Carolyne DURUSSEL 1981 1 6
(Where the space is a tab character and at the end of the line is a cr).
And I want the result to be:
NewBirthday ("Carolyne DURUSSEL",1981,1,6)
So:
Add NewBirthday (" at the beginning of each line.
Replace first tab by a space
replace second tab with ",
replace third tab with ,
replace fourth tab with ,
replace cr with )+cr
This script may run on PC or Mac, but I would prefer Mac of course.
What you get for getting this done? Your name on the web site!!!
(This script/program will be used by many people for many years, but will
never be modified).
Thx....
Bye, Alok
email: robot@writeme.com
visit: http://foxden.netopia.com/menghrajani/
Date: Fri, 5 Dec 1997 14:56:18 +0100
From: robot@writeme.com (Alok)
To: Multiple recipients of <list-fantasm@mail.tau.it>
Subject: Re: Simple prog
Hi,
Well I solved my prob by writing a javascript.
Here is a small word to everyone:
Christmas holidays are comming, so download the offical JavaScript guide
and JS reference.
JS is really easy to learn, it took me three days to master it completly
and it's really worth it!
Bye, Alok
Date: Fri, 05 Dec 1997 08:03:57 -0600
From: Robert Pollard <omsinc@earthlink.net>
To: Multiple recipients of <list-fantasm@mail.tau.it>
Subject: Re: Free Apple Tools
Lightsoft is making a C compiler? Great! They have my vote! I want it
when it comes out!
Date: Sun, 7 Dec 1997 10:00:16 +1000
From: mrwhippy@pac.com.au (Paul)
To: Multiple recipients of <list-fantasm@mail.tau.it>
Subject: Screen dimensions
Hello,
I know how to change the colour depth of the screen,but I also want to
change the screen dimensions,so I can force 640x480 mode (of course,only
after asking the user if they want to change :).Do I need to change the
gdRect entry in the device list? Is this the best way?
Thanks in advance,
Paul
Date: Sat, 6 Dec 1997 23:21:02 -0500 (EST)
From: Figaro Tea <humphret@ruby.winthrop.edu>
To: Multiple recipients of <list-fantasm@mail.tau.it>
Subject: Re: Screen dimensions
On Sun, 7 Dec 1997, Paul wrote:
> but I also want to change the screen dimensions,so I can force 640x480
> mode (of course,only after asking the user if they want to change :)
If you're writing a game then don't even ask, just switch it. As long as
you restore the resolution when you quit the app then there's no harm
done. (It always pisses me off when a game won't switch to its
*required* resolution. It pisses me off even more when it asks *me* to do
the switch!)
..._Tim_...
--=[I know everything...just not at the same time.]=--
http://www.shack.org/zzhumphreyt
zzhumphreyt@winthrop.edu
Date: Sun, 7 Dec 1997 12:42:37 +0100
From: robot@writeme.com (Alok)
To: Multiple recipients of <list-fantasm@mail.tau.it>
Subject: Re: Free Apple Tools
Where can I find MPW ??? How big is it??? Apple's site is just so big.. I
just downloaded MrC cos it said it was a c compiler and surprise.. It's a
plug in for code warrior or something like that...
So before I go on downloading useless things cos Apple hasn't documented
them on the site, what is MacApp ??? It's says next to it an oriented
object framework? But what does that mean?
Bye, Alok
email: robot@writeme.com
visit: http://foxden.netopia.com/menghrajani/
Date: Sun, 7 Dec 1997 15:14:25 +0100
From: robot@writeme.com (Alok)
To: Multiple recipients of <list-fantasm@mail.tau.it>
Subject: Re: Screen dimensions
I hate it when a game doesn't gimme back my normal resolutions, cos the
icons on the desktop move away!!! (I always like to have an alias of
PowerFantasm on the desktop :) )
ALok
Date: 5 Dec 97 19:33:53 -0600
From: "Kevin McEnhill" <kevinm@kci.wayne.edu>
To: Multiple recipients of <list-fantasm@mail.tau.it>
Subject: FantaC News?
Howdy,
With all of this talk about Apple's free tools and FantaC being brought up
a few times, I was wondering if there is any news on that front. I know you
Lightsoft guys are still breathing hard after Fantasm5 (excelent job! I'll
upgrade as soon as the checkbook lets me), so I am not pushing for a
release date, just some news and thoughts.
Kevin McEnhill
kevinm@kci.wayne.edu
Date: Sun, 7 Dec 97 12:43:19 -0700
From: James Hague <jhague@dadgum.com>
To: Multiple recipients of <list-fantasm@mail.tau.it>
Subject: Re: Screen dimensions
>If you're writing a game then don't even ask, just switch it. As long as
>you restore the resolution when you quit the app then there's no harm
>done.
Ack! Switching the color depth is okay, but switching the screen size is
tricky. Doing it without asking isn't a good idea because:
(1) Some monitors go nuts when you switch resolutions--and you have no
way of knowing this will happen. You see complaints all the time in
comp.sys.mac.games.xxx.
(2) Depending on how you code your game, the desktop icons can be
scattered about when you return to the original resolution. (This
happens only if you use WaitNextEvent or GetNextEvent in your game.)
(3) Switching resolutions causes a monitor "burp" that's mildly annoying
(and takes a bit of time). If you are playing a game to kill time while
working with, say, Photoshop, and you have to switch applications
frequently, then it gets _really_ annoying.
(4) Some people with 21" monitors think that 640x480 looks too chunky.
Anyhow, to switch resolutions you need to use version 2.0 or greater of
the DisplayManager. You can get info from the Apple developer web site.
--
James Hague
Dadgum Games
http://www.dadgum.com/
Date: Sun, 7 Dec 1997 20:02:39 -0500 (EST)
From: Figaro Tea <humphret@ruby.winthrop.edu>
To: Multiple recipients of <list-fantasm@mail.tau.it>
Subject: Re: Screen dimensions
On Sun, 7 Dec 1997, James Hague wrote:
> Ack! Switching the color depth is okay, but switching the screen size is
> tricky. Doing it without asking isn't a good idea because:
Alright, I stand corrected:)
..._Tim_...
Date: Mon, 8 Dec 1997 05:14:22 -0500
From: Stuart Ball <lightsoft@compuserve.com>
To: Multiple recipients of <list-fantasm@mail.tau.it>
Subject: FantaC News?
Kevin wrote:
>Howdy,
>
>With all of this talk about Apple's free tools and FantaC being brought up
>a few times, I was wondering if there is any news on that front. I know
you
>Lightsoft guys are still breathing hard after Fantasm5 (excelent job! I'll
>upgrade as soon as the checkbook lets me), so I am not pushing for a
>release date, just some news and thoughts.
Thanks for the compliments Kevin. I'll gather all the relevent info. and
answer
in the next NFtT due out sometime this week.
Many rgds,
Stu.
Date: Tue, 9 Dec 1997 11:46:12 -0500
From: Ajay Nath <AjayNath@compuserve.com>
To: Multiple recipients of <list-fantasm@mail.tau.it>
Subject: Re: Free Apple Tools
make sure that you try to use the apple developers web site at:
http://www.devworld.apple.com/
the site has links to an area from which you can download the MPW shell
program & some other tools that work with it such as C/C++ compiler. i got
a reply from someone at Apple who told me that this is indeed the compiler
which is used to create parts of the System Software so I guess it can't be
that bad!
MrC might be the motorola plugin C/C++ optimising compiler. i would be
surprised if apple was giving this away as motorola was selling it for a
couple of hundred $. it was renowned for being FANTASTIC at optimising PPC
code & i have seen it put out some great code...it was highly regarded.
now what does it mean that this stuff has been made free? it may mean
several things such as:
1) Apple is now using Rhapsody tools to develop its system software & so it
now longer will sell or support MPW tools & will sell & support Rhapsody
tools
2) Apple is moving to objective-c for its internal development so it moved
to the rhapsody tools for this
3) Apple no longer wanted to spend the $ supporting MPW & it didn't matter
since most people use CodeWarrior for development & then use the motorola
optimiser CW plugin for the final version of their apps
>>
what is MacApp ??? It's says next to it an oriented
object framework?
<<
MacApp originally was in object pascal & got moved to c++. it is an object
oriented framework..object programming being one of the recent popular
programming paradigm shifts..if you don't know about it you must at least
learn about it & then decide if it is right for your project..basically the
framework handled all the generic tasks of a progam & you filled in the
parts specific to your app...i.e. - the framework knew how to save/read
file..you just wrote the code that wrote your apps specific file info, or
the framework knew about events & just called some code that you wrote to
handle specific ones likes say update events.
the advantage of a framework was that it could do a lot of work for you &
it was easy to write apps really quickly with them IF you knew the
framework well..there is a learning curve with these frameworks.
MacApp was in use (& still is by some) for years so it was also very well
debugged. there were also lots of classes (again this relates to objects)
written for it so almost anything you might want to do had already been
done to some extent..it was powerful too..photoshop used MacApp for years
people have reported saving tremendous amounts of time using objects &
frameworks..partly because you don't spend time "reinventing" the wheel by
writing code that does stuff that you have already in the framework..&
partly because MacApp also had some graphical tools that worked with it so
you cold literally "draw" an application
we will ALL have to learn about frameworks to work with Rhapsody because
shared system objects & code are at the heart of it...there was a recent
article (in MacTech i think) that showed a WYSIWYG editor with rulers,
printing code & spell checking "drawn" & written in 30 lines of code!
Date: Tue, 9 Dec 1997 22:35:02 -0500 (EST)
From: Figaro Tea <humphret@ruby.winthrop.edu>
To: Multiple recipients of <list-fantasm@mail.tau.it>
Subject: CD-ROM Info
I know this doesn't go here but I can't think of another technically
minded place I can ask this.
Does anyone here know where on the Internet I can get some info as to how
cd-roms work? Specifically I want info as to how the data is encoded on
the CD itself, the wavelengths of the laser light used to read the CD,
explanations of the error correcting algorithms used to correct data
errors; ya' know, stuff like that.
I already have some info that I've found, and it's good, but it doesn't go
to deep at times in the explanations of things. The best place that I
found for technical info was http://www.pcguide.com/ref. This site,
http://www.pcwebopedia.com is pretty good too. Is there an online version
of a library? The search engines return too much commercial info, not
informative info.
Thanks for any help,
..._Tim_...
Date: Wed, 10 Dec 1997 14:39:58 +0000
From: Paul <mrwhippy@pac.com.au>
To: Multiple recipients of <list-fantasm@mail.tau.it>
Subject: RGBColor records
Hello,
Could someone explain how to use RGBColor records,please? I'm using the
color picker and I'm trying to set the original colour without any luck.I
know they're a 48 bit record,but how do you actually *use* them? Do you need
to split them over 2 registers,or do you need to convert them somehow?
Thanks,
Paul
Date: Tue, 9 Dec 97 22:05:09 -0700
From: James Hague <jhague@dadgum.com>
To: Multiple recipients of <list-fantasm@mail.tau.it>
Subject: Re: Free Apple Tools
>3) Apple no longer wanted to spend the $ supporting MPW & it didn't matter
>since most people use CodeWarrior for development & then use the motorola
>optimiser CW plugin for the final version of their apps
I think that's it. MPW is cool in many ways, if you like command line
tools, but for the most part it's crusty, slow, and unsupported.
>people have reported saving tremendous amounts of time using objects &
>frameworks..partly because you don't spend time "reinventing" the wheel by
>writing code that does stuff that you have already in the framework
I've been hearing this since the became a pop buzzword around 1987.
Funny thing, though, is how huge most of the apps written with such
frameworks are :-) (I cite the Code Warrior project manager as an
example.) Logically, you'd expect the philosophy of heavy re-use would
manifest itself in smaller applications.
--
James Hague
Dadgum Games
http://www.dadgum.com/
Date: Wed, 10 Dec 1997 19:42:18 +0000
From: Paul <mrwhippy@pac.com.au>
To: Multiple recipients of <list-fantasm@mail.tau.it>
Subject: RGBColor records again
Hello All,
Re: my earlier problem figuring out RGBColor records...
I figured out what I was doing wrong - Not long after asking for help :)
Thanks anyway!
Paul
Date: Wed, 10 Dec 1997 12:07:31 +0100
From: robot@writeme.com (Alok)
To: Multiple recipients of <list-fantasm@mail.tau.it>
Subject: Apple Programmers program
I just visited Apple web Site and found out that there a CD dilivered every
month to the Apple Programmers group.
AS I fell sick this week end, I haven't had time to find any more info.
Anybody knows the membership price, if it's worth it, if I can get the CD
in Switzerland, etc...
Bye, Alok
**
email: robot@writeme.com
(My web site is now down, but just wait for January to see a complet rewrite!!!)
Date: Wed, 10 Dec 1997 13:32:07 +0100
From: "Helge Herrgesell" <hh@digitalis.at>
To: Multiple recipients of <list-fantasm@mail.tau.it>
Subject: Re: Apple Programmers program
At 12:07 +0100 on 10.12.97, Alok wrote:
> I just visited Apple web Site and found out that there a CD dilivered every
> month to the Apple Programmers group.
>
> AS I fell sick this week end, I haven't had time to find any more info.
> Anybody knows the membership price, if it's worth it, if I can get the CD
> in Switzerland, etc...
>
>
> Bye, Alok
Hi,
write a short email to mailto:eurodev@apple.com and they'll send you the
required information. Normal membership is about $250/year, which include
CD's, ... and you can also sign NDA to get seeding CD's.
Helge
+----------------------------------------------------------------------+
| DIGITALIS OEG, telephone: +43-(0)316-348540-0 |
| Herrgesell & Pongratz OEG, fax: +43-(0)316-348540-30 |
| Koerblergasse 5 e-mail: hh@digitalis.at |
| A- 8010 Graz url: http://www.digitalis.at/ |
+----------------------------------------------------------------------+
Date: Thu, 11 Dec 1997 00:46:48 +0100
From: bondard <bondard@ens.fr>
To: Multiple recipients of <list-fantasm@mail.tau.it>
Subject: Re: RGBColor records again
Hey Paul,
So how about sharing what you just figured out with us chickens? Thanks!
Daniel
-----------------
Daniel Bondard
bondard@ens.fr
-----------------
Paul wrote:
>
> Hello All,
>
> Re: my earlier problem figuring out RGBColor records...
>
> I figured out what I was doing wrong - Not long after asking for help :)
>
> Thanks anyway!
>
> Paul
>
Date: Wed, 10 Dec 1997 18:16:20 -0500
From: Ajay Nath <AjayNath@compuserve.com>
To: Multiple recipients of <list-fantasm@mail.tau.it>
Subject: Re: Free Apple Tools
>>
Logically, you'd expect the philosophy of heavy re-use would
manifest itself in smaller applications.
<<
not at all...heavily reused code is written for all purpose situations so
it isn't optimised...who cares how big an app is anyway? does anyone run
app off of floppies? not at all!
risc code is usually bigger anyway as the instructions are in general
longer...also bigger code can be FASTER...i.e - code that has precomputed
tables in it
with sharable code it might not matter anyway...thats one of the things
rhapsody promises...why write a text editor when the system has a great
edit object available at all times it it?...sharing will also reduce the
size of your code
Date: Wed, 10 Dec 1997 22:00:33 -0500
From: Stuart Ball <lightsoft@compuserve.com>
To: Multiple recipients of <list-fantasm@mail.tau.it>
Subject: Re: Free Apple Tools
>with sharable code it might not matter anyway...thats one of the things
>rhapsody promises...
Sorry to butt in - I wouldn't normally, but...
MacOS has a useful shared library system (compared to the PC's dreaded
DLL's for example) for all to use but apps don't seem to be getting any
smaller. Could it be that to make useful shared code resources the OS would
have to be HUGE to cover all realistic eventualities?
WRT "visual" coding...
I can sit down with something like Visual Architect and create any kind of
useful app in a few hours. Does it run on a low end PowerMac? No; too slow.
The compiler is MrC, but the fault is in the 45000 lines of C code
generated by the visual front end - e.g. Simple app to display a window and
print Hello World - app size 389K. About 388K too much?
Stu.
Date: Thu, 11 Dec 1997 15:32:00 +0100
From: robot@writeme.com (Alok)
To: Multiple recipients of <list-fantasm@mail.tau.it>
Subject: Re: Free Apple Tools
>make sure that you try to use the apple developers web site at:
>
>http://www.devworld.apple.com/
Still haven't found it. Could you pls send the direct address.
Thx, Alok
Date: Thu, 11 Dec 97 11:13:01 -0700
From: James Hague <jhague@dadgum.com>
To: Multiple recipients of <list-fantasm@mail.tau.it>
Subject: Re: Free Apple Tools
>> Logically, you'd expect the philosophy of heavy re-use would
>> manifest itself in smaller applications.
>
>not at all...heavily reused code is written for all purpose situations so
>it isn't optimised...who cares how big an app is anyway?
No offense Ajay, but I still don't buy it :-)
--
James Hague
Dadgum Games
http://www.dadgum.com/
Date: Fri, 12 Dec 1997 09:52:06 +0000
From: Paul <mrwhippy@pac.com.au>
To: Multiple recipients of <list-fantasm@mail.tau.it>
Subject: Re:chickens
Hello,
>>So how about sharing what you just figured out with us chickens? Thanks!
I only started coding PPC assembler two or three weeks ago,but I'm getting
the hang of things now.I don't mind sharing knowledge with any "chickens"
out there. Just email me.
Paul
Date: Thu, 11 Dec 1997 08:52:48 -0600
From: marcus x jenkins <marcx@concentric.net>
To: Multiple recipients of <list-fantasm@mail.tau.it>
Subject: Amiga assebly (?)
Hey is it possible to write assembly for the Amiga using Fantasm? ( I see
it's possible to write for Atari ST's).
Also, is FantaC still in the works?
Date: Fri, 12 Dec 1997 15:39:44 +1000
From: mrwhippy@pac.com.au (Paul)
To: Multiple recipients of <list-fantasm@mail.tau.it>
Subject: Fanta-c (yes,another one :)
Hello,
In the spirit of all the Fanta-C banter lately,I've got a question.We have
Fantasm.It works.It's excellent.I can understand why lightsoft would make
it,and I hope people dump their existing c compilers and lash out en masse
for Fanta-C whenever it comes out,but as far as coding goes,why would I
want a C compiler when I have Fantasm?
Paul
Date: Thu, 11 Dec 1997 23:35:42 -0500
From: Stuart Ball <lightsoft@compuserve.com>
To: Multiple recipients of <list-fantasm@mail.tau.it>
Subject: Amiga assebly (?)
Marcus wrote:
>Hey is it possible to write assembly for the Amiga using Fantasm? ( I see
>it's possible to write for Atari ST's).
>
>Also, is FantaC still in the works?
Hi Marcus, hope all is going well!
We'll answer those in the next NFtT due shortly.
Many regards,
Stu.
Date: Thu, 11 Dec 97 22:03:22 -0700
From: James Hague <jhague@dadgum.com>
To: Multiple recipients of <list-fantasm@mail.tau.it>
Subject: Re: Fanta-c (yes,another one :)
>I can understand why lightsoft would make
>it,and I hope people dump their existing c compilers and lash out en masse
>for Fanta-C whenever it comes out,but as far as coding goes,why would I
>want a C compiler when I have Fantasm
Sometimes you've just _gotta_ be cross-platform. C isn't portable in and
of itself, but it's certainly more portable than assembly.
And sometimes, much as I hate to admit it, it's easier to write certain
kinds of programs in C.
--
James Hague
Dadgum Games
http://www.dadgum.com/
ate: Sat, 13 Dec 97 09:40:58 -0500
From: Jeffrey.B.Sack@ix.netcom.com, "M.D." <jbsack@ix.netcom.com>
To: Multiple recipients of <list-fantasm@mail.tau.it>
Subject: Re: Apple Programmers program
Alok,
You need to join Apples Developer program. Associate membership is 250 per year. You will get the monthly developer CD. If you also sign a seed developer non-disclosure agreement (free), you will then get several additional CD's with new tech (ie Rhapsody, etc). You can get the info off the developers web site.
Hope this Helps
JB
>I just visited Apple web Site and found out that there a CD dilivered every
>month to the Apple Programmers group.
>
>AS I fell sick this week end, I haven't had time to find any more info.
>Anybody knows the membership price, if it's worth it, if I can get the CD
>in Switzerland, etc...
>
>
>Bye, Alok
>
Date: Sat, 13 Dec 1997 17:55:42 +0100
From: Allan Jensen <maccoder@post6.tele.dk>
To: Multiple recipients of <list-fantasm@mail.tau.it>
Subject: MOD source
Hi
I still have a lot of source-code from the old amiga on my harddrive.
For example I have (I think) 3 different versions of mod-players written
in assembler (you know .. the music-format).
Its all in 68000 natch, and it would be really nice to have a
PPC-version (or a working 68k macversion). My question: have anyone made
one they feel like sharing?
I know it sounds like Im incredibly lazy, but there are a lot of good
things to be said about someone making a version for everyone to use
(everyone could improve on it, pooling of resources is always smart,
having some source youd be sure worked on most macs and so on).
Instead of everyone making their own version, it would be a Good Thing
if someone could perhaps release a version? Just like on the amiga where
it worked great.
Ill need a mod-player at some point and I know nothing about sound and
music. So before starting on such a project, I thought Id asked you
guys and girls first. I mean, we are a lot nicer and friendlier than
those amiga-type fellows, no?
Lightsoft has a nice modplayer in Fant5, so maybe they could give some
pointers?
Allan
P.S. I know about the MAD-library, but it seems strange reverting to a
c-library in an assembler-program.
Date: Sat, 13 Dec 97 15:56:52 -0700
From: James Hague <jhague@dadgum.com>
To: Multiple recipients of <list-fantasm@mail.tau.it>
Subject: Re: MOD source
>I'll need a mod-player at some point and I know nothing about sound and
>music. So before starting on such a project, I thought Id asked you
>guys and girls first. I mean, we are a lot nicer and friendlier than
>those amiga-type fellows, no?
I was going to write a MOD player at one point, but I've found that the freely available ones are pretty dang good: PlayerPro and ZSS. In an ideal world I'd prefer something I wrote myself, but I'm not sure how I'd do it better than these libs.
Using a lib from PPC assembly is an interesting undertaking, BTW. You need to convert the CodeWarrior lib to a shared library, and then you have to manually hook into it. Stu has the expertise in this area!
If anyone wants source to a MOD player (in either C or 8086 assembly), see the code/music section www.videogamedesign.com
--
James Hague
Dadgum Games
http://www.dadgum.com/
Date: Mon, 15 Dec 1997 08:53:53 -0500
From: Stuart Ball <lightsoft@compuserve.com>
To: Multiple recipients of <list-fantasm@mail.tau.it>
Subject: NFtT 15 Dec 1997
News From the Tower 15th Dec '97.
---------------------------------
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.
Remember that if you are away over the Christmas holiday period, and set up
or use auto-responding email software, please unsubscribe from or filter
out this list first. Thank you.
X-----------------X
1. Fantasm 5 tips/bugs/questions
2. Recent site updates
3. Internal Dev.
X-----------------X
1. Fantasm 5 tips.
Here are some "problems and tips" from users for your information (edited
for brevity):
**
a).The mystery of the vanishing window!
"I was coding away and building with the time sharing enabled (build hogs
cpu not ticked).
Anyway, I could see that memory was getting pretty low but started a build.
About half way
through Anvil gives me a dialog box saying memory is low. Well I knew that
anyway, so I
clicked OK. Immediately another dialog pops up saying that Anvil had run
out of memory
and I really had to close some windows now. I clicked OK again and then the
frontmost
window just vanished! The build completed and I was subsequently able to
reopen the file
that Anvil had closed. No damage had been done, but it was a little
disconcerting. Could you
explain this please?"
Sure. Anvil checks the amount of free memory every event loop. There are
three levels of low
memory warning/detection.
The first at about 120k free, then 40k free then zero. Anvil has a 40k
reserve buffer that
is never used except when the second level memory warning appears at which
point this
spare memory is brought into play. You will see the free memory in the
status bar reading
something like "0K!!" when this happens. If more temporary memory is
required for a crucial
operation then Anvil will close a window for you. It is programmed to pick
the frontmost
non-project window in this case. Anvil cannot display a dialog at this
point because there
may not be the memory to display a dialog (and the OS may crash in a call).
Please note
that when closing the window Anvil may or may not save the file as
temporary memory is
required to save a file.
The moral of this story is, of course, don't let free memory get too low.
**
b). "Can I start labels with numbers?"
No.
**
c). "I am trying to intersperse 68K code in one of my PPC source files. It
is not working.
Why?"
You are most probably coding the 68K source in lower case. The 68K
assembler is not
case sensitive and as such all it's internal definitions are coded in upper
case only.
Because your files are PPC, the 68K preprocessor is not run when the file
is read into Fantasm.
This phase of the preprocessing normally takes all the text and converts it
to upper case.
Hence to use 68K code in a PPC source file, code it in upper case and it
will assemble fine.
Generally this also makes it stand out like a sore thumb, making it easy to
spot!
Also, be aware that native code is write protected on a PowerMac so:
LEA FRED(PC),A0
MOVE.L #3,(A0)
will plonk you straight into the low level exception handler if running as
part of a native fragment!
**
d). "I own an older version of Fantasm. Is there a path to v5 or do I have
to
purchase it outright?"
As a long time user we certainly do not want you to purchase outright!
Because we have to work out Kagi codes and all sorts of nonsense, we only
publish upgrade
prices from the last major version (which in this case was PowerFant4).
Basically, our policy is you should pay the difference between what you
paid for your
original software and what the new version costs. You can do this by
choosing one of the
payment options from the register program included in the demo and making
up the required amount using the "bonus" tick box. Then either email or
snail mail
the register program's output to Kagi with your payment and we'll send your
CD.
**
e) "How do I code up the param bits for a Universal Procedure Pointer?"
At first it looks complicated, and IM PPCSystem Software has the difficult
job of
explaining the various options necessary to cover all eventualities within
the MacOS.
However, it is quite possible and once you've done one or two it becomes
trivial - some code:
kPowerPCISA EQU 1
**Vertical scroll bar callback
lwz r3,vscrollprocTV(rtoc) ; TV here in data
lwz r4,[t]vscrollproc(rtoc) ; Actual pointer to the code
stw r4,(r3) ; into transition vector
stw rtoc,4(r3) ; followed by our toc
lwz r3,vscrollprocTV(rtoc) ;the address of the code
li r4,0x2c0 ;the parameter passing flags
li r5,kPowerPCISA ;The code is PPC
Xcall NewRoutineDescriptor
stw r3,vscroll_upp(`bss) ;save the UPP
*end*
This code creates a upp of our actionProc for passing to TrackControl.
A TrackControl actionProc has the form of:
pascal void myScrollAction ( theControl, ctrlPart)
ControlHandle theControl;
short ctlPart;
{
your code
}
Thus we can see we are passed a word (or int32) and a half (int16). The
function will return
nothing (void). The template above tells us the convention is PASCAL. Now
we go to Inside Mac
PowerPC System Software page 2-17 where figure 2-6 shows us a template we
can use
for the parameter passing flags that go in r4 for the NewRoutineDescriptor
code above.
parameter 1 is a 4 byte sized item, so bits 24 and 25 are both set.
parameter 2 is a short, or 2 bytes, so bit 22 is set, 23 is clear.
The function returns void, so the return size is zero - bits 26 and 27.
The calling convention is pascal stack based, so bits 28-31 are set to zero
(page 2-15).
Figure 2-7 on page 2-19 gives a template for register based routines. Note
that you can
only pass parameters in 68K registers d0-d3 and a0-a3.
Because we have stated that in this case the code is native PPC, these
parameters
will actually get passed to our routine in r3 and r4.
As a final note, in a callback it is wise to save all registers you are
using
irrespective of the register volatility guidelines! You can do this on the
stack
(stmw/lmw) as long as you call no OS functions within your callback, or if
you do
need to call an OS function, or anything else, use the slightly modified
Xcall macro below.
Xcall: macro
*Stack frame - we need 24 for linkage and 88 for int params
stwu sp,-112(sp) ; parameter area and linkage area for
subroutine
; ref: IM PPC System SW 1-47
*set up params
lwz r12,TheFunctionName(rtoc) *load transition vector
stw R2,20(sp) *save my RTOC
lwz r0,0(r12) *get callee address
mtctr r0 *prepare branch
lwz R2,4(r12) *set callee RTOC
bctrl *to callee
lwz r2,20(sp) *get my toc back
*Tear down stack frame
addi sp,sp,112
endm
------------------------------
**
2. Site updates
a). Beginners Guide to PPC Assembly Language. Chapter 4.
b). Fantasm mailing list archives to 4 Dec. 97
------------------------------
**
3. Internal Dev.
Here is the status as of today:
We are switching over to LXT, which is a low level language based on 68K
assembly language
with extensions.
Fantasm 5.1 is progressing smoothly with no major problems. It is now
native on
both 68K and PowerPC machines. Initial tests indicate it to be faster than
the
version it will replace. The most obvious user enhancement in 5.1 over 5 is
the labels
pop-up menu which is like pop-up funcs allowing faster navigation over
source
files. (Well, faster than APPLE F, type label name colon, return) :-)
There are additions to the macro language and bug fixes where appropriate.
Fanta_C. It works but is not complete. Here are some details:
Preprocessor is at internal version 4. Internal Version 5 or 6 is the
planned
beta version. At the same time it is being ported to LXT. The main
difference between iv4 and iv5 is the handling of "complex macros" which
iv4 does not
handle correctly. This is happening now.
Compiler/grammer core - working and being internally tested/debugged.
Code gen: 68K - working and in test. PPC - not working.
At the moment these three items are individual components
(preproc/grammer/code
gen). They are to be integrated as either child tools of a controlling tool
or
just built into the same container.
Minor mods to the assemblers. For the "big" version the assemblers are
visible
and usable. The little version will probably hide the assembly phase if
there is one.
A source level debugger is also in the works, although the design of this
has to be tightly
integrated with the design of the compiler to allow line numbering tokens
to be passed
right through the system. At this time we have not decided whether an
integrated
debugger (i.e. running as part of Anvil) or an individual item is the best.
-----------------------
Comments, feedback and announcements for inclusion in NFtT can be sent to
either of
our normal addresses.
We reserve the right to edit and snip.
END
Lightsoft 1340 15 Dec 97
Date: Tue, 16 Dec 1997 01:26:05 +0000
From: Paul <mrwhippy@pac.com.au>
To: Multiple recipients of <list-fantasm@mail.tau.it>
Subject: Windows/Window shade
Hello,
Could someone please answer two questions for me?
If you create a window in your application and you want it to have a close
box,do you have to use a WIND resource? (I've got it working with a WIND
resource,but I wanted to know if this is the *only* way)
and the second...
How do you get around the window shade double clicks? If I have a window on
screen,I can either get it where it redraws so often it flickers,or where
it doesn't redraw at all :( Is there some simple technique for this?
Thanks in advance,
Paul
Date: Mon, 15 Dec 1997 06:56:49 -0500
From: Stuart Ball <lightsoft@compuserve.com>
To: Multiple recipients of <list-fantasm@mail.tau.it>
Subject: Re: MOD source
>Using a lib from PPC assembly is an interesting undertaking, BTW. You
need to convert the CodeWarrior >lib to a shared library, and then you have
to manually hook into it. Stu has the expertise in
>this area!
Yes, if Allan, or anybody else needs the info just let me know and I'll dig
out what you need. We spent a while looking at all the options and finally
settled on the PlayerPro library because of the sound quality and general
efficiency.
I think I'm correct in stating that at least some of the PP engine is coded
in assembly language.
Stu.
Date: Tue, 16 Dec 1997 00:48:37 +0100
From: bondard <bondard@ens.fr>
To: Multiple recipients of <list-fantasm@mail.tau.it>
Subject: Re: Windows/Window shade
Hello Paul,
1) About windows with close box: you can create one dynamically with
the following toolbox call :
( NOTE: C syntax ! I cannot give you the asm syntax, I didn't
even receive my Fantasm CD yet... But you surely know how to
make toolbox calls, so the name and usage should be enough for
you I suppose)
Color window:
wind = NewCWindow (wStorage, &rBounds, title, visFlag, wDefProcID,
behind, goAwayFlag, refCon);
B&W window:
wind = NewWindow (wStorage, &rBounds, title, visFlag, wDefProcID,
behind, goAwayFlag, refCon);
wStorage: (Ptr):
WIndowRecord ptr; NIL : the toolbox allocates one
rBounds: (Rect pointer):
window bounding rect in global coords
title: (pascal-style string):
window title
visFlag: (boolean: 0=false, not 0 = true; (don't know if byte or
word!!))
if true=draw immediately
wDefProcID: (word -- 16 bits)
type of window to create (see below for the codes)
behind: (WindowPtr):
-1 = in front; NIL = in back; else: the window
goAwayFlag: (boolean -- see above comments about booleans)
if true, will have a close box <================
refCon: (long -- 32 bits)
application-defined, do what you want with it
wDefProcID codes: (most of them have obvious names)
--------
documentProc = 0 <======= the usual one
noGrowDocProc = 4
zoomDocProc = 8
zoomNoGrow = 12
dBoxProc = 1
plainDBox = 2
altDBoxProc = 3
rDocProc = 16
Hope this helps
-----------------
Daniel Bondard
bondard@ens.fr
-----------------
Never believe that you know the last thing about any human heart
Henry James
Paul wrote:
>
> Hello,
>
> Could someone please answer two questions for me?
>
> If you create a window in your application and you want it to have a close
> box,do you have to use a WIND resource? (I've got it working with a WIND
> resource,but I wanted to know if this is the *only* way)
>
> and the second...
>
> How do you get around the window shade double clicks? If I have a window on
> screen,I can either get it where it redraws so often it flickers,or where
> it doesn't redraw at all :( Is there some simple technique for this?
>
> Thanks in advance,
>
> Paul
>
Date: Tue, 16 Dec 1997 10:45:19 +0000
From: Paul <mrwhippy@pac.com.au>
To: Multiple recipients of <list-fantasm@mail.tau.it>
Subject: SpeakString
Hello again,
I've tried using the SpeakString function without any luck.It's not defined
in the Sound.def file,so I imported it with ifnd etc,but still no luck :( Is
this function not supported,or is there some other way I have to access it?
Thanks
Paul
Date: Tue, 16 Dec 1997 15:52:23 -0600
From: Robert Pollard <omsinc@earthlink.net>
To: Multiple recipients of <list-fantasm@mail.tau.it>
Subject: Re: chickens
Hey Paul,
I am contemplating jumping into Assembler. I am currently developing
databases in 4th Dimension (Mac) and Oracle (Unix, Solaris). I had a
taste of Assembler back in the 6502 microprocessor days. I really go
hooked on the incredible control that I had. The learning curve was
tremendous compared to Basic or a programmable database so using it to
make a quick buck was out of the question. I learned that everybody
needs databases and decided to take a shot. It has been almost 13 years
and I haven't regreted the decision but still I want to learn Assembly.
One problem that I have is that I have no known source of information
that really gets me started. I have self taught 5 different operating
systems and 2 different databases so I believe I can teach myself
Assembly. I just need some resources (without spending a ton of money)
to get started. It wouldn't hurt to have someone that I wouldn't mind a
question ever now and then. This is the other problem. C and Assembly
programmers that I know of are sort of shy when it comes to helping
beginners. I would like to know of a book or some other resource that
puts the big picture in perspective. I know a little C and understand
pointers, arrays, structs, etc. but I need to practice using them. I
understand how to set up a variable in Assembly but I don't understand
all about it, (i.e. rtoc). Anyway, I appreciate anything that would
help me get started. I don't own Fantasm yet but I have used the demo
and studied some of the beginners information that is available. The
Mac toolbox is another mystery area that I definitely would need help
in.
Thanks for anything in advance!
Robert Pollard
(w) omsinc@earthlink.net
(h) Robert.Pollard@mailexcite.com
Date: 16 Dec 97 15:15:37 -0800
From: Cliff Harris <cliff_harris@orangemicro.com>
To: Multiple recipients of <list-fantasm@mail.tau.it>
Subject: Chickens????
Back in 1980 I bought my Apple II (not a "+", not a "e", just a II). I
decided a year later to learn assembly. I bought and read a book. I
bought and read a second book... After buying and reading five books I still
felt that I didn't know enough about assembly to proceed. What I finally
decided was that I needed a project. So I took the source code for the
BASIC program Star Trek (which I believe was in the "red book", or maybe I
just got the listing off of the cassette tape), and started converting it to
6502 assembly. I had the BASIC version and I knew what it did and the
source code showed how to do it. I just had to figure out the nitty gritty
details. Basically it just consists of picking an instruction/function to
implement and looking at the assembler mnemonics until you figure out a
way to do it.
I just got my Fantasm 5 disc, so I'm just starting out with PPC assembly
language. I've been doing 680x0 assembly since 1987 when I got too
frustrated with Microsoft's BASIC compiler and its idiotic restrictions and
rewrote my first (and only) Mac BASIC program in assembly. Everything since
then has been in assembly. I'm in the process of converting a program I
wrote in 680x0 to PPC. I'm planning to upload the source to the Lightsoft
site when it's done. The reason I wanted to do this is because I haven't
seen much in the way of examples that show the toolbox calls. My
application does window scrolling and file input and output, which I haven't seen.
A quick summary of what it does: It's called "ROM Sucker". It scans the
Mac's ROMs and extracts all the resources and lists them in a scrollable
window. It saves the resources in a ResEdit format file for more detailed
examination. The 680x0 version is on the latest "BBS in a Box" CD-ROM
set. I assume that it is therefore also on the AMUG (Arizona Mac User's
Group) web site (www.amug.org). I've got about 2/3 of it working now, so I
expect it'll be done in 2-4 weeks.
While I'm here, I'd like to vent a little: Dear Lightsoft guys: the
Macintosh has allowed SPACES in file names since 1984. I spent about 2 hours
trying to figure out why Anvil couldn't find my source files that were
named "ROM Sucker.s" and "ROM Sucker bss.def" until I finally put underscores
in place of the spaces. Geez, fellas, I shouldn't have had to go through
all that, especially since I couldn't find a mention in the docs about
file name requirements. (I seemed to notice that some of the file names in
the "defs" were truncated in funny ways. You can go up to 31 characters
in a file name, ya know?) By the way the amount of, and detail in, the
documentation is awesome. You guys obviously spent a lot of time on it.
Date: Tue, 16 Dec 1997 18:59:21 -0500
From: Stuart Ball <lightsoft@compuserve.com>
To: Multiple recipients of <list-fantasm@mail.tau.it>
Subject: SpeakString
Hi Paul,
If you haven't already, you need to add speechlib to your project - use
Anvil's "Add shared library" menu command and add "SpeechLib" probably
found in the Speech Manager extension. This will cause your application to
link with speechlib at run-time and SpeakString will be available.
The same would be true of any function not directly exported by
InterfaceLib which is always linked to by the PPC linker. You can tell when
you need to do this because the PPC linker will give an error something
along the lines of "Can't link with xyz - it is not exported by any shared
libraries being linked to".
Having read the above it seems a little disjoined, so here's the checklist:
1. If not defined in any of the .def files, import the function:
ifnd xyz
import xyz
endif
2. Add the correct shared library to your project. (NOTE: This is for PPC
only - if a 68K project, the add shared library command will not be
available).
3. Build.
Stu.
Date: Wed, 17 Dec 1997 13:53:35 +0000
From: Paul <mrwhippy@pac.com.au>
To: Multiple recipients of <list-fantasm@mail.tau.it>
Subject: Re:re:Speakstring
Thanks Stu.
I wasn't adding the shared library.I was getting the "Can't link with xyz"
error but didn't know what to do about it.It seems so simple now :)
Paul
Date: Wed, 17 Dec 1997 13:57:14 +0000
From: Paul <mrwhippy@pac.com.au>
To: Multiple recipients of <list-fantasm@mail.tau.it>
Subject: Controls
Hello,
I'm having a bit of trouble using controls.Could someone help me,please?
Firstly,is the volume slider (like the one in the sound control panel) a
control that you can select? If it is,where can I find it's procID? I found
the ID's for radio buttons and check boxes,etc but no sign of the ID for
sliders :(
And PopUp menus... I can't get these to work at all.I've defined the CNTL
resource,the MENU resource and the GetNewControl function,but no luck at all :(
I've tried using NewControl instead,but still nothing.Is it something to do
with setting the control in the CNTL resource to CDEF? That just changes the
control ID and nothing much else (?).Any help on this one *greatly* appreciated!
Thanks
Paul
Date: Wed, 17 Dec 1997 01:14:04 -0500 (EST)
From: Figaro Tea <humphret@ruby.winthrop.edu>
To: Multiple recipients of <list-fantasm@mail.tau.it>
Subject: Re: Controls
On Wed, 17 Dec 1997, Paul wrote:
> I'm having a bit of trouble using controls.Could someone help me,please?
> Firstly,is the volume slider
I'm not sure about OS 8, but in previous versions the slider was a custom
control that wasn't part of the standard set, which means you'd have to
find a CDEF somewhere or write your own.
> And PopUp menus... I can't get these to work at all.
The values in the control resource are different for popup menus. The
values mean this for popups:
BoundsRect: the rectangle for the menu defined in local
coordinates for the window
Value: a constant that tells where the menu title should be in relation to
the menu, 0 is to the left and 1 is centered on top of the menu
Visible: duh
Max: pixel width of title
Min: MENU ID of the popup menu
ProcID: 1008, the procedure that handles popup menus
If you set these values right then you can test the popup menu in ResEdit.
Just make a sample dialog box and put a control resource in there, if it
shows in ResEdit but not your program then it's not the resource that's
the problem.
..._Tim_...
--=[I know everything...just not at the same time.]=--
http://www.shack.org/zzhumphreyt
zzhumphreyt@winthrop.edu
Date: Wed, 17 Dec 1997 15:31:17 +0100
From: Per Hjeltman <leahjn96@student.umu.se>
To: Multiple recipients of <list-fantasm@mail.tau.it>
Subject: Using Fantasm with CodeWarrior?
Hi.
After trying to write a blitter using CodeWarrior's "wonderful" assembly
support I simply gave up in frustration. My question is: Just how would I
use PPC assembly from Fantasm together with C from CodeWarrior?
/Per Hjeltman
Date: Wed, 17 Dec 97 09:40:04 -0800
From: Kevin Avila <kevin@cache-computing.com>
To: Multiple recipients of <list-fantasm@mail.tau.it>
Subject: Re: Using Fantasm with CodeWarrior?
>After trying to write a blitter using CodeWarrior's "wonderful" assembly
>support I simply gave up in frustration. My question is: Just how would I
>use PPC assembly from Fantasm together with C from CodeWarrior?
Well, mabye someone here has a trick to it, but I have always had an
extreamly hard time using any great amount of assembly with CodeWarrior.
I almost always just end up disassembling the C code and slaping that
into Fantasm. However, if you are just using a small tid-bit of assembly,
you should just be able to use a function like:
asm Boolean myFunction(char *inData, int size)
{
xor r3,r4
cmpwi r3,0x0000
bne myFunction2
blr
}
------------------------------------------
Kevin Avila kevin@cache-computing.com
http://www.cache-computing.com
Date: Wed, 17 Dec 1997 21:42:09 +0100
From: anders <coderonin@geocities.com>
To: Multiple recipients of <list-fantasm@mail.tau.it>
Subject: Re: Using Fantasm with CodeWarrior?
>>After trying to write a blitter using CodeWarrior's "wonderful" assembly
>>support I simply gave up in frustration. My question is: Just how would I
>>use PPC assembly from Fantasm together with C from CodeWarrior?
>
> Well, mabye someone here has a trick to it, but I have always had an
>extreamly hard time using any great amount of assembly with CodeWarrior.
>I almost always just end up disassembling the C code and slaping that
>into Fantasm. However, if you are just using a small tid-bit of assembly,
>you should just be able to use a function like:
I have written quite a few blitters in PPC asm, using CodeWarrior.
The latest will be released when SpriteWorld 2.1 goes out of beta.
The assembler has improved somewhat with CW pro, too.
What are you having trouble with ? There are a few extended mnemonics
missing, I know but besides that ?
I have tried Fantasm, but Fantasm 5 still crashes a lot on my computer.
And I don't want to learn an entire macro language. It's easier for me
as a C programmer, to stay with C and use assembly functions when needed.
I find Fantasm to be a good thing, but not yet good enough....
>asm Boolean myFunction(char *inData, int size)
>{
> xor r3,r4
> cmpwi r3,0x0000
> bne myFunction2
> blr
>}
>
And remember to use fralloc/frfree if you want to use local variables/structs.
//anders
Date: Wed, 17 Dec 1997 19:17:46 -0500
From: Ajay Nath <AjayNath@compuserve.com>
To: Multiple recipients of <list-fantasm@mail.tau.it>
Subject: Chickens????
>>
I'm planning to upload the source to the Lightsoft
site when it's done. The reason I wanted to do this is because I haven't
seen much in the way of examples that show the toolbox calls. My
application does window scrolling and file input and output, which I
haven't seen.
<<
I don't mean to blow my own horn but two of the examples that i wrote are
on the CD. They are "AETester" which shows how to handle all the standard
mac events including apple events & "URLtility" which shows how to do file
i/o, implement a scrolling list, handle apple events & send apple events to
other apps. All the source is well commented. Try the apps & then check out
the source code.
I am willing to explain anything that people have questions about.
Date: 16 Dec 97 17:28:31 -0600
From: "Kevin McEnhill" <kevinm@kci.wayne.edu>
To: Multiple recipients of <list-fantasm@mail.tau.it>
Subject: Re: Apple Programmers program
On Wed, Dec 10, 1997 5:07 AM, Alok <mailto:robot@writeme.com> wrote:
I just visited Apple web Site and found out that there a CD dilivered every
month to the Apple Programmers group.
AS I fell sick this week end, I haven't had time to find any more info.
Anybody knows the membership price, if it's worth it, if I can get the CD
in Switzerland, etc...
Bye, Alok
Sorry for the late reply but there is this thing that keeps bothering me
Monday thru Friday from about 6:30 am to about 4:00 pm (I have people call
it work but my mom told me not to swear 8-).
I saw that a few people responded by pointing you to the Developer Program.
There is another way to get some of the CDs that you are talking about. My
wife and I bought the Developer Mailing. There is no "non-disclosure
agreement" and you don't get access to Apple's tech support people. You do
get a LOT of software though. We have all of Apple's latest Software
Development Kits, their development tools (MPW), the Inside Macintosh on
CD-Rom and other toys. You also get the latest version of their OS. Over
the year that we have had it we got System 7.6 and MocOS8 on a seperate
disk from the normal mailing and the next time that the OS disk comes
around, you get all of the localized versions.
We had to drop it this year though. There was no way we could afford the
$150 US per year. But, for the year that we had it it was VERY useful. The
price is a bit steep until you look at what it would cost to buy everything
seprately and it is $100 US cheaper that the Developer Program.
Hope this helps
Date: Thu, 18 Dec 1997 07:34:47 -0500
From: Stuart Ball <lightsoft@compuserve.com>
To: Multiple recipients of <list-fantasm@mail.tau.it>
Subject: Using Fantasm with CodeWarrior?
Hi Per,
The easiest way is to create a merged project in Anvil, where the target is
the app created by CodeWarrior. Set the code to go in a resource and tell
Anvil not to create the cfrg resource. You can then use GetResource,
HLockHi and then GetMemFragment to load and instantiate your fragment from
C.
Stu.
>Hi.
>
>After trying to write a blitter using CodeWarrior's "wonderful" assembly
>support I simply gave up in frustration. My question is: Just how would I
>use PPC assembly from Fantasm together with C from CodeWarrior?
>
>/Per Hjeltman
Date: Thu, 18 Dec 1997 07:34:51 -0500
From: Stuart Ball <lightsoft@compuserve.com>
To: Multiple recipients of <list-fantasm@mail.tau.it>
Subject: Chickens????
Cliff Harris wrote:
>Dear Lightsoft guys: the
>Macintosh has allowed SPACES in file names since 1984. I spent about 2
hours
>trying to figure out why Anvil couldn't find my source files that were
>named "ROM Sucker.s" and "ROM Sucker bss.def" until I finally put
underscores
>in place of the spaces.
Hello Cliff,
Big apologies for any trouble caused.
We added the following to the release notes on 13th Oct:
"4. Fantasm does not like file names with spaces in them because of the
field based
layout of the language."
Stu.
Date: 18 Dec 97 10:40:31 -0800
From: Cliff Harris <cliff_harris@orangemicro.com>
To: Multiple recipients of <list-fantasm@mail.tau.it>
Subject: Feature suggestions
I'd like to see two features implemented in Anvil.
Right now to use the Find command on a label (or whatever), I
double-click on the label, Cmd-C, Cmd-F, Cmd-V, <return>. I would like to be able to
skip the Cmd-C and Cmd-V steps, i.e. double-click on the label, Cmd-F,
<return>. This means that the selected text would automatically appears in
the "Find..." area of the Find dialog box, so we just need to hit <return>
and off we go.
I see that I cannot do a "backward selection". By that I mean that if I
hold down the shift key and click somewhere earlier in the text than the
cursor location the cursor just moves to the new position, but the text is
not selected. Forward selection works just fine, but I'd like to backward
select too.
Date: Thu, 18 Dec 1997 17:27:13 -0500 (EST)
From: Scott Lahteine <slur@world.std.com>
To: Multiple recipients of <list-fantasm@mail.tau.it>
Subject: Re: Chickens????
But...
With regard to handling spaces inside data fields, this is easily
fixed by putting "quotes" around filenames, something that could be done
quite easily for the next minor upgrade. The quotes can be any character
which can't be inside a filename.
scott lahteine remotely thru PINE
<mailto:slur@world.std.com>
<http://world.std.com/~slur/>
"Thank you very much." - Elvis Presley
Date: Thu, 18 Dec 1997 19:02:46 -0500
From: Ajay Nath <AjayNath@compuserve.com>
To: Multiple recipients of <list-fantasm@mail.tau.it>
Subject: Feature suggestions
>>
Right now to use the Find command on a label (or whatever), I
double-click on the label, Cmd-C, Cmd-F, Cmd-V, <return>. I would like to
be able to
skip the Cmd-C and Cmd-V steps, i.e. double-click on the label, Cmd-F,
<return>. This means that the selected text would automatically appears in
the "Find..." area of the Find dialog box, so we just need to hit <return>
and off we go.
<<
i think that the editor is the weakest part of Anvil. it has a lot of
problems with its stability.
try this: create a new document...type some words...double click on the
first word..all the letters are selected except the first one.
try this (WARNING this locks up my machine): open a new doc....don't type
anything...click on the document several times quickly...the insertion
caret disappears...now try to type..BOOM, your machine is locked up.
there is a standard for doing the quick entry of a search term...it
involves selecting a word & typeing cmd-E to enter it as the current search
term. then you can hit cmd-G to start the Find operation...thi is supported
by MPWs editor, BBEdit, TexEdit, Alpha & codewarriors editor. I guess you
could say it is a bit of a standard!
the real shame is that anvil does not support apple events..if it did then
you could use your favorite editor & then use a macro (or whatever) to tell
anvil to rebuild the current project, report any errors in the clipboard &
run your app if there were no errors.
even the first mac based development system (MDS Assembler - anyone
remember it?) supported this kind of external editor-assembler-linker way
of working....of course lightsoft might also make it possible to replace
the anvil editor with a plug-in one & then we could just write a plug-in
that uses WASTE (the free text edit replacement) to give us a more stable &
more mac-like editor.
i used to use bbedit to edit files & then switch to fantasm to compile them
& then switch to the finder to run the app...bbedit supports extensions & i
could have used them to drive Fantasm but fantasm does not support apple
events...*SIGH*..one step forward (Anvil), two steps back (i still have to
switch back & forth from bbedit & anvil)
Date: Fri, 19 Dec 1997 16:56:08 +0000
From: Paul <mrwhippy@pac.com.au>
To: Multiple recipients of <list-fantasm@mail.tau.it>
Subject: Drag and drop
Hello (again),
I'd like to write the code to handle drop-launching,but I can't seem to find
it in inside mac.Could someone please tell me which Inside Mac book it's in?
I've found references to it in other IM books,but no book/page numbers were
mentioned :(
Thanks!
Paul
Date: Fri, 19 Dec 1997 16:32:49 +0100
From: robot@writeme.com (Alok)
To: Multiple recipients of <list-fantasm@mail.tau.it>
Subject: Alok
Well I'm back on my feets after a long stay in bed.
I have few questions:
Where in the world is MPW? I searched it all over the place.. Just can't
find it... Pls give me a direct link to it, thx.
I'm currently working on a simple but fun 2D action game. Basically the
game is split into squares that form a map... A bit like dig dug, or
boomberman.
I'm planning to access to screen directly, but I need a sugestion. All my
sprits are known before the game starts (loaded into memory). What's the
best way I can use to display them? Plot them pixel by pixel? Use a swap
with an invisible screen? etc... Of course this game was first made on the
C64 so I won't have speed problems.
Bye, ALok
email: robot@writeme.com
Date: Fri, 19 Dec 1997 16:38:16 +0100
From: robot@writeme.com (Alok)
To: Multiple recipients of <list-fantasm@mail.tau.it>
Subject: Re: Drag and drop
>Hello (again),
>
>I'd like to write the code to handle drop-launching,but I can't seem to find
>it in inside mac.Could someone please tell me which Inside Mac book it's in?
>I've found references to it in other IM books,but no book/page numbers were
>mentioned :(
>
>Thanks!
>
>Paul
>
>
Hi,
Heard I have an example of Drag and Drop written in Basic. Want the source
and the compiled prog?
Let me know...
Alok
email: robot@writeme.com
Date: Fri, 19 Dec 1997 11:25:15 -0500
From: Stuart Ball <lightsoft@compuserve.com>
To: Multiple recipients of <list-fantasm@mail.tau.it>
Subject: Feature suggestions
We sincerly appreciate all bug reports, constructive criticism and feature
suggestions. People work in different ways on different projects and even
though we had a very good beta phase on Fantasm 5 it didn't (and won't)
cover all eventualities.
We are as determined as any other Mac developer to achieve bug free and
useful software, probably more so as we use our own software to write with.
We use this stuff 14-16 hours every day. We also try to vary the projects
we work on with Fantasm to get a better handle on what things it is good at
and where it falls down.
On the other hand, and as developers I'm sure you can sympathize with this,
"featuritus" and bloatware simply isn't wanted around here. Plus of course,
developers do tend to get a very narrow field of vision when somebody
starts mentioning release dates and schedules.
We are simply not in a position to promise any new features - that would be
foolhardy. But we do take all user suggestions very seriously, so please
don't be shy! If something is annoying you, or you feel something could be
done better, please continue to let us know.
With all of the above in mind, we will start an extended user testing phase
on Fantasm "the next version" early in 1998, starting at alpha with few new
facilities in the UI department. The main aim is to "round it out", make it
faster, easier to use and stomp on any bugs.
Thank you.
Stu.
Date: 19 Dec 97 08:11:49 -0800
From: Cliff Harris <cliff_harris@orangemicro.com>
To: Multiple recipients of <list-fantasm@mail.tau.it>
Subject: RE: Drag and drop
Paul wrote:
>
>I'd like to write the code to handle drop-launching,but I can't seem to
find
>it in inside mac.Could someone please tell me which Inside Mac book it's
in?
>I've found references to it in other IM books,but no book/page numbers
were
>mentioned :(
Just off the top of my head, I don't think there is anything really
special about this. You have to set the high-level event aware bit in the SIZE
resource. Then just handle high-level events (event code 23), namely
'odoc' and 'oapp'. Basically what happen is that the Finder will open your
app and send it an 'odoc' high level event message when you drag a document
onto its icon. Then you have to extract the name of the document file
from the message and open it. This is kind of complicated to do. All my
source code is at home, so I can't give you the particulars. Check out
IM:Interapplication Communication chapter 4.
Date: Fri, 19 Dec 1997 11:25:12 -0500
From: Stuart Ball <lightsoft@compuserve.com>
To: Multiple recipients of <list-fantasm@mail.tau.it>
Subject: Drag and drop
>I'd like to write the code to handle drop-launching,but I can't seem to
find
>it in inside mac
Hello Paul,
You need to handle the odoc apple event. See some of Ajay's example code
for details.
You need to set your applications flags so that High Level event aware is
set.
Stu.
Date: 19 Dec 97 07:40:55 -0800
From: Cliff Harris <cliff_harris@orangemicro.com>
To: Multiple recipients of <list-fantasm@mail.tau.it>
Subject: RE: Feature suggestions
Ajay Nath wrote:
>>>
>even the first mac based development system (MDS Assembler - anyone
>remember it?)
I'm still using CDS (Consulair Development System) on my IIci for all my
680x0 assembly language development. It became CDS when Apple gave MDS
back to Bill Duvall (who wrote it under contract to Apple). I suggested the
double-click, Cmd-F, <return> sequence because I am used to it in CDS.
Unfortunately it is not 32-bit clean so I have to run under System 7.5.5.
I tried MPW, but it was too complicated and bulky. I looked at Fantasm
about a year or two ago as a replacement also, but rejected it because it
didn't understand the RTD mnemonic, one of my favorites. I really like the
CDS environment. Very clean, simple, fast and easy.
I tried C for my personal use when I first got my 8500, but I got
discouraged when I couldn't get my basic application shell to work correctly. I
don't like high level languages. Too many wacko things happen. Before
you guys out there jump on that, my job title is "Hardware/software
engineer" and I do use C at work. But now I'm having fun at home with Fantasm PPC
assembly.
While I'm here, I have a question. Is the Delay routine documented
anywhere in the new Inside Macintosh? It's in the old volume II on page 384,
but I couldn't find any reference to it in the new IM or on the IM CD-ROM.
Date: Fri, 19 Dec 1997 21:24:18 +0100
From: leahjn96@student.umu.se (Per Hjeltman)
To: Multiple recipients of <list-fantasm@mail.tau.it>
Subject: Re: Using Fantasm with CodeWarrior?
> Hi Per,
> The easiest way is to create a merged project in Anvil, where the target is
> the app created by CodeWarrior. Set the code to go in a resource and tell
> Anvil not to create the cfrg resource. You can then use GetResource,
> HLockHi and then GetMemFragment to load and instantiate your fragment from
> C.
I've don that, but now I have another problem: Suppose I want to call
the function FooFunction, how would I then do? Is there some call like
CallFunction()? In that case, how much overhead would that add? The
function I'm calling is a blitter so I cannot afford to lose valuable
time just because the function happens to reside in a code fragment.
And how would I use the registers? If I mess all the registers up,
wouldn't my program crash when it returns to the CodeWarrior code?
Any help would be much much appreciated.
Date: Sat, 20 Dec 1997 11:45:07 +0100
From: anders <coderonin@geocities.com>
To: Multiple recipients of <list-fantasm@mail.tau.it>
Subject: Re: Using Fantasm with CodeWarrior?
>> Hi Per,
>> The easiest way is to create a merged project in Anvil, where the target is
>> the app created by CodeWarrior. Set the code to go in a resource and tell
>> Anvil not to create the cfrg resource. You can then use GetResource,
>> HLockHi and then GetMemFragment to load and instantiate your fragment from
>> C.
>
>I've don that, but now I have another problem: Suppose I want to call
>the function FooFunction, how would I then do? Is there some call like
>CallFunction()? In that case, how much overhead would that add? The
>function I'm calling is a blitter so I cannot afford to lose valuable
>time just because the function happens to reside in a code fragment.
You declare a function pointer, load the address of the function (from your
fragment). And then call the function (using the pointer).
This sets up the transition vector for you, which jumps to your code.
It also cleans up after you return from your function.
This doesn't add to much overhead (this overhead is generated for every
cross-TOC function call in CodeWarrior)
>And how would I use the registers? If I mess all the registers up,
>wouldn't my program crash when it returns to the CodeWarrior code?
You must save/restore the following "non-volatile" registers:
r1,r2 (of course)
r13-r31
fp14-fp31
cr2-cr4
The others are free for you to mess up :-)
>Any help would be much much appreciated.
>
Recommended reading:
"Assembler for Mac with PPC PDF", documentation for PPCAsm (MPW I think)
"PPC System Software", Inside Mac
//anders
Date: Sat, 20 Dec 1997 12:42:07 -0500
From: Ajay Nath <AjayNath@compuserve.com>
To: Multiple recipients of <list-fantasm@mail.tau.it>
Subject: RE: Feature suggestions
>> I looked at Fantasm
about a year or two ago as a replacement also, but rejected it because it
didn't understand the RTD mnemonic, one of my favorites.
<<
maybe you could just define a macro that inserts the hex code for the
instruction?
Date: Sat, 20 Dec 1997 12:51:38 -0500
From: Ajay Nath <AjayNath@compuserve.com>
To: Multiple recipients of <list-fantasm@mail.tau.it>
Subject: RE: Feature suggestions
anyone remember Dave McWherters McAssembly? i think it is still available
in the compuserve libraries. it was a cool fast small 68 assembler that
worked like a charm. i wonder if it would work under MacOS 8. i bet it
would as it seemed to be well coded.
Date: Sat, 20 Dec 1997 12:54:30 -0500
From: Ajay Nath <AjayNath@compuserve.com>
To: Multiple recipients of <list-fantasm@mail.tau.it>
Subject: free object c compiler
on the latest codewarrior cds there is something called "ObjectC" which is
apparently some free (for non commercial use?) development environmetn
which i haven't checked out.
here is the URL for it:
http://ourworld.compuserve.com/homepages/CPR_ObjectC
Date: Sat, 20 Dec 1997 12:56:47 -0500
From: Ajay Nath <AjayNath@compuserve.com>
To: Multiple recipients of <list-fantasm@mail.tau.it>
Subject: Drag and drop
by drop launching i assume that you mean dropping a file onto an app? you
have to program your app to recognise apple events & write an apple event
handler to do this....
or you could just look at the source for an app i wrote called "AETester"
that is on the lightsoft web site that shows how to do the above stuff
using PPC asm code with fantasm
Date: Sun, 21 Dec 1997 19:19:37 +0000
From: Paul <mrwhippy@pac.com.au>
To: Multiple recipients of <list-fantasm@mail.tau.it>
Subject: Re:re Drop launching
Thanks for all the responses to my question about drop launching -
especially Ajay for his source code that helps it all make a bit more sense :)
Paul
Date: Sun, 21 Dec 1997 10:44:07 -0500
From: Ajay Nath <AjayNath@compuserve.com>
To: Multiple recipients of <list-fantasm@mail.tau.it>
Subject: bss register
why did you guys choose to use r30 as the bss register? why not r31?
i always forget that r31 is available fo me to use as a register..
Date: Mon, 22 Dec 1997 20:57:50 -0500
From: Stuart Ball <lightsoft@compuserve.com>
To: Multiple recipients of <list-fantasm@mail.tau.it>
Subject: bss register
Ajay Nath wrote:
>why did you guys choose to use r30 as the bss register? why not r31?
>i always forget that r31 is available fo me to use as a register..
Good question! The answer is:
We found early versions of the "mixed mode" manager would simply crash when
calling the OS if r31 was modified from it's program start up state, so we
plumped for r30 instead and saved some overhead in the function call.
Stu
Date: Mon, 22 Dec 1997 23:19:02 -0500
From: Ajay Nath <AjayNath@compuserve.com>
To: Multiple recipients of <list-fantasm@mail.tau.it>
Subject: Calling routines
I have a question.
Suppose i have two routines A & B. Both have local variables. A calls B.
Is this the correct code for A to call B?
stwu sp,-56(sp) ; set up sp
bl B ; branch
addi sp,sp,56 ; clean up sp
Do I need to do the stack manipulation before & after the bl?
And i start my coding of B with:
mflr r0
stw r0,8(sp) ; save the LR
stwu sp,-FrameSize(sp) ; set up the stack for Bs locals &
register save area
& i end B with:
addi sp,sp,FrameSize
lwz r0,8(sp)
mtlr r0
blr ; return
Basically from the call from A to B the stack is getting manipulated twice.
This seems inefficient to me but it hasn't caused any errors that I can see
in my apps.
Any thoughts?
Date: Mon, 22 Dec 1997 23:20:26 -0500
From: Ajay Nath <AjayNath@compuserve.com>
To: Multiple recipients of <list-fantasm@mail.tau.it>
Subject: bss register
>>
We found early versions of the "mixed mode" manager would simply crash when
calling the OS if r31 was modified from it's program start up state, so we
plumped for r30 instead and saved some overhead in the function call.
<<
Do you know if this has been fixed?
Date: Tue, 23 Dec 1997 15:21:07 +0100
From: robot@writeme.com (Alok)
To: Multiple recipients of <list-fantasm@mail.tau.it>
Subject: Re: Using Fantasm with CodeWarrior?
Hi,
Maybe this isn't what you want to do, but anyways here is my suggestion,
some people will like this others (majority) will hate it.
When combining CodeWarrior with Fantasm, do like Mathematica, have two apps
running. One part calculation (hard job) for the Assembly, the other nice
looking windows for the input.
Bye, Alok
Date: Wed, 24 Dec 1997 18:00:26 +0000
From: Paul <mrwhippy@pac.com.au>
To: Multiple recipients of <list-fantasm@mail.tau.it>
Subject: Resources?
Hello,
I'm stuck again :)
How do you read data from a resource, 1 byte at a time? I can only find
information on how to load the whole resource at once :(
Any help really appreciated!
Paul
Date: Thu, 25 Dec 1997 09:40:46 +0000
From: Paul <mrwhippy@pac.com.au>
To: Multiple recipients of <list-fantasm@mail.tau.it>
Subject: Re: my resource question
Hello again,
I've figured out what I was doing wrong and I can read data from resources
easily now :) I must have had a bit too much Christmas spirit(s) ;)
Paul
PS - While I'm wasting your time with this message... "Merry Christmas!" :)
Date: Thu, 25 Dec 1997 17:39:54 +0000
From: Paul <mrwhippy@pac.com.au>
To: Multiple recipients of <list-fantasm@mail.tau.it>
Subject: CLUT's
Hello,
Does anyone have any tips on how I should do this....?
I'm working with image files and I'm really stuck with the colour
palette.For now,I'm only interested in the indexed 256 colour variety.I have
the raw palette data but I have no idea how to load it into a CLUT.Should I
be trying to create a new CLUT from the data,or is that only for 15-bit+
palettes?
All of the routines and functions I've found so far,are just to load and
dispose of CLUT resources.I can't find any mention of how to get the data
into a CLUT resource in the first place.Besides,I've noticed most people
don't seem to use them anyway,so there's obviously a better way :)
Any help worshippingly accepted :)
Paul
Date: Fri, 26 Dec 1997 10:10:34 +0000
From: Paul <mrwhippy@pac.com.au>
To: Multiple recipients of <list-fantasm@mail.tau.it>
Subject: Colour in a greyscale CLUT?
Hello again,
Ok,I've figured out my CLUT problem,but now I have another one :( If I load
a greyscale CLUT (254 greys,black & white),why is it,when I load an
image,certain parts of the image are *green*?
Thanks in advance,
Paul
X-Listserver: Macjordomo 1b10 - Macintosh Listserver by Michele Fuortes
Date: Fri, 26 Dec 1997 08:36:20 -0500
From: Ajay Nath <AjayNath@compuserve.com>
To: Multiple recipients of <list-fantasm@mail.tau.it>
Subject: Stack creation
Well I found the answer to my question about stack creation on PPC.
My source of info was "Optimizing PowerPC Code" by Gary Kacmarcik & the IBM
Compiler Writers Guide.
If we have routines "A" & "B" & "A" calls "B" then stack creation is as
follows if you use the standard calling conventions:
1) routine A does a "BLR B"
2) routine B saves any floating point registers (FPR) BEFORE it modifies
(builds) the stack
3) routine B saves any general registers (FPR) BEFORE it modifies (builds)
the stack
4) routine B saves the LR (& sometimes it needs to save the CR)
5) routine B modifies (builds) its stack
6) routine B does its stuff
7) routine B restores any registers it saved
8) routine B restores the LR (and maybe the CR) & does a "BLR" to return
This is kind of weird since B saves the volatile registers it uses BEFORE
its stack is built! This is called "writing above the current stack
pointer". Kacmarcik says on pg. 260, "If writing above the stack offends
you as a programmer, you can simply not do it."
Now the two apps that I have written that use PPC Asm do not follow the
above convention but they work fine. I just wanted to point out that they
DO deviate from the standard so if you look at the source code you should
know this.
Date: Fri, 26 Dec 1997 16:40:09 -0500
From: Stuart Ball <lightsoft@compuserve.com>
To: Multiple recipients of <list-fantasm@mail.tau.it>
Subject: bss register
Ajay wrote:
>>Do you know if this has been fixed?
I'd love to be able to give a definite answer but unfortunately I do not
know whether this is still the case. Maybe others have successfully used
r31?
Stu.
>>
We found early versions of the "mixed mode" manager would simply crash when
calling the OS if r31 was modified from it's program start up state, so we
plumped for r30 instead and saved some overhead in the function call.
<<
Date: Fri, 26 Dec 97 15:38:03 -0000
From: Kevin Avila <kevin@cache-computing.com>
To: Multiple recipients of <list-fantasm@mail.tau.it>
Subject: Re: bss register
>Maybe others have successfully used
>r31?
Don't use it. =) r31 is like a "messaging" register for the MacOS. the
emulator uses it alot. I guess it would be okey to use it while your
application is the one currently accessing the CPU, but please restore it
when your done because if the emulator sees something in r31 thats not
expected, it will hickup and there goes your computer.
------------------------------------------
Kevin Avila kevin@cache-computing.com
http://www.cache-computing.com
Date: Sat, 27 Dec 1997 01:43:25 +0100
From: robot@writeme.com (Alok)
To: Multiple recipients of <list-fantasm@mail.tau.it>
Subject: sit v.s. hqx
Hi,
I have noticed that very often people compress a file into sit then hqx but
sit is often smaller than sit+hqx or just hqx.
I would like Apple to get this msg cos I just downloaded a file xxxxx.sit.hqx
which took me an hour and if it would have been .sit only I would have
saved about 15 minutes!
But of course, there may be some special reason for using hqx, if so pls
let me know.
Bye, Alok
email: robot@writeme.com
Date: Sat, 27 Dec 1997 01:43:51 +0100
From: robot@writeme.com (Alok)
To: Multiple recipients of <list-fantasm@mail.tau.it>
Subject: Alok: Ci-Mots
Hello!!!
I have just finished my latest game. It's a word game in french running on
the Macintosh (don't worry a PC & English version is planned, but it'll
take some time...)
If you are interested in recieving it (300k nicely compacted with StuffIt ;
you may use Netscape Navigator to open it...), pls let me now.
BTW SVM Mac & Univers Mac (No 76) will publish it on Feb & March respectivly.
Bye, Alok
Bonjour!!!
Je viens juste de finir mon tout dernier programme. C'est un jeu de mot en
francais qui tourne sous Macintosh (ne vous en faites pas, une version PC &
anglais est prevue, mais ca va mettre du temps...)
Si vous voulez recevoir ce jeu (seul. 300k compacter avec StuffIt ; vous
pouvez utiliser Netscape Navigator pour l'ouvrir...), ecrive moi.
NB: Ce jeu sera disponible sur les CDs de SVM Mac & Univers Mac (no 76) de
fevrier et mars respectivement.
A+ Alok
Date: Sat, 27 Dec 1997 11:41:51 +0000
From: Paul <mrwhippy@pac.com.au>
To: Multiple recipients of <list-fantasm@mail.tau.it>
Subject: CLUTs (again)
Hello,
Ok,so now I'm desperate :) I really need some help re: CLUT's.
I separated a 768 byte colour palette from an 8 bit indexed colour image and
managed to mangle it into a CLUT resource,but I must be doing something
wrong because some of the colours are just not right :(
So I opened the image in Photoshop,saved the CLUT,and used a converter
utility to make it into a CLUT resource,instead.This didn't work properly
either :(
Out of desperation,I wrote a quick hack on the PC,to extract the palette
that way,then transfer the data into an ordinary resource,then used
GetResource and SetEntries,but then ResEdit said there were more colours in
the resource than it could display :(
I'm disposing the old handle in the pmTable before loading in my CLUT as it
says to in Inside Mac,but still no luck at all :(
Has anyone here loaded a palette from data (no CLUT resource) in this way
who could give me some hints about where I'm going wrong?
Thanks for *any* help :)
Paul
PS - Why does a 768 byte palette turn into 2056 bytes in the CLUT resource?
Date: Fri, 26 Dec 1997 22:44:18 -0500
From: Ajay Nath <AjayNath@compuserve.com>
To: Multiple recipients of <list-fantasm@mail.tau.it>
Subject: Re: bss register
actually i have been writing an app that uses r31 as its bss register & it
works fine.
i am having a problem with using anvil now though. it says something about
not being able to write out the app because of a "corrupted resource". this
has happened to me before & it was a problem with my hard drive & i ran the
apple disk repair utility & everything worked again...
the ONLY app that has ever had this problem has been PowerFantasm in its
various versions..
this time disk repair did indeed say that the hard drive needed to be
repaied & it said that it did it but i still get problems with
Anvil...anyone have any suggestions on how to work around this? i have
tried working with a copy of the project & reinstalling Anvil...all these
things didn't work...i guess i need a new hard drive (*SIGH*)
Date: Fri, 26 Dec 97 21:33:37 -0700
From: James Hague <jhague@dadgum.com>
To: Multiple recipients of <list-fantasm@mail.tau.it>
Subject: Re: CLUTs (again)
>PS - Why does a 768 byte palette turn into 2056 bytes in the CLUT resource?
Colors in a CLUT on the Mac are 16-bits, not 8. In addition to each rgb
value, there is a 16-bit field used for various and sundry things.
Bottom line: each entry has 8 bytes. 256*8=2048 + an 8 byte header =
2056. See the universal headers of IM: Quickdraw for details.
--
James Hague
Dadgum Games
http://www.dadgum.com/
Date: Sat, 27 Dec 1997 02:10:23 -0500
From: Stuart Ball <lightsoft@compuserve.com>
To: Multiple recipients of <list-fantasm@mail.tau.it>
Subject: Re: bss register
Ajay wrote:
>i am having a problem with using anvil now though. it says something about
>not being able to write out the app because of a "corrupted resource".
Hello Ajay,
Hope you had a good Christmas.
Maybe there's something in the list below that may help:
1. Move the target (not copy, or copy and rename old target) to another
disk (if available; a floppy would be fine as a verification measure if no
other HD). Reload the project. Anvil will ask you to verify target location
- point it at target on the new media and then try building.
2. running Norton Utils or Hard Disk Toolkit etc (checking for bad blocks
etc) across ones disk(s).
3. rebuilding the desktop on all drives
4. Added any extensions lately? 'Specially file system enhancements?
5. You may need to run Apple's disk repair App. several times to achieve a
satisfactory result.
If none of this helps, if you could give me some more information about
exactly when this is happening, I may be able to pinpoint the problem more
accurately.
For example is it during phase 4 (post link for example) or rescopy? If
during rescopy, have you checked your source resource(s)? (ResEdit is good
for this). The output code is going to the data fork or a resource?
Creating a cfrg resource?
The exact error message string would allow me to pinpoint the problem area
pretty closely.
Many thanks,
Stu.
Date: Sat, 27 Dec 1997 20:11:30 +0100
From: "MoonDark" <moondark@telemacus.it>
To: Multiple recipients of <list-fantasm@mail.tau.it>
Subject: Re: Alok: Ci-Mots
At 01:43 +0100 27/12/1997, Alok wrote:
>Hello!!!
>
>I have just finished my latest game. It's a word game in french running on
>the Macintosh (don't worry a PC & English version is planned, but it'll
>take some time...)
>
>If you are interested in recieving it (300k nicely compacted with StuffIt ;
>you may use Netscape Navigator to open it...), pls let me now.
>
>BTW SVM Mac & Univers Mac (No 76) will publish it on Feb & March respectivly.
Send it over please
Regards,
Mario
Date: Sun, 28 Dec 1997 06:28:51 +0100
From: "MoonDark" <moondark@telemacus.it>
To: Multiple recipients of <list-fantasm@mail.tau.it>
Subject: disable keyboard?
Hi, I'm trying to cook up a small program which disables keyboard input and
turns it back on when a specific task occurs ( a key is pressed, or maybe,
more easily, mouse is positioned at a certain location on screen ). I know
there must be several ways to do that, I'm trying to code this proggie as
transparently as possible, I need to keep my young son off my mac and I
can't stand using all this adultkey stuff, I only need to disable keyboard
input, I've got some ideas about doing it in C, one would be patching
getnextevent and disable reports of keyboard events, but sounds a little
too drastic and asm, as always, would be the best. I've no problem to
convert C snippets into asm code so any help would be warmly appreciated =)
Thx in advance!
Mario
Date: Sun, 28 Dec 97 13:04:32 -0000
From: Kevin Avila <kevin@cache-computing.com>
To: Multiple recipients of <list-fantasm@mail.tau.it>
Subject: Re: disable keyboard?
>one would be patching
>getnextevent and disable reports of keyboard events
I think that would actually be the best way. I disabled the keyboard
years ago on a 68K mac by disabling the keyboards IRQ, but that was that
hard ware, and especily hard on a powermac.
------------------------------------------
Kevin Avila kevin@cache-computing.com
http://www.cache-computing.com
Date: Mon, 29 Dec 1997 03:38:35 +0100
From: bondard <bondard@ens.fr>
To: Multiple recipients of <list-fantasm@mail.tau.it>
Subject: bad drive? maybe not..
Ajay Nath wrote:
>
> i am having a problem with using anvil now though. it says something about
> not being able to write out the app because of a "corrupted resource". this
> has happened to me before & it was a problem with my hard drive & i
Hello,
Perhaps your drive really has a problem, but I had something like
this happen to me, and I finally found it was a stupid error on
my part (aren't they all?), due to incorrect settings coupled
with an uninformative error message.
It seems Anvil/Fantasm give such a "resource corrupted" message
if the language settings are not right. Look at "Edit:General
preferences..."
dialog, at top left of window, the four "language" radio buttons.
(in my case, I wanted PPC and it was set for 68K).
Hope this helps
-----------------
Daniel Bondard
bondard@ens.fr
-----------------
Never believe that you know the last thing about any human heart
Henry James
Date: Mon, 29 Dec 1997 12:04:13 +0100
From: robot@writeme.com (Alok)
To: Multiple recipients of <list-fantasm@mail.tau.it>
Subject: Speech Manager
Hi,
I have a prob
I want my programme to use Apple's Speech Manager functions to speeck text,
so I looked at Inside Mac and here is what it says:
Use the function SpeekSentence (s:str255)
But where is this function?
Somebody pls help me.
I'm working under Thikn Pascal 4.0 (This is a school project).
Bye, ALok
Date: 29 Dec 97 07:10:52 -0800
From: Cliff Harris <cliff_harris@orangemicro.com>
To: Multiple recipients of <list-fantasm@mail.tau.it>
Subject: Routines not in library
I'm trying to use InitCursorCtl and SpinCursor, but Anvil complains that
they can't be imported because it can't find a shared library (or words to
that effect). So what do I need to do to use these routines?
Date: Mon, 29 Dec 97 11:03:26 -0000
From: Kevin Avila <kevin@cache-computing.com>
To: Multiple recipients of <list-fantasm@mail.tau.it>
Subject: Re: Routines not in library
>I'm trying to use InitCursorCtl and SpinCursor, but Anvil complains
As far as I know, these are functions people have written and are not
part of the Mac Toolbox. If you want the cursor to spin, you have to code
your own function.
------------------------------------------
Kevin Avila kevin@cache-computing.com
http://www.cache-computing.com
Date: Mon, 29 Dec 1997 21:36:28 -0500
From: Ajay Nath <AjayNath@compuserve.com>
To: Multiple recipients of <list-fantasm@mail.tau.it>
Subject: disable keyboard?
>> I need to keep my young son off my mac
i would just disconnect the keyboard
From: James Hague <jhague@dadgum.com>
To: Multiple recipients of <list-fantasm@mail.tau.it>
Subject: Re: Routines not in library
> As far as I know, these are functions people have written and are not
>part of the Mac Toolbox. If you want the cursor to spin, you have to code
>your own function.
I can back this up. Like a handful of other classic Mac routines, they
weren't included in any PowerPC shared libraries. Fortunately, it takes
less than a dozen lines of code to implement SpinCursor.
--
James Hague
Dadgum Games
http://www.dadgum.com/
Date: Tue, 30 Dec 1997 16:42:25 +1000
From: mrwhippy@pac.com.au (Paul)
To: Multiple recipients of <list-fantasm@mail.tau.it>
Subject: Re: Speech manager info
Salut Alok,
Ok,I know it's not ThinkPascal,but...
;---------------------------------------------------------------------------
la r3,WhatToSay(rtoc) ;Pascal text string
lwz r3,(r3)
Xcall SpeakString
OffLoop:
Xcall SpeechBusy ;check to see if it's finished yet
cmpwi r3,0 ;Any channels still open?
bgt OffLoop
;---------------------------------------------------------------------------
You need to add a shared library to get access to the SpeakString and
SpeechBusy functions.I have no idea how to do it in pascal,but in
fant4,select "add shared library" from Fantasms Project setup menu - Click
the speech checkbox.
In Fant5,you need to have an active project,then select "add shared
library".In the Standard file dialog,guide it to the "Speech Manager"
extension in the extensions folder.Then select "speechlib".
Cheers,
Paul
Date: Tue, 30 Dec 1997 16:10:06 +0100
From: robot@writeme.com (Alok)
To: Multiple recipients of <list-fantasm@mail.tau.it>
Subject: Alok
Hi,
I have started my second game.
This time it'll demand a lot of thinking.
basically you are a guard dog and you must get some sheeps into their house.
If you aproche them too much, they'll panic and run all over the place.
If you stay too distant, nothing will hapen.
Anyways, I hope to realeas it soon, since I have almost finished everything.
What I would like is to know how to test the arrow keys (on the keyboard).
Bye, Alok
BTW If you have a nice sheep drawing sen from the side, or a dog picture,
pls let me know.
Bye, Alok
*********
FEW HOURS LATER
**********
Hi,
Well I just finished the beta version of my game.
The graphics aren't yet good, and there is no sound.
PLus the menu isn't up
and the event loop is incomplete (no time for Finder :( )
Anyways, I'm using the code 126 for cursor up, 125 for cusor down, 123 for
left and 124 for right.
I hope that it's correct for all keyboards.
If anybody here is interested in recieveing the beta version (just 13k),
pls let me know (The final version will be sharware, so it's no more the
dumm games I have been writting until now (but it's not the great Mario64 I
just played at a friends place (I know I'm quite late)...)
(If anybody has (or can make) nice sheep beebbee or dog woof or has a nice
picture of sheep or dog, pls send them, thx).
Bye, Alok
email: robot@writeme.com
Date: 30 Dec 97 07:21:18 -0800
From: Cliff Harris <cliff_harris@orangemicro.com>
To: Multiple recipients of <list-fantasm@mail.tau.it>
Subject: Shared libraries
I'm still looking for SpinCursor and InitCursorCtl. They are in Inside
Mac: Imaging, so I figured they must be available. Now I've been told that
I need to add a shared library. So, which one? How can I find out which
routines are supported by which shared library?
Also, I've gone nutso looking through the .def files. I can't seem to
get a handle on how to find a particular routine in all the files. For
example, say I want to use some kind of text drawing routine like TETextBox,
do I go for QDraw_offscreen.def, QuickDraw.def, QuickDrawText.def,
TextEdit.def or TextUtils? Or maybe some other .def file? Plus it would be
easier if the imports were in alphabetical order to help find the one I'm
looking for. Maybe I should just include everything and let Anvil sort them
out?
Date: Tue, 30 Dec 1997 13:13:58 -0600
From: Garry Roseman <memphis@macconnect.com>
To: Multiple recipients of <list-fantasm@mail.tau.it>
Subject: Re: disable keyboard?
>>> I need to keep my young son off my mac
>
>i would just disconnect the keyboard
I use Keys Off 1.2. It was only $10. It can disable the keyboard after an
idle time and disable the keyboard whenever the machine is restarted. It
can even optionally disable the Shift key at restart so that it becomes
impossible to circumvent Keys Off. The keyboard remains disabled until a
password is typed (blind typing - there is no prompt so observers often
don't even realize that I typed a password). It has no connection to me; I
just happen to know about it. You can find it on Info-Mac.
--
Garry Roseman <mailto:memphis@macconnect.com>
Freelance Programmer
Date: Tue, 30 Dec 1997 20:34:08 -0500
From: Stuart Ball <lightsoft@compuserve.com>
To: Multiple recipients of <list-fantasm@mail.tau.it>
Subject: Shared libraries
>Also, I've gone nutso looking through the .def files. I can't seem to
>get a handle on how to find a particular routine in all the files.
Hello Cliff,
Open a file in the folder you want to search. Now, whilst that file is the
frontmost window, hit APPLE F, enter the search string and click the
"search all files in folder" checkbox, then click the OK
button. All files in that folder will be searched for the reference.
Stu.
Date: Wed, 31 Dec 1997 17:33:31 +0000
From: Paul <mrwhippy@pac.com.au>
To: Multiple recipients of <list-fantasm@mail.tau.it>
Subject: Screen draw/event loop
Hello,
I don't have any problems when I write directly to the screen,but when I use
an event loop to check for keydown events,whatever I've written to screen
disappears.I'm masking off all events except the keydown event,but the OS
seems to be getting an update event from somewhere - at least I *think* that's
why the screen is being cleared?
When writing directly to the screen,should I be disposing of the menu bar or
not? Could this be what's causing the problem? I can write over the top of it
without removing it,but as soon as the event loop starts....blank screen :(
Can anyone explain why this is happening? Or what I'm doing or not doing
that's wrong?
Many Thanks
Paul
Date: Wed, 31 Dec 1997 11:21:57 +0100
From: robot@writeme.com (Alok)
To: Multiple recipients of <list-fantasm@mail.tau.it>
Subject: Machine Serial Number
Hi,
Is there a way to get some number that only changes from one machine to
another but not from one startup? Something like a machine serial number?
Bye, Alok
email: robot@writeme.com
VISIT MY WEB PAGE!!! NEW CHRISTMAS LOOK !!!!
HTTP://FOXDEN.NETOPIA.COM/MENGHRAJANI
Date: Wed, 31 Dec 1997 11:47:48 -0500
From: Ajay Nath <AjayNath@compuserve.com>
To: Multiple recipients of <list-fantasm@mail.tau.it>
Subject: Machine Serial Number
>>
Is there a way to get some number that only changes from one machine to
another but not from one startup? Something like a machine serial number?
<<
the simple answer is no...but you can fake it if you look at certain
numbers like info written at certain hard drive sectors of things like
that...i assume that you are looking into this for copy protection issues.
there was a recent article in MacTech that was written by people from apple
explaining why trying to use copy protection on a mac (or any computer) is
problematic
if you really want to protect a program you need a hardware key like a
dongle
Date: Wed, 31 Dec 1997 11:43:31 -0500
From: Ajay Nath <AjayNath@compuserve.com>
To: Multiple recipients of <list-fantasm@mail.tau.it>
Subject: Re: Speech manager info
>>
la r3,WhatToSay(rtoc) ;Pascal text string
lwz r3,(r3)
<<
these two lines can be changed to
lwz r3,WhatToSay(rtoc)
which saves an instruction
Date: 31 Dec 97 10:37:21 -0800
From: Cliff Harris <cliff_harris@orangemicro.com>
To: Multiple recipients of <list-fantasm@mail.tau.it>
Subject: RE: Machine Serial Number
>>>
>Is there a way to get some number that only changes from one machine to
>another but not from one startup? Something like a machine serial
number?
><<
>
>the simple answer is no...but you can fake it if you look at certain
>if you really want to protect a program you need a hardware key like a
>dongle
I think there is some type of serial number, build date ("birth date"),
etc. in the extended parameter RAM. Unfortunately Apple says, anything
past byte 20 is "proprietary", so we don't get to know what's there. Several
years ago (actually many years...) Ken McLeod wrote MacEnvy, which did
look at this info. There was one other similar program. I don't know where
Ken, etc. got their info on the format of this data. Ken used to be in
my user group and now works for Apple (he used to be an architect -- now
there's an interesting series of life events). I shouldn't admit that I
have his email address. Don't tell anyone.
On the dongle thing: you still need software to look at the port to see
if the dongle is present, which of course leaves you open to hacking.
Years ago an acquaintance of mine used a logic analyzer to capture the signals
between the computer and a dongle. Then he just duplicated the function
of the dongle with logic and had a dongle that he could use at home. The
computer sent a series of pulses to the dongle. When the dongle saw the
nth pulse it sent one back to the computer. Another secret -- don't tell
MicroSim that its dongle was so easy to break.
Date: Thu, 1 Jan 1998 08:07:52 +1000
From: mrwhippy@pac.com.au (Paul)
To: Multiple recipients of <list-fantasm@mail.tau.it>
Subject: Re: Speech manager info
Thanks for the tip! I try to learn one new thing a day - you've just given
me a day off :)
Paul
>>>
> la r3,WhatToSay(rtoc) ;Pascal text string
> lwz r3,(r3)
><<
>
>these two lines can be changed to
>
> lwz r3,WhatToSay(rtoc)
>
>which saves an instruction
Date: Wed, 31 Dec 1997 16:07:33 -0500
From: Ajay Nath <AjayNath@compuserve.com>
To: Multiple recipients of <list-fantasm@mail.tau.it>
Subject: anvil PPC bug
well i had been having problems with anvil crashing when assembling one
particular file.
after a crash i would reboot my system & anvil would complain when i tried
to open the project that some resource file was "corrupted".
then i would run apples disk repair & it would tell me that it would repair
my hard drive.
then anvil would open the project correctly but then would crash again when
trying to assemble one particular file.
well i bought a new hard drive thinking that the old one just had some
problem in some area on it. i got a 4 GB external hard drive from APS
(~$400) & was pleased with it.
i installed fantasm on it...& had the same problems!
i finally found the problem: at the end of the file that anvil was choking
on the last line was:
gBlackPattern: DS.W -1,-1
i changed this to:
gBlackPattern: DC.W -1,-1
& now everything works fine!...but now i am stuck with this 4 GB empty
drive!
i think that anvil should have checked to make sure that the # given to it
in the DS directive was not negative...of course i was using the wrong
directive in the first place but this is a bug that involves using an
improper value with the correct SYNTAX & i think that anvil (the PPC
assembler) should have caught it