Date: 10 Mar 98 09:23:04 -0800
From: Cliff Harris <cliff_harris@orangemicro.com>
To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it>
Subject: Re: Sprites
robot wrote:
>- How do I load my graphics from the PICT ressource into memory, before
>copying it to the screen?
>
>- Can I have some source code please. (documented).
>
lis r3,"PI" ;load and shift into upper half
ori r3,r3,"CT" ;fill in the lower half
li r4,128 ;resource ID number
Xcall GetResource ;MT-1-73
stw r3,PictHandle(`bss) ;handle to PICT
How's that?
Date: 10 Mar 98 12:23:30 -0800
From: Cliff Harris <cliff_harris@orangemicro.com>
To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it>
Subject: RE: Alok: Ploting Pict's
When you call GetResource, make sure you're really getting a handle back.
If there is an error the Resource Manager will return zero instead of a
handle.
Date: Tue, 10 Mar 1998 16:52:43 -0500
From: Ajay Nath <AjayNath@compuserve.com>
To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it>
Subject: Re: Sprites
>> If I'm using assembly to write games, it not because I want to reenvent
the
wheel, nor because I need speed. The first rewason is price.
<<
Well MPW with a C compiler (and maybe C++) is now free from Apple. Can't
complain about that price!
Date: Tue, 10 Mar 1998 17:01:39 -0500
From: Ajay Nath <AjayNath@compuserve.com>
To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it>
Subject: Alok: Ploting Pict's
>> I'm first saving them in a ds.w 5
<<
Actually global variables in PPC Asm with Fantam are declared with the rs
directive, take a look at the file "globals.s" in the source code for
URLtility to see an example of this. You could do the following in a
"globals.s" file in your project.
; globals
gQD: rs.b 208 ; 208 bytes for QD variables (Used to be
206)
gPicHdlOne: rs.l 1 ; is nonzero when the app should quit
gMainWPtr: rs.l 1 ; WindowPtr
Then in your main file you could do the following:
li r3,1000 ; id of PICT resource
Xcall GetPicture
cmpwi r3,0 ; check for NIL
stw r3,gPicHdlOne(`bss) ; store hdl even if its NIL
beq failedToGetPict ; run away if no PICT was available
; r3 already = PictureHandle
lwz r4,gMainWPtr(`bss) ; r4 = WindowPtr
la r4,16(r4) ; r4 = ptr to portRect
Xcall DrawPicture ; Draw the picture!
Date: Wed, 11 Mar 1998 17:44:43 +0100
From: robot@writeme.com (Alok)
To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it>
Subject: Re: Sprites
>[...]
> Xcall GetResource ;MT-1-73
> stw r3,PictHandle(`bss) ;handle to PICT
>
>How's that?
I was expecting offscreen and or SAT...
BTW have I already told you this:
SAT goes nuts when I start moving the mouse over the sprites. I get
horrible portions of sprites on the screen (It's the finder that's
reploting what was under the mouse, and isn't anymore).
Alok
email: robot@writeme.com
Date: Wed, 11 Mar 1998 15:39:46 -0500
From: Ajay Nath <AjayNath@compuserve.com>
To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it>
Subject: Re: Sprites
re: GetResource with PICTs
you can just call GetPicture & save some instructions & code space
Date: Thu, 12 Mar 1998 15:30:17 +1000
From: mrwhippy@pac.com.au (Paul)
To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it>
Subject: Fant 510b3
Hello,
I don't know what happened,but after installing the beta3 patch,the
reported speed of my machine jumped from 100 (before the patch) to
900.Everything feels so much faster now - can't wait for version 6 ;)
Sarcasm aside,how does it come to this figure? What does it test?
Thanks in advance,
Paul
Date: Thu, 12 Mar 1998 17:18:01 +0100
From: robot@writeme.com (Alok)
To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it>
Subject: Thx Ajay Nath
Hi,
I was in the school's computerlab (for a change) this afternoon , and
downloaded SAT and printed the complete documentations (was surprised to
see it took me only 6 minutes and costed me 0$). Well I tried the demos and
think that you should give SAT a try. I would like to thank Ajay for his
advice.
I know some of you don't want to use shared libraries. But just give it a
chance. It'll occupy a weekend and will allow you to get quick results.
It'll also show you how others program and store/manage data.
Anyways, I hope I won't have too much trouble getting it to work with
Fantasm, and once again, any source is well come.
Sorry from now on, this msg has nothing to do with assembly. But I thought
it would interest programmers...
I was at this friend's home last weekend and sow an excellent game. There
is no real objective (a bit like SimCity, SimAnt, etc.., Escape Velocity.
Didn't you notice, games where you can do anything you want with just a
longterm simple objective like survive, are the most liked.). You are a guy
and hitchjack cars and kill people on the streets (and cops too). Then you
can sell your stolen cars or get a bomb put in them. The great thing about
this game is that you can go anywhere you want. Get into the police car.
Get out of it and into a subway (which you can't drive). Finally start
walking on the streets and get killed by a cop. You can also drive an
abulance and run over other people. Programming such a game shouldn't be
very hard. It's all simple 2D sprites. This game was under development, but
was dated 1983.
Bye, Alok
email: robot@writeme.com
Date: Thu, 12 Mar 1998 18:36:10 +0100
From: "Allan Jensen" <maccoder@post6.tele.dk>
To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it>
Subject: Re: Thx Ajay Nath
> You are a guy
>and hitchjack cars and kill people on the streets (and cops too). Then you
>can sell your stolen cars or get a bomb put in them. The great thing about
>this game is that you can go anywhere you want. Get into the police car.
>Get out of it and into a subway (which you can't drive). Finally start
>walking on the streets and get killed by a cop. You can also drive an
>abulance and run over other people. Programming such a game shouldn't be
>very hard. It's all simple 2D sprites. This game was under development, but
>was dated 1983.
>
This sounds an awful lot like a Playstation/PC game called GTA (Grand Theft
Auto). Well, it sounds exactly like it. It has been finished for a while.
Although it could look like a 2d game if you saw a still picture of it, it
isn't. You zoom in and out on the gameplaying area, and you get the right
perspective of the buildings when looking down on them. Not a an
unimpressive feat. Realtime zooming, and I'm pretty sure some of the
buildings are "true" 3d objects.
But you're right Alok. A very good idea, and great fun too. But I have a
sneaky suspicion that you'll need a 3dfx card to get the proper speed.
BTW, is there any information about 3dfx glide (or whatever the developer
stuff is called)for Mac on the net somewhere? I hate to admit it, but 3dfx
is pretty impressive. If only all macowners had one.
Allan
Date: Thu, 12 Mar 1998 14:05:16 -0500
From: Stuart Ball <lightsoft@compuserve.com>
To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it>
Subject: [ANN] New Mac demo
Allan Jensen has written a cool Mac demo entitled "Scumble". He has
graciously provided the project, source and excutable (Fant 5 project/PPC
only) for download from our Downloads and Updates page.
The demo features...well why not see for yourself, we won't spoil the
suprise, but you'll find it well worth the download time.
On behalf of the Fantasm "community" we thank Allan for his generosity.
Lightsoft 1905120398GMT
Date: Thu, 12 Mar 1998 14:05:13 -0500
From: Stuart Ball <lightsoft@compuserve.com>
To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it>
Subject: Fant 510b3
Hello Paul,
Yes we changed the make up of the speed test to take account of the faster
machines expected during the life of this update. It is just a figure that
can't be compared between revisions of the software. The figure is derived
from how many microseconds it took for the test loop to run; the higher the
number, the slower the machine. This figure will vary slightly between
tests as interupts are enabled during the test.
Stu.
X-Listserver: Macjordomo 1.1a23 - Macintosh Listserver by Michele Fuortes
Date: 13 Mar 98 09:30:47 -0800
From: Cliff Harris <cliff_harris@orangemicro.com>
To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it>
Subject: What BSS really means (?)
I am in the process of writing a Windows 95 device driver (they twist my
arm, they threaten me, etc. Really! Actually I'm doing it because they
pay me money, plus I wouldn't have a job if I refused. You ought to know
that programming Win95 drivers sucks in a major way).
Anyway I came across a reference to the BSS segment, which is where all
the uninitialized global variables are stored by the compiler. Sound
familiar? Anyway, BSS stands for Block Started by Symbol.
Date: Fri, 13 Mar 1998 15:09:06 -0500
From: Stuart Ball <lightsoft@compuserve.com>
To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it>
Subject: What BSS really means (?)
>BSS = "Block Started by Symbol"
Ah, the plot thickens. Do you have more info on why it stands for this? To
me that just doesn't make sense - they are english words alright, but
string 'em together in that order and it's gobbledegook, surely?
"Block started by Symbol"
What symbol started it?
Then again, maybe it's "spot on". But I don't get it.
Maybe a more logical meaning is:
"Block Storage Segment"
But unfortunately that's one I just made that up.
Stu.
Date: 13 Mar 98 13:04:25 -0800
From: Cliff Harris <cliff_harris@orangemicro.com>
To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it>
Subject: RE: What BSS really means (?)
Stuart Ball wrote:
>>BSS = "Block Started by Symbol"
>Ah, the plot thickens. Do you have more info on why it stands for this?
>
I have a book called, "Systems Programming for Windows 95". On page 134
it talks about initializing global variables (programming in C). In
programming a VxD (virtual device driver), it says to use
int counter=0;
instead of
int counter;
because, to quote, "The reason you need an explicit initializer has to do
with the way the C compiler, the linker, and the runtime library normally
work together to initialize data that you don't explicitly initialize.
The compiler places such uninitialized global data in the
block-started-by-symbol (BSS) segment. To save space in the executable file image on disk,
the linker doesn't generate any data records for BSS data."
Another book I have, "Windows 95 System Programming SECRETS", says about
the Borland C compiler (page 580):
"The .bss section is where any unitialized static and global variables
are stored. The linker combines all the .bss sections in the OBJ and LIB
files into one .bss section in the EXE. In the section table, the
RawDataOffset field for the .bss section is set to 0, indicating that this section
doesn't take up any space in the file. TLINK32 doesn't emit a .bss
section. Instead, it extends the virtual size of the DATA section to account
for unitialized data."
That's all I have on the bss business. I'll let you know if I come
across anything else.
Date: Sat, 14 Mar 1998 19:46:42 +0000
From: Paul <mrwhippy@pac.com.au>
To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it>
Subject: Finding fonts?
Hello,
I'm want to add fonts to a menu,but I'm not having much luck.How do I find
what fonts are present on a users system?
The GetFontName function wants a font ID to work with.The GetFontID (or
whatever it's called) function wants a font name to work with.It's
impossible for me to know what fonts are installed on another users
system,so is there some kind of record or table that has this data in it?
And if so,how do I find it? Where is it?
I've had a look at the FONT and FOND resources in the system file,but they
only have information on the "bare essential" fonts.Is this where I should
be looking?
Any help most appreciated,
Paul
BTW - If it matters,I'm only interested in true type fonts.
Date: Sat, 14 Mar 1998 10:21:25 +0100
From: robot@writeme.com (Alok)
To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it>
Subject: Allan Jensen's New demo..
Hi Allan Jensen,
Well your demo is really great, but it also put me off as I just finished
my own demo today (it uses 2D sprites and SAT, written in Pascal and looks
like rubbish next to yours). Well but let's see things on the good side:
a) My demo is dedicated to all people who have helped me learn programming.
b) It's perhaps the 8th demo & the 8th best demo on the mac.
I think it would be really better with some sound/music. BTW how can I
write SoundTrecker files? Is there any cheap program available?
Well could you pls mail me the other demos on the mac, thx.
Alok
email: robot@writeme.com
Date: Sat, 14 Mar 1998 14:01:42 +0100
From: Per Hjeltman <leahjn96@student.umu.se>
To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it>
Subject: Re: Allan Jensen's New demo..
>I think it would be really better with some sound/music. BTW how can I
>write SoundTrecker files? Is there any cheap program available?
PlayerPro comes to mind. I think it costs something like $100. (BTW, PP
includes some nifty Demo thingies too.) Download the demo!
--------------------------------------------------------------------------
| Per Hjeltman | IB Student: http://www.ibo.org | Ad astra per aspera |
--------------------------------------------------------------------------
| Whatever you can do or dream you can, begin it. Boldness has genius, |
| power and magic in it. Begin it now. |
| -- Johann Wolfgang von Goethe (1749-1832) |
--------------------------------------------------------------------------
X-Listserver: Macjordomo 1.1a23 - Macintosh Listserver by Michele Fuortes
Date: Sun, 15 Mar 1998 02:01:40 -0700 (MST)
From: Harvey Hirst <mephisto@extremezone.com>
To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it>
Subject: Re: Finding fonts?
>Hello,
>
>I'm want to add fonts to a menu,but I'm not having much luck.How do I find
>what fonts are present on a users system?
You can use the same function that sets up the Apple menu, except you're
asking for fonts:
AddResMenu( menuHandle, 'FONT' );
This will create a menu filled with only font names.
To use a font the user selected, do something like:
GetItem( menuHandle, item, fontName );
GetFNum( fontName, &fontNumber );
TextFont( fontNumber );
where 'item' is the menu item returned by MenuSelect().
Sorry 'bout the C,
Harvey
Date: Sun, 15 Mar 1998 22:42:43 +0000
From: Paul <mrwhippy@pac.com.au>
To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it>
Subject: Re:Re:Finding fonts?
At 02:01 AM 3/15/98 -0700, Harvey wrote:
>You can use the same function that sets up the Apple menu, except you're
>asking for fonts:
>
> AddResMenu( menuHandle, 'FONT' );
Many thanks for the help,Harvey! It seems so simple now :) I had all of my
menus set up and working,but I just couldn't find a way to load the font
names.I was reading through font information when I should've realised it
was a menu function instead.I'd already used the same function (as you said)
with the Apple menu,but it never dawned on me :( The only difference is
that I used AppendResMenu,which does the same thing :)
Paul
Date: Mon, 16 Mar 1998 00:17:00 -0500
From: Stuart Ball <lightsoft@compuserve.com>
To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it>
Subject: Fantasm 5.10 Final Candidate
Just a short note to let you know we've just completed work on Fantasm 5.10
final candidate. You can download the updates from the Developer Preview
Area of our WWW pages.
Please report any bugs in this build to:
<mailto:lightsoft@compuserve.com>
Thank you.
0511160398 GMT
Ahhh, Pillow.
Date: Mon, 16 Mar 1998 13:25:17 +0100
From: robot@writeme.com (Alok)
To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it>
Subject: Alok
Hi,
Well I got my web page uploaded today, and would like you to see the page
on my programming competition
(alok.hypermart.net/computers/computers.html). I would also like you to see
my guide to macs bug and send me your comments.
I would also remind you that I still can't get SAT to work with Fantasm.
And a last thing (and I'll stop to bother you :)) : Could I have an example
of a cicn loaded offscreen and then copyed to into a window.
Thx, Alok
email: robot@writeme.com
web site: alok.hypermart.net
PROGRAMMING COMPETITION !!!
Check out: alok.hypermart.net/computers/computers.html
X-Listserver: Macjordomo 1.1a23 - Macintosh Listserver by Michele Fuortes
Date: Tue, 17 Mar 1998 14:33:21 +0100
From: robot@writeme.com (Alok)
To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it>
Subject: Alok
Hi,
I'll make this msg short, cos it doesn't really belong here:
You can now easily write mod files with <A
HREF="www.indweller.com/products/macmod/">MacMod Pro</A> (ver 5.1 is latest
I think). It's a shareware. I found it today on UniverMac 77.
Bye, Alok (Again I know i shouldn't have sent this msg here).
email: robot@writeme.com
web site: alok.hypermart.net
PROGRAMMING COMPETITION !!!
Check out: alok.hypermart.net/computers/computers.html
Date: Tue, 17 Mar 1998 18:17:29 +0100
From: robot@writeme.com (Alok)
To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it>
Subject: Apple DrawSprocket
Hi,
Well I downloaded the Apple DrawSprocket since I was told that it works
with Fantasm.
I would like to know if anybody here has used it with PF4, and if he/she
could send some source.
Bye, Alok
email: robot@writeme.com
web site: alok.hypermart.net
PROGRAMMING COMPETITION !!!
Check out: alok.hypermart.net/computers/computers.html
Date: Fri, 20 Mar 1998 18:33:24 +0000
From: Paul <mrwhippy@pac.com.au>
To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it>
Subject: Marquee/selection
Hello,
Is there some easy way to do (marching ants) selections,like the
marquee/lasso tool in image manipulation apps? Or is it one of those things
you have to make and implement yourself?
If it's not one of the standard OS functions,does anyone have any
suggestions for how to make the dotted line move the way it does? Or if it's
in InsideMac, which book is it?
Thanks in advance,
Paul
Date: Fri, 20 Mar 1998 14:46:28 +0100
From: robot@writeme.com (Alok)
To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it>
Subject: Re: Marquee/selection
>Is there some easy way to do (marching ants) selections,like the
>marquee/lasso tool in image manipulation apps? Or is it one of those things
>you have to make and implement yourself?
>
>If it's not one of the standard OS functions,does anyone have any
>suggestions for how to make the dotted line move the way it does? Or if it's
>in InsideMac, which book is it?
I don't think there is an OS call for this, but I remeber having a small
guide in my mac:
Ok I have foudn it, mailing it to you directly...
Bye, Alok
email: robot@writeme.com
web site: alok.hypermart.net
PROGRAMMING COMPETITION !!!
Check out: alok.hypermart.net/computers/computers.html
Date: Sat, 21 Mar 1998 08:53:19 -0500
From: Stuart Ball <lightsoft@compuserve.com>
To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it>
Subject: News from the Tower 21Mar98
News From the Tower 20th Mar '98.
---------------------------------
Here's another one of those rather irregular news posts we put out from
time to time, letting you know what's happening and coming up. These go out
fairly infrequently so it's not exactly spam city, but if you do find this
mail annoying, please get thee hence to
<http://www.tau.it/lightsoft/links.html> where you may unsubscribe from
this list.
-----------------------------------------------------------
1. Bug reports for Fant5.10fc1
2. About bug reporting in general
3. Brave testers wanted...
-----------------------------------------------------------
1. BUG REPORTS FOR FANT5.10 FC1
a). No error report when global label length exceeds internal limits.
This is a nasty bug you need to be aware of.
Most development systems define a limit on the number of significant
characters taken into account when defining "global" labels. In Fantasm 5's
case it is 28 characters. Unfortunately in the current implementation,
should you exceed this number of chracters in a global label, no error or
warning is given. This leads to the poor programmer having to waste n
minutes/hours figuring out just what the heck is going on when, for
example, inserting a debug directive into a piece of code declared as
"global" and having the debugger NOT appear!
Why?
Under the current implementation the assembler simply truncates the label
at 28 characters and issues no error! This means you can have more than
one label with the same "global" name. What should happen is the assembler
should throw an error stating that the "global" label is being truncated.
i.e. Two global labels with the names:
a_long_global_label_abcdefghijklmnopqrstuvwxyz
a_long_global_label_abcedfghijkmnlopqrstuvwxyz
different here.................^^^
Both are truncated at:
an_extremely_long_label_abcd
when defined as global.
So both appear as the same label to the linker which assigns one address to
the label.
This bug is present when defining labels as global along with it's aliases
such as "public".
There may be another test version to fix this, or we may just fix it in the
released version. For now, we wanted to make you aware of it.
b). Anvil CD player track mis-selection.
If you play track 10 or higher and switch to track 1, track 2 is selected.
(With thanks to Benny Ronnhager)
---------------------------
2. ABOUT BUG REPORTING IN GENERAL
We very often receive a bug report that starts:
"You probably already know this, but"...
Please do not assume we know about bugs. If we see a bug, we fix it; if we
don't see it then we can't fix. The easiest ones to fix are those where the
user sends in a sample piece of code that demonstrates the bug. We have a
very high success rate with these kind of reports. The most difficult to
fix are those we don't know about :-)
So if you find yourself sitting there scratching your head, wondering why
something isn't working as you expect, first CHECK WITH THE DOCS (the FAQ
is the first place to look--easy to do from Anvils help menu), and if the
answer isn't there, bang off an email to us.
---------------------------
3. BRAVE TESTERS REQUIRED.
As you may be aware, in parallel with the release of Fantasm 5.1 we are
also developing Fantasm 6 and Fanta_C. Crucial to both these releases is
FantBug, which is our source and low level debugger. Development on FantBug
is proceeding in parallel with these other projects.
We would like to perform some early testing on FantBug simply because of
the low level nature of some of its operations. The reason we say "brave
testers" is because FantBug really does have the capability of damaging
files. A double bus error (Access exception as it's called these days) for
example results in a completely stopped processor - the only way to restart
the processor is a hard reset and this can damage files. One of the things
we are looking for in early testing is these double bus errors (this means
FantBug's access exception handler(s) caused an access exception).
Testing will consist of following a list of instructions and should only
take a few minutes to complete - build a project, step through it in the
debugger, examine the disassembled listing, etc.
We expect this test to start within a few weeks.
If you are interested, then please contact me, Stu, at
lightsoft@compuserve.com
with your machine specs. We especially need to know about your OS version,
processor, video, keyboard and mouse.
FantBug requires an 030 processor and system 7.?? or better. (We're not
sure about OS versions earlier than 7.5 at this point)
You should be familiar with both 68K and PowerPC assembly language and be a
Fant 5 owner (FantBug requires Anvil 2.1)
Thanks In Advance.
Stu.
----------------------------------------------------------------
End
Lightsoft 1350210398 GMT
Date: Mon, 23 Mar 1998 17:39:15 +0100
From: robot@writeme.com (Alok)
To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it>
Subject: Alok
Hi,
Well I got this great game idea, that seems quite easy to make, since it's
only in 2D. It's a mixture between Z and Command and Conquere and
Civilisation.
Anyways, as I was dicusing this a friend came up and told:
How do you think you'll do the AI part? How will the computer attack you?
So I started wondering, and I'm now very troubled. Don't you know somewhere
were I could get some info on how to get the computer to be good at
strategy games ?
Anyways, another thing that's been bothering me is from the last msg from
the tower:
> A double bus error (Access exception as it's called these days) for
>example results in a completely stopped processor - the only way to restart
>the processor is a hard reset and this can damage files.
WHAT is a hard setup? Does that mean you have to open the mac and unmount
the mother board?
Bye, Alok
email: robot@writeme.com
web site: alok.hypermart.net
PROGRAMMING COMPETITION !!!
Check out: alok.hypermart.net/computers/computers.html
Date: Mon, 23 Mar 1998 09:29:18 -0800
From: Kevin Avila <kevin@cache-computing.com>
To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it>
Subject: Re: Alok
>So I started wondering, and I'm now very troubled. Don't you know somewhere
>were I could get some info on how to get the computer to be good at
>strategy games ?
Hope your good at math ;) I worked on an AI engine at UCSB and boy
did we use alot of math, ofcourse, we had a very andvanced AI. Meaning,
it learned from it's mistakes so the next time you played it was
"smarter". Very fun to do tho.
+--------------------------+-----------------------------------+
| Kevin Avila | Cache Computing |
| Developer Theoretician | kevin@cache-computing.com |
| | http://www.cache-computing.com/ |
+--------------------------+-----------------------------------+
Date: Mon, 23 Mar 1998 20:21:08 +0000
From: Benny Ronnhager <benny.ronnhager@soderhamn.mail.telia.com>
To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it>
Subject: Mouse pointer graphic?
Hi!
I wonder how the mouse pointer (graphic) works? I suppose that the first
thing the OS does is to check the chip for cordinates in the vbl
routine. Then make a copy of the 16*16 pixel area under the mouse
pointer. And then you have the mask. Can someone tell me how that
routine works and maybe give me some 68000 code example.
Best regards Benny
--
MIDI Universe
Welcome to my little world in Cyberspace...
http://w1.270.telia.com/~u27002261
Benny Ronnhager
benny.ronnhager@soderhamn.mail.telia.com
'The Dream Is Always The Same...'
Date: Mon, 23 Mar 1998 16:34:08 -0500
From: Stuart Ball <lightsoft@compuserve.com>
To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it>
Subject: Alok
>WHAT is a hard setup? Does that mean you have to open the mac and unmount
>the mother board?
:-)
Sorry. No, a hard reset means physically resetting the processor. All CPU's
have a reset pin, which is toggled via one of two methods:
1/ When the machine is powered up.
2/ The user can reset the machine. On a Mac this is either done from the
keyboard or by what is sometimes known as the "programmers switch". The
keyboard method is holding down the CTRL, APPLE and the Power switch keys
simultaneously. There are various names for this, "Vulcan death grip" is
probably the only printable one.
This will instantly reset the processor.
(Note, the reset pin on a processor is normally labeled as NOTreset
(printed as "reset" with a bar over it) because most external digital
signals are inverted to prevent noise - thus the reset pin is "dragged" low
to reset - it normally sits at the processor operating voltage via a pull
up resistor).
Sorry for the confusion.
Stu.
Date: Tue, 24 Mar 1998 08:30:41 +0100
From: robot@writeme.com (Alok)
To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it>
Subject: Re: Mouse pointer graphic?
>Hi!
>
>I wonder how the mouse pointer (graphic) works? I suppose that the first
>thing the OS does is to check the chip for cordinates in the vbl
>routine. Then make a copy of the 16*16 pixel area under the mouse
>pointer. And then you have the mask. Can someone tell me how that
>routine works and maybe give me some 68000 code example.
>
>Best regards Benny
I'm pretty sure that it works like that (copybits). it's like a small
sprite. That's why it blinkers when you bring it above an animation (QT for
eg).
Bye, Alok
email: robot@writeme.com
web site: alok.hypermart.net
PROGRAMMING COMPETITION !!!
Check out: alok.hypermart.net/computers/computers.html
Date: Wed, 25 Mar 1998 12:23:32 -0500
From: Ajay Nath <AjayNath@compuserve.com>
To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it>
Subject: SAT info
I just got some more info about SAT so here it is.
>>
Date: Tue, 24 Mar 1998 10:54:48 +0100
From: Ingemar Ragnemalm <ingemar@lysator.liu.se>
Reply-To: ingemar@lysator.liu.se
Organization: Lysator computer club
Subject: Released: Sprite Animation Toolkit 2.5.0
Released: Sprite Animation Toolkit 2.5.0.
Sprite Animation Toolkit (SAT) is a popular game programming library
for Macintosh. It is free of charge as long as credits are given and
I get a free copy of released products. SAT can be used from Think
Pascal, Think C or CodeWarrior (Pascal or C).
SAT has been used to develop dozens of released Mac games and
applications, from simple freeware games to commercial software.
Some of the more known ones include Missions Of The Reliant, BOOM,
Asterax, Escape Velocity, Bub&Bob and Harry The Handsome Executive,
and of course many of my own games, Bachman, Slime Invaders, Bert,
Ingemar's Skiing Game, HeartQuest, Smack a Skunk and a few upcoming
titles.
For more information and downloading, go to the SAT web page:
www.lysator.liu.se/~ingemar/sat.html
Ingemar Ragnemalm
<<
Date: Thu, 26 Mar 1998 13:28:07 +0100
From: robot@writeme.com (Alok)
To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it>
Subject: Sprites
Hi,
I would like to know what QDOffscreen is, what options it offers, and if
it's documented in the QD Inside Mac (I don't want to download each Inside
Mac for nothing).
Another question:
If I load an icon (with GetCIcon) and save the handle the call returns. And
then use PlotCIcon to draw, am I doing offscreen drawing ? If not, how do I
do offscreen drawing (i have printed LighSoft's 'space invader' game which
uses offscreen, but I haven't understood how it exactly works.)
Oh a last question:
I have called GetCIcon and it returned a CIconHandle
so I looked at the Mac traps and it says:
struct CIcon {
PixMap iconPMap; /*the icon's pixMap*/
BitMap iconMask; /*the icon's mask*/
BitMap iconBMap; /*the icon's bitMap*/
Handle iconData; /*the icon's data*/
short iconMaskData[1]; /*icon's mask and BitMap data*/
};
But if I look at PixMap it says:
struct PixMap {
Ptr baseAddr; /*pointer to pixels*/
short rowBytes; /*offset to next line*/
Rect bounds; /*encloses bitmap*/
short pmVersion; /*pixMap version number*/
short packType; /*defines packing format*/
long packSize; /*length of pixel data*/
Fixed hRes; /*horiz. resolution (ppi)*/
Fixed vRes; /*vert. resolution (ppi)*/
short pixelType; /*defines pixel type*/
short pixelSize; /*# bits in pixel*/
short cmpCount; /*# components in pixel*/
short cmpSize; /*# bits per component*/
long planeBytes; /*offset to next plane*/
CTabHandle pmTable; /*color map for this pixMap*/
long pmReserved; /*for future use. MUST BE 0*/
};
So that means that the hRes is in the CIcon handle and that I could get it
from there to create my rect and plot the icon. So lets see:
Ptr+short+Rect+short+short+long => hRes
Ok so isn't this worth 22 ?
So why don't I get the hRes when I do
li r3,1000
Xcall GetCIcon
mr r20,r3
Xcall Debugger
and then
dm r20^^+#22
under MacsBug ???
Is hRes something else ?
Thx, Alok
web site: alok.hypermart.net
Be a programmer, join the programming competition !
Check out: alok.hypermart.net/computers/computers.html
Date: Thu, 26 Mar 1998 19:49:43 +0100
From: robot@writeme.com (Alok)
To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it>
Subject: Sprites: ALok
Hi,
Well I have been working on m sprite routines...
Here is my source, but it crashes at the end !!!
Could you pls tell me what's going wrong ? Thx.
(I'm using 36 CICNs that represent a car rotated by 10 degrees each time.
I can't give them to you, cos they have been 'stolen' from another game
(I'll contact the autor very soon), cos I didn't have time to draw my own)
game_start: ENTRY
start_up
bl init_prog *calls init_mac, init_graph_lib & HideCursor
li r3,144 *There are 36 CICNs and each handle is 4 wide
addi r3,r3,10 *Secutiy
Xcall NewHandle
mr r20,r3 *Save the CICNs Handle
Xcall HLock
lwz r20,(r20)
li r21,1000 *ID of first CICN
*Now create offscreen:
li r3,32*32*8 *Handle for the screen copy
Xcall NewHandle
mr r23,r3 *Save it in r23
load_loop: mr r3,r21 *r21=ID of first CICN
Xcall GetCIcon
stw r3,(r20) *Store in CICNs Handle
addi r20,r20,4 *A handle = 4, right?
addi r21,r21,1 *Next ID (ID=1000-1036)
cmpwi r21,1036 *Last ID
bne load_loop
addi r20,r20,-144 *Bring back the CICN Handle to beginning
li r3,0
li r4,10
li r5,10
li r6,42
li r7,42
Xcall SetRect
mr r22,r3 *A 32 pixel wide rectangle where CICNs will
be drawn
li r21,1000 *ID
draw_loop:
mr r3,r23 *Get IMG LIGHTSOFT LIBRARIES
li r4,10 *X
li r5,42 *X'
li r6,10 *Y
li r7,42 *Y'
bl get_image_256
mr r3,r22 *Get the rect into r3
lwz r4,(r20) *And the CICN Handle
Xcall PlotCIcon *Display
mr r3,r23 *Put IMG *Clear the CICN
li r4,10
li r5,42
li r6,10
li r7,42
bl put_image_256
addi r20,r20,4 *COntinue, thus giving the effect
of a car that's rotating arround itself
addi r21,r21,1 *ID
cmpwi r21,1036
bne draw_loop
Xcall Debugger *AND now every thing is fine, but the mac
will carsh after this !!!
tidy_up
blr
global game_start
extern init_prog
extern get_icl8
extern icl8_print
extern get_image_256,put_image_256
Thx, for helping me...
(Just reminding you, you must register for my assembly competition from my
web site, if you want to participate).
web site: http://alok.hypermart.net/
Be a programmer, join the programming competition !
Check out: alok.hypermart.net/computers/computers.html
Date: Thu, 26 Mar 1998 19:59:25 -0500
From: Stuart Ball <lightsoft@compuserve.com>
To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it>
Subject: Sprites: ALok
>Well I have been working on m sprite routines...
>
>Here is my source, but it crashes at the end !!!
>
>Could you pls tell me what's going wrong ? Thx.
Hello Alok,
I'd check the heap - it's a good bet you've corrupted it.
You can check when you break into Macsbug by typing "HC".
If the heap is bad, it means you have written to memory you have not
allocated - normally you have written one too many bytes into a handle or
pointer you previously set up at a given size.
If this is a case, it's easy to find where.
Split the program in half by insert a debug call in the middle - when it
stop,s do a heap check, if it's bad, put the debugger half way between the
middle and the top and try again. If it isn't bad, put the debugger call
half way between the middle and the end of the code and try again. Continue
splitting sections in half until you find the code that is causing the
heap corruption.
This method will find the problem even in large programs very quickly.
Hope this helps,
Stu.
Date: Thu, 26 Mar 1998 19:59:22 -0500
From: Stuart Ball <lightsoft@compuserve.com>
To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it>
Subject: Need input/docs on-line.
Hello all,
I've just completed entering a whole bunch (three days worth) of 68K
A-traps into Fantbug for its 68K disassembler. Anyway I thought it would be
cool if it knew about the "undocumented" OS calls. I'm sure there must be
quite a few. If you have any info on anything at all, please let me know.
What I need is the line a op-code, and any selectors it takes, although
just a hint would be more than fine!
Confidentiality assured.
Changing the subject somewhat, the final documentation for Fantasm 5.1 has
been posted to our downloads and updates pages. Two new documentation part
numbers were generated for 5.1 - LSA0042 is a 68K/PPC assm reference card
(20 odd pages) designed to be printed out and stapled to your monitor.
(Don't staple it to your monitor unless your monitor really wants it
though. I can tell you Sony plastic cracks when you do this :( And be sure
to keep the staple gun away from the big glass bit!). LSA0042 covers all
instructions accepted by Fantasm and gives a quick syntax check.
LSA0500 is LXT's manual which has been finalized and LXT is on-line for
download at version 1.04.
Fant5.1 should hopefully plop into your mailboxes this weekend (yes we
fixed the global labels > 28 chars no error error (if you see what I
mean)).
Stu
Date: Fri, 27 Mar 1998 16:07:41 +0100
From: robot@writeme.com (Alok)
To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it>
Subject: Hide Menu Bar
Hi,
I need to hide the menu bar.
Is there any other way than finding the screen address and removing it by
drawing directly to screen ?
If I use bl box_256 (LS's lib) than I can't get the first and last pixel
cleared :(
Bye, Alok
web site (Last updated: 29/3/98): http://alok.hypermart.net/
Date: 27 Mar 98 07:11:21 -0800
From: Cliff Harris <cliff_harris@orangemicro.com>
To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it>
Subject: RE: Need input/docs on-line.
Stuart Ball wrote:
>Anyway I thought it would be cool if it knew about the "undocumented" OS
calls.
>
One way to find these would be to write a little program to go through
all possible A-traps with a compare to Unimplemented. That would give you a
list of all the ones that ARE implemented.
Date: Fri, 27 Mar 1998 09:03:04 -0800
From: Kevin Avila <kevin@cache-computing.com>
To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it>
Subject: Re: Hide Menu Bar
>I need to hide the menu bar.
Here are som C++ functions out of my framework, should be easy to
convert to asm.
short oldMBarHeight;
short MBarHeight;
RgnHandle mBarRgn;
RgnHandle GrayRgn = nil;
void UTMenubar::HideMenuBar(void)
{
Rect mBarRect = {0,0,0,0};
RgnHandle grayRegion = nil;
oldMBarHeight = LMGetMBarHeight();
LMSetMBarHeight(0);
SetRect( &mBarRect,
qd.screenBits.bounds.left,
qd.screenBits.bounds.top,
qd.screenBits.bounds.right,
qd.screenBits.bounds.top + oldMBarHeight);
mBarRgn = NewRgn();
RectRgn(mBarRgn, &mBarRect);
grayRegion = GetGrayRgn();
UnionRgn(grayRegion, mBarRgn, grayRegion);
PaintOne(nil, mBarRgn);
DrawMenuBar();
}
void UTMenubar::ShowMenuBar(void)
{
RgnHandle grayRegion = nil;
LMSetMBarHeight(oldMBarHeight);
grayRegion = GetGrayRgn();
DiffRgn(grayRegion, mBarRgn, grayRegion);
DisposeRgn(mBarRgn);
mBarRgn = nil;
DrawMenuBar();
}
+--------------------------+-----------------------------------+
| Kevin Avila | Cache Computing |
| Developer Theoretician | kevin@cache-computing.com |
| | http://www.cache-computing.com/ |
+--------------------------+-----------------------------------+
Date: Fri, 27 Mar 1998 18:35:09 +0000
From: Benny Ronnhager <benny.ronnhager@soderhamn.mail.telia.com>
To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it>
Subject: Mac OS 8
Hi!
I am soon going to buy Mac OS 8, but I want to know first if OS 8 is
happy on my old Power Macintosh 6100/60. I have 72 Mb ram. How much hard
disk space is required to install it? And the most important thing. What
about the speed compared to my OS 7.1.2? Is my Mac going to be slower or
faster?
Best regards Benny
Date: Fri, 27 Mar 1998 21:31:29 +0100
From: robot@writeme.com (Alok)
To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it>
Subject: Sprite:ALok
Hi,
Just For Your Info, I got my sprite routine working. My mistake was to pass
a handle (instead of a pointer) to get_image_256 . Anyways, I think that
Stu could write this somewhere (if get_image_256 is still used with PF5.0)
for the other beginners.
Has I'm talking to you about handles, here is something I have wondered
since long, but never remembered to ask (you should be glad that I don't
ask you each and every question I have, else you would have a gigabyte of
mail to download each morning)
??? Why/When does one lock a handle ???
Bye, Alok
(I would like you to check out my guide to macsbug so that I can get some
comments about it...)
web site (Last updated: 29/3/98): http://alok.hypermart.net/
Date: Fri, 27 Mar 1998 14:40:01 +0000
From: luke@ihermes.com (Luke Cowell, G+J Gruner + Jahr Polska)
To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it>
Subject: Re: Mac OS 8
On Fri, Mar 27, 1998, 6:35:09 PM GMT Benny Ronnhager wrote:
>Hi!
>
>I am soon going to buy Mac OS 8, but I want to know first if OS 8 is
>happy on my old Power Macintosh 6100/60. I have 72 Mb ram. How much hard
>disk space is required to install it? And the most important thing. What
>about the speed compared to my OS 7.1.2? Is my Mac going to be slower or
>faster?
>
>Best regards Benny
>--
>MIDI Universe
>Welcome to my little world in Cyberspace...
>http://w1.270.telia.com/~u27002261
>
>Benny Ronnhager
>benny.ronnhager@soderhamn.mail.telia.com
>
>'The Dream Is Always The Same...'
>
>
It won't take up a whole lot more HD space 10-20 extra megs. However, I will gobble up your RAM. You seem to have adequate amounts of RAM, but expect a system heap of 15megs. The good news is there are a lot of improvements and one of them is a speed increa!
se for PPC users.
Faster
Lukeoramajamadingalingdingdong
Date: Fri, 27 Mar 1998 20:51:25 -0500
From: Stuart Ball <lightsoft@compuserve.com>
To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it>
Subject: Sprite:ALok
> Anyways, I think that
>Stu could write this somewhere (if get_image_256 is still used with PF5.0)
>for the other beginners.
Open the library with the librarian, and then click on a function - it will
tell you what parameters are needed. (Set up from the title, input and
output directives).
Stu.
Date: Sat, 28 Mar 1998 01:36:44 -0600
From: Santiago <oxygen@mail.utexas.edu>
To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it>
Subject: Re: Mac OS 8
>On Fri, Mar 27, 1998, 6:35:09 PM GMT Benny Ronnhager wrote:
>
>
>>Hi!
>>
>>I am soon going to buy Mac OS 8, but I want to know first if OS 8 is
>>happy on my old Power Macintosh 6100/60. I have 72 Mb ram. How much hard
>>disk space is required to install it? And the most important thing. What
>>about the speed compared to my OS 7.1.2? Is my Mac going to be slower or
>>faster?
>
>It won't take up a whole lot more HD space 10-20 extra megs. However, I
>will gobble up your RAM. You seem to have adequate amounts of RAM, but
>expect a system heap of 15megs. The good news is there are a lot of
>improvements and one of them is a speed increase for PPC users.
OS 8 does take up more RAM than previous versions, but that still
sounds excessive. My usage is about 10 Megs right after starting up and
growing to 12 by the time Open Transport and other things get themselves
loaded up, and I don't exactly have a lean system folder. (Heaps of
control panels, a full-screen desktop picture, and the debugger.) Maybe
you don't have VM turned on? That'll drive up all your applications'
memory consumption, including the system. In any case, I highly recommend
upgrading. Once you get used to all the new little tweaks, System 7 starts
looking like the dinosaur it is...
Happily assembling away under OS 8,
Andres Santiago Perez-Bergquist
Date: Sat, 28 Mar 1998 10:55:21 +0100
From: robot@writeme.com (Alok)
To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it>
Subject: Re: Hide Menu Bar
Seems quite complicated...
I guess there isn't any OS call :(
Anyways, since I'm calling LS's graph_init_lib I might as well draw a rect
using QD.
Bye, Alok
web site (Last updated: 29/3/98): http://alok.hypermart.net/
Date: Sat, 28 Mar 1998 10:55:24 +0100
From: robot@writeme.com (Alok)
To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it>
Subject: Handle
Hi,
Just for my info, how do I create a handle that reserves more than 65535 bytes ?
Alok
web site (Last updated: 29/3/98): http://alok.hypermart.net/
Date: Sat, 28 Mar 1998 20:57:00 +0100
From: robot@writeme.com (Alok)
To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it>
Subject: ALok
>> Anyways, I think that
>>Stu could write this somewhere (if get_image_256 is still used with PF5.0)
>>for the other beginners.
>Open the library with the librarian, and then click on a function - it will
>tell you what parameters are needed. (Set up from the title, input and
>output directives).
>
>Stu.
I know that, but it isn't always very clear for me (a) I each time need to
remember what a byte, half, word, long is b) When you say byte to
destination memory, I couldn't guess it was a ptr and not a handle c) I
can't get the open info window to run in backgrnd (I each time need to
close it))
Date: Sat, 28 Mar 1998 20:57:05 +0100
From: robot@writeme.com (Alok)
To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it>
Subject: Re: Mac OS 8
Well Ajay Nath trained me to stop sending msg to this list that don't
belong to Fantasm, so I must now do the same...
By sending other msg over here, the msg about Fantasm get ignored by most
people, so please try to reduce traffic.
Anyways, for your info, you can set up your own mailing list for free with
hypermart. And if it's about programming, I'll subscribe for sure...
But as this msg isn't about fantasm, here is a question I have got:
I currently have a 5200 PowerMac with 8 ram, how much will it cost me to
upgrade to a g3 (including upgrading ram to something that'll allow me t
have sys8.0 ) ?
Bye, Alok
web site (Last updated: 29/3/98): http://alok.hypermart.net/
Date: Sun, 29 Mar 1998 09:25:47 +1000
From: mrwhippy@pac.com.au (Paul)
To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it>
Subject: Re: Handle
>Hi,
>
>Just for my info, how do I create a handle that reserves more than 65535
>bytes ?
>
You can use either;
movei r3,$FFFFFA ;for example
Xcall NewHandle
or;
lis r3,$FF
ori r3,r3,$FFFA
Xcall NewHandle
The second one is just what the movei macro expands to,so both are the same :)
Paul
Date: Sun, 29 Mar 1998 00:06:12 +0100
From: robot@writeme.com (Alok)
To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it>
Subject: demo
Hi,
visit: http://zerius.victoria.bc.ca/FE.html/
It's to learn more about written demos on the mac.
I haven't read it, but it must be talking a lot of assembly.
Bye, Alok
From: robot@writeme.com (Alok)
To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it>
Subject: My last msg was miss sent...
Sorry... Alok
web site (Last updated: 28/3/98): http://alok.hypermart.net/
Date: Sun, 29 Mar 1998 16:23:51 +0000
From: Benny Ronnhager <benny.ronnhager@soderhamn.mail.telia.com>
To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it>
Subject: LSR.L
Hi!
If I use
LSR.L #4,D4
in 68000 assembler
Can I use
srwi r4,r4,4
in PPC
Is this the same instructions?
Benny
--
MIDI Universe
Welcome to my little world in Cyberspace...
http://w1.270.telia.com/~u27002261
Date: Mon, 30 Mar 1998 21:34:15 +1000
From: mrwhippy@pac.com.au (Paul)
To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it>
Subject: Memory errors :(
Hello All,
Lately,I'm causing an error (too frequently :),which dumps me in Macsbug
with an error mentioning "bowels of the memory manager". I've looked over
my code heaps of times and still can't see any reason for this error
occuring.
Is there anything in particular that causes these errors that I should look for?
I can't seem to figure it out,and the continued reboots are getting
frustrating :(
Any help most welcome :)
Paul
Date: Mon, 30 Mar 1998 17:15:12 +0000
From: Benny Ronnhager <benny.ronnhager@soderhamn.mail.telia.com>
To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it>
Subject: toc_routine?
Hi!
I have a question about the toc_routine directive. I want to know the
address of the label rxinthanda from file1.s, rxinthanda is a label in
file2.s
Is this the right way to do it?
Benny
file1.s looks like this...
---
lwz r4,[t]rxinthanda(rtoc) ; r4 is the address of label ;rxinthanda in
file2.s (I hope)
; some code here
extern rxinthanda
---
file2.s looks like this...
---
rxinthanda: toc_routine
; some code here
global rxinthanda
---
--
MIDI Universe
Welcome to my little world in Cyberspace...
http://w1.270.telia.com/~u27002261
Benny Ronnhager
benny.ronnhager@soderhamn.mail.telia.com
'The Dream Is Always The Same...'
Date: Tue, 31 Mar 1998 18:22:27 +0000
From: Benny Ronnhager <benny.ronnhager@soderhamn.mail.telia.com>
To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it>
Subject: SCC!
Hi!
I am trying to convert my sequencer rxmidia source from 68000 to PPC.
There are 2 things I must do.
1. Program the SCC ship.
2. Set a new pointer (to my rxmidia routine) in the dispatch table.
When a MIDI byte comes in via the serial port A modem, the rxmidia
(interrupt) routine is called. All that works fine in 68000, no
problems at all. But in PPC? NO, sorry!
I am not using any system calls to do this in 68000. Can I program the
SCC ship directly in PPC? Maybe this is the problem?
Best regards Benny
--
MIDI Universe
Welcome to my little world in Cyberspace...
http://w1.270.telia.com/~u27002261
Benny Ronnhager
benny.ronnhager@soderhamn.mail.telia.com
'The Dream Is Always The Same...'
Date: Wed, 1 Apr 1998 22:00:45 +0200
From: robot@writeme.com (Alok)
To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it>
Subject: Alok
Hi,
I would like you to do me a small favor (I'm really sorry to bother you,
but I really need your help now.. I can't get my sources to work..):
Write 3 little programs (in PPC):
Open a CICN and save it in a screen_buffer(`bss)
Then
First prog:) Get the screen address and splat.
2nd:) Call QDOffscreen and splat
3rd:) Do a copybits...
I will really appriciate recieving at least one of these sources...
I know I should code and just ask you some tips, but I have tried all of
these three methodes for the pas few days, but none work :(
BTW Which of these methodes should I use if I have a movable window ?
Thanks a lot!!
Bye, Alok
web site (Last updated: 28/3/98): http://alok.hypermart.net/
Date: Thu, 2 Apr 1998 16:14:04 -0500
From: Stuart Ball <lightsoft@compuserve.com>
To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it>
Subject: A short NFtT - 2 Apr 98
1. Fantasm 5.1 update has been sent to all registered Fantasm 5 users. If
you are a registered user and have not received your update, please contact
lightsoft@zedworld.demon.co.uk quoting your license number.
2. Updated PPC project setup files are now available from the Download and
Updates pages (8K download). These set the PPC stack size to "default"
rather than the previous 32K. Existing PPC projects should be edited so
that the Stack size field of the cfrg pane reads 0 (i.e. default). Thanks
to Ajay Nath.
3. We have started updating the Fantasm 5 area to reflect version 5.1. A
new page is now available showing what is included on the Fantasm 5 CD.
4. We have a backlog of orders of approximately ten days due to getting the
5.1 CD put together. The CD is now final and all backlogged orders will be
dispatched tomorrow (3rd Apr). We apologize for the delay.
(Please note that changes to WWW pages indicated above will be on-line
shortly)
End
Lightsoft 2210 02Apr98
Date: 03 Apr 98 12:43:04 -0800
From: Cliff Harris <cliff_harris@orangemicro.com>
To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it>
Subject: PPC coding problems
I recently had some problems with some code I was writing. The first
problem was where I needed to add $8000 to a number, so I used:
addi r3,r3,$8000
when I got into the debugger, it was turned into:
subi r3,r3,$8000
so I thought maybe this is some kind of optimization because the high bit
is set and it looks like a negative number. So just for fun I tried to
fool the assembler with:
subi r3,r3,$8000
Ha, ha. Fooled me instead, I still got:
subi r3,r3,$8000
So I ended up with:
addi r3,r3,$4000
addi r3,r3,$4000
but I still don't know why I can't just add $8000 in the immediate mode.
-------------------------------------------------
Problem #2: (Somewhat related to the above) I needed to mask off the
upper halfword in a register, so I used:
li r3,$FFFF
and r4,r4,r3
The debugger showed r3 = $FFFFFFFF, so I tried:
li r3,$0000FFFF
which also showed r3 = $FFFFFFFF, so I tried:
li r3,65535
I got r3 = $FFFFFFFF again. So I finally used:
li r3,-1
srwi r3,r3,16
I finally got r3 = $0000FFFF, but it seems cumbersome. Is there a more
direct way to get $0000FFFF into a register?
I just looked at my mnemonic list and saw that the easiest way to do the
mask is:
andi r4,r4,$FFFF
but that still doesn't answer the question.
Date: Sat, 4 Apr 1998 13:21:31 +0200
From: robot@writeme.com (Alok)
To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it>
Subject: BSS
Hi,
I'm saving somethings in the bss (globaly reserved space), but as I reach
the end of my init routine, the content of my bss has changed. For eg, I
save my screen_x value (=832) but I finsh with the value 8.
So what's my mistake? (DO you need my source?) Am I supposed to lock the bss?
TO save in the BSS I just do:
stw r3,screen_x(`bss)
And to load:
lwz r3,screen_x(`bss)
Please, help me - THX a lot...
Bye, Alok
web site (Last updated: 28/3/98): http://alok.hypermart.net/
Date: Sat, 4 Apr 1998 09:27:42 -0500
From: Ajay Nath <AjayNath@compuserve.com>
To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it>
Subject: BSS problems
Check to make sure that the size of the variable that you are
storing into in the BSS is the right size. A PPC WORD is 4 bytes so if a
variable is declared in the BSS as 2 bytes you might incorrectly store only
part of the data there. One way to test for this is to store the WORD
$12345678 into the 4 bytes & then when it is changed see what data is
actually in the WORD.
Another problem that can occur is that you might change the BSS
(either r30 or r31) register accidentally.
- Ajay Nath
Date: Sat, 4 Apr 1998 09:31:08 -0500
From: Stuart Ball <lightsoft@compuserve.com>
To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it>
Subject: PPC coding problems
Cliff Harris wrote:
>I recently had some problems with some code I was writing. The first
>problem was where I needed to add $8000 to a number, so I used:
>
> addi r3,r3,$8000
>
>when I got into the debugger, it was turned into:
>
> subi r3,r3,$8000
Yup, subi is an extended instruction formed from addi. Others are li and
la.
If the signed 16 bit integer is negative, it's a subi.
addi looks like:
addi rx,ry,value
subi is really
addi rx,ry,-value
li is really
addi rx,0,value
la is really
addi rx,ry,displacement
Thus any immediate data greater than 0x7fff will be treated as a negative
(and sign extended accordingly). These are given in LSA0042 page 13 - si
means signed integer.
>but I still don't know why I can't just add $8000 in the immediate mode.
You can, but it's treated as a signed integer :-)
>Is there a more
>direct way to get $0000FFFF into a register?
Load it from memory or keep it hanging about in a non-volatile register
(LSA0041 page 79)?
You can easily do the opposite (0000xxxx or xxxx0000) with clear left
immediate and clr right immediate.
clrlwi ra,rs,16
clrrwi ra,rs,16
You can do any bit length you want, so you can clear bytes, nibbles, etc
e.g.
**Needs LS_PPC_macros.def
entry
stdx r3,r4,r5 *to debugger
movei r3,0xF2345678 *some test data
clrlwi r3,r3,8 *clear upper 8 bits of r3
movei r3,0xF2345678 *test data
clrrwi r3,r3,16 *clear lower 16 bits of r3
blr
Date: Sat, 4 Apr 1998 09:31:05 -0500
From: Stuart Ball <lightsoft@compuserve.com>
To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it>
Subject: BSS
Alok wrote:
>I'm saving somethings in the bss (globaly reserved space), but as I reach
>the end of my init routine, the content of my bss has changed. For eg, I
>save my screen_x value (=832) but I finsh with the value 8.
Do you mean the register is changing or the contents of the memory at
screen_x(`bss)
If it's the contents of the memory then you can use MacsBugs' step spy to
stop your program when the contents change - simply used as:
ss addr
where address is the address of screen_x(`bss)
i.e. stop your program just before you load up screen_x, then ss. Your
program will run slowly whilst ss'ing because Macsbug has to check screen_x
after every instruction. When screen_x changes, Macsbug will stop and let
you know what instruction changed it.
If it's the register that's changing, then you just need to step through
your program looking for where it changes. It would be nice if there were a
way in Macsbug of running until register x changes, but if there is I can't
find it.
Date: Sat, 4 Apr 1998 18:07:08 +0200
From: robot@writeme.com (Alok)
To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it>
Subject: Alok: Dialogs
Hi,
Well I solved my bss problem. So now I have a nice dialog that's centered
in the screen. My next problem is to get the lines around a group to be
drawn (user defined objects) and to handle clicks/keyboards (Thanks to Ajay
Nath's sources, I have got my default button to be surrounded by a black
rect).
- So I would like to know if anyone has got any source (PPC pls)...
- How I can get the number of objects in my dialog
- How to draw the user rect
- How o handle radio button, and clicks.
Thx, Alok
web site (Last updated: 28/3/98): http://alok.hypermart.net/
Date: Sat, 04 Apr 1998 20:29:28 +0000
From: Benny Ronnhager <benny.ronnhager@soderhamn.mail.telia.com>
To: Multiple recipients of Fantasm <list-fantasm@mail.tau.it>
Subject: Glue, Shared Library!
Hi!
Can someone explain for me what Glue is?
And a Shared Library?
Best regards Benny
--
MIDI Universe
Welcome to my little world in Cyberspace...
http://w1.270.telia.com/~u27002261
Benny Ronnhager
benny.ronnhager@soderhamn.mail.telia.com
'The Dream Is Always The Same...'