Philip Pemberton’s 3B1 emulator now Boots AT&T Unix!

No really, you read that right!  You may remember my post about this emulator a while back, with a small mention how it’ll boot the diagnostic disk, and fail from there.

Well now, thanks to Andrew Warkentin’s hard work, the system now boots!

3B1 time check

3B1 time check

Using the 3.51 installation set from bitsavers, and the IMDU program to decompress the disk images the emulator can install UNIX onto a hard disk image (be sure to check the debug version, and the stderr.txt for the emulated geometry for your supplied hd.img).

I’ve got to say, it’s pretty cool!  Although building the exe for Windows needed a little nudge, but my compile seems to be working, although the ‘release’ version still outputs far too much information.

blank

blank

At this point it’s stuck “working” .. I thought it’d be able to do more, but it did take down the new root password, and then say it’s “setting up the screen”.  I ran a second copy on wine for the heck of it, and it’s doing the same thing.

xx

Apparently if you ‘X’ the modem panel, you’ll get a desktop

I’ll update as I can, but I wanted to get this out there.  For those who want to try, you can download my work here. Remember F10 will capture/uncapture the mouse.

The floppy disk file is called ‘discim’.  Simply copy the RAW 409,600 byte file onto this filename, and freebee will pick this up as a disk change.  You can make a hard disk file by simply creating a blank file (I used qemu-img create -f raw hd.img 65M) by providing a file of that size called hd.img .  When freebee starts, if you look at stderr.txt it will tell you the geometry that it is going to use:

WD2010 initialised, 1040 cylinders, 8 heads, 16 sectors per trackDisc image loaded.

Which you then pass onto the diagnostic disk to format the hd.img.

(boot with the diagnostic/setup disk, 01.RAW)

Option #2 (Format Disk), then Option 12 (Others).  Then using my information, 1040 cylinders, 8 tracks, 16 sectors per track (I guess it figures out heads on it’s own from the tracks?)  I then let it setup the disk as multi-user and it’ll format the disk.  It should only take a few seconds.

Format the disk from the diagnostics floppy

Format the disk from the diagnostics floppy

Installation of the OS starts with 02.RAW and it’s pretty self explanatory.

Apparently the best way to login the first time is to move the mouse frantically around, and it may let you into the system.  Logon as root and try doing this:

remove the /dev/ph0 and /dev/ph1 files

make a new /etc/inittab

is:2:initdefault:
rc::bootwait:/etc/rc > /dev/null 2>&1
vid:2:respawn:/etc/getty window 9600

remove the files

/etc/.modeminit
/etc/.phclr
/etc/.phinit

I did that to my disk (download), and I can now boot up.

3B1 booted up!

3B1 booted up!

I found vi and the C compiler on the bitsavers archive, but the C compiler currently doesn’t work.

panic

panic: pagein

Which is no doubt something else up with the MMU.

32 thoughts on “Philip Pemberton’s 3B1 emulator now Boots AT&T Unix!

  1. I got further along in boot than you did with your build – I think the problem is that the modem is not yet implemented. Anyway, the secret is, after you set the root password, you get a window that starts out “To Use Your Telephone….”

    If you “X” that window closed instead of pressing ENTER, you will get an error about \dev\ph0 (the modem I would think), but startup continues to the desktop.

    I’ve got to get back to my real job and stop playing with this – one question I didn’t have time to check out – do you know how to insert virtual floppy drives??

    THANKS for compiling this!

    • Because of some idiot saying I’m spreading malware I’ve had to password protect the directory, and send every download link to a 404. But if you check the message there is another link in the 404 looking page that’ll give you a username/password to use. The whole thing changes automatically, but rest assured the download link does work!

  2. Hi, I’m picking this up to progress work on reviving my old 7300 using the Gessewin MFM drive emulator. I’m writing tools to manipulate the emulation files he uses, and disk images, and the linux sysv filesystem driver so it can loop mount those images.

    I’ve recently gotten my old hard disk read by the emulator, mounted on linux for modification, dismounted, rebooted on a real machine, and then that image booted into freebee the emulator.

    The problem with freebee reading drive images is that it doesn’t understand real drive geometry, which I’ve corrected adding (a) config args to breebee for such things, including the hd.img filename; and (b) having load_hd() see if there’s a valid volume header in the image, and take the geometry from that.

    As others seemed to have noticed, if the machine does real work for a while, something bad happens. In my case, running any compilation results in a “kernel panic: pagein” I take this to be the long-running MMU woes, and I may chase a little further.

    The other problem is that when I run freebee in a Virtual Box Linux window, the captured mouse response is horrible. This may not be the case on a native windows executable, but I’d need to build it on windows. What are the tools and instructions for doing that?

    • I compiled it with MinGW+MSYS …. I don’t recall doing anything that difficult to build it.

      I think freebee suffers from the 80/20 problem which is that 80% of the emulator is written in 20% of the time. And the last 20% takes the longest, and it works well enough for trivial tasks…

      • Maybe I can nibble it down to 85 or 90. It’s been useful for figuring out drive imaging stuff for the MFM emulator.

        I’ll try mingw/msys, which I’ve never used before.

        thx
        -dB

    • Are these utilities available? Being able to mount and put files into the hard disk image from Linux would be a much easier way to move things in and out than by using floppies. Thanks!

  3. I was able to format the disk. Then, If I hit reboot, no matter what floppy image I insert, the system goes into diagnostics. So I shut down the emulator, I plugged the no. 2 disk and booted again. It said “Insert disk no. 3 and press any key. No matter If I insert or not the no. 3 disk, If I hit any key the emulator will stop with the messages:

    src/memory.c:90:checkMemoryAccess(): Page not mapped in: addr 00080000, page 0080, mapbits 0000
    src/memory.c:895:m68k_read_memory_8(): Bus Error while reading, addr 00080000, statcode 1

    This happens with both my linux build and your windows build. So, what am I doing wrong?

  4. Download system seems to be malfunctioning, can you put your drive up somewhere else or have a look at the user/password generator?

    Anyway it’s a shame that this emulator has been abandoned, the last update on the bitbucket was in 8/14. I doubt that the MMU issues were fixed, has anyone else tried picking up the project? I know the MMU was custom but does it resemble the NeXT MMU at all? Previous made tremendous progress on that front in the meantime.

  5. cc is now working! Couldn’t let this little gem not have cc. I played some “tetrix” and conway’s game of life. it’s pretty neat to see bitmapped graphics on this system – when i used a real one back in the early 90s, we were mainly just using it in terminal mode. to get software onto it, i used dosbox to write files onto a 360k msdos floppy. then used the ‘msdos’ program on the 3b1 to access the floppy. you have to change main.c to use 9 sectors/track instead of 10 though to read the dos disks: “wd2797_load(&state.fdc_ctx, state.fdc_disc, 512, 9, 2, writeable);” I was also able to try out the Bellcore MGR window manager which was a trip! it requires user access to VRAM which is now on github (“VIDPAL” mod)

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.