• Updated 2023-07-12: Hello, Guest! Welcome back, and be sure to check out this follow-up post about our outage a week or so ago.

Development on SE/30 and Quadra 650

rabindranath72

Well-known member
Hi all,

I am a newbie to the forum, and (almost) newbie to Macintosh systems. I recently acquired a Macintosh SE/30 and a Macintosh Quadra 650, and I'd like to try my hand at software development. In particular, my idea was to port the old Minix OS to the Macintosh SE/30 (for starters) as a native OS, rather than an application running under System.

My stumbling block is documentation on hardware, like memory maps, registers definitions etc.

I found this technical note:

https://developer.apple.com/legacy/library/#technotes/hw/hw_14.html#//apple_ref/doc/uid/DTS10002483

which refers to Macintosh SE/30 Developer Notes (part number M0061LL/A, which I haven't been able to find anywhere.

Some development notes can be found here:

http://developer.apple.com/legacy/library/documentation/Hardware/Developer_Notes/Macintosh_CPUs-68K_Desktop

Which I *think* has the same information as:

http://web.archive.org/web/19990424023012/http://developer.apple.com/techpubs/hardware/hardware2.html

but the former is not directly accessible, so if the contents are the same, there is no trace of specific documentation for the Mac SE/30 (and also the documentation on the Quadra 650 is scant at best.)

I have the Apple Guide to Macintosh Family hardware 2e, but it does not go too deep into details. Would the Designing Cards and Drivers be useful? I have seen the 2e quite cheap, but the price for the 3e is steep. Would the 2e be useful at least for SE/30?

Also, do any of the Inside Macintosh volumes deal with actual hardware of the SE/30 and Quadra 650? I know the first three volumes deal with the early Macintosh, but my understanding is that the architectures changed quite a bit.

Thanks in advance for any and all information you can provide,

Cheers,

Antonio

 

bbraun

Well-known member
There is no "Bare metal programming for macs" book. The information you have is more or less the best publicly available information. Guide to the Macintosh Family Hardware is essentially the SE/30 (and family) version of the 650's developer notes you linked to. Designing Cards and Drivers will help if you want to make an expansion board, write a declaration ROM or similar, but it's not really of that much use when wanting to talk directly to the SE/30 hardware.

You can look at the NetBSD and Linux sources, since both run on the machines you're interested in. You can also look at the MESS sources as an SE/30 reference. That and spend hours and hours staring at disassembled ROM and/or System code.

 

rabindranath72

Well-known member
Thanks for the information; I suspected hardware info I was looking for about Macs weren't really available at all.

Good news about the Drivers and Cards book; if it only tells you how to add new hardware and interface it with MacOS then it's not really useful.

I was just skimming the A/UX 2.0 Toolbox ROM documentation, and it provides a sort of "layer" through which the kernel accesses ROM functions. What's interesting is that only some ROM functions are accessible, which is probably those which can be made to work safely within a Unix environment. If that is the case, I might be able to reproduce a similar mechanism under the Minix kernel, and provide the necessary hardware interfacing through the ROMs. That would make things much easier.

Thanks,

Antonio

 

rabindranath72

Well-known member
Thanks for the offer!

I think I will tackle the SE/30 first, as it looks the simpler of the two machines. The plan is to try to put together the kernel and the memory manager (two of the components of Minix.) The "pure" 68k implementations of Minix aren't very good since they don't use any MMU facilities, but rely on a technique known as process shadowing, which makes the systems particularly slow. I reckon Minix will fly on a 68k architecture with a proper MMU :cool:

 

uniserver

Well-known member
in your opinion what benefits would one get from running minix over the macos that is already installed?

Less bloat? more features? more software availability? open source?

 

rabindranath72

Well-known member
Well, let's say my interest is mostly academic, at least at this stage. The biggest hurdle will be to get a proper kernel running.

From a practical point of view, Minix is interesting because it has a micro-kernel architecture, contrary to most UNIX versions out there which run on the Mac (and not) namely: OS X, NetBSD, A/UX. This means it's designed to be very flexible and modular (for example, you can change file system by simply changing the file system module, without needing to recompile the whole kernel.)

The advantages with respect to MacOS would be many, just to name two:

1) pre-emptive multi-tasking with proper memory protection; MacOS 6 and 7 do not really use all the power of the 68030 processor.

2) Minix has a more or less standard UNIX interface (originally it was UNIX V6, later it was decided to support POSIX) which means that a lot of software would be available from the start.

 

uniserver

Well-known member
do you think a reasonable GUI(x?) could be installed?

I didn't know that MacOS 6 and 7 do not make good use of the 68030!

Well you might be on to something :)

The Macintosh LC-II has a 16mhz 68030 as well

Would Minix work /wo a FPU installed?

Also the Macintosh LC-II has a 10meg memory limit, might that be a issue as well?

 

rabindranath72

Well-known member
I don't see why a GUI should not work. Perhaps even using parts of the Mac ROM, if they do not conflict with Minix's paradigm.

Minix doesn't require an FPU, but an MMU is necessary for memory protection and virtualisation capabilities. Of the old OSes that used the capabilities of the 68030, only A/UX did (although earlier 68030-based Macs didn't use the burst mode of the CPU due to economy reasons.)

Also RAM should not be much of a problem; and the upper bound would depend on the hardware, not the OS. I reckon a system with at least 1Mb should be able to run a basic Minix system. If other 68k implementations are an indication, even 512Kb should be sufficient.

 

rabindranath72

Well-known member
Don't expect that my efforts (should I even succeed!) will be portable across the whole range of 68030-based Macs. My primary target is the SE/30, so I will tailor things for this machine. Given its peculiarities, I don't expect my port to work on other Macs without changes.

 

onlyonemac

Well-known member
^ Most software doesn't work cross-platform anyway. They usualy find out what Mac they're running on and then execute the appropriate code. That goes particularly for software which uses low-level access to the hardware.

 

rabindranath72

Well-known member
Sure; what I meant is that I won't provide any checks for which hardware the software is running. It will assume it's an SE/30. :approve:

 

onlyonemac

Well-known member
I'm just telling you not to worry that your code only runs on the SE/30. (Also, such checks are easy to do, and you would merely have to display an alert saying something like "This Macintosh does not support this software.".)

 

Bunsen

Admin-Witchfinder-General
In particular, my idea was to port the old Minix OS to the Macintosh SE/30 (for starters) as a native OS, rather than an application running under System.
Personally, I think this is a great idea. I have a copy of the Tanenbaum textbook (2nd ed, I think) on Minix here, and I would love to dive into it.

It sounds like you are aware of MacMinix - i wonder if any of the code in that would be of use?

There's a little discussion of Minix/MacMinix in this thread, and a couple of others scattered around the place.

I note this possibly helpful hint:

There were other 68k versions (Atari ST and Amiga, for instance) that were more "bare metal" and thus would provide more in the way of useful bootloader/ initialization/ etc. code.
 

Bunsen

Admin-Witchfinder-General
Also, the "map" of all the available technical documentation for early Macs is over here. It sounds like Technical Introduction to the Macintosh Family is the one you want, at least to get started with.

Would the Designing Cards and Drivers be useful?
Not very. I have a copy here. Unless you're building a Nubus or PDS card, and the Mac System drivers to go with, it won't be particularly helpful.

 

rabindranath72

Well-known member
Thanks for the links! Does Technical Introduction offer more information than the Guide to the Macintosh Family hardware? I have the latter, and it has lots of interesting information about the Mac SE/30. It's a pity that the info is scattered all over the book; I was thinking of copy-pasting the relevant info from each chapter as I read the book, and build an SE/30 specific text. I also have Inside Macintosh vols. 1 to 3, would volume 5 be useful? I know it has some details on the Macintosh II, which could help with the documentation of the ROM.

I am aware of MacMinix, but as mentioned it doesn't seem very helpful since it runs under MacOS; essentially it implements the kernel as a MacOS "process" (due to the fact that MacOS always runs in supervisor mode) and the calls to the sytem hardware simply are calls to MacOS and Toolbox. It's quite possible some parts of the ROM could be useful, if they can be safely used in an interrupt-based system (and this would help if someone where interested in having Minix run on anything else than an SE/30, though as I stated this is not one of my top priorities.)

I have worked extensively with the Atari ST version of Minix (up to the latest semi-official release, 1.6.25) and there are definitely some machine code snippets which will be useful, although that version specifically targets the 68000 processor, not any of its successors. I installed a 68010 in my STe, and modified some of the Minix assembly code to make use of the loop mode and get some speed improvements. I'll probably tinker with the ST assemby code and add 68030 features. But the other parts of the system are quite different.

Notice my reference Minix version will be 1.x, NOT the 2.x version described in the 2nd edition of Tanenbaum's book; the reason is that Minix 2.x is somewhat of a mess (as admitted by Tanenbaum himself:) bloated, and hard to understand (which defeats the purpose of Minix, really.) I don't know much about Minix 3.x as I don't have the book, but it seems it's a sort of "return to the origins" though it's still bigger than 1.x. Add to this the fact that I will work mostly under A/UX 2.0 for development, whose compiler follows the earlier K&R standard rather than ANSI (which is required by Minix 3.x) and the conclusions are pretty clear: Minix 1.x is the easier route.

As I said, the project is mostly academic, something I will do in my (spare) free time; it has been years since I did any system-level development and I only recently got these Macs, so I want to see what I can "squeeze" out of them (and I am mostly intrigued by the SE/30) ;D

 
Top