Compare commits

...

7 Commits

Author SHA1 Message Date
Maxim Poliakovski 9a70c3bdb0
Remove bogus atirage128.cpp 2024-04-15 17:17:04 +02:00
dingusdev 103ef6169c Continued expanding zdocs 2024-04-15 07:52:09 -07:00
dingusdev 1a165ff64c Update manual.md 2024-04-15 07:28:30 -07:00
dingusdev 8cbbb2ed50 Initial preparation for a release 2024-04-15 07:01:51 -07:00
Maxim Poliakovski 781d9b46da athens: allow setting custom XTAL frequency. 2024-04-15 14:38:46 +02:00
Maxim Poliakovski ffa221192d athens: use component's name in logging messages. 2024-04-15 14:21:08 +02:00
Maxim Poliakovski 751f964139 athens: clean up initialization. 2024-04-15 14:21:08 +02:00
24 changed files with 224 additions and 23 deletions

32
CREDITS.md Normal file
View File

@ -0,0 +1,32 @@
# 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

View File

@ -1,6 +1,6 @@
/*
DingusPPC - The Experimental PowerPC Macintosh emulator
Copyright (C) 2018-22 divingkatae and maximum
Copyright (C) 2018-24 divingkatae and maximum
(theweirdo) spatium
(Contact divingkatae#1017 or powermax#2286 on Discord for more info)
@ -40,14 +40,28 @@ 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;
// set up power on values
// 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
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
@ -55,7 +69,7 @@ void AthensClocks::start_transaction()
bool AthensClocks::send_subaddress(uint8_t sub_addr)
{
LOG_F(INFO, "Athens: subaddress set to 0x%X", sub_addr);
LOG_F(INFO, "%s: subaddress set to 0x%X", this->name.c_str(), sub_addr);
return true;
}
@ -68,16 +82,14 @@ bool AthensClocks::send_byte(uint8_t data)
break;
case 1:
if (this->reg_num >= ATHENS_NUM_REGS) {
LOG_F(WARNING, "Athens: invalid register number %d", this->reg_num);
LOG_F(WARNING, "%s: invalid register number %d", this->name.c_str(),
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, "Athens: too much data received!");
LOG_F(WARNING, "%s: too much data received!", this->name.c_str());
return false; // return NACK
}
return true;
@ -102,7 +114,7 @@ int AthensClocks::get_dot_freq()
};
if (this->regs[AthensRegs::P2_MUX2] & 0xC0) {
LOG_F(INFO, "Athens: dot clock disabled");
LOG_F(INFO, "%s: dot clock disabled", this->name.c_str());
return 0;
}
@ -114,29 +126,31 @@ 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, "Athens: untested D2 value %d", d2);
LOG_F(WARNING, "%s: untested D2 value %d", this->name.c_str(), d2);
}
if (std::find(N2_commons.begin(), N2_commons.end(), n2) == N2_commons.end()) {
LOG_F(WARNING, "Athens: untested N2 value %d", d2);
LOG_F(WARNING, "%s: untested N2 value %d", this->name.c_str(), d2);
}
int mux = (this->regs[AthensRegs::P2_MUX2] >> 4) & 3;
switch (mux) {
case 0: // clock source -> dot cock VCO
out_freq = ATHENS_XTAL * ((float)n2 / (float)(d2 * post_div));
out_freq = this->xtal_freq * ((float)n2 / (float)(d2 * post_div));
break;
case 1: // clock source -> system clock VCO
LOG_F(WARNING, "Athens: system clock VCO not supported yet!");
LOG_F(WARNING, "%s: system clock VCO not supported yet!", this->name.c_str());
break;
case 2: // clock source -> crystal frequency
out_freq = ATHENS_XTAL / post_div;
out_freq = this->xtal_freq / post_div;
break;
case 3:
LOG_F(WARNING, "Athens: attempt to use reserved Mux value!");
LOG_F(WARNING, "%s: attempt to use reserved Mux value!", this->name.c_str());
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);
}

View File

@ -1,6 +1,6 @@
/*
DingusPPC - The Experimental PowerPC Macintosh emulator
Copyright (C) 2018-22 divingkatae and maximum
Copyright (C) 2018-24 divingkatae and maximum
(theweirdo) spatium
(Contact divingkatae#1017 or powermax#2286 on Discord for more info)
@ -31,7 +31,8 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
#define ATHENS_NUM_REGS 8
constexpr auto ATHENS_XTAL = 31334400.0f; // external crystal oscillator frequency
/** Default external crystal oscillator frequency. */
constexpr auto ATHENS_XTAL = 31334400.0f;
namespace AthensRegs {
@ -52,6 +53,7 @@ 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
@ -68,8 +70,9 @@ 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

View File

@ -0,0 +1 @@

BIN
icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

View File

@ -53,10 +53,11 @@ void sigabrt_handler(int signum) {
}
static string appDescription = string(
"\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. "
"\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. "
"\nUse at your own discretion. "
"\n"
);

View File

@ -1,3 +1,5 @@
The MESH is a SCSI controller used in Power Mac machines.
# Registers
| Register Name | Number |

View File

@ -1,4 +1,4 @@
The PowerPC is the main processor behind Power Macs.
The PowerPC is the main processor behind Power Macs. Currently, DingusPPC only implements the 32-bit variant.
# General Notes

148
zdocs/users/manual.md Normal file
View File

@ -0,0 +1,148 @@
# 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