HDTenEightyP/NetNews huggingface dataset:
From: k044477@hobbes.kzoo.edu (Jamie R. McCarthy)
Subject: Re: simulating page-flipping via cluts
Organization: Kalamazoo College
Date: Fri, 11 Sep 1992 16:31:35 GMT

tmaehl@vax1.umkc.edu writes:
>k044477@hobbes.kzoo.edu (Jamie R. McCarthy) writes:
>
>> If you're clut-flipping to simulate page-flipping,
>> [you need every single color]
>
>Two questions: How do you simulate page-flipping with clut-flipping??
>
>And second: Wouldn't this fail to accomplish anything at all on
>a direct color screen, or am I *completely* misunderstanding (a
>distinct possibility.)

The easy one first:  yes, clut-flipping does nothing on a direct-color
screen.  In fact, a direct-color screen doesn't even have a color table
to flip.

Clut flipping is a nasty little technique that lets you pretend you have
two video pages, each of which has half as many bits per pixel as the
real video page.  In short, you split each pixel in half, and alternate
between setting the clut so that one half is visible and the other half
not.  An example might help clarify.

Let's say we're working on an 8-bit-deep screen.  Conceptually, split
each pixel into two 4-bit halves, call them left and right.  To set the
pixel at x,y on the left video page to, say, color 7, you set the high
four bits of the actual pixel at x,y to 7, without disturbing the low
four bits.  To set the pixel on the right video page to color 4, you set
the low four bits to 4 without disturbing the high four bits.

Let's say the palette we're using is sixteen shades of gray.  (Note that
you only get sixteen colors, since each page gets only four bits per
pixel.  Note also that you can have different palettes for the left and
the right page, and that there's actually a good use for that:  there
are glasses that sync to your monitor that use LCD shutters to give a
decent 3-D effect.  But I digress.)  Then, to display the left page, you
set colors 0x00-0x0F to black, 0x10-0x1F to dark gray, ... , 0xF0-0xFF
to white.  To display the right page, you set 0x00, 0x10, ... 0xF0 to
black, 0x01, 0x11, ... 0xF1 to dark gray, and so on.

Note that you don't have to use hi-nybble/lo-nybble for left and right
pages;  you can split up the pixel any way you want.  It doesn't even
have to be an even split, and you can split it as many ways as there are
bits in the pixel in the first place.  If you don't mind having only two
colors and seeing the same eight frames over and over, you can do
eight-position full-screen animation at whatever your monitor's refresh
rate is, using just a tiny fraction of CPU power.

Note also that, if the palette(s) for your virtual pages all have all
their bits clear for white and all their bits set for black, you can
leave those two colors where they are, and the Palette Manager will be
usable.  (Though I'll concede that there's no good reason not to use
SetEntries instead of AnimatePalette when you're getting this
low-level...)
-- 
 Jamie McCarthy      Internet: k044477@kzoo.edu      AppleLink: j.mccarthy
 "I may not understand what you say, but I'll defend to your death
  my right to deny it."                 - Albert, from 'Outrageously Pogo'
Newsgroups: comp.sys.mac.programmer
From: neeri@iis.ethz.ch (Matthias Neeracher)
Subject: Re: Is a resource fork already open?
Organization: Integrated Systems Laboratory, ETH, Zurich
Date: Tue, 8 Sep 1992 12:07:09 GMT

In article <1992Sep8.153520.10687@waikato.ac.nz> ldo@waikato.ac.nz (Lawrence D'Oliveiro, Waikato University) writes:
>In article <39464@imag.imag.fr>, cinquin@imag.fr ( Philippe Cinquin) writes:
>> Sorry if this is a stupid question, but how do you know if the resource fork of
>> a file is already open?
>
>If a file is already open by somebody else, you'll get an error if you try
>opening it in a mode that's incompatible with the other person's open mode.
>
>But I suspect you're really asking what happens when you open a resource file
>twice from the same application. The answer is, you will get the same file
>refnum back the second time. So how do you tell that this is happened? It can
>be done, without too much low-level messing about.

>[Low level messing about deleted :-]

Excuse me, but am I missing something obvious or is there a much simpler way to
determine if the resource fork is already open?

PBGetCatInfo returns a field called ioFlAttrib, and according to
_Inside Macintosh:Files_, bit 2 of that field is set if the resource
fork is open.

Matthias

-----
Matthias Neeracher                                   neeri@iis.ethz.ch
 "You must have picked up that copy of Scarlett instead of Inside Mac
  when you tried to find the right call..." -- Keith Rollin
Newsgroups: comp.sys.mac.programmer
From: potts@itl.itd.umich.edu (Paul Potts)
Subject: Re: Sound Loop in a with a Modal Dialog?
Organization: Instructional Technology Laboratory, University of Michigan
Date: Fri, 11 Sep 1992 12:36:05 GMT


I tried mailing this, but didn't get a response, so I'm not sure if it
made it. Apologies to those who are tired of this thread...

Danny -
Haven't looked at it in great detail, but I noticed one thing in
your code right off that looks wrong.

You are using a call to the function SoundisStopped to determine
if you should play the sound again - however, SoundisStopped
appears to return the mySCStatus.scChannelBusy. This will be
TRUE if sound is currently playing. It looks to me like your
logic would thus be reversed - you attempt to play the sound
again only if it is currently playing.

I could be off base here - let me know if this appears to help.
The other problem I still notice is that you call PlayTheSound,
and then ModalDialog. ModalDialog *waits* until you do something
that activates one of the buttons (click on it or press return).
So ModalDialog will be called in this loop based on
dialogtrue, until item 1 is hit, but the sound will be started
once each time before calling ModalDialog. Since ModalDialog
waits for a button to be activated, it will allow the sound to
time out and finish playing. The sound will be played again
if you hit a button that isn't number 1 (doesn't conclude the
loop based on dialogtrue). Otherwise it will be played once,
ModalDialog will wait for a button to be pressed, and then
you're done. This problem combined with the reversed logic
I mentioned above might give the symptoms you are seeing.

Hope this helps some (also hope it is correct advice...
I have learned the hard way to give no guarantees...)
If these turn out to be the problems, you could post
a followup to the newsgroup too.
-Paul-


-- 
"...remove protective cap. Hold atomizer with thumb at base and nozzle 
between first and second fingers. Without tilting head, insert nozzle into 
nostril. Fully depress rim with a firm, even stroke and sniff deeply."
-advice for presidential candidates from Paul Potts - potts@itl.itd.umich.edu
Newsgroups: comp.sys.mac.programmer
From: umdenbo0@ccu.umanitoba.ca (David A. Denboer)
Subject: C problem using Rects
Organization: University of Manitoba, Winnipeg, Canada
Date: Mon, 7 Sep 1992 04:19:00 GMT

For some stupid reason, this followinf piece of code does not compile anymore.
        OffsetRect(&dispBounds, -dispBounds.left, -dispBounds.top);

In one project, it compiles fine.
If I move the code to another project, it will not compile again.  It says
"Syntax Error", and my C compiler does not seem to know what a Rect is?!!!
I have all the correct #includes, as it does work in one project, but not in
any other.  I checked the Compiler options, and they are also the same from
project to project.
Has anyone else had this problem?

Thanks for any help!
--
David A. denBoer
Musi Computer Products
umdenbo0@ccu.umanitoba.ca
-- 
David A. denBoer
Musi Computer Products
umdenbo0@ccu.umanitoba.ca
Newsgroups: comp.sys.mac.programmer
From: joseph@joebloe.maple-shade.nj.us (Joseph Nathan Hall)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Opinions requested: Bedrock path
Date: Tue, 8 Sep 92 00:14:08 EDT
Organization: 5 Sigma Software
Reply-To: joseph@joebloe.maple-shade.nj.us
Distribution: usa
X-Mailer: uAccess - Macintosh Release: 1.5v5


In article <Bu8Fxu.BD3@well.sf.ca.us> (comp.sys.mac.programmer), kpm@well.sf.ca.us (Keith Morgan) writes:
) I am a new Mac developer interested in cross-platform development. I am 
) eliciting others opinions on what development tools to buy and learn
) that will be most useful in positioning me for Bedrock, when it becomes 
) available. I am concerned both about purchase price and the time-cost of 
) learning. 

A friend and I have been working on a cross-platform project for some
time.  He uses Borland's libraries for Windows, and I use TCL.  The
user interface code (20-30%) is separate between our versions, and
the rest is common.  You will find that a good modular design where
user actions are represented as "commands" will keep most of the code
that doesn't actually put stuff on the screen platform-independent.

Most of the platform-independent code in our application, in fact,
is unaugmented C.  I have hopes of getting it running on UNIX (in
Motif) some day.

Since there are no cross-platform tools at present that have a good
price/performance ratio, this is probably the best approach for you
unless your pockets are inordinately deep.

I wouldn't hold my breath for Bedrock.  Nice idea, but ....

Anyway, apparently neither MacApp nor TCL has a good long-term future.  
I'd guess that neither will be around more than another two years
in anything resembling its current form.  Just decide which is more 
convenient for you, and use it.  You WILL have to cope with changes 
in your OO libraries.  THINK C WILL become THINK C++, or it will fade 
from existence.  Change sucks, I know.  But so does the alternative.

uunet!joebloe!joseph   (609) 273-8200 day   joseph%joebloe@uunet.uu.net
v   v  sssss | Certified Guru: all-grain brewing,| 2102 Ryan's Run East
 v v  s   s  | C, synthesizer comp & arranging,  | Rt 38 & 41
  v    sss   | photography. Also not a bad cook. | Maple Shade NJ 08052
-----My employer isn't paying for this, and my opinions are my own-----
From: morris@quake.think.com (Harry Morris)
Newsgroups: comp.sys.mac.programmer
Subject: more on sublaunching
Followup-To: comp.sys.mac.programmer
Date: 15 Sep 92 16:59:55
Organization: Thinking Machines Corporation, Cambridge MA, USA
Distribution: world
NNTP-Posting-Host: quake.think.com


thanks to everyone who sent suggestion son sub-lanuching.  I think I've
gotten sub-launching pretty much working now!

However, I've got a document I need to launch, I know it's name, type, and
creator.  I've set up the AppParmHandle to point to my file, and that works
fine.  Two problems remain though.  I'd appreciate any help I can get.

1) I need to figure out which app to launch, given a type and creator.
This is probably normally done by the finder.  I think the necessary info
is in the desktop file, but TN 29 says not to rely on that.  Is there any
kosher way to do this?

2) When I launch an app (say, MSWord) with a doc, it opens the doc, and
becomes the frontmost app.  But then if I switch back to my app, and try to
launch another doc in the same app, the app becomes frontmost, but the
second do is not loaded.  Any idea how do this?  I've seen OnLocation do
it. 
Newsgroups: comp.sys.mac.programmer
From: ldo@waikato.ac.nz (Lawrence D'Oliveiro, Waikato University)
Newsgroups: comp.sys.mac.programmer,comp.sys.mac.misc
Subject: Re: Opinions on THINK Reference?
Date: 8 Sep 92 15:48:30 +1200
Followup-To: comp.sys.mac.programmer,comp.sys.mac.misc
Organization: University of Waikato, Hamilton, New Zealand

In article <ksand-070992133416@wintermute.apple.com>, ksand@apple.com (Kent Sandvik) writes:

> I'm eagerly awaiting the day when all important programming references are
> integrated to development environments. 411, Blue Notes and
> Think Reference is just the first generation of lookup tools.

And they should all be accessible via a dcmd from MacsBug!

Lawrence D'Oliveiro                       fone: +64-7-856-2889
Computer Services Dept                     fax: +64-7-838-4066
University of Waikato            electric mail: ldo@waikato.ac.nz
Hamilton, New Zealand    37^ 47' 26" S, 175^ 19' 7" E, GMT+12:00
To someone with a hammer and a screwdriver, every problem looks
like a nail with threads.
Newsgroups: comp.sys.mac.programmer
From: steve.herman%express@freedom.msfc.nasa.gov (Steve Herman)
Subject: HELP! -47 fBsyErr on Server
Followup-To: comp.sys.mac.programmer
Organization: BCSS
Date: Tue, 8 Sep 1992 21:43:22 GMT

Help....

I can't seem to figure out how to get past this error when attempting to
unmount a server volume from within my program (System 7.0.1/THINK C
5.0.2).

I'm getting the error when I've put a file from the server volume in the
trash and then call UnmountVol().  I can understand the error if the file
is still in the trash, however, if I've emptied the trash OR taken the file
out of the trash using 'Put Away' the -47 error remains on subsequent calls
to UnmountVol().

The only way to unmount the volume is to go to the Finder and drag the
volume to the trash.

I've seen the problem on both Novell server volumes and VAXshare volumes.

What is Finder doing which I'm failing to do?

Is this related to the invisible "Network Trash Folder" and "Trash Can
Usage Map" which get created on the server volume?

Any help or suggestions would be greatly appreciated.

----------------------------------------------------
- Steve Herman - BCSS
- Boeing Computer Support Services
- Huntsville, AL
----------------------------------------------------
From: triantos@acsu.buffalo.edu (Nick B Triantos)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Game Techniques (was: NON-QUICKDRAW GAMES)
Date: 8 Sep 92 04:13:31 GMT
Organization: The University at Buffalo
Originator: triantos@autarch.acsu.buffalo.edu

First, thanks to Joe Holt and Ben Haller, without whom I still wouldn't have a
clue whether it is _really_ possible to do direct screen writes.  I do have a
question or four which have arisen from building a program based on Joe's words
about finding the screen memory, though.

On my Mac IIci, with a 640x480 color monitor working through a RasterOps 264
card, 1K of memory is reserved for each row of screen pixels, although the
monitor only uses the first 640 bytes of each 1024.  So my question is this:
Is this a standard behavior for 640x480 video cards?  What about for those
screens and video cards that produce 800+ pixels horizontally?  They should
still fit within the 1024 bytes.  But how about the 21" monitors that provide
some 1200+ pixels horizontally?  Do those cards reserve 2K / row, or am I just
generalizing something which only my video card is doing?

Second, I changed the test part of the program as follows:  I did
while(!Button())
  *myScrnPtr++ = 0xAA
and some other things.  I make sure that I hit the button before I hit the end
of the screen.  Now, it seems as though the drawing is still slow (I'd say
about 100 lines / sec).  Is that slowdown all because of my while(!Button())?
I didn't think that that function should be so burdensome to the CPU.  Guess
that's something I should try out on my own, but it can't hurt to ask.

Related to that, I guess it doesn't seem as though my little test program
places values in Screen memory at anything close to the rate of, say, moving a
400x300 window.  For my example, the system would be moving ~120K bytes, and so
it should go relatively quickly, but it seems really fast to me, considering it
takes me almost as long to move 1200 bytes.  Is the System's window moving code
optimized to move more than words at a time?  Does the 68000 have something
similar to a MOVE.BLK <src>,<dst> instruction?

Last question, directed more toward Ben Haller than most others.  Does Solarian
II use two screens worth of memory and switch between the two for such smooth
animation?  I understand that you're not animating the whole 640x480 screen at
once, but it still does look really nice and smooth.

Well, I guess that's all for now.  So long, and thanks for all the fish.

-Nick
--
Nick Triantos    internet: triantos@acsu.buffalo.edu
                 AOL:      Triantos
"Scientists tell us that the fastest animal on earth, with a top speed of
120 ft/sec, is a cow that has been dropped out of a helicopter." - Dave Barry
From: hagstrop@oberon.mathcs.carleton.edu (Paul Hagstrom)
Newsgroups: comp.sys.mac.programmer
Subject: Re: NEED CONTACT: Ex-Muse Co. Castle Wolfenstein Employee
Date: 15 Sep 1992 01:19:08 GMT
NNTP-Posting-Host: bbn.com

In article <1992Sep14.012338.8110@access.digex.com> og@access.digex.com (Gary  
Goldberg) writes:
> I have been speaking to many net-folk who would like to pursue the code
> for Castle Wolfenstein/Beyond Castle Wolfenstein from the Apple II days
> published by Muse, an apparently defunct software company. If anyone knows
> how to contact ex-employees of the company, or legal counsel for them, for
> the express purpose of obtaining source code or publication copyright info,
> please e-mail me at og@access.digex.com. I am not interested in monetary
> gain but rather to create a freeware version for the current-day Macintosh
> systems. Thanks you in advance for your help. - Gary Goldberg

You may want to look into a PC game called, I think, "Wolfenstein 3D".  It is  
available (or, at least one place it is available) at sunee.uwaterloo.ca in the  
pub/vr directory.  Apogee's name is on it, and it doesn't seem to make any  
references to Muse's original game, unfortunately.  Still, it might be  
informative to try to get in touch with Apogee.  The number listed in the  
"catalog" file is: (214) 278-5655, and maybe somebody there could point in the  
right direction..

--
schmotsignature.
Paul Hagstrom
(hagstrop@carleton.edu)
Xref: sparky comp.sys.mac.programmer:15386 comp.sys.mac.misc:16427
From: jsp@uts.amdahl.com (James Preston)
Newsgroups: comp.sys.mac.programmer,comp.sys.mac.misc
Subject: Re: Opinions on THINK Reference?
Date: 12 Sep 92 05:31:40 GMT
Reply-To: jsp@pls.amdahl.com
Organization: Amdahl Corporation, Sunnyvale CA

matsb@tdb.uu.se (Mats Bredell) writes:

}I'm using THINK Reference and I think it's very good. But there are some
}things that keep annoying me.

}* Sometimes the links (when you click on a highlighted word to get more info)
}  doesn't work. It takes you somewhere completely different. The same thing
}  happens when you click on a link to see what it's about, and then want to
}  go back. The back links also fail quite often.

I have never experienced this problem, not even once, and I use THINK
Reference a LOT.

}* Some of the info in THINK Reference is wrong. There are bugs in the docs,
}  and this can keep you searching for programming bugs for weeks! You still
}  need the full IM manuals.

Yes, there are a lot of bugs in there, but most of them are not serious,
more along the lines of typos.  And THINK Reference was not meant to be
a replacement for Inside Mac, just a supplement to it.  I think they did
an amazing job of craming that much information into 2.1 megabytes.

}* The THINK Reference usually uses a lot of bad programming techinques in
}  the docs and programming examples. They use a lot of constant values
}  instead of symbolic names, they access low memory globals, and in some
}  places even encourages the programmer to access low memory globals 
}  instead of using supported toolbox calls.

I wouldn't say they encourage it, they're just informing you that it's
there.  If you choose to bypass the toolbox call, that's your decision.
More often than not, I find the examples tremendously helpful.  More
than once, I have incorporated a piece of their sample code into my
program (and I never directly access any low-memory globals).

--James Preston
Xref: sparky comp.sys.mac.programmer:15267 comp.sys.mac.apps:14376
From: eauu011@orion.oac.uci.edu (Gizmo)
Subject: Re: 2up, double-sided printing
Newsgroups: comp.sys.mac.programmer,comp.sys.mac.apps
Organization: University of California, Irvine
Date: 10 Sep 92 08:39:57 GMT

I'm also interested in knowing how to print on both sides.  Could someone tell
me if there is there some kind of init that will allow a DeskWriter C to print
odd number pages and then allow the users to reload the papers to print the
even number pages on the back?

Please post on the net, I'm sure there are other users who would also like to
conserve paper to save a tree.

Any Help would be greatly appreciated.

Wayne
Newsgroups: comp.sys.mac.programmer
From: greeny@top.cis.syr.edu (J. S. Greenfield)
Subject: Peculiar Virtual Memory behavior
Organization: Syracuse University, CIS Dept.
Date: Thu, 3 Sep 92 19:31:57 EDT


I was recently informed by someone running a small application of mine, that
he gets a "Memory is very low" message running with virtual memory, even
when there is plenty of memory.

My application is very small and runs in just a 40K partition.  Needless to
say, I do not use any special VM routines, and the message is not from
my application.

My guess is that this message is generated by the system, for some reason.

Does anybody who is familiar with or uses VM have a guess as to what is
causing this behavior?


Thanks.


-- 
J. S. Greenfield                                         greeny@top.cis.syr.edu
(I like to put 'greeny' here, 
but my d*mn system wants a 
*real* name!)                        "What's the difference between an orange?"
Newsgroups: comp.sys.mac.programmer
From: mspace@netcom.com (Brian Hall)
Subject: Re: THINK C linker makes me sad
Date: Tue, 08 Sep 92 09:32:27 GMT
Organization: Netcom - Online Communication Services  (408 241-9760 guest) 
Distribution: usa

howard@netcom.com (Howard Berkey) writes:
>Please, no flames for this... I LOVE the THINK C environment, and I know
>that the 'open letter to symmantec' thread was months ago, but I do REALLY
>WISH that the THINK C linker (or loader) would recognize discrete blocks of 
>code at the function (rather than file) level.  
>	While I'm at it some revision control system would be nice too...

I use MPW Projector just fine with Think C.  Between adding "projector
aware" as an option and "modify read-only" as a menu item, it is usable.
It would be better if you did not have to keep the shell open all the time
for easy check in/out, but it beats the alternative.

-- 

 \ | /   | Brian Hall                 mspace@netcom.com
 - : -   | Mark/Space Softworks       Applelink: markspace
  /|\    |                            America Online: MarkSpace
 |-+-|   |
/-\|/-\  | The tornado ate my powerbook.
Newsgroups: comp.sys.mac.programmer
Subject: protecting a single folder....
From: coedgar@wisipc.weizmann.ac.il (Ron Edgar)
Date: Sat, 12 Sep 1992 23:17:28 GMT
Distribution: world
Organization: Weizmann Institute of Science, Computation Center.

   I am posting this to this group because as simple as it sounds, I got
no good solutions, hoping you people are more knowladgable.....
All I want is to protect a single folder from beeing opened without a
password, with the major restriction of not having to install the programm
in the system folder - just in that very folder...
  I could use ResEdit to render it invisable, ( which would be enough for my
purpose) but it's a very uncomfortable solution (unless it is possible to open
an invisable folder not from ResEdit).
  Does anyone have a solution ?
--
+-------------------------------------------------------------------------+
| Ron Edgar            coedgar@wiscon.weizmann.ac.il  (unix)              |
| Weizmann Ins.Sci.    coedgar@wiccmail.weizmann.ac.il (MSmail)           |
| Rehovot Israel   "old chemists never die, they just reach equilibrium"  |
From: Glen.Stewart@f175.n2240.z1.ieee.org (Glen Stewart)
Newsgroups: comp.sys.mac.programmer
Subject: RE: AppMaker / Think C / PICT objects
Date: 31 Aug 92 04:05:20 GMT
Organization: FidoNet node 1:2240/175 - The Associati, Grand Blanc MI

How do you like AppMaker, Ramesh?  Does it let you focus completely on the raw 
core-code of your program, or do you have to figure out what it provided, then 
find a way to hook into it?

Thanks!


--  
=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
 Glen Stewart - Internet: Glen.Stewart@f175.n2240.z1.ieee.org