68kMLA Classic Interface

This is a version of the 68kMLA forums for viewing on your favorite old mac. Visitors on modern platforms may prefer the main site.

Click here to select a new forum.
System 7 Source Code Leak
Posted by: Dennis Nedry on 2011-02-20 10:12:18
From my understanding, the source code of System 7 leaked. Was this a complete source, and if so, did anyone ever manage to get this to build, say, for booting a PC? ;D

Or heck, build for Mac and make cool super-deep mods?

Posted by: basalgangster on 2011-02-20 12:33:29
There are key things missing from the leak. It's possible to build some complete drivers, a lot (maybe all?) of the ROM, and some critical pieces of the system, like the boot code and DA Handler. But source for some other parts, including the 68k interpreter and the virtual memory system are missing. I don't think a complete build is possible from those sources, but it would be possible to build some of it, and take the rest as intact resources from the system file of a working system. That would be an interesting exercise. Maybe somebody has done it. But just figuring out what is there and what is missing is a pretty big job.

Posted by: ChristTrekker on 2011-02-21 07:59:44
I can't imagine this is something that happened recently, so I assume this is "old news".

But who cares? I hadn't heard about it before. Anybody have more information?

Posted by: basalgangster on 2011-02-21 18:02:54
I can think of at least two reasons to care. One is just knowledge and understanding. The source files reveal the working of the operating system much better than anything can. The change history at the top of many of them start in 1980, with entries by Andy Hertzfeld or Bud Tribble. If you are a computer archeologist (aren't we?), these files are your Rosetta stone.

The second reason is the one mentioned by Dennis Nedry in his original posting. If we have the code, we could each make our own customized version of system 7, that supports the equipment we want to support or adding features system 7 never had.

Posted by: Dennis Nedry on 2011-02-21 19:55:59
I think he was genuinely interested, and the 'who cares' referred to his supposition that it was old news. i.e. He didn't care if was old news, he wanted to know more about it.

It is very cool that such a thing exists, and I'm surprised we haven't seen more from it.

Posted by: basalgangster on 2011-02-21 20:40:53
The best organized and most straightforward part of it is the ROM code. If somebody wanted to build a custom ROM, I think that would not be too difficult. I have been working on thoroughly understanding the boot sequence. The boot code is all there. The process manager is all there as far as I can tell. And the memory manager too. Making the memory manager reentrant was a big obstacle to making the macintosh operating system able to do preemptive multitasking. It would be fun to try to make a reentrant memory manager for System 7.

A nice feature of the old Mac OS was its modular construction. All the little pieces were put into resources and tucked into the system file. We can alter just one of those resources, put it back into a system file, and it should work.

Posted by: ClassicHasClass on 2011-02-21 21:57:08
What does it build with, MPW, I assume?

And, uh, where might we find it? You know, just for looking. |)

Posted by: John Hokanson Jr. on 2011-02-21 22:20:10
Bear in mind that they had such trouble getting Copland out the door. Thus suggesting that adding too many neato features such as preemptive multitasking and protected memory to the classic OS, while maintaining backwards compatibility, is neither easy nor pretty. I find it hard to believe that Apple's software engineers were idiots. Even Microsoft eventually realized the limitations of the 9x codebase, and harmonized everything under NT (starting with XP). So it goes with 9 vs. X.

9x never had a *true* iteration of protected memory.

9x always seemed to crash just as often as OS 9. Though at least Mac OS 9 has the common decency to not grind through your HD every 5 bleeding seconds, or spew goddamned DLLs all over the place. Don't get me started on the Registry or the massive security holes you could fly the Death Star through.

Anyways, maybe I'm wrong. It could have been totally doable, and the project was just really really REALLY badly managed (i.e. feature creep).

As for me, I'd be content with certain improvements outside of the "holy grail" features like PM and PMT. Especially if all the features from 8 and 9 were grafted into a System 7 branch.

Posted by: basalgangster on 2011-02-22 19:07:43
Everything is MPW. It is remarkable that almost all the code is 68k assembly. A few things are in c or pascal.

All make files are in MPW, and some of them are pretty complicated, so switching away from MPW would be a lot of work.

There are also a lot of Rez files and pre-compiled resource files. Some things for which there is no source, are there as compiles resources (like the virtual memory system).

Posted by: John Hokanson Jr. on 2011-02-23 00:24:53
AFAIK, that's the way it's been since the beginning. The Finder, QuickDraw and most mission critical applications of the Mac OS were written in 68k assembly, with portions in PASCAL. If it ain't broke, don't fix it.

1