mirror of
https://github.com/dingusdev/dingusppc.git
synced 2024-06-13 02:29:46 +00:00
Compare commits
No commits in common. "9a70c3bdb0b6d4c8199fe1bf7ee70a8ecfb14bef" and "14f75d834a370de5420b8d06f31a79a3abe8ced3" have entirely different histories.
9a70c3bdb0
...
14f75d834a
32
CREDITS.md
32
CREDITS.md
|
@ -1,32 +0,0 @@
|
|||
# DingusPPC
|
||||
|
||||
|
||||
## Developers
|
||||
|
||||
- divingkatae
|
||||
- maximumspatium
|
||||
- joevt
|
||||
- mihaip
|
||||
|
||||
## Building
|
||||
|
||||
- Waqar144
|
||||
- webspacecreations
|
||||
- leap0x7b
|
||||
- sdkmap
|
||||
|
||||
## Testing
|
||||
|
||||
- LagLifeYT
|
||||
|
||||
## Thanks
|
||||
|
||||
- 68kmla
|
||||
- AppleFritter
|
||||
- Archive.org
|
||||
- Bitsavers
|
||||
- Emaculation
|
||||
- GitHub
|
||||
- PenguinPPC
|
||||
- The developers of other PowerPC Mac emulators, past and present
|
||||
- All those preserving the software of 68k and PowerPC Macs
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
DingusPPC - The Experimental PowerPC Macintosh emulator
|
||||
Copyright (C) 2018-24 divingkatae and maximum
|
||||
Copyright (C) 2018-22 divingkatae and maximum
|
||||
(theweirdo) spatium
|
||||
|
||||
(Contact divingkatae#1017 or powermax#2286 on Discord for more info)
|
||||
|
@ -40,28 +40,14 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|||
|
||||
AthensClocks::AthensClocks(uint8_t dev_addr)
|
||||
{
|
||||
set_name("Athens");
|
||||
supports_types(HWCompType::I2C_DEV);
|
||||
|
||||
this->my_addr = dev_addr;
|
||||
|
||||
// This initialization is not prescribed
|
||||
// but let's set them to acceptable values anyway
|
||||
this->regs[AthensRegs::D2] = 2;
|
||||
this->regs[AthensRegs::N2] = 2;
|
||||
|
||||
// set P2_MUX2 on power up as follows:
|
||||
// - dot clock VCO is disabled
|
||||
// - dot clock = reference clock / 2
|
||||
// set up power on values
|
||||
this->regs[AthensRegs::P2_MUX2] = 0x62;
|
||||
}
|
||||
|
||||
AthensClocks::AthensClocks(uint8_t dev_addr, const float crystal_freq)
|
||||
: AthensClocks(dev_addr)
|
||||
{
|
||||
this->xtal_freq = crystal_freq;
|
||||
}
|
||||
|
||||
void AthensClocks::start_transaction()
|
||||
{
|
||||
this->pos = 0; // reset read/write position
|
||||
|
@ -69,7 +55,7 @@ void AthensClocks::start_transaction()
|
|||
|
||||
bool AthensClocks::send_subaddress(uint8_t sub_addr)
|
||||
{
|
||||
LOG_F(INFO, "%s: subaddress set to 0x%X", this->name.c_str(), sub_addr);
|
||||
LOG_F(INFO, "Athens: subaddress set to 0x%X", sub_addr);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -82,14 +68,16 @@ bool AthensClocks::send_byte(uint8_t data)
|
|||
break;
|
||||
case 1:
|
||||
if (this->reg_num >= ATHENS_NUM_REGS) {
|
||||
LOG_F(WARNING, "%s: invalid register number %d", this->name.c_str(),
|
||||
this->reg_num);
|
||||
LOG_F(WARNING, "Athens: invalid register number %d", this->reg_num);
|
||||
return false; // return NACK
|
||||
}
|
||||
this->regs[this->reg_num] = data;
|
||||
if (reg_num == 3) {
|
||||
LOG_F(INFO, "Athens: dot clock frequency set to %d Hz", get_dot_freq());
|
||||
}
|
||||
break;
|
||||
default:
|
||||
LOG_F(WARNING, "%s: too much data received!", this->name.c_str());
|
||||
LOG_F(WARNING, "Athens: too much data received!");
|
||||
return false; // return NACK
|
||||
}
|
||||
return true;
|
||||
|
@ -114,7 +102,7 @@ int AthensClocks::get_dot_freq()
|
|||
};
|
||||
|
||||
if (this->regs[AthensRegs::P2_MUX2] & 0xC0) {
|
||||
LOG_F(INFO, "%s: dot clock disabled", this->name.c_str());
|
||||
LOG_F(INFO, "Athens: dot clock disabled");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -126,31 +114,29 @@ int AthensClocks::get_dot_freq()
|
|||
int post_div = 1 << (3 - (this->regs[AthensRegs::P2_MUX2] & 3));
|
||||
|
||||
if (std::find(D2_commons.begin(), D2_commons.end(), d2) == D2_commons.end()) {
|
||||
LOG_F(WARNING, "%s: untested D2 value %d", this->name.c_str(), d2);
|
||||
LOG_F(WARNING, "Athens: untested D2 value %d", d2);
|
||||
}
|
||||
|
||||
if (std::find(N2_commons.begin(), N2_commons.end(), n2) == N2_commons.end()) {
|
||||
LOG_F(WARNING, "%s: untested N2 value %d", this->name.c_str(), d2);
|
||||
LOG_F(WARNING, "Athens: untested N2 value %d", d2);
|
||||
}
|
||||
|
||||
int mux = (this->regs[AthensRegs::P2_MUX2] >> 4) & 3;
|
||||
|
||||
switch (mux) {
|
||||
case 0: // clock source -> dot cock VCO
|
||||
out_freq = this->xtal_freq * ((float)n2 / (float)(d2 * post_div));
|
||||
out_freq = ATHENS_XTAL * ((float)n2 / (float)(d2 * post_div));
|
||||
break;
|
||||
case 1: // clock source -> system clock VCO
|
||||
LOG_F(WARNING, "%s: system clock VCO not supported yet!", this->name.c_str());
|
||||
LOG_F(WARNING, "Athens: system clock VCO not supported yet!");
|
||||
break;
|
||||
case 2: // clock source -> crystal frequency
|
||||
out_freq = this->xtal_freq / post_div;
|
||||
out_freq = ATHENS_XTAL / post_div;
|
||||
break;
|
||||
case 3:
|
||||
LOG_F(WARNING, "%s: attempt to use reserved Mux value!", this->name.c_str());
|
||||
LOG_F(WARNING, "Athens: attempt to use reserved Mux value!");
|
||||
break;
|
||||
}
|
||||
|
||||
LOG_F(INFO, "%s: dot clock frequency set to %f Hz", this->name.c_str(), out_freq);
|
||||
|
||||
return static_cast<int>(out_freq + 0.5f);
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
DingusPPC - The Experimental PowerPC Macintosh emulator
|
||||
Copyright (C) 2018-24 divingkatae and maximum
|
||||
Copyright (C) 2018-22 divingkatae and maximum
|
||||
(theweirdo) spatium
|
||||
|
||||
(Contact divingkatae#1017 or powermax#2286 on Discord for more info)
|
||||
|
@ -31,8 +31,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|||
|
||||
#define ATHENS_NUM_REGS 8
|
||||
|
||||
/** Default external crystal oscillator frequency. */
|
||||
constexpr auto ATHENS_XTAL = 31334400.0f;
|
||||
constexpr auto ATHENS_XTAL = 31334400.0f; // external crystal oscillator frequency
|
||||
|
||||
namespace AthensRegs {
|
||||
|
||||
|
@ -53,7 +52,6 @@ class AthensClocks : public I2CDevice, public HWComponent
|
|||
{
|
||||
public:
|
||||
AthensClocks(uint8_t dev_addr);
|
||||
AthensClocks(uint8_t dev_addr, const float crystal_freq);
|
||||
~AthensClocks() = default;
|
||||
|
||||
// I2CDevice methods
|
||||
|
@ -70,9 +68,8 @@ private:
|
|||
uint8_t my_addr = 0;
|
||||
uint8_t reg_num = 0;
|
||||
int pos = 0;
|
||||
float xtal_freq = ATHENS_XTAL;
|
||||
|
||||
uint8_t regs[ATHENS_NUM_REGS] = {};
|
||||
uint8_t regs[ATHENS_NUM_REGS];
|
||||
};
|
||||
|
||||
#endif // ATHENS_H
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
|
9
main.cpp
9
main.cpp
|
@ -53,11 +53,10 @@ void sigabrt_handler(int signum) {
|
|||
}
|
||||
|
||||
static string appDescription = string(
|
||||
"\nDingusPPC - Alpha 1 (5/10/2024) "
|
||||
"\nWritten by divingkatae, maximumspatium, "
|
||||
"\njoevt, mihaip, et. al. "
|
||||
"\n(c) 2018-2024 The DingusPPC Dev Team. "
|
||||
"\nThis is a build intended for testing. "
|
||||
"\nDingusPPC - Prototype 5bf5 (8/23/2020) "
|
||||
"\nWritten by divingkatae and maximumspatium "
|
||||
"\n(c) 2018-2020 The DingusPPC Dev Team. "
|
||||
"\nThis is not intended for general use. "
|
||||
"\nUse at your own discretion. "
|
||||
"\n"
|
||||
);
|
||||
|
|
0
zdocs/developers/get-inherited-property notes.txt → zdocs/get-inherited-property notes.txt
Normal file → Executable file
0
zdocs/developers/get-inherited-property notes.txt → zdocs/get-inherited-property notes.txt
Normal file → Executable file
|
@ -1,5 +1,3 @@
|
|||
The MESH is a SCSI controller used in Power Mac machines.
|
||||
|
||||
# Registers
|
||||
|
||||
| Register Name | Number |
|
|
@ -1,4 +1,4 @@
|
|||
The PowerPC is the main processor behind Power Macs. Currently, DingusPPC only implements the 32-bit variant.
|
||||
The PowerPC is the main processor behind Power Macs.
|
||||
|
||||
# General Notes
|
||||
|
|
@ -1,148 +0,0 @@
|
|||
# DingusPPC User Manual
|
||||
|
||||
## Implemented Features
|
||||
|
||||
* Interpreter (with 601, FPU, and MMU support)
|
||||
* IDE and SCSI
|
||||
* Floppy disk image reading (Raw, Disk Copy 4.2, WOZ v1 and v2)
|
||||
* ADB mouse and keyboard emulation
|
||||
* Some audio support
|
||||
* Basic video output support (i.e. ATI Rage, Control, Platinum)
|
||||
|
||||
## Known Working OSes
|
||||
|
||||
* Disk Tools (7.1.2 - 8.5)
|
||||
* Mac OS 7.1.2 - 9.2.2 (from CD)
|
||||
* Mac OS 7.5.3 - 9.2.2 (from Hard Disk)
|
||||
* OpenDarwin 6.6.2
|
||||
|
||||
## Windows
|
||||
|
||||
DingusPPC uses two windows when booted up; a command line window and a monitor window to display the machine.
|
||||
|
||||
## Commands
|
||||
|
||||
DingusPPC is operated using the command line interface. As such, we will list the commands as required.
|
||||
|
||||
```
|
||||
-r, --realtime
|
||||
```
|
||||
|
||||
Run the emulator in runtime (using the interpeter).
|
||||
|
||||
```
|
||||
-d, --debugger
|
||||
```
|
||||
|
||||
Enter the interactive debugger. The user may also enter the debugger at any point by pressing Control and C, when the command line window is selected.
|
||||
|
||||
```
|
||||
-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)
|
||||
|
||||
```
|
||||
list machines
|
||||
```
|
||||
|
||||
Shows the currently implemented machines within DingusPPC.
|
||||
|
||||
```
|
||||
list properties
|
||||
```
|
||||
|
||||
Shows the configurable properties, such as the selected disc image and the ram bank sizes.
|
||||
|
||||
### Properties
|
||||
|
||||
```
|
||||
rambank1_size X
|
||||
rambank2_size X
|
||||
rambank3_size X
|
||||
rambank4_size X
|
||||
```
|
||||
|
||||
Set the RAM sizes to use, with X being an integer of a power of 2 up to 256.
|
||||
|
||||
```
|
||||
fdd_img
|
||||
```
|
||||
|
||||
Set the floppy disk image
|
||||
|
||||
```
|
||||
hdd_img
|
||||
```
|
||||
|
||||
Set the hard disk image
|
||||
|
||||
```
|
||||
cdr_img
|
||||
```
|
||||
|
||||
Set the CD ROM image
|
||||
|
||||
```
|
||||
cpu
|
||||
```
|
||||
|
||||
Change which version of the PowerPC CPU to use
|
||||
|
||||
```
|
||||
emmo
|
||||
```
|
||||
|
||||
Access the factory tests
|
||||
|
||||
```
|
||||
serial_backend stdio
|
||||
serial_backend socket
|
||||
```
|
||||
|
||||
Change where the output of OpenFirmware is directed to, either to the command line (with stdio) or a Unix socket (unavailable in Windows builds). OpenFirmware 1.x outputs here by default.
|
||||
|
||||
## Accessing OpenFirmware
|
||||
|
||||
After booting from a PCI Power Mac ROM without any disk images, enter the debugger and change the NVRAM property `auto-boot?` to false. Quit of the emulator and boot it back up to access it.
|
||||
|
||||
## Supported machines
|
||||
|
||||
The machines that currently work the best are the Power Mac 6100, the Power Mac 7500, and the Power Mac G3.
|
||||
|
||||
Early implementations for the Power Mac G3 Blue and White and the Apple Pippin are also present.
|
||||
|
||||
## Debugger
|
||||
|
||||
The debugger can be used to not only see what code is being executed at a given moment, but also see what is stored in an NVRAM portion.
|
||||
|
||||
## Quirks
|
||||
### Mouse Grabbing
|
||||
|
||||
While the emulator window is in focus, press Control and G to access.
|
||||
|
||||
### CD ROM Images
|
||||
|
||||
Currently, ISO images are supported. However, support is not yet implemented for multi-mode CD images.
|
||||
|
||||
### Hard Disks
|
||||
|
||||
Because Sheepshaver, Basilisk II, and Mini vMac operate on raw disks, it is required to a program such as BlueSCSI to make their hard disk images work in an emulator like DingusPPC. This is because the Mac OS normally requires certain values in the hard disks that these emulators don't normally
|
||||
|
||||
### OS Support
|
||||
|
||||
Currently, the Power Mac 6100 cannot boot any OS image containing Mac OS 8.0 or newer.
|
||||
|
||||
### Currently Unimplemented Features
|
||||
|
||||
* JIT compiler
|
||||
* AltiVec
|
||||
* 3D acceleration support
|
||||
* Additional ADB and USB peripherals
|
||||
* Networking
|
Loading…
Reference in New Issue
Block a user