INFO-MAC@SUMEX-AIM.STANFORD.EDU (Moderator Dwayne Virnau...) (05/09/87)
INFO-MAC Digest Saturday, 9 May 1987 Volume 5 : Issue 87 Today's Topics: Help wanted: ResErrProc hook. Multiple stacks and messing with HeapEnd MacTerminal Direct connection of Laserwriter to Mac ScrapSaver 1.2 small mistake in file-name in INFO-MAC-5.084 Sneaky Lightspeed Pascal "Feature" File Fixer .05 Piezo fan for the Mac, Cheap! data sampling on SE Postscript <--> imPRESS TCP/IP on the Mac Multisync monitors on MacIIs RE: Using an NEC MultiSync with a Mac II 3 Questions & 1 Flame SoundWave Review ---------------------------------------------------------------------- Date: Fri, 8 May 87 12:46:30 est From: munnari!csadfa.oz!jlo@seismo.CSS.GOV (John O'Neill) Subject: Help wanted: ResErrProc hook. Does anyone know how best to use the ResErrProc hook (IM 1-116)? I was hoping to use it as a general error trap mechanism, combined with a setjmp/longjmp exception handler to avoid having to explicitly call ResError() after every trap which might generate an error. IM-1-116 suggests that ResError() also returns error codes for Operating System errors such as File Manager errors or Memory Manager errors. This is misleading, as many file manager errors (e.g. dupFNErr) do not set ResErr, and the ResErrProc is therefore not called. A further problem is that some ROM routines deliberately (?) induce Resource Manager errors. i.e. When I tried using the ResErrProc, it seems to get called with resNotFound (-192) quite a lot, even when the resource (*is*) found. For example, SetMenuBar(GetNewMBar(MenuBarID)) results in one call of ResErrProc for each menu in the menu bar, even though the menus do exist, are found, are displayed OK etc. Furthermore, ResError() will return noErr in confirmation that all was well! It turns out that: GetNewMBar->GetMenuBar->...->SetResLoad(false)->GetResource->GetResInfo where GetResInfo is passed a handle which is not a handle to a resource, and hence, as IM-1-121 tells us, ResErr is set to resNotFound. I currently work around the problem by nullifying my ResErrProc around such code, but that is hardly a general solution. Advice on (*exactly*) what errors do invoke ResErrProc would be welcomed, as would advice on better error management strategies. John O'Neill Phone ISD: +61 62 68 8818 Dept. Computer Science Telex: ADFADM AA62030 University College ACSNET/CSNET: jlo@csadfa.oz Aust. Defence Force Academy UUCP: ...!seismo!munnari!csadfa.oz!jlo Canberra. ACT. 2600. ARPA: jlo%csadfa.oz@SEISMO.CSS.GOV AUSTRALIA JANET: jlo@oz.csadfa ------------------------------ Date: Thu, 07 May 87 11:26:03 EST From: sbm@purdue.edu Subject: Multiple stacks and messing with HeapEnd I don't remember seeing my last question even posted in a digest yet, but I have solved it. The problem was that, after my application started up, everything worked correctly, but the floppy disk never stopped spinning, even when I quit back to the Finder. The answer was that, in my overzealous initialization, I was removing the VBL task that the floppy disk driver installs at system startup. My new problem is actually an old one. Since I am doing multitasking, I need multiple stacks, and I have found some more ROM traps that scribble in random places between HeapEnd and SP, namely, InitWindows and NewWindow. Do these call MapRgn for some reason (remember that MapRgn was the routine that was originally found to display this behaviour)? Anyway, this is obviously a problem that can't be worked around, but must be dealt with, and I don't remember seeing any appropriate suggestions. These types of routines seem to need lots of memory, and take the region between HeapEnd and SP to be usable stack space. What I need is a way to tell them just how much stack space they actually have available, so I tried the obvious. As part of my initialization, I allocate a big chunk out of the application heap and make it the current heap zone, so that the application heap is actually never used in my program. Hence, I thought it wouldn't hurt too much just to set HeapEnd in the context switch to the topmost (lowest in memory) location available for stack space for the new process. To my surprise, it seems to work. There is no more scribbling in forbidden zones in memory, and, apparently, the ROM routines are not confused by HeapEnd's bouncing around. Besides that, there is a benefit: the Mac's stack sniffer will actually tell me when a stack has *really* overflowed. It all seems too good to be true. Could some knowledgeable person find out for me whether this radical use of HeapEnd can mess things up, and, if so, what the correct way is to tell these routines where the end of the stack zone is? Steve Munson sbm@Purdue.EDU sbm@Purdue.CSNET ------------------------------ Date: Fri, 8 May 87 09:49+0100 From: Ralph <MartinRR%cardiff.ac.uk@Cs.Ucl.AC.UK> Subject: MacTerminal I would like to configure Macterminal so that it always starts up with settings appropriate for my use. Obviously, one way to do that is to save the settings in a document. Another would seem to be to edit the Untitled document, then save it, but there seems to be problems with this - each time I quit, it then asks if I want to save the document. Another possibility seems to be to cut out the resources which do the trick from a MacTerminal document, and paste them into MacTerminal itself. On looking at one, there are 4 types of resources, including one called CNFG. Does anyone out there have a specification of what these resources contain, and can they tell me which I need to paste into MacTerminal itself to customize it, if this is possible ? Or does anyone have any other good suggestions for customizing ? Ralph ------------------------------ Date: 08 May 87 16:19:55 BST From: gorry_fairhurst%aberdeen.ac.uk@Cs.Ucl.AC.UK Subject: Direct connection of Laserwriter to Mac Some time ago I made a cable up to directly connect two apple talk devices. (i.e. a LaserWriter and a Mac), now I seem to remember it was pretty simple, but can't remember how to connect the differential driven lines together. Some one out there must have a better memory than me, could you please mail me, I've got the wire and DB-9, and I've just put the soldering iron on to warm. Gorry (Mac)Fairhurst ------------------------------ Date: Thu, 7 May 87 09:41 EDT From: Jeffrey Shulman <SHULMAN%slb-test.csnet@RELAY.CS.NET> Subject: ScrapSaver 1.2 This is ScrapSaver 1.2 (written by Paul Mercer (LOGICHACK) on Delphi.) Fixes a problem with the clipboard and System 4.1. [ also archived as [SUMEX-AIM.Stanford.EDU]<INFO-MAC>INIT-SCRAPSAVER-12.HQX DoD ] (This file must be converted with BinHex 4.0) :#P0MFQ&`8f&fCA)!58j*9%e"3e-!N!J#(jQ[!*!%!3#3!`(L!*!$iJ#3!chrN#! +8f0bBA"6BACPFQ8#!*!$58j*9%e"3e-!N!0S!#-!N!4*6NP868&$8`#3!fJ!)`# 3%T[9d6i!N!B#(rq3JJ#3!pj)jamqB4"K3%cII2K1G8+RUITBMdje-$bSPD&'XIJ #VQ`HF!LP(QBB)NJ[#%(krq"`#+!Z2c`!"$mm!!1SP8je2c`!!DR)6R8`2!!63UG 4b2rm)%p#U!!-%A`!!3!E-AJ#%!!@3rS!5#&*!"+J!'Bb)A`!N!-%!#3aI!!"!#` KI!#3!`3!,N2i#@!K53!JS!*Q%+!"8,J*B%*i#@VHr!"36R@J!8+i#@$Hr!"36R8 13faTF'*[BA*N)%CTE'8,9Q9bFfP[EL!a,M)6+%-T)$%j1$FX)&!Z)%ePFQ0PFJ# 3!`%!N!-"iJ#3!q)!N!-p!!1l&J@%!*!$(!!b!!"*6NP8!*!$#J2S!!!J!*!%!lS U#P0MFQ&`8f&fCA,b[J: ------------------------------ Date: Thu, 7 May 87 09:40:14 CDT From: CMP.WERNER@r20.utexas.edu Subject: small mistake in file-name in INFO-MAC-5.084 you announced: archived as [SUMEX-AIM.Stanford.EDU]<INFO-MAC>UTILITY-DUPTREE-11.HQX in fact the file is version 1.0 and appears in the archives as: UTILITY-DUPTREE-10.HQX no big deal - but it defeated my "semi-automatic" mechanism of fetching new files .... Werner [ Ooops. The file is indeed version 1.0, and is archived as [SUMEX-AIM.Stanford.EDU]<INFO-MAC>UTILITY-DUPTREE-10.HQX DoD ] ------------------------------ Date: Fri, 8 May 87 10:34:29 PDT From: PUGH%CCC.MFENET@nmfecc.arpa Subject: Sneaky Lightspeed Pascal "Feature" Well, I sure feel foolish. I was nabbed by a feature of Lightspeed Pascal and it ends up making me look pretty inept. However, I will swallow my pride and tell what I have learned in order to prevent it from happening to someone else. I was trying to fix a couple of little bugs in Randomizer, as you probably noticed. I had placed the Randomizer source, project, and resource files in a folder deep in the my disk for permanent storage. When I wanted to work on them, I would copy them into the System Folder to do the development and then copy them back when I was done. So far so good. Well, I noticed that I had lost some of the changes I had made. So, after some experimentation I discovered that LSP was saving the pathname of the source code and modifying the copy that was back in the original directory, and not the copy in the System Folder, although it was using that project and that resource file. A picture would be appropriate here, but you don't get one, you get a table instead. These are the files used by LSP. HD:System Folder: HD:LSP:Projects:Randomizer: Random Project <--- Random Project Random.pas Random.pas <--- Random Resources <--- Random Resources Needless to say, this is a bit sneaky of LSP, but to be expected since it manages the pathnames for you. It is related to the problem where LSP cannot find a file and asks you to look for it, only to reveal it in the default directory. LSP should look in the default directory first, and then search it's saved pathname. That would remove some of the ambiguity from the issue and would prevent it from asking you to look for all the files when you move a project to a new folder or disk. The simplest fix is to modify the project file to use the source copy by holding down the Option key and double clicking on the source name in the project window. This is equivalent to Remove and Add. I had merely been double clicking to bring up the source and getting the wrong copy unknowingly. Well, since I have been copying the source, project, and resource files back to their original locations (replacing the ones there), I have been losing my changes. This means that the Randomizer in the archives is a goof and here is the correct one. Lord, please help me so that I don't have to post this again. I apologize profusely for the inconvienience and promise that everything now works as advertised. I promise not to do this again. People using Randomizer should be aware that the old BeepInit crashes frequently. You should be using the one included with Randomizer, which is also archived as INIT-SOUND-BEEP.HQX on Sumex-Aim.Stanford.Edu. People start using this and then blame Randomizer when the BeepInit crashes. Honest, it's not my fault. Randomizer just makes sure that BeepInit eventually gets the one file that will crash it. If you pass Randomizer along, I would appreciate it if you would keep the BeepInit and SoundInit files with it. Thanks for your support. Jon N L pugh@nmfecc.arpa M A L National Magnetic Fusion Energy Computer Center F T N Lawrence Livermore National Laboratory E L PO Box 5509 L-561 C Livermore, California 94550 C (415) 423-4239 [ once again archived as [SUMEX-AIM.Stanford.EDU]<INFO-MAC>INIT-RANDOMIZER.HQX DoD ] ------------------------------ Date: Fri 8 May 87 12:26:00-EDT From: TN07@TE.CC.CMU.EDU Subject: File Fixer .05 Attached is the latest version of the program File Fixer. This program repairs 400 or 800-K Mac disks, MFS or HFS. The program was written by Frank Beatrous at the University of Pittsburgh. If you recover a trashed disk send your thanks directly to Frank at 110343@PittVMS.BITNET. Enjoy, Tom [ archived as [SUMEX-AIM.Stanford.EDU]<INFO-MAC>UTILITY-FILEFIXER-05.HQX DoD ] ------------------------------ Date: 7 May 87 17:12:00 EST From: <bouldin@ceee-sed.arpa> Subject: Piezo fan for the Mac, Cheap! A cheap source for the piezo fan that is used in a lot of Mac upgrades is thru Edmund Scientific. It's $12.00 in quantity one. Stated to move 7 cfm of air. Connect to the 110 V on the inside of the Mac case and you are in business. It's on page 41 of the 1987 catalog, under "Educational Aids". Edmund part number E36,653. ------------------------------ Date: 7 MAY 87 09:15-N From: INDUGERD%CNEDCU51.BITNET@wiscvm.wisc.edu Subject: data sampling on SE Hello, Can anybody help me about data acquisition with mac SE ? A friend of mine need to acquire data in a neurophysiology experiment. The sampling rate is 10 khz. Are there any hardware and software available on Mac SE for such task ? Thanks for help. Philippe ------------------------------ Date: 7 May 87 14:45:00 EDT From: "STEPHEN_TETHER" <tether@mitlns.mit.edu> Subject: Postscript <--> imPRESS Two questions: (1) Is there a general method of capturing the Postscript commands that would normally be sent to a Laserwriter when a document is printed? Ideally the method should work for ALL applications. (2) Are there any Postscript <--> imPRESS translators out there? The idea is to use the Imagen laser printers connected to the Lab VAX-cluster for printing Mac documents. I know about PaintImp, DrawImp, but these are written in C for Unix, and our machines run VMS and don't have a C compiler. Translating Postscript to imPRESS seems easier than recoding the above programs, besides being more general. Stephen Tether MIT Laboratory for Nuclear Science Cambridge, MA 02139 tether@mitlns.mit.edu tether@mitlns.bitnet satether@BIX ------------------------------ Date: Thu, 7 May 87 15:22:30 PDT From: Ray_Davison%SFU.Mailnet@umix.cc.umich.edu Subject: TCP/IP on the Mac Our university is in the progress of establishing a campus wide network to tie together the various networks that are cropping up. We are seriously looking at TCP/IP as the interconnection protocols. We also have a fairly large number of Macs around campus. I would like any information anyone has on TCP/IP products for the Macintosh. This would include any Mac LAN to TCP/IP gateways, hardware, software and vapourware. Please reply directly to me and I will summarize the responses for the list. Ray Davison Simon Fraser University Computing Services Burnaby B.C. Canada V5A 1S6 USERRAYD@SFU.bitnet Ray_Davison%SFU@um.cc.umich.edu (604)291-4448 ------------------------------ Date: Thu, 7 May 87 15:09:55 EDT From: Dan Magorian <magorian@umd5.UMD.EDU> Subject: Multisync monitors on MacIIs Leornard Li of Xerox posted a query about the use of NEC Multisyncs on the MacII. Basically, NEC or anybody else's autosyncing unit will work. I have had a NEC hooked up on and off since February. You need to wire a conversion from the DB9 connector used by the MEC and the DB15 used by the MacII (the new IBMs use DB15 as well, probably not the same pinout). The configuration is: MacII Monitor Signal 1 ------- 6 ground 2 ------- 1 red 5 ------- 2 green w/ sync 9 ------- 3 blue 3 ------- 4 composite sync (can be omitted) This adaptor may be available prewired from vendors as well, but it's easy to sold to solder up. The monitor must be set to analog and manual mode (it syncs at 35KHz) The quality of the picture isn't as good as the Sony the Apple sells, but it's OK. Also, use the DB15 to DB15 monitor cable from Apple (in other words, wire only a short adaptor instead of the whole cable) to avoid an impedance mismatch that rounds pixels and degrades the image. If you're buying one outright, buy Apple or another vendor's for better quality. But the multisyncs are around and easy to get hold of... Dan Magorian (301) 454-6030 Computer Science Center magorian@umd5.umd.edu University of Maryland magorian@umdd.bitnet College Park, MD 20742 Applelink: A0190 ------------------------------ Date: Thu, 7 May 87 19:57:54 EDT From: MacTechnics_User_Group@um.cc.umich.edu Subject: RE: Using an NEC MultiSync with a Mac II (Originally from Apple Tech Support) To hook up an NEC MultiSync monitor to a Macintosh II: You will need to make an adapter cable from the video card to the monitor. Here are the pinouts of the video card: Pins Signal Name 1,4,6,11,13,14 Ground 2 Red 3 CSync- (composite sync) 5,12 Green (with sync) 9 Blue 7,8,10,15 Not connected Here is the pinout description for the adapter cable (using the sync-on-green configuration): Macintosh II NEC Signal Name 1 ----------- 6,7,8,9 Ground 2 ----------- 1 Red 5 ----------- 2 Green (sync) 9 ----------- 3 Blue The monitor must be set to Analog mode and manual mode as well. I know someone that tried this without 100% success (fuzzy picture). I'm not sure what the problem was, it's possible that unused pins should be grounded or tied high. Eric Shapiro MacTechnics P.O. Box 4063 Ann Arbor, Mi 48106 ------------------------------ Date: Fri, 8 May 87 08:35:12 PDT From: UWACDC.BITNET Subject: 3 Questions & 1 Flame 1. Does anyone know what the price of A/UX is going to be (AUC or retail)? 2. Does anyone know how to reach LoDown? We're very interested in their WORM drive for the Mac and can't find any adds in recent Mac magazines. Any experience with this device? 3. Does anyone know of any GIS (Geographic Information System) software for the MAC? How about the (shudder) PC? <Flame On> 4. I'm a new developer and have already hit the 32K segment wall using LSP. How do the developers of LSP, TML, or Turbo expect us to do scientific programming on the Mac with such a silly limit? I know, I know, the limit is really caused by the Segment Manager but that didn't seem to stop Absoft--their FORTRAN compiler doesn't have the 32K limit. Shame on Apple for such a fundamental shortcoming and shame on all the Pascal compilers for propogating the mistake. I can only hope that the new Mac II toolbox doesn't have such a limit and/or software developers give us a work around. I don't relish the idea of using FORTRAN on Mac even with MacFace available. I realize that this is an old complaint but flaming is a great release. Perhaps this will be the flame that gets something done about this serious problem. BTW: Prototyper from SmethersBarnes, advertised as 'availablw now' in MacTutor is just now going to Beta testing! I could really use such a product right now and my hopes were dashed to find it still vapor. Should be out RSN (right). <Flame off> John Osborne School of Oceanography, WB-10 University of Washington Seattle, WA 98195 <OZ001@UWACDC.BITNET> ------------------------------ Date: Thu, 7 May 87 10:23 EDT From: BOGARTZ%UMASS.BITNET@wiscvm.wisc.edu Subject: SoundWave Review I just received my copy of SoundWave, the next generation of sampling software from the folks who brought us MacNifty SoundCap. (They are now called Impulse, but are working out of the same location.) SoundWave is mostly a great improvement over SoundCap. Here is my impression of the improvements they have made: It has Undo! It is written in Lightspeed Pascal. It uses a much more standard user interface. Where SoundCap took over the entire screen, SoundWave opens up to four separate sample windows, each with its own palette of tools for playing, drawing on the wave, etc. They have solved the problem of how to view a whole sample while editing it at a fine level of detail. The scroll bar is a horizontal "summary" of the sample, scaled both vertically and horizontally to fit in one screen's width, that resides at the top of the sample's window. The thumb of the scroll bar is a little transparent rectangle that corresponds to what is in the main portion of the window. If you remember the video game Defender, you will find it very reminiscent of the planet summary at the top of the screen. It has a digital filter bank with five filters, each of which can be set at a user specifiable frequency. (I guess this makes it a parametric equalizer, but it is laid out as a graphic eq.) It is truly user-programmable. Here's how you do it. The program provides a menu titled "Custom." In SoundWave there is a resource called "swci" (for SoundWave custom item). Every CODE resource pasted into the swci appears as an item under the Custom menu. So all you have to do is use your favorite language compiler to create a CODE resource, paste it into SoundWave with ResEdit, and SoundWave effectively becomes a front-end to whatever digital sound application you want to write. The CODE resource gets a pointer to SoundWave's frontmost window that contains a sample (SoundWave won't let you choose anything from the Custom menu unless the frontmost window contains a sample). From this it can get a pointer to an array containing the sample data. Then you can mess around with it to your heart's desire. Some obvious applications for this: a tone generator (included as a sample Custom item with SoundWave, along with LSP project and source file); a routine to dump your sample to a sampling keyboard over MIDI; some heavy-duty algorithms for digital processing, such as digital reverb, harmonization (pitch change), compression, etc. Gripes: It doesn't have some of the signal processing features that SoundCap had, like flanging or scratchbar. (However, I would guess that because of SoundWave's easy extensibility, people will write them...) Most of the dialog boxes have "Cancel" on the left and "OK" on the right, which I think is backwards from most applications. The filtering operation takes a long time (over 20 seconds for even small ranges). This is understandable, but the "Cancel" button does not work during this process, leading you to think your Mac has hung. There should be a warning that "this may take a while." I am going to be writing an extensive review of SoundWave for the June issue of the Boston Computer Society's Computers and Music newsletter, which is called (coincidentally, and we thought of it first!) "Soundwaves". What? You've never heard of or seen "Soundwaves"? Well, just send your name and address to me: David Bogartz 81 Bridge St., Apt. 2 Northampton MA 01060 (Bitnet: DSBOGARTZ@AMH) for a complimentary issue. DISCLAIMER: I am not associated with Impulse in any way except as a satisfied customer. I am, however, associated with the Boston Computer Society, being a member and the editor of "Soundwaves". ------------------------------ End of INFO-MAC Digest *****Thisions oTerminaD