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

Latest Forum Discussions

See All

Whitethorn Games combines two completely...
If you have ever gone fishing then you know that it is a lesson in patience, sitting around waiting for a bite that may never come. Well, that's because you have been doing it wrong, since as Whitehorn Games now demonstrates in new release Skate... | Read more »
Call of Duty Warzone is a Waiting Simula...
It's always fun when a splashy multiplayer game comes to mobile because they are few and far between, so I was excited to see the notification about Call of Duty: Warzone Mobile (finally) launching last week and wanted to try it out. As someone who... | Read more »
Albion Online introduces some massive ne...
Sandbox Interactive has announced an upcoming update to its flagship MMORPG Albion Online, containing massive updates to its existing guild Vs guild systems. Someone clearly rewatched the Helms Deep battle in Lord of the Rings and spent the next... | Read more »
Chucklefish announces launch date of the...
Chucklefish, the indie London-based team we probably all know from developing Terraria or their stint publishing Stardew Valley, has revealed the mobile release date for roguelike deck-builder Wildfrost. Developed by Gaziter and Deadpan Games, the... | Read more »
Netmarble opens pre-registration for act...
It has been close to three years since Netmarble announced they would be adapting the smash series Solo Leveling into a video game, and at last, they have announced the opening of pre-orders for Solo Leveling: Arise. [Read more] | Read more »
PUBG Mobile celebrates sixth anniversary...
For the past six years, PUBG Mobile has been one of the most popular shooters you can play in the palm of your hand, and Krafton is celebrating this milestone and many years of ups by teaming up with hit music man JVKE to create a special song for... | Read more »
ASTRA: Knights of Veda refuse to pump th...
In perhaps the most recent example of being incredibly eager, ASTRA: Knights of Veda has dropped its second collaboration with South Korean boyband Seventeen, named so as it consists of exactly thirteen members and a video collaboration with Lee... | Read more »
Collect all your cats and caterpillars a...
If you are growing tired of trying to build a town with your phone by using it as a tiny, ineffectual shover then fear no longer, as Independent Arts Software has announced the upcoming release of Construction Simulator 4, from the critically... | Read more »
Backbone complete its lineup of 2nd Gene...
With all the ports of big AAA games that have been coming to mobile, it is becoming more convenient than ever to own a good controller, and to help with this Backbone has announced the completion of their 2nd generation product lineup with their... | Read more »
Zenless Zone Zero opens entries for its...
miHoYo, aka HoYoverse, has become such a big name in mobile gaming that it's hard to believe that arguably their flagship title, Genshin Impact, is only three and a half years old. Now, they continue the road to the next title in their world, with... | Read more »

Price Scanner via MacPrices.net

B&H has Apple’s 13-inch M2 MacBook Airs o...
B&H Photo has 13″ MacBook Airs with M2 CPUs and 256GB of storage in stock and on sale for up to $150 off Apple’s new MSRP, starting at only $849. Free 1-2 day delivery is available to most US... Read more
M2 Mac minis on sale for $100-$200 off MSRP,...
B&H Photo has Apple’s M2-powered Mac minis back in stock and on sale today for $100-$200 off MSRP. Free 1-2 day shipping is available for most US addresses: – Mac mini M2/256GB SSD: $499, save $... Read more
Mac Studios with M2 Max and M2 Ultra CPUs on...
B&H Photo has standard-configuration Mac Studios with Apple’s M2 Max & Ultra CPUs in stock today and on Easter sale for $200 off MSRP. Their prices are the lowest available for these models... Read more
Deal Alert! B&H Photo has Apple’s 14-inch...
B&H Photo has new Gray and Black 14″ M3, M3 Pro, and M3 Max MacBook Pros on sale for $200-$300 off MSRP, starting at only $1399. B&H offers free 1-2 day delivery to most US addresses: – 14″ 8... Read more
Department Of Justice Sets Sights On Apple In...
NEWS – The ball has finally dropped on the big Apple. The ball (metaphorically speaking) — an antitrust lawsuit filed in the U.S. on March 21 by the Department of Justice (DOJ) — came down following... Read more
New 13-inch M3 MacBook Air on sale for $999,...
Amazon has Apple’s new 13″ M3 MacBook Air on sale for $100 off MSRP for the first time, now just $999 shipped. Shipping is free: – 13″ MacBook Air (8GB RAM/256GB SSD/Space Gray): $999 $100 off MSRP... Read more
Amazon has Apple’s 9th-generation WiFi iPads...
Amazon has Apple’s 9th generation 10.2″ WiFi iPads on sale for $80-$100 off MSRP, starting only $249. Their prices are the lowest available for new iPads anywhere: – 10″ 64GB WiFi iPad (Space Gray or... Read more
Discounted 14-inch M3 MacBook Pros with 16GB...
Apple retailer Expercom has 14″ MacBook Pros with M3 CPUs and 16GB of standard memory discounted by up to $120 off Apple’s MSRP: – 14″ M3 MacBook Pro (16GB RAM/256GB SSD): $1691.06 $108 off MSRP – 14... Read more
Clearance 15-inch M2 MacBook Airs on sale for...
B&H Photo has Apple’s 15″ MacBook Airs with M2 CPUs (8GB RAM/256GB SSD) in stock today and on clearance sale for $999 in all four colors. Free 1-2 delivery is available to most US addresses.... Read more
Clearance 13-inch M1 MacBook Airs drop to onl...
B&H has Apple’s base 13″ M1 MacBook Air (Space Gray, Silver, & Gold) in stock and on clearance sale today for $300 off MSRP, only $699. Free 1-2 day shipping is available to most addresses in... Read more

Jobs Board

Medical Assistant - Surgical Oncology- *Apple...
Medical Assistant - Surgical Oncology- Apple Hill Location: WellSpan Medical Group, York, PA Schedule: Full Time Sign-On Bonus Eligible Remote/Hybrid Regular Apply Read more
Omnichannel Associate - *Apple* Blossom Mal...
Omnichannel Associate - Apple Blossom Mall Location:Winchester, VA, United States (https://jobs.jcp.com/jobs/location/191170/winchester-va-united-states) - Apple Read more
Cashier - *Apple* Blossom Mall - JCPenney (...
Cashier - Apple Blossom Mall Location:Winchester, VA, United States (https://jobs.jcp.com/jobs/location/191170/winchester-va-united-states) - Apple Blossom Mall Read more
Operations Associate - *Apple* Blossom Mall...
Operations Associate - Apple Blossom Mall Location:Winchester, VA, United States (https://jobs.jcp.com/jobs/location/191170/winchester-va-united-states) - Apple Read more
Business Analyst | *Apple* Pay - Banco Popu...
Business Analyst | Apple PayApply now " Apply now + Apply Now + Start applying with LinkedIn Start + Please wait Date:Mar 19, 2024 Location: San Juan-Cupey, PR Read more
All contents are Copyright 1984-2011 by Xplain Corporation. All rights reserved. Theme designed by Icreon.