[PATCH v2 00/23] q800: add support for booting MacOS Classic - part 1

Mark Cave-Ayland posted 23 patches 10 months, 3 weeks ago
Failed in applying to current master (apply log)
Maintainers: Laurent Vivier <laurent@vivier.eu>, Jason Wang <jasowang@redhat.com>
There is a newer version of this series
MAINTAINERS                 |   3 +
hw/m68k/meson.build         |   2 +-
hw/m68k/q800-glue.c         | 252 ++++++++++++++++++
hw/m68k/q800.c              | 505 +++++++++++++-----------------------
hw/misc/mac_via.c           |  13 +-
hw/net/dp8393x.c            |  32 +--
include/hw/m68k/q800-glue.h |  50 ++++
include/hw/m68k/q800.h      |  62 +++++
include/hw/net/dp8393x.h    |  60 +++++
9 files changed, 619 insertions(+), 360 deletions(-)
create mode 100644 hw/m68k/q800-glue.c
create mode 100644 include/hw/m68k/q800-glue.h
create mode 100644 include/hw/m68k/q800.h
create mode 100644 include/hw/net/dp8393x.h
[PATCH v2 00/23] q800: add support for booting MacOS Classic - part 1
Posted by Mark Cave-Ayland 10 months, 3 weeks ago
[MCA: the original series has now been split into 2 separate parts based upon
Phil's comments re: QOM parenting for objects in Q800MachineState. Part 1
consists of the Q800MachineState patches along with QOM parenting fixes and
the 2 mac_via RTC patches.]

This series contains the remaining patches needed to allow QEMU's q800
machine to boot MacOS Classic when used in conjunction with a real
Quadra 800 ROM image. In fact with this series applied it is possible
to boot all of the following OSs:

  - MacOS 7.1 - 8.1, with or without virtual memory enabled
  - A/UX 3.0.1
  - NetBSD 9.3
  - Linux (via EMILE)

If you are ready to experience some 90s nostalgia then all you need is
to grab yourself a copy of the Quadra 800 ROM (checksum 0xf1acad13) and a
suitable install ISO as follows:

  # Prepare a PRAM image
  $ qemu-img create -f raw pram.img 256b

  # Launch QEMU with blank disk and install CDROM
  $ ./qemu-system-m68k \
      -M q800 \
      -m 128 \
      -bios Quadra800.rom \
      -drive file=pram.img,format=raw,if=mtd \
      -drive file=disk.img,media=disk,format=raw,if=none,id=hd \
      -device scsi-hd,scsi-id=0,drive=hd \
      -drive file=cdrom.iso,media=cdrom,if=none,id=cd \
      -device scsi-cd,scsi-id=3,drive=cd

And off you go! For more in-depth information about the installation process
I highly recommend the installation guide over at emaculation.com [1].
Compatibility is generally very good, and I'm pleased to report it is possible
to run one of the most popular productivity apps from the 90s [2].

I'd like to add a big thank you to all the people who have helped me work on
this series, including testing on real hardware, answering questions about
MacOS Classic internals and helping to diagnose and fix bugs in the 68k
emulation. In particular thanks go to Laurent Vivier, Finn Thain, Howard
Spoelstra, Volker Rümelin, Richard Henderson, Martin Husemann, Rin Okuyama,
Elliot Nunn, and SolraBizna.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>

[1] https://www.emaculation.com/doku.php/qemu
[2] https://www.youtube.com/watch?v=yI21gURQ1Ew


v2:
- Split series into 2 parts (this is part 1)
- Update QOM parenting for objects in Q800MachineState (Phil)
- Split GLUE device into separate glue.c and glue.h files
- Split TYPE_DP8393X and dp8393xState into dp8393x.h
- Add R-B tags from Laurent (where I still believe they are valid)


Mark Cave-Ayland (23):
  q800: fix up minor spacing issues in hw_compat_q800 GlobalProperty
    array
  q800: add missing space after parent object in GLUEState
  q800: introduce Q800MachineState
  q800: rename q800_init() to q800_machine_init()
  q800: move CPU object into Q800MachineState
  q800: move ROM memory region to Q800MachineState
  q800: move GLUE device into separate q800-glue.c file
  q800: move GLUE device to Q800MachineState
  q800: introduce mac-io container memory region
  q800: reimplement mac-io region aliasing using IO memory region
  q800: move VIA1 device to Q800MachineState
  q800: move VIA2 device to Q800MachineState
  hw/net/dp8393x.c: move TYPE_DP8393X and dp8393xState into dp8393x.h
  q800: move dp8393x device to Q800MachineState
  q800: move ESCC device to Q800MachineState
  q800: move escc_orgate device to Q800MachineState
  q800: move ESP device to Q800MachineState
  q800: move SWIM device to Q800MachineState
  q800: move mac-nubus-bridge device to Q800MachineState
  q800: don't access Nubus bus directly from the mac-nubus-bridge device
  q800: move macfb device to Q800MachineState
  mac_via: fix rtc command decoding from PRAM addresses 0x0 to 0xf
  mac_via: fix rtc command decoding for the PRAM seconds registers

 MAINTAINERS                 |   3 +
 hw/m68k/meson.build         |   2 +-
 hw/m68k/q800-glue.c         | 252 ++++++++++++++++++
 hw/m68k/q800.c              | 505 +++++++++++++-----------------------
 hw/misc/mac_via.c           |  13 +-
 hw/net/dp8393x.c            |  32 +--
 include/hw/m68k/q800-glue.h |  50 ++++
 include/hw/m68k/q800.h      |  62 +++++
 include/hw/net/dp8393x.h    |  60 +++++
 9 files changed, 619 insertions(+), 360 deletions(-)
 create mode 100644 hw/m68k/q800-glue.c
 create mode 100644 include/hw/m68k/q800-glue.h
 create mode 100644 include/hw/m68k/q800.h
 create mode 100644 include/hw/net/dp8393x.h

-- 
2.30.2