[comp.sys.mac.programmer] Making a Mac SE think its a II

leeke@glacier.STANFORD.EDU (Steven D. Leeke) (08/13/88)

I've got a program that claims to need a Mac II (Interleaf) and won't run on
an SE (4MB) with a 68020/881 (Radius 16).  I'd like to know if anyone has a
patch or idea about how I can trick IL into loading on the SE (Interleaf
doesn't do color, etc. and I need my Mac II for development..).  I've run
IL in 4MB under MF and it ran fine until the usual MF-related confusion that
IL displays no matter how much memory you give it under MF.

Many thanks,

Steve Leeke

-- 
Steven D. Leeke, Center for Integrated Systems, Stanford University
    {ucbvax,decvax}!decwrl!glacier!leeke, leeke@glacier.stanford.edu

"I suppose they don't use money in the 23rd century?"

oster@dewey.soe.berkeley.edu (David Phillip Oster) (08/14/88)

I've complained and complained about this, but too many applications check
for the presence of a MacII, when all they are really interested in is
some specific feature, such as a 68020, or color quickdraw.

If this program really makes no color quickdraw calls, and you have a
68020, you can try to fool it by doing the following:

There is a low memory global, RomVersion:
extern int RomVersion : 0x28E;
that holds:
0xFFFF on a classic mac
0x7FFF on a MacPlus and an SE
and 
0x3FFF on a II.

You can patch this in a debugger.

Apple decided that this wasn't detailed enough, so they provided the trap:
SysEnvirons().
This returns a record, and is declared in OSUtil.h
You can: 1.) set a breakpoint on this trap to see if your app calls it.
If it does, patch the return value to claim to be a MacII.

If all this manual patching works, you can write an INIT to do it all for
you at system startup. I know tail patching is not approved of, but you
don't need a product, and I doubt anyone will be looking at the caller of
SysEnvirons().


--- David Phillip Oster            --When you asked me to live in sin with you
Arpa: oster@dewey.soe.berkeley.edu --I didn't know you meant sloth.
Uucp: {uwvax,decvax,ihnp4}!ucbvax!oster%dewey.soe.berkeley.edu