Peter Godiwn’s Gopher Server

Thanks to reader Peter Godiwn, he built a .net Gopher Proxy that can read several providers via API, and to get the ball rolling, he built a WordPress connector, and yes it works great with my site!

The added bonus is that now I am automatically updating my site via gopher.  It lives as a root, so instead of taking my existing gopher offline, I added a new DNS record, and brought up:

gopher://gopherblog.superglobalmegacorp.com

Naturally that URL won’t work for 99.99% of the people out there since their browsers don’t support gopher, but the Floodgap Gopher proxy, will do the trick!

One cool feature is that it can take modern images, and convert them to GIF for older browsers.  Images even work on Netscape!

Auto converted PNG to GIF

You can find source & binaries on his github page.

Super thanks to Peter, and what a fitting 10+1 post!

Multiplayer Macintosh Plus via Javascript/

I found this fun page over on retroweb.maclab.org  What is interesting is that it encorporates PeerJS and WebRTC to allow for a virtual network, letting you play multiplayer AppleTalk.  Just enable the network, and scan for other users.

It’s pretty cool, in a zero config kind of way!

PCE-MacPlus

And for coolness it’ll embed in a snazzy picture of a Mac Plus.  Although you can magnify the screen, so you don’t have to squint so much.

10 years later…

I can’t believe it either.  It’s been 10 years since my first ambitious post.

And off to a crazy start, I tackled installing NetWare 3.12, Running Xenix under emulation, and getting Mach 3.0+Lites running, among others in the first month.

As far as posts go, some months are obviously better than others, and so much has happened in the last 10 years, I’ve moved cities, states, countries and continents.  I’ve been though breakups, marriages, children, deaths, losing jobs, losing money, starting companies, renting houses, buying a house… It’s been incredible.

Looking back, in some places, I wish I’d written more, as this blog has been really technical which isn’t so bad, but even then it’s exceptionally terse.  Lots of stuff doesn’t format correctly, and the one thing I don’t like at all is that it doesn’t render on older browers.  But I have so much going on during the day, I don’t have time to write a CMS.  I had tried a few people to spec out something to read the wordpress DB, and generate pages + gopher pages, but they always go running for the hills.

I hope to keep on trying to modernize Darwin 0.3 .  I know that the world at large really doesn’t care, and I have a feeling that Rhapsody DR2 has some fundamental flaws that really prevent it from being anything useful, although it can’t be re-sold so it’s dead anyways.

So where will I be in 10 more years? I really don’t know.  I know one project I’ve been constantly putting off will have to come to light sooner or later, but I do want to move to virtuallyfun.com .  I know my blog is hard to find, it’s a custom name, on a really really long DNS zone.  10 years ago, I was hosted on wordpress, back at blogspot.com, but after their nearly 2 week outage, I moved out onto my own machine.  I’d almost move back to someone managed, as I have so much other stuff going on, running a site isn’t worth my time, but I haven’t had time. When I do make the move though, most people won’t notice I plan to do a 302 + a refresh to bounce to the new domain, and all being well it’ll preserve the same schema so other than a shorter domain in the titlebar most people won’t notice.  Right now it’s doing it, but backwards.  But rest assured, I’m still keeping superglobalmegacorp.com ..

I hope to at least keep this thing up, keep it slightly interesting.    Over the last year, the #1 page is Darwin 0.1 + Rhapsody DR 2 booted!  I honestly didn’t think that would be anywhere near as popular as it is, but even after OSNews locked the topic, I still get over 100 hits a day.  The #2 spot is Dunc’s Algomusic MkIIIb, after being linked to from [Vinesauce] Vinny – Text to MIDI.  Which just goes to show, I really can never tell what is going to be popular..

Laters!

MachTen 2.2

MachTen console

Not that I need another UNIX, but I came across this fine thing googling around for some Mach based OS’s running on the 68000, and well here is MachTen.  Perhaps the most notable thing about MachTen is that it is capable of running in usermode under MacOS.  Without a MMU.

# cc -v hi.c -o hi
gcc version 1.40
 /usr/local/PMtools/cpp -v -undef -D__GNUC__ -Dunix -D__MACHTEN__ -DMACHTEN -DTENON -D__unix__ -D____MACHTEN____ -D__MACHTEN__ -D__TENON__ -Dmc68000 hi.c /var/tmp/cc000093.cpp
GNU CPP version 1.40
 /usr/local/PMtools/cc1 /var/tmp/cc000093.cpp -fno-builtin-alloca -fno-defer-pop -quiet -dumpbase hi.c -version -o /var/tmp/cc000093.s
GNU C version 1.40 (68k, MIT syntax) compiled by GNU C version 2.3.3.
default target switches:
 as -mc68000 -o hi.o /var/tmp/cc000093.s
 ld -o hi -x /usr/lib/crt0.o hi.o -lc
# size hi
text    data    bss     dec     hex
11220   400     1672    13292   33ec
# ./hi
hello!

And yes, it even supports TCP/IP with it’s own TCP/IP stack.  It can even operate as a router of all things!  From a users point of view it is a little sparse, but it’s 4.3BSD, and thankfully includes the C compiler, so unlike of UNIX of the era on ‘small hardware’ this one isn’t crippled.

configuring TCP/IP

TCP/IP is configured through the MacOS via the control panel.  As you can see it can use AppleTalk, Ethernet and TokenRing interfaces.  For my simplicity, I’m just using SLiRP on the Ethernet, so it’s the old 10.0.2.15/24 setup.  I re-compiled my BasiliskIII to redirect a port into the VM so I can telnet into it.

To install System 7.0.1 you need to set Basilisk II / Cockatrice III as a IIci. I went ahead and used this ROM.  The ROM however does expect there to be a FPU.

rom Mac-IIci.ROM
modelid 5
cpu 2
fpu true

Running however, I’ve been able to set the CPU to 3 or 4 (68030/68040) and it’s fine, I think the major thing is the modelid.  If I try this under System 8 which needs a 68040, then it’ll crash in spectacular ways.  You don’t need MacTCP as again MachTen is a 4.3BSD kernel with Mach 2.5, so it has it’s own.

MachTen also includes support for NFS!  This greatly eases getting data in & out of the system.  To mount my Synology I just need the following command:

mount -t nfs -o timeo=1,retry=1,rsize=512,wsize=512,retrans=1 192.168.1.3:/volume1/Data /mnt/data

And I’m good to go!

Previous 1.6

Loading…

For anyone who is interested in classical 680×0 based NeXT emulation, I build the latest snapshot of Previous for Windows.  You can find it here: Previous-1.6_build_767.7z

When I had a cube, I was like everyone else, without a working magnetic optical disc. And I was a (and still am) a diehard 3.3 fan, but it’s still fun loading up version 0.8 under emulation.

1.0a

The problem was several fold, from the drives turning out to be VERY sensitive to dust, the NeXT’s sucking air through the MO drive, trapping quite a bit of dust in the drives, mechanisms breaking, the optics being sensitive to heat, and of course our old friend, bad capacitors.  The build disk application warns it can take upwards of 3 hours to create a MO of the operating system.  They clearly were not fast either.  I think it took 30 minutes under emulation.

Oops!

At the end of the day, I guess it didn’t matter.  Optical discs came and went in the 80’s , and re surged with CD’s and re-writable discs up until this decade.  Now we’ve pretty much gone either all solid state, or only large capacity disks with moving parts.

Oh well, I was looking for sample code, to see if there were other driver examples for the driverkit.  I didn’t think there was anything far back when NeXTSTEP was a black box, 68030 thing, but it never hurts to look.

telnet

It is cool that TCP/IP won out in the protocol wars.  It’s very convenient to have a current 2017 desktop, being able to communicate with operating systems nearly 30 years old.  Especially when it comes to things like NFS, making it even better for mapping drives, and sharing data.

And much to my surprise, with the bad reputation the SLiRP code has, I’m able to mount my Synology’s NFS share just fine from my virtual cube.

mount -t nfs -o fs,mnttimeout=1,retry=1,rsize=512,wsize=512,retrans=1 192.168.1.3:/volume1/Data /mnt/data

I had just added some parameters to lower retry times, and resize the blocksize to be much smaller than a single packet so I don’t have to worry about any issues with MTU resizing.  Maybe it’s not optimal, but being able to copy data in and out is all I want to do, and it’s been reliable.

Oh yeah, since it was burred in the messages, for people who like old dmesg’s

Remote debugging enabled
msgbuf at 0x73fe000
NeXT Mach/4.3 #5.1(XM13): Thu Dec  1 13:03:37 PST 1988; /sources/projects/mk-0.8.26e0.8/RELEASE (photon)
physical memory = 15.99 megabytes.
available memory = 14.97 megabytes.
using 16 buffers containing 0.12 megabytes of memory
odc0 at 0x2012000
od0 at odc0 slave 0
od1 at odc0 slave 1
SCSI 53C90 Controller, Target 7, as sc0 at 0x2014000
IBM     DORS-32160    !# as sd0 at sc0 target 2 lun 0
       Disk Label: NeXT_0_8
       Disk Capacity 2063MB, Device Block 512 bytes
en0 at 0x2006000
en0: Ethernet address 00:00:0f:00:22:09
dsp0 at 0x20000d0
np0 at 0x200f000
sound0 at 0x200e000
root on sd0
master cpu at slot 0.
setting hostname to NeXT_0_8
network_init.gethostbyname fails, errno=2
network_init failed: no network
Network Server initialised.

Darwin 0.3 booted multiuser!

Multiuser!

I know it doesn’t look exciting, but really it is!

Darwin03_qemu090_01_5_2017.7z

NetInfo is completely broken, but I just disabled it, I don’t think anyone cares.  It is missing some kernel system call, and copying the one from Rhapsody results in missing calls in the /System library.  So instead of spending more time on it, I just had the startup comment it out.

The headers and spiraling dependencies of things is out of control, so it really needs to be re-built.  But there is enough there for it to boot up, you can telnet into it, and compile simple programs.

As far as I’m aware none of the early Darwin’s ever were released as binary for x86, so I guess that is a nice thing.

The EIDE driver is still busted, I spent a day trying to debug it to come to the conclusion that, yes it does lose interrupts.  While stacking OO drivers to add features sure looks nice, it makes fundamental issues, either in the Driver itself, or the object framework (let’s face it, nothing is defect free) hard for an outsider to find.  From the outside I used to think it was either the DMA or the multisector transfers screwing it up, but with source in hand, disabling both did nothing.

4.4 BSD (darwin) (ttyp0)

login: root
[darwin:~] root# hostinfo
Mach kernel version:
Kernel Release 5.5:
Sun Apr 30 10:53:53 SGT 2017; root(rcbuilder):kernel-7/BUILD/RELEASE_I386
Copyright (c) 1988-1995,1997-1999 Apple Computer, Inc. All Rights Reserved.

Kernel configured for a single processor only.
1 processor is physically available.
Processor type: pentium (Intel Pentium)
Processor active: 0
Primary memory available: 64.00 megabytes.
Default processor set: 40 tasks, 71 threads, 1 processors
Load average: 0.99, Mach factor: 0.00
[darwin:~] root#

For people who like this kind of stuff.  In my limited testing, I found some configure scripts don’t like the idea of a Darwin with a major number of zero.  And seeing that this would fall into place during OS X Server 1.0.2, which makes it Rhapsody 5.5.  I don’t think either of the 1.2 or 1.2v3 Rhapsody 5.6 versions were ever released to the public in source, but maybe someone has a copy somewhere.

And, of course here is a gratuitous dmesg.

Kernel Release 5.5:
Sun Apr 30 10:53:53 SGT 2017; root(rcbuilder):kernel-7/BUILD/RELEASE_I386
Copyright (c) 1988-1995,1997-1999 Apple Computer, Inc. All Rights Reserved.

physical memory = 64.00 megabytes.
using 227 buffers containing 1.27 megabytes of memory
available memory = 59.19 megabytes. vm_page_free_count = 1d99
minimum quantum is 10 ms
Copyright (c) 1982, 1986, 1989, 1991, 1993
The Regents of the University of California. All rights reserved.

PCI Ver=2.10 BusCount=1 Features=[ BIOS16 CM1 ]
Found PCI 2.0 device: ID=0x12378086 at Dev=0 Func=0 Bus=0
Found PCI 2.0 device: ID=0x70008086 at Dev=1 Func=0 Bus=0
Found PCI 2.0 device: ID=0x70108086 at Dev=1 Func=1 Bus=0
Found PCI 2.0 device: ID=0x00a81013 at Dev=2 Func=0 Bus=0
Found PCI 2.0 device: ID=0x802910ec at Dev=3 Func=0 Bus=0
PCI bus support enabled
PnP: Plug and Play support enabled
ISA/EISA bus support enabled
ISA bus
DriverKit version 500
hc0: device detected at port 0x1f0 irq 14
hc0: Checking for ATA drive 0… Detected
hc0: Checking for ATA drive 1…
hc0: Checking for ATAPI drive 1…
hc0: Resetting drives…
Registering: hc0
hd0: QEMU HARDDISK 0.9.0
hd0: 4063 cylinders, 16 heads, 63 spt (disk geometry)
hd0: using multisector (16) transfers.
Registering: hd0
hd0: Device Block Size: 512 bytes
hd0: Device Capacity: 1999 MB
hd0: Disk Label: Disk
hc1: device detected at port 0x170 irq 15
hc1: Checking for ATA drive 0…
hc1: Checking for ATAPI drive 0… Detected
hc1: Checking for ATA drive 1…
hc1: Checking for ATAPI drive 1…
hc1: Resetting drives…
hc1: Drive 0: ATAPI CD-ROM (FAST DRQ, REMOVABLE, CMD PKT LEN=12)
hc1: LBA supported.
hc1: buffer type 3, 512 sectors.
Registering: hc1
IDEDisk: disk 0 is ATAPI
Registering: sc0
sd0: QEMU QEMU CD-ROM 0.9.
Registering: sd0 at Target 0 LUN 0 at sc0
sd0: Disk Not Ready
Registering: fc0
Registering: PS2Controller
Registering: PCKeyboard0
PCI bus support enabled
Registering: PCI0
Registering: EISA0
Registering: event0
Registering: kmDevice0
rootdev 300, howto 40000
BusMouse mouseInit: no resolution in config table. Default is 400
Bus mouse running
Registering: BusMouse
Display0: Cirrus Logic GD5434 detected (2097152 Bytes)
Display0: PCI Dev: 2 Func: 0 Bus: 0
Display: Mode selected: 800 x 600 @ 60 Hz (RGB:256/8)
Registering: Display0
NE2000 Generic Driver v0.9.1b
by Gabor Sebestyen

Vendor: RealTek RTL-8029
BASE: 0xc100; IRQ: 11
Registering: en0
en0: Ethernet address 52:54:00:12:34:56
Device inited…

Updated Darwin 0.3

Darwin03_29_4_2017.7z

It still boots single user mode, one of the source projects has a nice rm -rf $DSTROOT so it nuked what little progress I made during the week.

But I have the compiler running and lots more.  It has issues with netinfo which is really the only thing blocking it from multiuser boot.  Some syscall not found, and I need to dig into the kernel to see if it even exists…

I’ll re-build all the libs and headers.  Oddly enough the disk image I can build libraries and programs can’t build driverkit or the kernel…

Darwin 0.3 single user mode test drive

So I asked around for some old Darwin CD’s and I got lucky!

Darwin 0.3 Front

Volume 1, Summer of 1999!  Although the back doesn’t really give it justice:

Darwin 0.3 back

As you can guess, when they talk about binary and installers, it’s for the PowerMa computers of the era, and not x86.

So once more again, I was able to rebuild a kernel, and build some of the OS.  There isn’t really anything to see, it’s not even slightly usable.  However at the boot loader type in

-s

hit enter, and it’ll boot up in single user mode.

Darwin 0.3 single user mode

Darwin03_qemu090_24_4_2017.7z

There is no games, nothing fun to do, I didn’t even build a compiler.  It’s just enough to show that it’ll boot up.  If you manually conifgure the loop back you can ping yourself, launch inetd you can even try to telnet in, but control break is .. broken, and there is no NetInfo running so no passwords.

Of course for anyone finding this site today there are more newer, and capable images on my sourceforge page:

aapl-darwin/files/qemu-images/

Reading .toast image files

Well I put out a cry for help all over the place, looking for Darwin 0.3

And much to my amazement, when I woke up, I not only got a reply but a link to a toast image.  Great, what is toast?  Well simply put toast is a format made popular by then Adaptec Toast.  Obviously the sane thing to do is to find Toast, install it, and mount the disk image inside of a Macintosh.

Adaptec toast 4.0

But, honestly, where is the fun in that?

Instead let’s have Cockatrice III do it!  Now I never did get around to writing proper CD-ROM emulation, nor integrating it, but that doesn’t matter!  Instead I’m going to rely on Daemon tools Lite, to do all the heavy lifting.  DTL will create a virtual SCSI adapter, add in a SCSI CD-ROM device, and mount the image.  Needless to say, I’m on Windows and that is where that part of the adventure ends, as Windows 10 cannot read HFS.

Now back to Cockatrice!

All I had to do was assign the SCSI 6 position to the mounted drive letter, and I’m set!  Just add this to the CockatriceIII_Prefs file:

scsi6 \\.\e:

And now I can mount the image from within Cockatrice III

Darwin 0.3 toast mounted

And there we go, now I can copy the files of just like having a real Mac.

 

Darwin 0.1 + Rhapsody DR 2 booted!


Following up from yesterday, here we go!

Rhapsody 1.0 booting

So I finally got it running, after some inspiration from NCommander over at nextcomputers.org forums, that the Darwin 0.1 kernel is infact build able, I went ahead and took a stab at it.  While he was trying to start from OPENSTEP, I tried it from something as close as I could to the target, which was Rhapsody DR2.

Back in the days of the NeXT / Apple merger, there was hope that OPENTSTEP could become the next great OS for the Apple Macintosh.  It had been a while since NeXT had the OS running so things had rotten somewhat, as time had passed on.  However the first and most viable platform would of course be the x86.  Back in 1993 while feeling increased pressure in the hardware space, NeXT was forced to start porting away from their black m68k based hardware, and this was an opportunity to get their software running on different platforms.  And sadly in 1993, the NRW aka NeXT RISC Workstation that was in development with dual m88000 processors was killed along with all hardware projects.  In the end it didn’t matter as much as the only processor from the early 90’s that has a vibrant future is the i386.

So back again to this transitional time before OS X 10, there were developer versions of this OS seeded out that required you to have an intel machine as OPENSTEP was being ported to the PowerPC machines that Apple was selling.

So on May 14, 1998, the last public version for the Intel processor was released, DR2.

However two interesting things happened along the way to what would become OS X Server 1.0 .  The first is that Apple gave up on the ‘yellow box‘ portable API, and to satisfy the GPL requirement to release changes to source code, Apple would go one further and release the source code to many of the internal system utilities, along with the kernel in what was known as Darwin.

This was a big deal for many of us, as the cost of getting the source code to any UNIX was incredibly prohibitive, and OS’s like Linux, NetBSD/OpenBSD/FreeBSD were picking up steam, OPENSTEP being awaken from it’s cryonic hibernation but with the promise of being free and open software was pretty great!  Back in the day it sure looked promising!

Obviously things didn’t work out as everyone had hoped as Apple either straight up ignored anyone on the outside, or they hired people who showed promise, made them sign NDA’s and were basically never heard from again.

So the recently recovered source code to Darwin 0.1 corresponds with the release of the PowerPC only OS X Server 1.0.  However as we all found out, Darwin will still built and maintained on Intel, as it was a very secretive plan B, in case something went wrong with the PowerPC platform.  Being portable had saved NeXT before, and now it would save Apple.

So with this little background, and a lot of stumbling around in the dark, I came up with some steps, that have permitted me to build the Darwin 0.1 kernel under DR2.

However it was not perfect, and the biggest glaring issue was due to the software that was recovered, the layer known as driverkit, (driverkit-139.1-1.tar.gz) turns out to be from another, later release of Darwin, the 0.2 release, which the only thing surviving is the driver kit.  It doesn’t build cleanly, and In order to get it to build I had to break the mach PCI bus.  This means that yes, PCI devices will not load at runtime, only at boottime by sald.

After a lot of fighting I was able to produce a system that could boot into both single user and multiuser mode, although it was unable to load drivers so there was no networking, and no UI.

In a fit of boredrom, I built a bunch of the command line tools for Darwin, and a few libraries, and then went to see why the driverkit had a problem finding the reason why KernBus was undefined, or even with some attempts at helping all the methods were unknown, I stumbled onto the fact that during compilation it will generate new headers, and in those headers are the correct interface for driverkit to call into the KernBus.  So I was able to quickly rebuild driverkit, then re-link into the kernel and now I could load drivers!  Thrilled with this much, I did something more aggressive, I made a dump of my install ‘target’ and then restored it onto an image of my dev VM.  And much to my amazement it booted up to the graphical login.  I now had PCI working correctly.

Darwin 0.1

This kind of thing is not for casual users, but if you install DR2 into a VM, you ought to be able to then use this ISO image, and follow these instructions, and you will then have a DR2 OS from 1998 with the OS X 1.0 kernel from 1999 running.  The biggest difference I’ve noticed is that the newer kernel can use 512MB of RAM, a nice bump up from 192 which was the prior limit.

Obviously there is a lot more work to be done, it’d be nice to find some source to an IDE or other block controller and modify it to work with the massive disks of today, along with the filesystem code to handle partitions larger than 2GB.

Maybe it will be possible to port in the driverkit to XNU, so we can get things like existing drivers, and SMP, massive filesystems etc..  It’s great to see we are going the right way.

For fans, here is a qemu 0.90 image+exe that can run Darwin 0.3 into single user mode.

EDIT and for people still hitting this, here is a multiuser bootable image.  I’ll keep updating on the source forge page.