johnrash/bebox: Haiku native PowerPC and Hobbit BeField Emulator · GitHub


BeField is a Haiku utility that emulates Be Inc.’s BeField, the
dual-processor laptop that BeOS was born on. It runs each PowerPC fashions
from their unique boot ROMs, with BeOS for PowerPC from Developer Release
6 by R5.0.3. It additionally runs the Hobbit prototypes that got here earlier than them,
constructed round two AT&T Hobbit processors, with Be’s 1993-94 system from
their surviving disks.


The Hobbit prototype's Browser, HeapWatch and Clock
BeOS 1.1d6
BeOS R3 with GL Teapot, BeBounce and the CPU monitor
BeOS R5.0.3 on the BeBox
Bebox preferences

Model Processors Bus
BeField Dual603-66 two PowerPC 603 at 66 MHz 33 MHz
BeField Dual603e-133 two PowerPC 603e at 133 MHz 33 MHz
Hobbit prototype (1993-94) two AT&T 92010 (Hobbit) at 25 MHz BeBus, 25 MHz

The window reveals the emulated display between the 2 entrance panel LED
columns (the “blinkenlights”), sixteen mild pipe segments every: a CPU load
bar of fifteen LEDs over the facility LED (left) or the disk LED (proper), lime
and amber like the true ones (or crimson and inexperienced, for those who favor).

  • Both processors (a PowerPC 603/603e interpreter with the 603’s software program
    TLB), the MPC105 bridge, the BeField interrupt and CPU management registers.
  • Boot ROM: the nub and major ROM in a writable flash (BeOS’s ROM updater
    works), NVRAM and actual time clock.
  • Video: Number Nine #9 GXE64 (S3 Vision864, AT&T 21C498 RAMDAC) with its
    graphics engine, the default; or Cirrus Logic CL-GD5434. 640×480 to
    1280×1024, 8 and 32 bits per pixel (what the BeOS drivers supply).
  • Sound: Crystal CS4231A codec, performed by the Haiku media equipment.
  • AT keyboard and PS/2 mouse; 4 sport ports (axes and buttons).
  • Storage: NCR 53C810 SCSI (disks and CD-ROMs on IDs 0-6), IDE, floppy.
  • Four serial ports: to a console window, a TCP server or shopper, a bunch
    serial port or a log file.
  • Ethernet: an NE2000 suitable ISA card on a non-public community behind the
    host (NAT, by libslirp): the BeField reaches the host and the
    Internet, and host ports might be forwarded to it.
  • Shared folders: a Haiku folder seems to BeOS as a SCSI disk it might probably learn
    and write; the adjustments come again to the folder when BeOS shuts down.

Not emulated but: the parallel port, GeekPort, MIDI and infrared ports.

  • The BeField boot ROMs, which aren’t included: bootnub.rom (16 KB)
    and bootmain.rom (Be Boot ROM 1.1d7) from a BeField, in a folder of your
    selection.
  • BeOS for PowerPC: CD pictures (ISO, BIN/CUE or Toast).
  • For the releases with the Be File System (Advanced Access to R5): a
    newer boot ROM, which the Preview Release 2, R3 and R4.5 CDs carry as
    /beos/and many others/bebox_bootmain.picture (Advanced Access, Preview Release 1 and
    R5 use a kind of). BeField extracts it for you (see under).
  1. Open Machine > Preferences > ROM & NVRAM and select the folder with
    the ROMs. For a BFS launch, select its CD picture as Boot ROM picture:
    BeField copies the boot ROM from the CD (PR2’s additionally boots Advanced Access
    and PR1).
  2. In Storage, put the CD picture on a SCSI ID as CD-ROM (ID 3 is the
    traditional selection), and provides one other ID a disk for putting in: Choose…
    opens a file panel whose New disk picture… button makes one proper
    there (within the folder the panel reveals) and places it on that ID.
  3. Machine > Power on. The newer boot ROMs cease at their boot menu when
    no boot quantity is ready but: press Return.

Changes to the {hardware} restart the machine. A tool kind set and not using a
file is turned again into “None” when the preferences are saved.

Before the PowerPC BeField, Be constructed its machine round two AT&T 92010
“Hobbit” processors, three AT&T DSP3210 sign processors and the BeBus.
A number of prototypes survive with their disks, operating Be’s 1993-94 system: a
window server, a console, the Browser and its dock.

What is emulated:

  • Both Hobbit processors (an interpreter written from AT&T’s programmer’s
    reference: the stack cache, the MMU, the timers, the occasion sequences).
  • The board: its I/O and interrupt registers, the processor resets, the
    floppy DMA; the PC suitable I/O chips (keyboard and PS/2 mouse, actual
    time clock, two serial ports, floppy) and the NCR 53C94 SCSI
    controller.
  • The video card: a Trident VGA with an XGA type graphics engine on the
    BeBus (640×480 or 800×600, 256 colours, because the window servers set it).

Not emulated: the three DSPs and what hangs off them (sound, the phone
and modem), the Ethernet card, the joystick controller and the parallel
port. The system begins with out them (its sound server reviews an error).

No boot ROM of those machines survives, so BeField does the boot ROM’s job:
it masses /system/kernel from the boot quantity (the floppy if one is
inserted, else the SCSI disk with the bottom ID) and begins it. To run one:

  1. In Preferences > Machine, select Hobbit prototype and 4, 8, 16,
    20 or 32 MB of reminiscence (the sizes its kernel is aware of).
  2. In Storage, put a Hobbit disk picture on a SCSI ID as a disk. To run a
    kernel of your personal as a substitute of the disk’s, select it in ROM & NVRAM >
    Hobbit kernel
    .
  3. Machine > Power on. The kernel reviews its progress on serial port
    1 (give it a console window in Serial to observe).

Notes:

  • The November 1994 disks begin /system/Browser, which they’ve as
    /system/browser: the console comes up as a substitute (the true machines did
    the identical). Type /system/browser & in it to begin the Browser.
  • The floppy drive is the kernel’s drive 1.
  • The system writes to its disk (swap recordsdata and extra): make a copy of
    your pictures, or use them by QCOW2 overlays
    (bebox-img create -b IMAGE OVERLAY.qcow2).
  • The entrance panel lights are hidden: the Hobbit’s kernel drives none.

Installing from the floppies

The installer floppy and disks 1of7 to 7of7 set up the November 1994
system (the one on the “pixels” disk) on a brand new disk. The installer floppy
has no window of its personal: its /system/Browser copies a minimal system
(kernel, servers, shell, /Installer) from the floppy to the primary onerous
disk, with out asking and with out exhibiting something however the pointer. Boot it
solely with the disk to put in on: it replaces the system recordsdata of any
different Hobbit disk it finds.

  1. Put a duplicate of a Hobbit disk (or an overlay of 1) on SCSI ID 0, and a
    new disk picture on ID 1 (in Storage, the ID’s file panel has New
    disk picture…
    ; 120 MB works, the unique disks have 120 to 170 MB).
    Power on, kind /bin/format within the console, select the SCSI disk with
    ID 1, give the quantity a reputation, then 0 to depart. Power off.
  2. Take the Hobbit disk off ID 0 and put the brand new disk there as a substitute.
    Insert the installer floppy and energy on. After a couple of minute (the
    pointer is all you see), energy off and eject the floppy.
  3. Power on: the console comes up from the brand new disk. Type /Installer,
    click on Begin, then insert 1of7 (Media > Insert floppy…) and
    click on Continue, and so forth as much as 7of7. The Installer then
    uncompresses, verifies and extracts the archive (a couple of minutes), and
    Install finishes: “Installation full”. When it begins
    uncompressing, the console reveals VOLUME:/_install_/archive.Z: System Error 0: innocent, and an actual Hobbit did the identical (compress deletes
    the archive whereas it nonetheless has it open, which this file system
    refuses; the Installer removes it on the finish).
  4. Restart, and kind /system/browser & to begin the Browser.
  5. Optionally, run /Installer once more with replace.img as disk #1: Be’s
    replace of 28 November 1994 (a hard and fast storage_server and the Phone
    answering machine’s spoken prompts in /system/telephone, as on the “be”
    disk).

Each launch likes a machine of its personal (its boot ROM, its disks, possibly
the 133 MHz mannequin), so the machine is stored in a profile: all the pieces in
the preferences besides Keyboard & mouse and the LED look, plus the boot
ROM flash (with the boot ROM updates BeOS installs) and the NVRAM (with
the boot quantity). Machine > Profile lists the profiles to modify
between (a operating BeField restarts with the opposite one), and has New
profile…
(a duplicate of the present profile, underneath a reputation like “BeOS5 133
MHz” or “DR8 66 32 MB”), Rename and Delete. The standing line reveals
the present profile. Profiles are folders in
~/config/settings/BeField/Profiles/; the settings from earlier than profiles
turned the profile “Default”.

Release Boot ROM Boots from CD Installs to disk
DR6 (BeOS 1.1d6) unique 1.1d7 sure sure
DR7 (BeOS 1.1d7) unique 1.1d7 sure sure
DR8 unique 1.1d7 sure sure
Advanced Access PR2’s sure sure
Preview Release 1 PR2’s sure –
Preview Release 2 from its CD sure sure
R3 from its CD sure sure
R4.5 from its CD sure sure
R5.0.3 R3’s sure sure

“-” means not tried but. The DR8.2 picture is a Mac updater, and the R4 picture
is x86 solely. The boot ROM from the R3 CD works with each launch examined
right here, so one profile with it might probably run all of them.

DR6 predates the 1.1d7 boot ROM: BeField arms its kernel the PCI system
desk within the older format it expects. Install it because the CD says: boot the
CD, run the Installer from the dock, format the SCSI disk (“Format:” within the
left pop-up menu), then set up onto it and make it the startup disk.
DR6’s mouse driver strikes the pointer twice as far left and down as proper
and up (that’s DR6, not the emulation). The Developer Releases’ date
prints the 12 months as years since 1900 (126 for 2026).

  • While the window is lively, the keyboard belongs to the BeField. Click the
    display to seize the mouse; the host key, proper Control, releases
    it. Keyboard & mouse within the preferences picks one other host key and
    units the mouse velocity.
  • Game ports within the preferences connects host joysticks to the 4
    sticks (two per sport port, as with Y cables).
  • The standing line reveals the floppy, CD and onerous disk (with the disk
    exercise); click on the floppy to insert one.
  • Machine has the facility, reset and interrupt switches, and restarts with
    the boot menu or with kernel debug output on serial port 4 (that holds
    F1 at energy on, as on an actual BeField). Send Ctrl+Alt+Delete offers BeOS
    the keys Haiku retains for itself: BeOS R3 and later present their Team
    Monitor, and restart when it’s despatched once more.
  • The two processors run on two host cores when each are busy
    (Preferences > Advanced, on by default): as much as practically twice as quick,
    which the 133 MHz mannequin wants on slower computer systems. The standing line reveals
    the velocity in p.c of an actual BeField.
  • Tools > Serial console reveals a serial port linked to a console.
  • View reveals the display at precise or double dimension or fitted to the
    window, and reveals or hides the LEDs.

In Preferences > Network, activate the Ethernet card (port 300h, IRQ 5
by default, as Be’s software program expects). In BeOS’s Network preferences, add a
“Novell NE2000 suitable adapter (ISA)” with the identical port and IRQ, and
select DHCP (R4.5) or set IP 10.0.2.15, masks 255.255.255.0, gateway
10.0.2.2 and DNS 10.0.2.3 by hand. The host is 10.0.2.2 from the BeField.
Forwarded host ports (tcp:2121:21, tcp:2323:23) make companies
operating in BeOS reachable from the host.

In Preferences > Storage, make a SCSI ID a Shared folder and select
a Haiku folder. At energy on BeField copies the folder, with its attributes
(file sorts, icons), to a recent BFS quantity that BeOS mounts like every disk;
the releases with BFS (Advanced Access and later) can use it. When BeOS has
shut down (Be menu > Shut Down) and the BeField is powered off, BeOS’s adjustments
return to the folder: new and altered recordsdata, attributes, deletions. A file
modified on either side in the meantime retains the Haiku model, and BeOS’s is saved
subsequent to it as “NAME (BeField)”. If BeOS didn’t shut down cleanly, the quantity
is stored and given again to BeOS on the subsequent energy on, in order that it might probably restore
it first. As the entire folder is copied at each energy on, hold it small.

Hard disks are uncooked pictures or QCOW2 pictures, which solely take the area that
is written (skinny provisioning) and might be overlays of a backing picture.
bebox-img manages them, and reads recordsdata from BeOS volumes (BFS) and from
the Hobbit prototypes’ disks:

bebox-img create [-f raw|qcow2] [-b BACKING] FILE SIZE
bebox-img data FILE
bebox-img verify FILE
bebox-img convert [-O raw|qcow2] SOURCE DESTINATION
bebox-img ls IMAGE [PATH]
bebox-img attr IMAGE PATH
bebox-img extract IMAGE PATH OUTPUT

For instance
bebox-img extract "BeOS Release 3 PowerPC.iso" /beos/and many others/bebox_bootmain.picture r3.rom.

On a Hobbit disk, extract additionally copies entire directories (/ for the
entire disk) into a brand new folder, holding the recordsdata’ dates, and ls reveals
the recordsdata’ sorts and creators: bebox-img extract hobbit-930800009.img / pixels. No BeOS launch reads the Hobbit’s file system (DR6 to DR8 have
a later, incompatible model of it, the others BFS), so that is the way in which
to its recordsdata: extract them, then give the folder to a BFS launch as a
shared folder. The Hobbit’s applications don’t run on the
PowerPC; its sources, headers, textual content and photos are what is beneficial.

The machine window solutions hey:

hey BeField get Running of Window BeField          # additionally set ... to true/false
hey BeField get Speed of Window BeField            # p.c of actual time
hey BeField get LedLevels of Window BeField        # left, proper (0-15)
hey BeField get SerialLog 4 of Window BeField      # a console port's output
hey BeField set Floppy of Window BeField to /path/disk.img
hey BeField kind of Window BeField with textual content=ls    # sorts on the keyboard
hey BeField shot of Window BeField with path=/tmp/display.png

Also get Mips, get EmulatedTime, get DiskLed, get AudioStats (the
sound output’s counters: underruns are gaps), get Profiles, get Profile
and set Profile (switches, restarting a operating machine), and the
instructions
pwon, pwof, rset and cadl (Ctrl+Alt+Delete). Replies come after the
motion.

BeField [--profile NAME] [--rom-dir DIR] [--boot-rom IMAGE] [--model 66|133|hobbit] [--kernel FILE] [--ram MB] [--video s3|cirrus] [--scsiN-disk FILE] [--scsiN-cd FILE] [--scsiN-share FOLDER] [--ide0 FILE] [--floppy FILE] [--net] [--net-forward SPEC] [--power-on] units up the machine (the
settings are stored). --profile switches to a profile first, making it as a
copy of the present one if there may be none; the opposite choices change that
profile.

bebox-headless runs a machine and not using a window, for exams and debugging:
serial ports to recordsdata or TCP, scripted keys and mouse clicks, screenshots,
instruction traces, reminiscence dumps and watches. bebox-headless --help lists
the choices.

On Haiku (with haiku_devel, zlib_devel and libslirp_devel): make
builds the app;
bundle/build-package.sh builds the app and the instruments and creates the
bundle.

The emulator core is transportable C++17 and is examined on Linux:

  • make -C exams/linux verify: processor exams (towards qemu-ppc as an
    oracle), Hobbit processor exams, multiprocessor and system exams, QCOW2
    exams (towards qemu-img), underneath AddressSanitizer and
    UndefinedBehaviorSanitizer.
  • exams/boot-regression.sh: boots every BeOS launch headless (the media
    and put in disks go in work/) and the Hobbit disks (in Hobbit/),
    by throwaway overlays.
  • exams/vm-test.sh person@haiku-host: builds the app on a Haiku machine and
    drives it with hey.

design/ describes the {hardware} and the emulator’s design.

  • Claude Opus 5.5
  • John Rash

MIT, see LICENSE. The utility icon (art work/BeField.hvif) is by
zuMi, underneath the MIT License. The icons in art work/icons come from Haiku’s
icon set (MIT, Haiku, Inc.). The BeField ROMs and BeOS aren’t a part of this
challenge.



Source link