TweetFollow Us on Twitter

Mar 90 Mousehole
Volume Number:6
Issue Number:3
Column Tag:Mousehole Report

System 7.0 and Memory

By Larry Nedry, Contributing Editor

From: Sysop

Re: finding source code to articles

The monthly sources from MacTutor are now available in the File Library. Each file is a Stuffit file containing all of the sources for a given article. There is a $5.00 charge for each file downloaded.

From: Walrus

Re: Think C and System 7.0 and...

Maybe some of the Symantec folks can answer this. System 7.0 is due to require 2 megs. Think C 4.0 with Debugger requires 2 megs. When the new system comes out, how much will I need to run C, 4 megs? Could I squeak by with 3?

On a related subject, how difficult is it to self-install SIMMs in a Mac SE? What if you’re strong suit is NOT hardware? Since I’m in Silicon Valley I do suppose I can find dealers to do this, but I might be interested in doing it myself. Any horror stories out there about memory expansion?

From: Btoback

Re: Think C and System 7.0 and...

I’ve installed SIMMs and Radius expansion cards into my SE, as well as changing the disc drive. The hardest part is removing the back. The second hardest part is getting all the cables plugged back into the motherboard without removing most of the skin on your knuckles. The third hardest part is waiting for the self-test to complete after you put the system back together - especially since the self-test takes longer after you put more memory in!

There are some locking connectors on cables that need special care, as does the connector on the back of the CRT. The only thing you may need to force is the back: if you force anything else, you’re about to break it. In short, you don’t have to be a hardware expert, but some mechanical intuition helps. If you don’t know about proper static precautions, ask someone first. And you’ll get a good look at one the most compact and clever packaging jobs around.

From: Siegel

Re: Think C and System 7.0 and...

THINK C will probably work on a minimal System 7.0 configuration, but it’ll be sort of like running it on a 1MB system is now; you won’t be able to write or debug really huge programs. You can’t have 3MB in your system; the hardware architecture doesn’t allow for that.

From: Noisy

Re: Think C and System 7.0 and...

Can’t help you with the 2-3-4 megs question, but I will pass on a fable about a software developer who decided that the hardware jocks were overpaid, and he could put SIMMs in his Mac+ all by himself, thank you very much. They’re not overpaid...I destroyed a rack of SIMM pins on the motherboard and ended up paying for a new motherboard...just to save a $25 installation fee. Let an expert do it - they’ve got to eat too.

From: Walrus

Re: Thanks for the Memory (advice)

I know, that’s a bad pun, but what could I do?

Many thanks to the people that responded to my memory/Think C/System 7.0 question. I now have a Mac SE with 2.5 megs (I got the old .5 chip cards for old times’ sake) and it is wonderful. By the way, I did not do it myself. I have been busily learning the Toolbox AND the C language at the same time (I know Pascal, but C is the current wave) and not having a source level debugger to lean on is toooooo much (MS-DOS C neophytes can use “printf” statements, the most common debugging tool. That method is not so simple for the Mac programmer (yeah, maybe open another window, but that ain’t so easy at the beginner level). So, if you are a Mac C beginner, USE A DEBUGGER! I stepped thru a problem I was having in a program, and it was like my IQ went up by about 20 points. Even if $$$ is holding you back, get it anyway, you will save hours and hours of your time, and your progress will go much faster. (A method of using Think C and the Debugger in 1 meg that was posted was tried, but I just couldn’t get it to go.)

From: Matt

Re: Well, I’ve got these SIMM’s...

I just bought 2 1meg SIMMs (Microtech International, $75 each). But now what? When I try to install them I run into MAJOR problems. If I put one of them in SIMM slot 1, my Mac doesn’t find the other 75meg! If I put both of them in (slots 1&2), with or without the .5meg in the front slots, the system won’t start up - it gives me a sad-Mac and 0000 00003 0000 FFFF !?*@#! What do I do?

From: Matt

Re: And I’ve got these other SIMMs.....

Well, now that I’m installing 2meg in my SE, I have 2 1mBit SIMMs. Is there any market for them? Should I just throw them in a closet? How much are they worth?

From: Apage

Re: Well, I’ve got these SIMM’s...

First of which flavor of Mac are we talking about? Mac II, Mac Plus, Mac SE, or SE/30? This makes a big difference. For Mac IIs, there is a certain order that the SIMMS must go in, I think that it is the largest SIMMs goes in the first bank, and you must install them in sets of 4. For pluses and SEs (not the SE/30) you can install in sets of two, but there is also a resistor that must be moved from one location to another. I do not have my hardware reference manual from Addison Wesley, and a good idea if you see yourself doing a lot of this) my slime ball best friend borrowed it and has yet to return it. Otherwise I could tell you how these devices should be set. Good Luck. Let me know how it turns out.

From: Matt

Re: Well, I’ve got these SIMM’s...

Hm... Addison-Wesley... In fact Inside Mac V has a chapter on SIMMs in SE’s and II’s, which details exactly which resistor must be removed (Labeled “256k Bit” in the “RAM Size” area of the SE motherboard). That’ll teach me to read the manuals before asking dumb questions.

From: Guido

Re: VBL/Sound

Help!!! I’m am currently writing my own sound routines (because Apple’s have just a little too much overhead for me!!!) and am coming across a little problem with my VBL task (I believe). My sound routines simply take a sampled sound and play it back. My VBL task simply takes 370 bytes from my buffer and crams them into the sound buffer. When I reach the end of my buffer, I fill the rest of the buffer with 0x80. This seems to work EXCEPT for a little noise. My sample plays back, but I get a little static along with it. Some things I AM doing: getting the address of the sound buffer and the VIA chip from low-memory globals, start my VBL with a SetUpA5() and end with a RestoreA5(). Some things I am NOT doing: doing ANY trap calls, calling SysBeep or anything like that. If you have any ideas, please let me know. THANKS!!!!!!

From: Guido

Re: Sound/VBL

I am writing my own sound routines to playback samples and I’m running into a small snag... It seems that if I call GetNextEvent while my sound is playing, I get a little static (noise) along with my sound. If I don’t call GetNextEvent, the sound plays back perfectly. I guess GetNextEvent is also doing something I don’t know about and messing up my vbl task. Anyone have any comments?

From: Macdts

Re: Sound/VBL

This not a good idea. It would be incompatible with System 7.0 and will cause the current Sound Manager to fail. Also, consider that _SysBeep is a Sound Manager call. If you need help playing samples with the Sound Manager, I’m the expert. Playing sounds in a VBL is also warned against in Tech Note #19.

From: Guido

Re: Sound/VBL

Thanks for your reply. What I didn’t say is that I’m writing these routines for an arcade-style game, and want them to be as FAST and efficient (not general-purpose) as possible. From what I can tell, many others are doing the same thing I’m trying to do (eg. Crystal Quest, SoundEdit, etc.) If you know what’s causing the problem, PLEASE HELP!!! If not, please upload an example of SoundMgr calls to playback samples FAST. Thanks...

From: Macdts

Re: Sound/VBL

If you show me some code or describe the problem I could help. I’m nearly finished with a sample application that demonstrates the Sound Manager. I’ll upload it when it done.

The fastest way to have a sound channel allocated and use the bufferCmd. You also need System 6.0.2 or later. In fact 6.0.4 contains an optimized Sound Manager and it won’t get any faster.

From: Guido

Re: Sound/VBL

Thanks for your reply. I’ve uploaded my sound routines for your viewing pleasure(?!?!). As you will see, they are very quick and dirty. (But, that’s what they have to be for an arcade game) The way they are used is: SND_get() read in a ‘snd ‘ type 1 resource. SND_open() then installs my vbl task and turns on sound in the VIA chip. SND_play then sets up some variables for the vbl task to playback. SND_close() closes everything. This all plays back just fine UNLESS I call GetNextEvent() while the sound is playing. Then I get some extra pops and crackles. What could GetNextEvent be doing to mess up my vbl task? SoundEdit (from Farallon Computing, MacRecorder) seems to be using routines similar to mine, but without the extra noise. Thanks again for the help.

From: Rhoglund

Re: Hiding the menu bar

I am currently writing an application that has a modeless dialog box as its primary window. Since I have no menu items, I would like to be able to turn of the menu bar. Is there a call I can make to accomplish this task, such as ‘HideMenuBar’, or do I need to perform some Quickdraw magic?

From: Macdts

Re: Hiding the menu bar

This is not a good idea. The user interface states the menu bar must always be available. There are only a couple reasons to “hide” it. One would be a slide show/presentation application. An application that does not use the menu bar should NOT hide it from the user. Doing so confuses the user, and it presents a number of technical difficulties.

Under MultiFinder the menu bar is in use. MultiFinder “owns” the Apple menu. It is used to switch to other applications. It also contains the “switch icon” in the upper right corner.

The Notification Manager uses the menu. Applications in the background that need to notify the user, such as the Print Monitor, use the Apple menu to do so.

System 7.0 uses the menu at all times.

Finally, there was an article in Apple Direct that stated the Human Interface problems of hiding the menu bar. This is the official Apple position. Don’t hide the menu bar unless you need the full screen.

From: Nicks

Re: How do you hide the Menu Bar?

So just how does Hypercard and other programs hide the menu bar? I know that I could obliterate it by just drawing over the screen memory for it, but as soon as I call Get/WaitNextEvent and the user clicks in a menu, the menu item will be drawn and mess up the screen. Do I have to patch the Event Mgr? or is there some obvious thing that I’m missing here?

From: Spud

Re: How do you hide the Menu Bar?

Hmmmm, I think Bill Atkinson and the gang play around with a low-memory global that controls the menu bar height. My guess is that they set it to zero and *poof*, the menubar is gone.

From: Turing

Re: How do you hide the Menu Bar?

Get a GrafPort directly through the OpenPort call (rather than through the Window Manager calls). The visRgn of that port will be set to the entire screen, rather than just the grayRgn.

From: Rsimmons

Re: Menu Snapshots

In the August, 1986 issue of MacTutor there was a assembly language article on how to restore the ability to take Macintosh screen shots that include pulled down menus (Macpaint image files of the screen) that was lost in the Mac-OS system version long ago. I understand from later reading that the patch is not recommended. Can anyone help me out with a way to capture screen shots with a menu pulled down? Where do I get it and how soon can I get it?

From: Jesse

Re: Menu Snapshots

I’ve got an Init that allows snap shots to take place with a menu down. It works fine on my Mac+ with System 6.03, I’ll go ahead and post it.

From: Tomt

Re: Menu Snapshots

If you’re interested in a commercial product that can capture screens with menu’s down I know that Exposure from Preffered Publishing does. I think several others do as well.

From: Gigabit

Re: Print Orientation

I would like to change the default page orientation of my app at startup to be landscape instead of portrait. An example application that does this is MacProject.

From: Aggie

Re: Print Orientation

Fiddling with the editor in LSP I discovered a way of doing this that seems to work. You essentially change the page orientation within the hPrint after it is set in the default mode. The code excerpt for this is as follows:

    hPrint := THPrint(NewHandle(SIZEOF(printRec)));{allocate Print Record}
    PrintDefault(hPrint);{stuff default values in Print Record}
    HLock(handle(hPrint));
    r := hPrint^^.rPaper;
    setRect(hPrint^^.rPaper, r.top, r.left, r.bottom, r.right);  {set 
for
landscape mode}
    hPrint^^.PrStl.wDev := 837;
    HUnLock(handle(hPrint));
    if PrStlDialog(hPrint) and prError = noErr then
etc...

r is of course defined as a rect. The hPrint^^.PrStl.wDev :=837; I stumbled upon in the editor and could not find any documentation to support this, but it does seem to work. How robust this is I cannot guarantee, however, I have not had a problem with it.

From: Turing

Re: memory manager

Normally we cannot access the heap, directly or indirectly, in the interrupt time. But if I setup a separate heap for an interrupt-time routine. On the entrance of that routine I will set the current heap to that dedicated heap and set A5 to the proper address, and on the exit I will restore the current help and A5 to the original value. Now can I use the Memory Manager to access the blocks in that heap at the interrupt time? Can I use the Resource Manager, QuickDraw, and other Toolbox routines that touch to the heap at the interrupt time now?

From: Macdts

Re: memory manager

Normally we cannot access the heap, directly or indirectly, in the interrupt time. No. You have access to the heap. You can allocate a block of memory, lock it down, and then use is at interrupt time. What you cannot do is call any routine that will move or purge memory. Also, you cannot call a routine that accesses a low memory global. That list is very large and covers most of the toolbox. This does mean that you cannot use the Memory Manager, Resource Manager, Quickdraw, etc.

From: Turing

Re: memory manager

I know I have access to the locked blocks at the interrupt time. But I want to know whether I have access to the UNLOCKED blocks at the interrupt time if I setup a dedicate heap for an interrupt driven routine and touch that heap only in that routine, either directly or indirectly through other Toolbox calls.

From: Turing

Re: memory

I know I have access to the locked block at the interrupt time. What I asked is: Can I dedicate a separate heap to my interrupt routine, then have access to the UNLOCKED blocks in that heap at the interrupt time? For example, can I use the QuickDraw routines (OpenPicture, etc.) to record a picture into that dedicated heap at the interrupt time?

From: Macdts

Re: memory

The answer still is no. You cannot call any routine that moves or purges memory, or accesses a low memory global while at interrupt time. Another problem is that you should not be performing time consuming processes at interrupt time. Recording a picture is a time consuming process. This causes problems by holding off other interrupts too long.

From: Aggie

Re: MacTutor Help

I have just downloaded the Mactutor Help source from the Jan. issue. I am using LSP 2.03 and cannot get this help utility to work in my program. I am using the HELP code resource method as described in the documentation. I get the message “InitGraf needs @thePort as its parameter” at the statement Call_code(h^);.HELP! I have no idea what to do since I have a feeling that it is referring to the InitGraf statement inside the HELP code resource. Any enlightenment would be appreciated.

From: Tomc

Re: Mac II ci

MacsBug 6.1 works fine on IIci’s. SADE works when you get MultiFinder 6.1b9 from APDA.

Tom Chavez

MacsBug and ResEdit Product Manager

Development Tools Product Marketing

From: Dstamey

Re: LSP limitations

I have been programming with the object-oriented extensions of LSP for six months now and have not found the source file size limitation to be problem yet. Typically I put the parent object in one unit by itself and each time I subclass it, I put the subclass in its own unit. In this manner, my source files never get too large (I’m sure you’ve noticed how the editor slows down as the file size increases, so I try to keep them medium sized). As for the 32K segment size limit, there’s not much you can do about that for now. You probably have already encountered the bug (really a design problem) with the method dispatcher. If a method belongs to a segment that is not currently loaded the method dispatcher does NOT call LoadSeg to load it, and you get an error. Think’s tech support has given me the impression that this will be fixed in the next release. Fortunately my objects are designed so that this has been only a minor inconvenience.

From: Jhannah

Re: C books

I don’t suppose the book “Programming C on the Macintosh” by Terry A. Ward, (Scott, Foresman & Co.) has been mentioned yet... this is a great book that compares some of the prominent C compilers and also has the complete C source code of the first version of the game “Megaroids”.

I have this and the Cummings & Pollack book, and I am borrowing the Kernighan & Ritchie book from work... I am still searching for the Huxham-Burnard-Takatsuka book.

From: Jhannah

Re: C books

Woops, I forgot to mention what the Kernighan & Ritchie book WAS! They co-wrote the book “The C Programming Language” (Prentice Hall)... this is THE book of C in general, and is now in its 2nd version (the “new” C approved by the American National Standards Institute)

From: Thehulk

Re: C books

I think the Ward’s book really doesn’t cover much of anything in the way of C or Mac programming. Even though there is an excellent source listing for Megaroids, it is outdated for the new Macs and nobody uses the MegaMax compiler any more. The Megaroid source code listing is full of code that is used for handling alternate screen buffers and assembly code for glue (and speed). Try porting this code to MPW or THINK C for fun on a Mac II...

From: Gigabit

Re: Object Pascal vs LSC

Break out the VISA and buy MacApp/MPW. Its expensive and a difficult development system to learn, especially for the novice of which I’m one, but the depth of the class libraries are well worth it. I have reviewed LSPC class libraries, and they are not nearly as complete as MacApp. As a beginning programmer you need all the help you can get

From: Bryce

Re: TExtendedText?

Spud, I know it’s been a while since you left the message on TExtendedText, but I just saw it. Anyway, the class was defined in a FrameWorks article back in late ’88. The problem with that implementation was that any view resource incorporating a TExtendedText view had to be DeRezed -- assuming that the view was created by ViewEdit -- so that a few new fields such as precision could be added to a standard TNumberText view. This method of changing TnumberText to TExtendedText made the view no longer editable in ViewEdit...not desirable. Since the enhancements gained by implementing the TExtendedText view were pretty minor, I still just handle and convert plain old TEditText to and from extended numbers on the fly. Maybe someday Apple will add TExtendedText to MacApp, but for now...

From: Teisen

Re: TCL list manager class

Being a vanilla UNIX programmer professionally, I was hesitant to jump into THINK’s TCL on my home machine. I’ve just now taken the plunge and all I can say is “WOW!” If I come across a LM Class, I’ll upload it for you (I could sure use one myself and, frankly, am surprised that one was not included!)

From: Unclejim

Re: Disk Based Scrolling

Yes I would be interested in your Big TEdit. However the problem I’ve had with some other things I thought I would buy is I really don’t need a complete word processor. I don’t mind getting more than I need but it usually becomes quite problematic to turn things off etc. I certainly understand not giving away your source. if I could simply find something object or source doesn’t matter that I could pass a file ID or whatever and have it manage scrolling and possibly cut/copy/paste that would be great. many months later I still have nothing. Word processors are not my are. Yes I am interested in anything that might help. I have CAPPs LSP from a long time ago but the scrolling (PEScroll) etc are all apart of interface libs and inaccessible. Thanks for responding you have been the only one who did in 3 months. Happy new year and good luck on your project.

 

Community Search:
MacTech Search:

Software Updates via MacUpdate

How to get coins faster in Rodeo Stamped...
There comes a time in a cowboy or cowgirl's life when all the riding and lassoing skills in the world aren't enough. You're going to need some cold, hard cash to keep your sky zoo expanding in Rodeo Stampede. [Read more] | Read more »
Artik Games releases Splashy Cats for An...
Splashy Cats had us hooked from the title alone, and when we found out the game was literally just zig-zagging one of our favourite pop-culture references, guised as a playable cat character, down a river – our appetites were whetted to say the... | Read more »
Battle Cars (Games)
Battle Cars 1.1 Device: iOS Universal Category: Games Price: $1.99, Version: 1.1 (iTunes) Description: Welcome to the world of Battle Cars. Battle Cars is a classic arcade top-down racing game with fast mini cars and funny weapons to... | Read more »
How to get started with live.ly
One could be forgiven for thinking that there are already plenty of streaming video apps out there. It's just that the App Store charts would insist that you're mistaken. [Read more] | Read more »
Rodeo Stampede: Guide to all Savannah an...
A "gotta catch 'em all" joke seems appropriate here, even though we're talking animals in Rodeo Stampede and not pocket monsters. By now you've probably had plenty of rides, tamed some animals and built yourself a pretty nice zoo | Read more »
Is there cross-platform play in slither....
So you've sunken plenty of hours into crawling around in slither.io on your iPhone or iPad. You've got your stories of tragedy and triumph, the times you coiled four snakes at one time balanced out by the others when you had a length of more than... | Read more »
Rodeo Stampede guide to running a better...
In Rodeo Stampede, honing your skills so you can jump from animal to animal and outrun the herd as long as possible is only half the fun. Once you've tamed a few animals, you can bring them home with you. [Read more] | Read more »
VoxSyn (Music)
VoxSyn 1.0 Device: iOS Universal Category: Music Price: $6.99, Version: 1.0 (iTunes) Description: VoxSyn turns your voice into the most flexible vocal sound generator ever. Instantly following even subtle modulations of pitch and... | Read more »
Catch Battleplans on Google Play from Ju...
Real-time strategy title Battleplans is due for release on Google Play on June 30th, following its release for iOS systems last month. With its simple interface and pretty graphics, the crowd-pleaser brings a formerly overlooked genre out for the... | Read more »
iDoyle: The interactive Adventures of Sh...
iDoyle: The interactive Adventures of Sherlock Holmes - A Scandal in Bohemia 1.0 Device: iOS Universal Category: Books Price: $1.99, Version: 1.0 (iTunes) Description: Special Release Price $1.99 (Normally $3.99) | Read more »

Price Scanner via MacPrices.net

MacBook Airs on sale for up to $50-$100 off M...
B&H Photo has 13″ and 11″ MacBook Airs on sale for up to $100 off MSRP. Shipping is free, and B&H charges NY sales tax only: - 11″ 1.6GHz/128GB MacBook Air: $849 $50 off list price - 11″ 1.... Read more
Brexit Vote Result Forecast To Slash UK 2016...
Uncertainty and economic volatility can be expected to increase over the next nine months, as the Brexit and concerns over the future of the EU hit IT investment, say Canalys market analysts, with... Read more
13-inch 256GB MacBook Air on sale for $1149,...
Amazon has the 2016 13″ 1.6GHz/256GB MacBook Air (model MMGG2LL/A) on sale for $1149.99 including free shipping. Their price is also $50 off MSRP. Read more
Haven App Launches New Age Of Wirless 911 Eme...
Haven from RapidSOS represents a transformation in access to emergency services from a phone call solely dependent on voice to a robust data connection for voice, text, medical/demographic data.... Read more
Cu Parachute 1.1 Retirement Success PLanning...
Tucson, Arizona based Indie developer Bradley McCarthy has announce the release of Cu (Copper) Parachute 1.1 for iPhone, iPad, and iPod touch devices — a tool with which users can continuously... Read more
Research and Markets Releases iPhone 6s Plus...
A new analysis report from Dublin-based Research and Markets observes that with the iPhone 6s Plus, Apple introduced a new rear camera module. The new device has similar structure and technology than... Read more
Apple refurbished Retina MacBook Pros availab...
Apple has Certified Refurbished 2015 13″ and 15″ Retina MacBook Pros available for up to $380 off the cost of new models. An Apple one-year warranty is included with each model, and shipping is free... Read more
Apple refurbished 11-inch MacBook Airs availa...
Apple has Certified Refurbished 11″ MacBook Airs (the latest models), available for up to $170 off the cost of new models. An Apple one-year warranty is included with each MacBook, and shipping is... Read more
Apple price trackers, updated continuously
Scan our Apple Price Trackers for the latest information on sales, bundles, and availability on systems from Apple’s authorized internet/catalog resellers. We update the trackers continuously: - 15″... Read more
12-inch 32GB and 128GB WiFi iPad Pros on sale...
B&H Photo has 12″ 32GB & 128GB WiFi iPad Pros on sale for up to $80 off MSRP, each including free shipping. B&H charges sales tax in NY only: - 12″ Space Gray 32GB WiFi iPad Pro: $749 $50... Read more

Jobs Board

*Apple* Retail - Multiple Positions, Willow...
Job Description: Sales Specialist - Retail Customer Service and Sales Transform Apple Store visitors into loyal Apple customers. When customers enter the store, Read more
*Apple* iPhone 6s and New Products Tester Ne...
…we therefore look forward to put out products to quality test for durability. Apple leads the digital music revolution with its iPods and iTunes online store, Read more
*Apple* iPhone 6s and New Products Tester Ne...
…we therefore look forward to put out products to quality test for durability. Apple leads the digital music revolution with its iPods and iTunes online store, Read more
*Apple* iPhone 6s and New Products Tester Ne...
…we therefore look forward to put out products to quality test for durability. Apple leads the digital music revolution with its iPods and iTunes online store, Read more
*Apple* Retail - Multiple Positions, Towson...
Job Description: Sales Specialist - Retail Customer Service and Sales Transform Apple Store visitors into loyal Apple customers. When customers enter the store, Read more
All contents are Copyright 1984-2011 by Xplain Corporation. All rights reserved. Theme designed by Icreon.