[comp.sys.mac] Determining Machine Configuration

brian@ut-sally.UUCP (Brian H. Powell) (08/19/87)

     I'm trying to discern the difference in my program between the 64K ROMs,
the 128K ROMs and any newer ROMs.  (e.g., the SE ROMs and the II ROMs.)
     I don't have the SysEnvirons glue; apparently that's only for MPW 2.0,
and I'm using LS-C.  I'm not sure I'll be patient enough to wait for Think to
come out with a new version of LS-C which might support SysEnvirons.  I don't
think 2.11 does.
     I had honestly hoped that Apple would live up to their pledge of the way
they would treat the low-memory global ROM85.  (== FFFF for 64K ROMs, 7FFF for
128K ROMs, 3FFF for future ROMs, etc.)  My Mac SE says ROM85==7FFF.  Uhh.
Oops.  Apple goofed on that one.
     So that leaves me with ROMBase+8.  On an SE, it has value 0276.  On the
Mac-Plus it has 0075, on a 64K ROM mac it's 0069 and on an XL 82FF.  What are
the values for a Mac II?  (Can somebody check that out for me?)  The old
Environs call would return (machine_type == 3, ROM version 76) on an SE.
     In case you're wondering, ROM85 is a low-memory global at $28E, and
ROMBase is at $2AE.
     Is it sufficient to assume if Environs returns a machine_type == 1 (the
_byte_ ROMBase+8 == 0) that I'm looking at either a 64K ROM or 128K ROM Mac?
For future reference, does anybody know what the values of ROMBase+8 are
supposed to mean in future machines?

Brian H. Powell
		UUCP:	{ihnp4,seismo,ctvax}!ut-sally!brian
		ARPA:	brian@sally.UTEXAS.EDU

   _Work_					 _Not Work_
  Department of Computer Sciences		P.O. Box 5899
  Taylor Hall 2.124				Austin, TX 78763-5899
  The University of Texas at Austin		(512) 346-0835
  Austin, TX 78712-1188
  (512) 471-9536

olson@endor.harvard.edu (Eric Olson) (08/20/87)

In article <8796@ut-sally.UUCP> brian@ut-sally.UUCP (Brian H. Powell) writes:
>
>     I'm trying to discern the difference in my program between the 64K ROMs,
>the 128K ROMs and any newer ROMs.  (e.g., the SE ROMs and the II ROMs.)
>     I don't have the SysEnvirons glue; apparently that's only for MPW 2.0,
>and I'm using LS-C.  I'm not sure I'll be patient enough to wait for Think to
>come out with a new version of LS-C which might support SysEnvirons.  I don't
>think 2.11 does.
>     I had honestly hoped that Apple would live up to their pledge of the way
>they would treat the low-memory global ROM85.  (== FFFF for 64K ROMs, 7FFF for
>128K ROMs, 3FFF for future ROMs, etc.)  My Mac SE says ROM85==7FFF.  Uhh.
>Oops.  Apple goofed on that one.

Philip Borenstein at Think Tech told me that someone had written LSC
SysEnvirons glue and it might be posted to comp.binaries.macintosh soon.
It's pretty easy to gin together the machineType field; I'll post that 
tomorrow.

ROM85 is the same for the Mac+ and the SE because they run virtually the
same Traps (on the plus in patches, on the SE in ROM).  I think this was
a reasonable choice.  In general, the lower the value of ROM85, the greater
the capability of the machine.  This is from IM Vol 5, I think, if not,
some technote. 

-Eric


Eric K. Olson		olson@endor.harvard.edu		harvard!endor!olson