68k Macintosh Liberation Army Forums
68k Macintosh Liberation Army Forums
Home | Members | Search | FAQ
 All Forums
 UNIX on 68k
 A/UX emulation possibilities
Author Topic  
stonent
Junior Member


USA
155 Posts
Posted - 03 Nov 2003 :  22:36:12
I see that there was an MMU patch for UAE to allow you to run Linux from within UAE. Since BasiliskII uses a lot of UAE technology, I'd assume it would be possible to migrate this into Basilisk II. High-speed A/UX anyone?

SE 4/2000/FDHD/7.0.1 :)
Q840av - Alive!
Q650 64/2000/A/UX Woot!
SGI Indy R5000SC
2 Sparc Classics, 1 IPC, 1 SS4, 1 SS5
Stonent's Sun Collectors forum ;)

maclover5
LC Doctor/Hot Rodder


Australia
5830 Posts
Posted - 04 Nov 2003 :  16:50:41
Two words: Good luck. You have a very hard project ahead.

"**** em" - Jobs in regards to customers
Warrior maclover5
68kMLA

Official 68kMLA Detective
Number of 68ks Liberated: 7
Number of Contraband (PPC) Liberated from the Dumpster: 1Go to Top of Page

The Balance Of Judgement
Senior Member


Ivory Coast
1006 Posts
Posted - 04 Nov 2003 :  17:37:58
Not going to work unless you want to spend a good few months doing nothing but hardcore programming.

Now here's why:

AUX does not use the ToolBox as much as Mac OS does. AUX is a direct hardware implementation of UNIX on the Mac OS hardware, meaning that it will access devices directly, bypassing any usual work that the ToolBox does. Basilisk II does not emulate any real hardware, it just messes around with the ToolBox and emulates the CPU that is required to run. (ToolBox Patching) Hence, Basilisk II does not provide a hardware emulation, but rather a sloppy patch job to the ToolBox to trick Mac OS into running, which is why many applications won't run because hardware components are missing.

Even if you got MMU to work, there is another problem ahead: Hard Disks. Basilisk II uses Disk Images to represent hard disks. These disk images are treated by Mac OS as large external floppy drives. If you drag a hard disk in Basilisk II to the trash, you won't be presented the dialogue that you normally get on a real Macintosh if you eject a SCSI device.."Are you sure you want to eject the disk? It will re-appear on the Finder Desktop when you restart." Thus, it isn't a true SCSI Disk System. You would have to write a complex sequence of programming to allow Basilisk II to treat disk images as true SCSI Devices and allow the Partition tools to be able to make partitions. (AUX requires UNIX Partitions, it does not use HFS that much)

The next hurdle of course would be to make sure it works correctly. See, AUX only works on specific models because it is custom designed for them. So when using Basilisk II, you would need to have the correct ROM type in for a supported model.

Hence, it's not worth the time or money if money ever was an issue. Not happening anytime soon.

Go to Top of Page

maclover5
LC Doctor/Hot Rodder


Australia
5830 Posts
Posted - 05 Nov 2003 :  05:26:23
I honestly don't see what the point would be...Quadras are cheap and relatively easy to find.

"**** em" - Jobs in regards to customers
Warrior maclover5
68kMLA

Official 68kMLA Detective
Number of 68ks Liberated: 7
Number of Contraband (PPC) Liberated from the Dumpster: 1Go to Top of Page

Unknown_K
Full Member


USA
602 Posts
Posted - 05 Nov 2003 :  09:01:28
quote:

I honestly don't see what the point would be...Quadras are cheap and relatively easy to find.

"**** em" - Jobs in regards to customers
Warrior maclover5
68kMLA

Official 68kMLA Detective
Number of 68ks Liberated: 7
Number of Contraband (PPC) Liberated from the Dumpster: 1


I agree a used Quadra 700 is pretty much free these days.

Go to Top of Page

Jamethiel
Starting Member



5 Posts
Posted - 07 Nov 2003 :  10:47:32
I was actually looking at doing exactly this a few months ago, but not to run A/UX.

What I was looking for was a system that had a good machine-level debugger and could run NetBSD.

This was before I found the bug that was keeping the NetBSD native-boot code from working, which is one of the two reasons I wanted such an emulator.

The other reason was to try and figure out the (almost completely undocumented) SWIM chip in the hopes of being able to write a NetBSD driver for it. There's nothing quite like watching a trace of I/O register accesses and lining it up to a disassembly of the driver for figuring out how hardware works. There still isn't a SWIM driver for NetBSD yet.

Unfortunately, the UAE CPU core was a bit more complex than I wanted to try and figure out at the time, and I knew that writing a working 68000 core was beyond me, let alone a 68030 core. So I dropped the project in favor of a Lisp Machine emulator.

There's another fun problem with doing hardware-level emulation of a Mac system. Collecting all the NuBus declaration ROM images and emulating the video cards, network cards, MacIvory cards, TI MicroExplorer cards, etc. Sure, you could just do one of each, but where's the fun in that?

And then hardware documentation! Space Aliens Ate My Mouse is about as good as you're going to get on how ADB works short of understanding the NetBSD HWDIRECT ADB drivers. And those are still a little finicky. You can find documentation on the IWM chip, but the SWIM chip is a lot harder to figure out. And the SWIM II chip is a complete unknown. What are the memory maps for the different systems? In 24-bit mode? In 32-bit mode? Plus you have to collect ROM images for each system -and- keep them all straight. Oh, and most of the NuBus cards are completely undocumented, hardware wise.

I may take this challenge up at some point. Just not soon.

Hunh. I should try and get a machine with a SWIM II chip. I might at least be able to get that to read 800k disks, which would be an improvment over the current situation in NetBSD, and might lead to getting the floppy driver into better shape for when the SWIM ISM mode is figured out...

Oh well, I've ranted for long enough now.

--Jamethiel


Go to Top of Page

Alb2550
Starting Member



25 Posts
Posted - 10 Nov 2003 :  18:50:08
Gamba's homepage has some macII roms on it that work in basilisk II.
I tried them myself.
so that's one obstacle down.

Look at the linux/m68k project they had to do ADB and SCSI drivers for the mac and they have support for most a/ux machines.
I think they did swim chip drivers too.

i don't know much about coding but those drivers might be useful.

Alb_2550@hotmail.com
2x LC475's
1x LCIII
1x Mac SEGo to Top of Page

Alb2550
Starting Member



25 Posts
Posted - 28 Nov 2003 :  00:39:10
Found Some Tech info on the ADB.
Hope It Helps.

http://www.eetasia.com/ARTICLES/2000JUN/2000JUN02_CT_AN8.PDF

Alb_2550@hotmail.com
2x LC475's
1x LCIII
1x Mac SEGo to Top of Page

stonent
Junior Member


USA
155 Posts
Posted - 28 Nov 2003 :  02:05:12
The point would be... Really fast A/UX. Really fast compiles. KDE on A/UX anyone?

SE 4/2000/FDHD/7.0.1 :)
Q840av - Alive!
Q650 64/2000/A/UX Woot!
SGI Indy R5000SC
2 Sparc Classics, 1 IPC, 1 SS4, 1 SS5
Stonent's Sun Collectors forum ;)Go to Top of Page

Unknown_K
Full Member


USA
602 Posts
Posted - 28 Nov 2003 :  05:49:55
I dont know, an oldworld machine like my AWS 95 with a/ux 3.1 is pretty responsive running software of its vintage. You have to remember alot of what makes an old machine zippy is having a faster drive then available when initially sold and maxing out the ram. I also have a Thunder 24 video card the speeds up the video and allows more usable resolutions. Compare this to a low end mac II with 8mb ram, 80mb hd, and an old clunky 640x480 video card and there is a big difference.

Go to Top of Page

Jamethiel
Starting Member



5 Posts
Posted - 28 Nov 2003 :  09:21:30
Following up on the comment by Alb2550 about Linux having SWIM chip drivers, I checked the sources for the most recent linux kernel on kernel.org. It turns out that Linux only supports the SWIM3 chip used in PPCs and the IOP-based SWIM chips for the IIfx and Q950 (and those by passing messages to the normal MacOS-loaded code in the IOPs, showing no direct manipulation of the SWIM chips).

I'm both saddened and relieved. Saddened to think that Linux doesn't even support the well known IWM chip (well known enough that NetBSD and OpenBSD support it) or the original SWIM chips in IWM mode, and relieved that nobody else figured the SWIM chips out yet either (petty of me, I know).

Maybe I'll play with the SWIM chip in my LC II this weekend. I still have my notes and the Pocket Forth source for my original experiments... Or Pocket is small enough, I could make a boot disk with it for the SE/30... And now I have a couple experiments in mind to try.


Go to Top of Page

markymark
Junior Member



223 Posts
Posted - 02 Dec 2003 :  23:29:56

What also needs to be done is a complete Apple Sound Chip driver.

Then all the Aiff Wave and even mp3 stuff could be played.

Also any music editing stuff could be ported over from other 68k unix OS's.

Heres a SWIM thing I found.


Notes on the SWIM controller chip.
Alastair Bridgewater, Febuary 2, 2001.

The SWIM drive controller chips used in such Macs as the Classic and the
IIcx are descended from the original Disk ][ drive controller card for
the Apple ][ series of computers. Unlike the previous generation drive
controller (the IWM controller), they support both GCR and MFM format
disks. They also support two sets of registers, although only one set
may be used at a time (see Switching between IWM and SWIM modes below).


SWIM mode register layout:

.equ writeData, 0x0000 /* Data (write) */
.equ writeMark, 0x0200 /* Mark (write) */
.equ writeCrc, 0x0400 /* CRC (write) */
.equ writeParameter, 0x0600 /* Parameter data (write) */
.equ writePhase, 0x0800 /* Phase (write) */
.equ writeSetup, 0x0a00 /* Setup (write) */
.equ modeZeros, 0x0c00 /* mode register zeros (write) */
.equ modeOnes, 0x0e00 /* mode register ones (write) */

.equ ??? 0x1000 /* ??? (read?) */ /* data read? */
.equ readData, 0x1200 /* Data (read) */ /* mark read? */
.equ ??? 0x1400 /* ??? (read) (error?) (mark?) */
.equ readParameter, 0x1600 /* Parameter data (read) */
.equ readPhase, 0x1800 /* Phase (read) */
.equ readSetup, 0x1a00 /* Setup (read) */
.equ readMode, 0x1c00 /* mode register (read) */
.equ handshake, 0x1e00 /* Handshake (read) */

According to the patent (US4916556), the SWIM chip has 16 registers as
follows: data (r/w), mark (r/w), error (r), write CRC (w), parameter data
(r/w), phase (r/w), setup (r/w), handshake (r), mode zeros (w), mode ones
(w), and status (r).


Switching between IWM and SWIM modes:

To switch from SWIM mode to IWM mode, clear bit 6 of the mode register by
writing 0x40 (or any other value with that bit set) to modeZeros. Typically,
this value will be 0xf8, to clear the action, writemode, HEDSEL, and MOTORON
bits at the same time.

To switch from IWM mode to SWIM mode, use the following code fragment:

tstb a0@(q7L)
tstb a0@(mtrOff)
tstb a0@(q6H)
moveb #0x57,d2
moveb d2,a0@(q7H)
moveb #0x17,a0@(q7H)
moveb d2,a0@(q7H)
moveb d2,a0@(q7H)

To determine which mode the chip is in, store data in writePhase, and see
if it shows up in readPhase (it will if the chip is in SWIM mode). The
sequence of values used for this in the Classic's .Sony driver is 0xf5,
0xf6, 0xf7.


Selecting a drive:

Bits one and two of the mode register select the internal and external
drives, respectively, and bit 7 controls the motoron signal.


Manipulating the disk Phase and SEL lines, and reading the SENSE line:

Disk phase lines are controlled by means of the phase register. The bottom
four bits control the state of their respective phase lines. The top four
bits are usually all set to 1 to indicate that the phase lines are all
outputs.

While the patent appears to indicate that the disk SEL line can be
controlled by the SWIM chip (and the SWIM III driver in MkLinux concurs),
the SEL line is still controlled by the VIA in both the IIcx and Classic
.Sony drivers.

The sense line can be read by way of bit three of the handshake register.


Parameter memory:

The SWIM chip has 16 bytes of parameter memory. This memory is accessed by
successive accesses to the parameter register (either read or write). The
offset into parameter memory for the next access can be reset by writing to
the modeZeros register.


Go to Top of Page

markymark
Junior Member



223 Posts
Posted - 02 Dec 2003 :  23:45:06

Some odd characters were in the last post here it is again.

Notes on the SWIM controller chip.
Alastair Bridgewater, Febuary 2, 2001.

The SWIM drive controller chips used in such Macs as the Classic and the
IIcx are descended from the original Disk ][ drive controller card for
the Apple ][ series of computers. Unlike the previous generation drive
controller (the IWM controller), they support both GCR and MFM format
disks. They also support two sets of registers, although only one set
may be used at a time (see Switching between IWM and SWIM modes below).


SWIM mode register layout:

.equ writeData, 0x0000 /* Data (write) */
.equ writeMark, 0x0200 /* Mark (write) */
.equ writeCrc, 0x0400 /* CRC (write) */
.equ writeParameter, 0x0600 /* Parameter data (write) */
.equ writePhase, 0x0800 /* Phase (write) */
.equ writeSetup, 0x0a00 /* Setup (write) */
.equ modeZeros, 0x0c00 /* mode register zeros (write) */
.equ modeOnes, 0x0e00 /* mode register ones (write) */

.equ ??? 0x1000 /* ??? (read?) */ /* data read? */
.equ readData, 0x1200 /* Data (read) */ /* mark read? */
.equ ??? 0x1400 /* ??? (read) (error?) (mark?) */
.equ readParameter, 0x1600 /* Parameter data (read) */
.equ readPhase, 0x1800 /* Phase (read) */
.equ readSetup, 0x1a00 /* Setup (read) */
.equ readMode, 0x1c00 /* mode register (read) */
.equ handshake, 0x1e00 /* Handshake (read) */

According to the patent (US4916556), the SWIM chip has 16 registers as
follows: data (r/w), mark (r/w), error (r), write CRC (w), parameter data
(r/w), phase (r/w), setup (r/w), handshake (r), mode zeros (w), mode ones
(w), and status (r).


Switching between IWM and SWIM modes:

To switch from SWIM mode to IWM mode, clear bit 6 of the mode register by
writing 0x40 (or any other value with that bit set) to modeZeros. Typically,
this value will be 0xf8, to clear the action, writemode, HEDSEL, and MOTORON
bits at the same time.

To switch from IWM mode to SWIM mode, use the following code fragment:

tstb a0@(q7L)
tstb a0@(mtrOff)
tstb a0@(q6H)
moveb #0x57,d2
moveb d2,a0@(q7H)
moveb #0x17,a0@(q7H)
moveb d2,a0@(q7H)
moveb d2,a0@(q7H)

To determine which mode the chip is in, store data in writePhase, and see
if it shows up in readPhase (it will if the chip is in SWIM mode). The
sequence of values used for this in the Classic's .Sony driver is 0xf5,
0xf6, 0xf7.


Selecting a drive:

Bits one and two of the mode register select the internal and external
drives, respectively, and bit 7 controls the motoron signal.


Manipulating the disk Phase and SEL lines, and reading the SENSE line:

Disk phase lines are controlled by means of the phase register. The bottom
four bits control the state of their respective phase lines. The top four
bits are usually all set to 1 to indicate that the phase lines are all
outputs.

While the patent appears to indicate that the disk SEL line can be
controlled by the SWIM chip (and the SWIM III driver in MkLinux concurs),
the SEL line is still controlled by the VIA in both the IIcx and Classic
.Sony drivers.

The sense line can be read by way of bit three of the handshake register.


Parameter memory:

The SWIM chip has 16 bytes of parameter memory. This memory is accessed by
successive accesses to the parameter register (either read or write). The
offset into parameter memory for the next access can be reset by writing to
the modeZeros register.


Go to Top of Page

Alien
Junior Member


Netherlands
269 Posts
Posted - 03 Dec 2003 :  03:22:31
quote:
The point would be... Really fast A/UX.

A/UX is no slug, when used right. But this is a valid point.

quote:
Really fast compiles.

Something tells me that setting up a cross-compiling environment would be way easier...

quote:
KDE on A/UX anyone?

Ugh. No, thanks.

,xtG
.tsooJ

--
who | grep -i blonde | date
cd ~; unzip; touch; strip; finger
mount; gasp; yes; uptime; umount
sleepGo to Top of Page

The Balance Of Judgement
Senior Member


Ivory Coast
1006 Posts
Posted - 05 Dec 2003 :  02:23:36
I still don't see the point, not when you can get free machines that run AUX like the SE/30 that people are literally dumping out.

It's like people's obsession with Emulating PPC on Intel to run OS X. (Which by the way has been done, the developers have booted 8.5 with extensions off)

It's just easier to grab a machine to do anything natively.

Go to Top of Page

Unknown_K
Full Member


USA
602 Posts
Posted - 05 Dec 2003 :  03:06:42
quote:

I still don't see the point, not when you can get free machines that run AUX like the SE/30 that people are literally dumping out.

It's like people's obsession with Emulating PPC on Intel to run OS X. (Which by the way has been done, the developers have booted 8.5 with extensions off)

It's just easier to grab a machine to do anything natively.



I agree that having the real hardware is always better then emulation. Still I wonder why somebody hasnt made a g3 or g4 ppc PCI card computer for the pc that would let you run OSX on a newer system. A mac card and a PC would still probably cost less then a new g4 would and let you run anything a mac or pc could run.

Its even funnier on the PC side with people trying to emulate dos for retro gaming when 386/486/pentium era machines are either totally free or just a few bucks. There are alot more PC's being dumped them macs since there was a higher volume made and the get upgraded faster.

Go to Top of Page

cory5412
68KMLA Comrade-in-Arms


USA
4679 Posts
Posted - 05 Dec 2003 :  06:34:23
Terrasolf makes the BriQ, it's a G3/4 linux running CDROM sized computer, it's MiniITX iThink, and it' mostly got no video and stuff, but it's a PowerPC processor and such.

I'm sure that it'd be better to make a more 'maclike' box, but still completely possible

That would be a VERY interesting upgrade for some older macs IMHO... If Apple or someoen was to make a cdromsized G3 with a NuBus card and software so's you could use G3 on your 68k or older PowerPCs I'd get one for the 7300

Official 68k videographer
Official MLA TourGuide
Editor of the MLAgazine
"I'm just a normal computer geek who somehow landed a social life"Go to Top of Page

Jamethiel
Starting Member



5 Posts
Posted - 08 Dec 2003 :  12:25:02
quote:

Heres a SWIM thing I found.

Notes on the SWIM controller chip.
Alastair Bridgewater, Febuary 2, 2001.


Ugh. I misspelled the month name when I wrote that. :-/

I actually knew a little more than that at the time, but didn't have anything verifiably working, so didn't write it up. And since then I obtained a little more information from the NetBSD/port-mac68k list.

Hrm... I should update that document, write one on the IWM chip, one on the drives, one on how the floppy drivers work, and one on how the whole standalone-boot thing works. Then I should update my website...

I guess I'll put all that down on my list of things to do for 1Q 2004.


Go to Top of Page

markymark
Junior Member



223 Posts
Posted - 08 Dec 2003 :  23:41:29

So you already knew that. LOL.

I don't know why apple just doesn't release the hardware info for the old chips.

Go to Top of Page

The Balance Of Judgement
Senior Member


Ivory Coast
1006 Posts
Posted - 09 Dec 2003 :  01:41:25
Apple enjoys holding the keys to software and hardware that is years old and can't possibly hurt them if used.

It's like CyberDog..Apple promised to open up the source but later refused.

Go to Top of Page

cory5412
68KMLA Comrade-in-Arms


USA
4679 Posts
Posted - 09 Dec 2003 :  20:11:59
IIRC, A/UX is not only Apple's holding. It is a group effort of AT&T, SCO and sun/oracle, IIRC anyway.

Official 68k videographer
Official MLA TourGuide
Editor of the MLAgazine
"I'm just a normal computer geek who somehow landed a social life"Go to Top of Page

q950
Junior Member


USA
135 Posts
Posted - 10 Dec 2003 :  19:52:12
I think that you are right cory, releasing that source code would get them in serious trouble. SGI took a lot of heat by accidentally releasing something like 100 lines of SCO group source code with a linux distribution. It seems like SCO is really being a hardass about this kind of thing. I believe that Apple could release the source if you agreed to certain licensing contracts. I was reading my A/UX manuals and it made mention of licensing at least portions of the source code out to companies if they desired it. At least now we know its not impossible to oneday see the source code to A/UX.

Logan

Quadra 950, Workgroup Server 9150, Performa 6400, Powerbook 2300c, 4x Quadra 700's, iBookGo to Top of Page

   

68k Macintosh Liberation Army Forums

© 2001-2003 68kMLA

Go To Top Of Page

68k of the Week: kastegir's PowerBook 180.