Page 1 of 1

68xxx...

Posted: Sat May 31, 2003 11:00 pm
by darklife
I would like just for fun to program an operating system for either my old Mac performa or my
Amiga 500. Does anyone know of any example small OS's for one of these platforms that I can learn
from? Could I make the bootstrap for the Macintosh on my PC? (Since floppy disk data
can PC<>MAC) This also means i'll need a cross assembler for the 68xxx processor :(
Any information (memory maps/ROM gates/examples/docs) would be very useful at-this-point.
I would simply (okay, not so simple) like to assemble 68xxx code from my PC through Linux (or
DOS) and use something like "dd" or rawrite to make a boot sector for the Mac. Is this possible?
I know the Amiga is another story since it's Sony disk drive is 100% NOT compatible
with the PC >>:((
Thanks for help (and I'll need lots if I actually do this).
PS: This message board is the best!

RE:68xxx...

Posted: Sat May 31, 2003 11:00 pm
by Jamethiel
Ah, someone else with an interest in OS work on Macs (I don't have an Amiga, so I don't know about OS work for it).

Example small OSes for the Mac are hard (impossible?) to come by at this point. You're kindof stuck with NetBSD-mac68k and Linux/mac68k for examples.

A cross-assembler and C cross compiler for the 68k shouldn't be -too- hard to come by, at least for Linux. GCC and GNU as support the 68k, after all. You may not even have to do the dirty work of compiling it yourself, look to see if there's a cross compiler in your ports tree/portage tree/packages collection for your distro.

If you're going to do serious Mac hacking, you may want to obtain the following books:

    1. The old Inside Macintosh books (the ones with roman numeral volume numbers), at least through volume V.
    2. The Programmers Introduction to the Macintosh Family.
    3. The Technical Introduction to the same.
    4. Designing Cards and Drivers (either version).
    5. A set of CPU manuals for the 68k chips.

Some of these books are going to be more about how to write programs for MacOS, but IM:III and IM:IV have some basic hardware info for the 512k and the Plus, and IM:V has some information about NuBus, ADB, and so on. I forget if it was ProgIntro or TechIntro that had the memory maps, and my copy of the one I have is packed away somewhere right now, but one or the other has basic memory maps for the Plus, the SE, and the II. DC&D has a lot of information about how NuBus works and how to take advantage of it.

You will also need to raid Apple's web site looking for their TechNote archives. The one you will most famously need is called "Space Aliens Ate My Mouse", but some of the others are useful as well.

The only floppy disk controller that we have figured out is the old IWM controller, which was phased out in the SE / MacII era (the originals of these two machines had it, they later issued updated machines which used the newer SWIM controller). What we know about the SWIM controller is at http://www.dridus.com/~nyef/documents/swimnotes.txt and in the NetBSD-mac68k mail list archives (the swimnotes.txt file is slated for an update at some point this year).

NetBSD-mac68k and Linux/mac68k both boot using a MacOS program, and require that you have a MacOS system available to run it from. There has been some work done on fixing this, at least as far as NetBSD is concerned, at http://www.dridus.com/~nyef/macboot/ but it still doesn't work. On the other paw, it does show how to get at least some stuff done on a bare SE/30 from a boot disk. This may be the example code you are looking for. Fair warning, though, I wrote it from a NetBSD-mac68k system, so you may need to tweak it a little (or a lot) to get it to work in a cross-compiler.

The Performa series of Macs are the same as other machines but relabeled for sale at Sears (at least I think it was Sears). For example, my Performa 400 is an LC II by any other name. What sort of Performa do you have?

--Jamethiel

RE:68xxx...

Posted: Mon Jun 02, 2003 11:00 pm
by darklife
Sounds like more work then I want to deal with :(
I only have a Performa 575 with OS 7.1? on it. The hardware seems
nice but now that I know finding information on the hardware
will be even harder than I thought I may just stick to the x86
platform. I'm going to look for some Amiga information but the
main problem with that is the floppy disk format. The Amiga uses 800K
disk drives and there is NO way to write binary from a PC to an Amiga
disk on the PC. I could however transfer the binary through serial
cable and use the Amiga its self to write a boot disk but thats a
lot of work!! The good thing is that there is tons of information
avail. for the Amiga hardware. I wish I would still have all my old
Apple ][ hardware. I always have wanted to write a preemtive multitasking
OS for it :) After all, my favorite processor has always been the 6502.
I may still give the Mac a try. Hope the text in this message looks
okay since im using Lynx. Thanks for your help.