DSITRI
Dr. H. Nikolaus Schaller Information Technology Research Initiative (DSITRI), Oberhaching, Germany

1. What is Mac06?

"Mac06" is a lightweight environment resembling the UNIXª programming and user interface running on top of MacOSª. It is therefore virtually hardware independent within the Macintosh computer series, as the already existing device drivers are used. The file system completely relies on the MacOS HFS and, therefore, transferring data between Mac06 and MacOS is very simple. Programs can be compiled using the integrated development system or external IDE like Symantec C++/THINK C or Metrowerks CodeWarrior. In this environment, even the MacToolbox (dialogs, windows etc) can be used within Mac06 executables. It is also possible to launch any Mac application from within the Mac06 system.

2. Where can I download the files?

Either from the info-mac archives or directly from
http://www.dsitri.de/projects/mac06/index.html
Please note the COPYRIGHT and LICENCE conditions and the README file as well as the latest Release Notes.

3. Which hardware is supported?

Regarding processors, all Macintosh, Macintosh Performa and PowerPC platforms are supported in principle as well as MacOS 8.x - but they have not been tested in all apects. In fact, the system relies completely on the documented MacOS programming interface. Only devices mapped into the Mac06 system calls are available. These are in the current release:
  1. monitor screen (any LCD or CRT, any resolution and color depth)
  2. mouse
  3. keyboard
  4. HFS disks (IDE, SCSI, internal, external, hard and soft, floppies and CD-ROMs)
  5. sockets (MacTCP)
  6. serial interfaces
There is no printer support yet. BSD socket calls for TCP/IP including UDP and DNS are supported through MacTCP and the PPP-version you have installed. The system has been compiled and tested on a Performa 5200 with MacOS 8.5.1 using Symantec C++ for Power PC version 8.0.3, and a PowerBook 165 with MacOS 7.5.5 and Think C 7.0.

4. What is the latest release?

The latest release is mac06-1.1.

5. When is the next release coming and what is on the roadmap?

I can't announce the next release yet, but there are already too much ideas to include: Tell me what you would like to have next.

6. Where can I find the source code?

Sorry, but the policy is not to publish the source code of the kernel, the libraries and the applications but it can be made available on individual negotiation of a contract. All code has been completely rewritten by using publically avaliable descriptions and is not based on freeware/shareware source code from e.g. GNU, Linux software.

7. What does "Mac06" stand for?

Mac06 (pronounced "mac-oh-six") is an allusion to "POSIX" (the portable operating system standard IEEE Std. 1003.1-1988/90) and to the Macintosh operating system "MacOS". The idea to rename the system from the initial working title "minux" (mini-unix) hit the author while walking to attend the "Systems 97" fair in Munich - the time the vision of an Mac-POSIX operating system began to grow from "mini" to "full sized".

8. How are file names converted?

File names having dots only (i.e. ".", "..", etc.) under MacOS are prefixed by two additional dots in Mac06. Therefore Additionally, slash characters ("/") are replaced by ":" and blanks (" ") by underscores ("?"). Therefore, the MacOS file "..Test x/y" is listed under Mac06 as "..Test?x:y". These rules are applied vice versa for creating new files and directories. All this is done to keep the directory structure transparent. Note that the virtual files (to be correct: directories) "." and ".." are available under Mac06 only and have no direct MacOS equivalent.
And, finally, please note that upper and lower case characters are distinguished!  - At least mostly. Unfortunately, you can't create two files that are distinguished only by uper- and lower case, i.e. Makefile and makefile. Either one will be listed correctly and found only when entered appropriately, but the Mac HFS can't store both.

9. How do I write appliction software for Mac06?

At the current stage, there are two solutions:
  1. use the integrated development system (c89 C compiler, as assembler, ld linker and the libraries provided)
  2. use Think C or Symantec C++ for Power PowerPC.

  3. A sample project (68k and PPC versions) can be found in /home/demo/src-Think.
  4. use Code Warrior. A sampe project written by Erik Winkler can be downloaded from http://www.erols.com/ewinkler/cwmac06.sea.hqx.

10. How are the file creator and file type attributes handled?

11. How to Quit?

Either: If the kernel is killed and application processes keep hanging around in the MacOS process list, kill them by hand (tricky on the Finder - but AppWatcher from www.mauisoftware.com may be helpful).

12. Where does /usr/bin/sh.1 come from?

This is a tribute to the way MacOS launches applications. Although MacOS 7.x is a multi-tasking system, there is the restriction, that each application can be run only once. The reason lies in the way, application configurations are stored in the ressource fork of the file. Therefore, several images of the same application code in memory could mangle up the resource fork and therefore MacOS does not permit to launch the same application file more than once.
If you are running a server system, you may be aware of an exeption. It is possible to set the multiLaunch flag through ResEdit. Then, the same application can be run on an AppleShare network on different machines - but still not on the same.
Mac06 therefore tries firstly to launch the original. If this fails because the process is already running, the kernel makes a copy of the application file (named sh.1, sh.2 etc.) and launches this. Therfore, two ressource forks exist, the files have different names and MacOS will launch the application for a second time. This copy will never be deleted automatically, but it will be reused. By calling shell scripts and some applications which fork() and exec() others, you will certainly run across this feature.

13. Why is Mac06 a full kernel and not simply a POSIX library doing all this file name conversion stuff?

Well, most of the POSIX system calls could be implemented in a library module that transforms all the Mac Toolbox calls to POSIX conventions. Even processes could be managed - but the fork() command has a very special side effect: all file descriptors in both processes share the current file access pointers. This can not be implemented in a library with variables local to each process. Therfore, a separate kernel process holding this information is required. Additionally, this concept is much more flexible and allows for much better multitasking. Nevertheless, the multitasking model is not preemptive as in UNIX but cooperative.

14. What are the terminal control characters?

/dev/console and /dev/tty1 etc. emulate a VT52 with 24x80 screen. If you resize the window, neither the number of lines and columns is updated, nor the LINES and COLUMNS environment variables.

15. How far dows the POSIX compatibility go?

Compatibility is currently somewhere between 90% and 95%. Not supported are: The fork() and exec() topic can not be easily solved. The others are being worked on.

16. What is UCODE?

UCODE is a bytecode for a virtual machine very similar to the conecept used for Java (and was used for the UCSD PASCAL 20 years ago). This bytecode defines the operations to be done for executing a program. The UCODE is based on a stack machine model that is easily interpreted and is optimized for the C code of UNIX applications. Therefore special codes are included for strcpy, memcpy, switch and system calls. The idea behind using UCODE is that it gives platform independent application codes (although they are slower that e.g. 680x0 or Power PC native code).

17. Which Books can you recommend?



Back to Mac06 Home Page
©hns@dsitri.de
Last Modification: 01 Jul 2001