An experimental emulator
Go to file
Mihai Parparita f65f9b9845 Add a deterministic execution mode
Adds support for a --deterministic command-line option that makes
repeated runs the same:
- Keyboard and mouse input is ignored
- The sound server does a periodic pull from the DMA channel (so that
  it gets drained), but only does so via a periodic timer (instead of
  being driven by a cubeb callback, which could arrive at different
  times)
- Disk image writes are disabled (reads of a modified area still
  work via an in-memory copy)
- NVRAM writes are disabled
- The current time that ViaCuda initializes the guest OS is always the
  same.

This makes execution exactly the same each time, which should
make debugging of more subtle issues easier.

To validate that the deterministic mode is working, I've added a
periodic log of the current "time" (measured in cycle count), PC
and opcode. When comparing two runs with --log-no-uptime, the generated
log files are identical.
2024-11-09 22:48:06 -08:00
.github CI 2024-04-09 12:56:06 +03:00
benchmark Fix bench + test compilation (again) 2024-09-30 20:35:33 -07:00
cmake Make Emscripten build not depend on SDL2 or cubeb 2023-10-25 22:25:53 -07:00
core Add a deterministic execution mode 2024-11-09 22:48:06 -08:00
cpu/ppc Add a deterministic execution mode 2024-11-09 22:48:06 -08:00
debugger debugger: Erase prompt when repeating command. 2024-11-09 06:48:22 -07:00
devices Add a deterministic execution mode 2024-11-09 22:48:06 -08:00
machines machineyosemite: register stock hard drive. 2024-10-09 14:50:44 +02:00
thirdparty Fixes issue #97 2024-06-30 06:53:44 -07:00
utils Add a deterministic execution mode 2024-11-09 22:48:06 -08:00
zdocs Update documentation 2024-10-06 23:46:19 -07:00
.clang-format clang-format everything 2020-05-12 23:55:45 +05:00
.gitignore More clean-up 2024-09-15 18:31:36 -07:00
.gitmodules Add Capstone submodule. 2020-12-03 00:53:28 +01:00
CMakeLists.txt bench1: Add benchmark for ppc_exec. 2024-09-24 21:07:35 -07:00
CONTRIBUTING.md
CREDITS.md Floating-point fix-ups 2024-10-17 08:00:27 -07:00
dppcicon.ico
endianswap.h endianswap: Add parenthesis around macros. 2024-02-11 07:40:42 -07:00
icon.png Initial preparation for a release 2024-04-15 07:01:51 -07:00
icon.rc
LICENSE
main_sdl.cpp sdl: handle gamepad events 2024-10-06 23:28:05 -07:00
main_sdl.m Revert "Add a basic mouse grab mode when running on macOS" 2023-12-19 13:15:10 +01:00
main.cpp Add a deterministic execution mode 2024-11-09 22:48:06 -08:00
main.h Make Emscripten build not depend on SDL2 or cubeb 2023-10-25 22:25:53 -07:00
memaccess.h memaccess: Add addr type cast. 2024-04-09 21:19:04 -07:00
README.md README: Grammar. 2024-04-01 18:23:39 -07:00
vcpkg.json Manage Windows build dependencies with vcpkg. 2023-01-08 22:27:13 +01:00

DingusPPC

Written by divingkatae and maximumspatium

Be warned the program is highly unfinished and could use a lot of testing. Any feedback is welcome.

Philosophy of Use

While many other PowerPC emus exist (PearPC, Sheepshaver), none of them currently attempt emulation of PowerPC Macs accurately (except for QEMU).

This program aims to not only improve upon what Sheepshaver, PearPC, and other PowerPC Mac emulators have done, but also to provide a better debugging environment. This currently is designed to work best with PowerPC Old World ROMs, including those of the Power Mac 6100, 7200, and G3 Beige.

Implemented Features

This emulator has a debugging environment, complete with a disassembler. We also have implemented enough to allow Open Firmware to boot, going so far as to allow audio playback of the boot-up jingles.

How to Use

This program currently uses the command prompt to work.

There are a few command line arguments one must enter when starting the program.

-r, --realtime

Run the emulator in runtime.

-d, --debugger

Enter the interactive debugger.

-b, --bootrom TEXT:FILE

Specifies the Boot ROM path (optional; looks for bootrom.bin by default)

-m, --machine TEXT

Specify machine ID (optional; will attempt to determine machine ID from the boot rom otherwise)

As of now, the most complete machines are the Power Mac 6100 (SCSI emulation in progress) and the Power Mac G3 Beige (SCSI + ATA emulation in progress, No ATI Rage acceleration).

How to Compile

You need to install development tools first.

At least, a C++20 compliant compiler and CMake are required.

You will also have to recursive clone or run

git submodule update --init --recursive

This is because the CubeB, Capstone, and SDL2 modules are not included by default.

For SDL2, Linux users may also have to run:

sudo apt install libsdl2-dev

CLI11 and loguru are already included in the thirdparty folder and compiled along with the rest of DingusPPC.

For example, to build the project in a Unix-like environment, you will need to run the following commands in the OS terminal:

mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
make dingusppc

You may specify another build type using the variable CMAKE_BUILD_TYPE.

For Raspbian, you may also need the following command:

sudo apt install doxygen graphviz

Testing

DingusPPC includes a test suite for verifying the correctness of its PowerPC CPU emulation. To build the tests, use the following terminal commands:

mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release -DPPC_BUILD_PPC_TESTS=True ..
make testppc

Intended Minimum Requirements

  • Windows 7 or newer (64-bit), Linux 4.4 or newer, Mac OS X 10.9 or newer (64-bit)
  • Intel Core 2 Duo or better
  • 2 GB of RAM
  • 2 GB of Hard Disk Space
  • Graphics Card with a minimum resolution of 800*600

Compiler Requirements

  • Any C++20 compatible compiler