qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4 00/24] q800: add support for booting MacOS Classic - part 1
@ 2023-06-21  8:53 Mark Cave-Ayland
  2023-06-21  8:53 ` [PATCH v4 01/24] q800: fix up minor spacing issues in hw_compat_q800 GlobalProperty array Mark Cave-Ayland
                   ` (25 more replies)
  0 siblings, 26 replies; 47+ messages in thread
From: Mark Cave-Ayland @ 2023-06-21  8:53 UTC (permalink / raw)
  To: laurent, qemu-devel

[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


Patches missing review tags: 8 (new)

v4:
- Rebase onto master
- Add R-B tags from Phil and Laurent
- Use qdev_realize() in patch 5 as suggested by Markus
- Add new patch 8 to switch q800-glue.c to use the DEFINE_TYPES macro
  as suggested by Phil

v3:
- Add R-B tags from Phil and Laurent
- Add missing headers in patches indicated by Phil
- Change patch 5 to use valid_cpu_types Machine class property and the cpu_type
  Machine property to initialise the CPU
- Remove osdep.h header from dp8393x.h in patch 13 noticed by Phil
- Change sysbus_realize_and_unref() to sysbus_realize() in patch 19
- Use memory_region_add_subregion() instead of sysbus_mmio_map() in patch 19

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 (24):
  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-glue.c: switch TypeInfo registration to use DEFINE_TYPES() macro
  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         | 249 +++++++++++++++++
 hw/m68k/q800.c              | 526 ++++++++++++++----------------------
 hw/misc/mac_via.c           |  13 +-
 hw/net/dp8393x.c            |  32 +--
 include/hw/m68k/q800-glue.h |  50 ++++
 include/hw/m68k/q800.h      |  66 +++++
 include/hw/net/dp8393x.h    |  60 ++++
 9 files changed, 635 insertions(+), 366 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



^ permalink raw reply	[flat|nested] 47+ messages in thread

end of thread, other threads:[~2023-06-25 22:20 UTC | newest]

Thread overview: 47+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-21  8:53 [PATCH v4 00/24] q800: add support for booting MacOS Classic - part 1 Mark Cave-Ayland
2023-06-21  8:53 ` [PATCH v4 01/24] q800: fix up minor spacing issues in hw_compat_q800 GlobalProperty array Mark Cave-Ayland
2023-06-21  8:53 ` [PATCH v4 02/24] q800: add missing space after parent object in GLUEState Mark Cave-Ayland
2023-06-21 11:41   ` BALATON Zoltan
2023-06-21 14:24     ` Mark Cave-Ayland
2023-06-21 16:12       ` BALATON Zoltan
2023-06-21  8:53 ` [PATCH v4 03/24] q800: introduce Q800MachineState Mark Cave-Ayland
2023-06-21 11:33   ` BALATON Zoltan
2023-06-21 14:14     ` Mark Cave-Ayland
2023-06-21 16:25       ` BALATON Zoltan
2023-06-21  8:53 ` [PATCH v4 04/24] q800: rename q800_init() to q800_machine_init() Mark Cave-Ayland
2023-06-21  8:53 ` [PATCH v4 05/24] q800: move CPU object into Q800MachineState Mark Cave-Ayland
2023-06-21 11:56   ` BALATON Zoltan
2023-06-21 14:28     ` Mark Cave-Ayland
2023-06-21 17:06       ` Laurent Vivier
2023-06-21 12:27   ` BALATON Zoltan
2023-06-21  8:53 ` [PATCH v4 06/24] q800: move ROM memory region to Q800MachineState Mark Cave-Ayland
2023-06-21  8:53 ` [PATCH v4 07/24] q800: move GLUE device into separate q800-glue.c file Mark Cave-Ayland
2023-06-21  9:46   ` Philippe Mathieu-Daudé
2023-06-21 14:09     ` Mark Cave-Ayland
2023-06-21 12:00   ` BALATON Zoltan
2023-06-21 14:30     ` Mark Cave-Ayland
2023-06-21 16:27       ` BALATON Zoltan
2023-06-21 16:34         ` BALATON Zoltan
2023-06-21  8:53 ` [PATCH v4 08/24] q800-glue.c: switch TypeInfo registration to use DEFINE_TYPES() macro Mark Cave-Ayland
2023-06-21  9:43   ` Philippe Mathieu-Daudé
2023-06-21  8:53 ` [PATCH v4 09/24] q800: move GLUE device to Q800MachineState Mark Cave-Ayland
2023-06-21  8:53 ` [PATCH v4 10/24] q800: introduce mac-io container memory region Mark Cave-Ayland
2023-06-21  8:53 ` [PATCH v4 11/24] q800: reimplement mac-io region aliasing using IO " Mark Cave-Ayland
2023-06-21  8:53 ` [PATCH v4 12/24] q800: move VIA1 device to Q800MachineState Mark Cave-Ayland
2023-06-21  8:53 ` [PATCH v4 13/24] q800: move VIA2 " Mark Cave-Ayland
2023-06-21  8:53 ` [PATCH v4 14/24] hw/net/dp8393x.c: move TYPE_DP8393X and dp8393xState into dp8393x.h Mark Cave-Ayland
2023-06-21  8:53 ` [PATCH v4 15/24] q800: move dp8393x device to Q800MachineState Mark Cave-Ayland
2023-06-21  8:53 ` [PATCH v4 16/24] q800: move ESCC " Mark Cave-Ayland
2023-06-21  8:53 ` [PATCH v4 17/24] q800: move escc_orgate " Mark Cave-Ayland
2023-06-21  8:53 ` [PATCH v4 18/24] q800: move ESP " Mark Cave-Ayland
2023-06-21  8:53 ` [PATCH v4 19/24] q800: move SWIM " Mark Cave-Ayland
2023-06-21  8:53 ` [PATCH v4 20/24] q800: move mac-nubus-bridge " Mark Cave-Ayland
2023-06-21  8:53 ` [PATCH v4 21/24] q800: don't access Nubus bus directly from the mac-nubus-bridge device Mark Cave-Ayland
2023-06-21  8:53 ` [PATCH v4 22/24] q800: move macfb device to Q800MachineState Mark Cave-Ayland
2023-06-21  8:53 ` [PATCH v4 23/24] mac_via: fix rtc command decoding from PRAM addresses 0x0 to 0xf Mark Cave-Ayland
2023-06-21  8:53 ` [PATCH v4 24/24] mac_via: fix rtc command decoding for the PRAM seconds registers Mark Cave-Ayland
2023-06-21  9:42 ` [PATCH v4 00/24] q800: add support for booting MacOS Classic - part 1 Philippe Mathieu-Daudé
2023-06-21 14:06   ` Mark Cave-Ayland
2023-06-22 10:07     ` Philippe Mathieu-Daudé
2023-06-25 22:18       ` Mark Cave-Ayland
2023-06-22  7:34 ` Laurent Vivier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).