mirror of
https://github.com/dingusdev/dingusppc.git
synced 2024-06-13 02:29:46 +00:00
commit
f019902f41
|
@ -20,8 +20,8 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|||
*/
|
||||
|
||||
#include <core/hostevents.h>
|
||||
#include <core/coresignal.h>
|
||||
#include <cpu/ppc/ppcemu.h>
|
||||
#include <loguru.hpp>
|
||||
#include <SDL.h>
|
||||
|
||||
EventManager* EventManager::event_manager;
|
||||
|
|
|
@ -25,7 +25,6 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|||
#include "timermanager.h"
|
||||
|
||||
#include <cinttypes>
|
||||
#include <memory>
|
||||
|
||||
TimerManager* TimerManager::timer_manager;
|
||||
|
||||
|
|
|
@ -24,13 +24,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|||
|
||||
#include "ppcemu.h"
|
||||
#include "ppcmmu.h"
|
||||
#include <array>
|
||||
#include <cmath>
|
||||
#include <iostream>
|
||||
#include <limits>
|
||||
#include <stdexcept>
|
||||
#include <stdio.h>
|
||||
#include <loguru.hpp>
|
||||
#include <stdint.h>
|
||||
|
||||
// Affects the XER register's SO and OV Bits
|
||||
|
||||
|
|
|
@ -25,14 +25,12 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|||
#include "ppcmmu.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <functional>
|
||||
#include <iostream>
|
||||
#include <map>
|
||||
#include <setjmp.h>
|
||||
#include <stdexcept>
|
||||
#include <stdio.h>
|
||||
#include <string>
|
||||
#include <unordered_map>
|
||||
|
||||
using namespace std;
|
||||
using namespace dppc_interpreter;
|
||||
|
|
|
@ -23,18 +23,10 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|||
|
||||
#include "ppcemu.h"
|
||||
#include "ppcmmu.h"
|
||||
#include <array>
|
||||
#include <cfenv>
|
||||
#include <cfloat>
|
||||
#include <stdlib.h>
|
||||
#include <cinttypes>
|
||||
#include <cmath>
|
||||
#include <iostream>
|
||||
#include <limits>
|
||||
#include <map>
|
||||
#include <stdexcept>
|
||||
#include <stdio.h>
|
||||
#include <unordered_map>
|
||||
#include <loguru.hpp>
|
||||
|
||||
// Used for FP calcs
|
||||
uint64_t ppc_result64_b;
|
||||
|
|
|
@ -22,13 +22,13 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|||
/** @file PowerPC Memory Management Unit emulation. */
|
||||
|
||||
#include <devices/memctrl/memctrlbase.h>
|
||||
#include <devices/common/mmiodevice.h>
|
||||
#include <memaccess.h>
|
||||
#include "ppcemu.h"
|
||||
#include "ppcmmu.h"
|
||||
|
||||
#include <array>
|
||||
#include <cinttypes>
|
||||
#include <functional>
|
||||
#include <loguru.hpp>
|
||||
#include <stdexcept>
|
||||
|
||||
|
|
|
@ -26,10 +26,10 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|||
|
||||
#include <devices/memctrl/memctrlbase.h>
|
||||
|
||||
#include <array>
|
||||
#include <cinttypes>
|
||||
#include <functional>
|
||||
#include <vector>
|
||||
|
||||
class MMIODevice;
|
||||
|
||||
/* Uncomment this to exhaustive MMU integrity checks. */
|
||||
//#define MMU_INTEGRITY_CHECKS
|
||||
|
|
|
@ -25,16 +25,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|||
#include <core/mathutils.h>
|
||||
#include "ppcemu.h"
|
||||
#include "ppcmmu.h"
|
||||
#include <array>
|
||||
#include <cinttypes>
|
||||
#include <cstring>
|
||||
#include <functional>
|
||||
#include <iostream>
|
||||
#include <stdexcept>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <loguru.hpp>
|
||||
#include <thread>
|
||||
#include <vector>
|
||||
|
||||
uint32_t crf_d;
|
||||
|
|
|
@ -26,10 +26,6 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|||
*/
|
||||
|
||||
#include <devices/common/adb/adb.h>
|
||||
#include <loguru.hpp>
|
||||
|
||||
#include <cinttypes>
|
||||
#include <cstring>
|
||||
|
||||
#if 0
|
||||
#include <thirdparty/SDL2/include/SDL.h>
|
||||
|
|
|
@ -22,6 +22,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|||
/** @file Apple Desktop Bus emulation. */
|
||||
|
||||
#include <devices/common/adb/adbbus.h>
|
||||
#include <devices/common/adb/adbdevice.h>
|
||||
#include <devices/deviceregistry.h>
|
||||
#include <loguru.hpp>
|
||||
|
||||
|
|
|
@ -24,7 +24,6 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|||
#ifndef ADB_BUS_H
|
||||
#define ADB_BUS_H
|
||||
|
||||
#include <devices/common/adb/adbdevice.h>
|
||||
#include <devices/common/hwcomponent.h>
|
||||
|
||||
#include <memory>
|
||||
|
|
|
@ -23,7 +23,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|||
|
||||
#include <core/timermanager.h>
|
||||
#include <devices/common/adb/adbdevice.h>
|
||||
#include <loguru.hpp>
|
||||
#include <devices/common/adb/adbbus.h>
|
||||
#include <machines/machinebase.h>
|
||||
|
||||
AdbDevice::AdbDevice(std::string name) {
|
||||
|
|
|
@ -24,11 +24,8 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|||
#ifndef ADB_DEVICE_H
|
||||
#define ADB_DEVICE_H
|
||||
|
||||
#include <devices/common/adb/adbbus.h>
|
||||
#include <devices/common/hwcomponent.h>
|
||||
|
||||
#include <cstring>
|
||||
#include <functional>
|
||||
#include <string>
|
||||
|
||||
/** Common ADB device addresses/types. */
|
||||
|
|
|
@ -22,7 +22,10 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|||
/** @file Apple Desktop Bus Keyboard emulation. */
|
||||
|
||||
#include <devices/common/adb/adbkeyboard.h>
|
||||
#include <devices/common/adb/adbbus.h>
|
||||
#include <devices/deviceregistry.h>
|
||||
#include <core/hostevents.h>
|
||||
#include <loguru.hpp>
|
||||
|
||||
AdbKeyboard::AdbKeyboard(std::string name) : AdbDevice(name) {
|
||||
EventManager::get_instance()->add_keyboard_handler(this, &AdbKeyboard::event_handler);
|
||||
|
|
|
@ -24,13 +24,14 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|||
#ifndef ADB_KEYBOARD_H
|
||||
#define ADB_KEYBOARD_H
|
||||
|
||||
#include <core/hostevents.h>
|
||||
#include <devices/common/adb/adbdevice.h>
|
||||
#include <devices/common/hwcomponent.h>
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
class KeyboardEvent;
|
||||
|
||||
class AdbKeyboard : public AdbDevice {
|
||||
public:
|
||||
AdbKeyboard(std::string name);
|
||||
|
|
|
@ -22,7 +22,10 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|||
/** @file Apple Desktop Bus Mouse emulation. */
|
||||
|
||||
#include <devices/common/adb/adbmouse.h>
|
||||
#include <devices/common/adb/adbbus.h>
|
||||
#include <devices/deviceregistry.h>
|
||||
#include <core/hostevents.h>
|
||||
#include <loguru.hpp>
|
||||
|
||||
AdbMouse::AdbMouse(std::string name) : AdbDevice(name) {
|
||||
EventManager::get_instance()->add_mouse_handler(this, &AdbMouse::event_handler);
|
||||
|
|
|
@ -24,13 +24,14 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|||
#ifndef ADB_MOUSE_H
|
||||
#define ADB_MOUSE_H
|
||||
|
||||
#include <core/hostevents.h>
|
||||
#include <devices/common/adb/adbdevice.h>
|
||||
#include <devices/common/hwcomponent.h>
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
class MouseEvent;
|
||||
|
||||
class AdbMouse : public AdbDevice {
|
||||
public:
|
||||
AdbMouse(std::string name);
|
||||
|
|
|
@ -23,7 +23,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|||
|
||||
#include <devices/common/ata/atabasedevice.h>
|
||||
#include <devices/common/ata/atadefs.h>
|
||||
#include <devices/deviceregistry.h>
|
||||
#include <devices/common/ata/idechannel.h>
|
||||
#include <loguru.hpp>
|
||||
|
||||
#include <cinttypes>
|
||||
|
|
|
@ -25,13 +25,14 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|||
#define ATA_BASE_DEVICE_H
|
||||
|
||||
#include <devices/common/ata/atadefs.h>
|
||||
#include <devices/common/ata/idechannel.h>
|
||||
#include <devices/common/hwcomponent.h>
|
||||
#include "endianswap.h"
|
||||
|
||||
#include <cinttypes>
|
||||
#include <string>
|
||||
|
||||
class IdeChannel;
|
||||
|
||||
class AtaBaseDevice : public HWComponent, public AtaInterface
|
||||
{
|
||||
public:
|
||||
|
|
|
@ -25,7 +25,6 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|||
#define ATAPI_BASE_DEVICE_H
|
||||
|
||||
#include <devices/common/ata/atabasedevice.h>
|
||||
#include <devices/common/ata/atadefs.h>
|
||||
|
||||
#include <cinttypes>
|
||||
#include <string>
|
||||
|
|
|
@ -23,6 +23,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|||
|
||||
#include <devices/common/ata/atadefs.h>
|
||||
#include <devices/common/ata/atapicdrom.h>
|
||||
#include <devices/common/ata/idechannel.h>
|
||||
#include <devices/common/scsi/scsi.h> // ATAPI CDROM reuses SCSI commands (sic!)
|
||||
#include <devices/deviceregistry.h>
|
||||
#include <machines/machinebase.h>
|
||||
|
|
|
@ -32,6 +32,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|||
#include <devices/common/hwcomponent.h>
|
||||
#include <devices/deviceregistry.h>
|
||||
#include <machines/machinebase.h>
|
||||
#include <loguru.hpp>
|
||||
|
||||
#include <cinttypes>
|
||||
#include <memory>
|
||||
|
|
|
@ -24,6 +24,8 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|||
#include <cpu/ppc/ppcmmu.h>
|
||||
#include <devices/common/dbdma.h>
|
||||
#include <devices/common/dmacore.h>
|
||||
#include <devices/common/hwinterrupt.h>
|
||||
#include <devices/common/mmiodevice.h>
|
||||
#include <endianswap.h>
|
||||
#include <memaccess.h>
|
||||
|
||||
|
|
|
@ -30,10 +30,10 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|||
#define DB_DMA_H
|
||||
|
||||
#include <devices/common/dmacore.h>
|
||||
#include <devices/common/hwinterrupt.h>
|
||||
|
||||
#include <cinttypes>
|
||||
#include <functional>
|
||||
|
||||
class InterruptCtrl;
|
||||
|
||||
/** DBDMA Channel registers offsets */
|
||||
enum DMAReg : uint32_t {
|
||||
|
|
|
@ -26,7 +26,6 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|||
|
||||
#include <cinttypes>
|
||||
#include <cstring>
|
||||
#include <memory>
|
||||
|
||||
I2CProm::I2CProm(uint8_t dev_addr, int size)
|
||||
{
|
||||
|
|
|
@ -26,7 +26,6 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|||
#include <cinttypes>
|
||||
#include <cstring>
|
||||
#include <fstream>
|
||||
#include <iostream>
|
||||
#include <loguru.hpp>
|
||||
|
||||
/** @file Non-volatile RAM implementation.
|
||||
|
|
|
@ -22,8 +22,8 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|||
/** Utilities for working with Apple Open Firmware and CHRP NVRAM partitions. */
|
||||
|
||||
#include <devices/common/ofnvram.h>
|
||||
#include <devices/common/nvram.h>
|
||||
#include <endianswap.h>
|
||||
#include <loguru.hpp>
|
||||
#include <machines/machinebase.h>
|
||||
#include <memaccess.h>
|
||||
|
||||
|
|
|
@ -24,15 +24,14 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|||
#ifndef OF_NVRAM_H
|
||||
#define OF_NVRAM_H
|
||||
|
||||
#include <devices/common/nvram.h>
|
||||
|
||||
#include <cinttypes>
|
||||
#include <map>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
class NVram;
|
||||
|
||||
/** ========== Apple Open Firmware 1.x/2.x partition definitions. ========== */
|
||||
#define OF_NVRAM_OFFSET 0x1800
|
||||
#define OF_NVRAM_SIG 0x1275
|
||||
|
|
|
@ -27,7 +27,6 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|||
#include <endianswap.h>
|
||||
#include <loguru.hpp>
|
||||
#include <machines/machinebase.h>
|
||||
#include <memaccess.h>
|
||||
|
||||
#include <cinttypes>
|
||||
|
||||
|
|
|
@ -124,7 +124,7 @@ public:
|
|||
|
||||
private:
|
||||
uint32_t base_addr;
|
||||
unique_ptr<BanditPciDevice> my_pci_device;
|
||||
std::unique_ptr<BanditPciDevice> my_pci_device;
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
@ -24,7 +24,6 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|||
#include <devices/common/hwcomponent.h>
|
||||
#include <devices/common/pci/dec21154.h>
|
||||
#include <devices/deviceregistry.h>
|
||||
#include <endianswap.h>
|
||||
#include <loguru.hpp>
|
||||
|
||||
#include <cinttypes>
|
||||
|
|
|
@ -20,7 +20,9 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|||
*/
|
||||
|
||||
#include <devices/common/pci/pcibridge.h>
|
||||
#include <memaccess.h>
|
||||
#include <devices/common/pci/pcidevice.h>
|
||||
#include <devices/common/pci/pcihost.h>
|
||||
#include <loguru.hpp>
|
||||
|
||||
PCIBridge::PCIBridge(std::string name) : PCIDevice(name)
|
||||
{
|
||||
|
|
|
@ -22,14 +22,11 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|||
#ifndef PCI_BRIDGE_H
|
||||
#define PCI_BRIDGE_H
|
||||
|
||||
#include <devices/deviceregistry.h>
|
||||
#include <devices/common/pci/pcidevice.h>
|
||||
#include <devices/common/pci/pcihost.h>
|
||||
|
||||
#include <cinttypes>
|
||||
#include <string>
|
||||
#include <unordered_map>
|
||||
#include <vector>
|
||||
|
||||
/** PCI configuration space registers offsets */
|
||||
enum {
|
||||
|
|
|
@ -20,9 +20,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|||
*/
|
||||
|
||||
#include <devices/common/pci/pcidevice.h>
|
||||
#include <endianswap.h>
|
||||
#include <loguru.hpp>
|
||||
#include <memaccess.h>
|
||||
|
||||
#include <cinttypes>
|
||||
#include <fstream>
|
||||
|
|
|
@ -22,6 +22,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|||
#include <devices/common/hwcomponent.h>
|
||||
#include <devices/common/pci/pcibridge.h>
|
||||
#include <devices/common/pci/pcihost.h>
|
||||
#include <devices/deviceregistry.h>
|
||||
#include <devices/memctrl/memctrlbase.h>
|
||||
#include <machines/machinebase.h>
|
||||
#include <endianswap.h>
|
||||
|
|
|
@ -23,10 +23,8 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|||
#define PCI_HOST_H
|
||||
|
||||
#include <core/bitops.h>
|
||||
#include <devices/deviceregistry.h>
|
||||
#include <endianswap.h>
|
||||
|
||||
#include <array>
|
||||
#include <cinttypes>
|
||||
#include <string>
|
||||
#include <unordered_map>
|
||||
|
|
|
@ -24,6 +24,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|||
#include <core/timermanager.h>
|
||||
#include <devices/common/hwinterrupt.h>
|
||||
#include <devices/common/scsi/mesh.h>
|
||||
#include <devices/common/scsi/scsi.h>
|
||||
#include <devices/deviceregistry.h>
|
||||
#include <loguru.hpp>
|
||||
#include <machines/machinebase.h>
|
||||
|
|
|
@ -25,12 +25,13 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|||
#define MESH_H
|
||||
|
||||
#include <devices/common/hwcomponent.h>
|
||||
#include <devices/common/hwinterrupt.h>
|
||||
#include <devices/common/scsi/scsi.h>
|
||||
|
||||
#include <cinttypes>
|
||||
#include <memory>
|
||||
|
||||
class InterruptCtrl;
|
||||
class ScsiBus;
|
||||
|
||||
// Chip ID returned by the MESH cell inside the Heathrow ASIC
|
||||
#define HeathrowMESHID 4
|
||||
|
||||
|
|
|
@ -22,6 +22,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|||
/** @file NCR53C94/Am53CF94 SCSI controller emulation. */
|
||||
|
||||
#include <core/timermanager.h>
|
||||
#include <devices/common/dmacore.h>
|
||||
#include <devices/common/hwcomponent.h>
|
||||
#include <devices/common/hwinterrupt.h>
|
||||
#include <devices/common/scsi/sc53c94.h>
|
||||
|
|
|
@ -29,13 +29,14 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|||
#ifndef SC_53C94_H
|
||||
#define SC_53C94_H
|
||||
|
||||
#include <devices/common/dmacore.h>
|
||||
#include <devices/common/scsi/scsi.h>
|
||||
#include <devices/common/hwinterrupt.h>
|
||||
|
||||
#include <cinttypes>
|
||||
#include <memory>
|
||||
|
||||
class DmaBidirChannel;
|
||||
class InterruptCtrl;
|
||||
|
||||
#define DATA_FIFO_MAX 16
|
||||
|
||||
/** 53C94 read registers */
|
||||
|
|
|
@ -30,7 +30,6 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|||
|
||||
#include <cinttypes>
|
||||
#include <cstring>
|
||||
#include <stdio.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
using namespace std;
|
||||
|
|
|
@ -25,13 +25,11 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|||
#include <devices/common/scsi/scsihd.h>
|
||||
#include <devices/deviceregistry.h>
|
||||
#include <loguru.hpp>
|
||||
#include <machines/machinebase.h>
|
||||
#include <machines/machineproperties.h>
|
||||
#include <memaccess.h>
|
||||
|
||||
#include <fstream>
|
||||
#include <cstring>
|
||||
#include <stdio.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
#define HDD_SECTOR_SIZE 512
|
||||
|
|
|
@ -29,7 +29,6 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|||
#include <cinttypes>
|
||||
#include <fstream>
|
||||
#include <memory>
|
||||
#include <stdio.h>
|
||||
#include <string>
|
||||
|
||||
class ScsiHardDisk : public ScsiDevice {
|
||||
|
|
|
@ -24,6 +24,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|||
|
||||
#include <core/hostevents.h>
|
||||
#include <core/timermanager.h>
|
||||
#include <devices/common/adb/adbbus.h>
|
||||
#include <devices/common/hwinterrupt.h>
|
||||
#include <devices/common/viacuda.h>
|
||||
#include <devices/deviceregistry.h>
|
||||
|
@ -32,7 +33,6 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|||
#include <memaccess.h>
|
||||
|
||||
#include <cinttypes>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
|
|
|
@ -43,14 +43,15 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|||
#ifndef VIACUDA_H
|
||||
#define VIACUDA_H
|
||||
|
||||
#include <devices/common/adb/adbbus.h>
|
||||
#include <devices/common/hwcomponent.h>
|
||||
#include <devices/common/hwinterrupt.h>
|
||||
#include <devices/common/i2c/i2c.h>
|
||||
#include <devices/common/nvram.h>
|
||||
|
||||
#include <memory>
|
||||
|
||||
class AdbBus;
|
||||
class InterruptCtrl;
|
||||
|
||||
#define VIA_CLOCK_HZ 783360
|
||||
|
||||
/** VIA register offsets. */
|
||||
|
|
|
@ -24,7 +24,6 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|||
#include <devices/deviceregistry.h>
|
||||
#include <devices/common/hwcomponent.h>
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
bool DeviceRegistry::add(const std::string name, DeviceDescription desc)
|
||||
|
|
|
@ -24,7 +24,6 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|||
#ifndef DEVICE_REGISTRY_H
|
||||
#define DEVICE_REGISTRY_H
|
||||
|
||||
#include <devices/common/hwcomponent.h>
|
||||
#include <machines/machineproperties.h>
|
||||
|
||||
#include <functional>
|
||||
|
@ -33,6 +32,8 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|||
#include <map>
|
||||
#include <vector>
|
||||
|
||||
class HWComponent;
|
||||
|
||||
typedef std::function<unique_ptr<HWComponent> ()> CreateFunc;
|
||||
|
||||
struct DeviceDescription {
|
||||
|
|
|
@ -27,7 +27,6 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|||
#include <loguru.hpp>
|
||||
|
||||
#include <cinttypes>
|
||||
#include <memory>
|
||||
|
||||
using namespace MacSuperdrive;
|
||||
|
||||
|
|
|
@ -23,6 +23,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|||
|
||||
#include <core/timermanager.h>
|
||||
#include <devices/deviceregistry.h>
|
||||
#include <devices/common/dmacore.h>
|
||||
#include <devices/common/hwinterrupt.h>
|
||||
#include <devices/floppy/superdrive.h>
|
||||
#include <devices/floppy/swim3.h>
|
||||
|
@ -31,7 +32,6 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|||
#include <machines/machineproperties.h>
|
||||
|
||||
#include <cinttypes>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
|
|
|
@ -24,14 +24,15 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|||
#ifndef SWIM3_H
|
||||
#define SWIM3_H
|
||||
|
||||
#include <devices/common/dmacore.h>
|
||||
#include <devices/common/hwcomponent.h>
|
||||
#include <devices/common/hwinterrupt.h>
|
||||
#include <devices/floppy/superdrive.h>
|
||||
|
||||
#include <cinttypes>
|
||||
#include <memory>
|
||||
|
||||
class DmaBidirChannel;
|
||||
class InterruptCtrl;
|
||||
|
||||
/** SWIM3 registers offsets. */
|
||||
namespace Swim3 {
|
||||
|
||||
|
|
|
@ -24,13 +24,9 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|||
#ifndef AMIC_H
|
||||
#define AMIC_H
|
||||
|
||||
#include <devices/common/dmacore.h>
|
||||
#include <devices/common/hwinterrupt.h>
|
||||
#include <devices/common/mmiodevice.h>
|
||||
#include <devices/common/scsi/sc53c94.h>
|
||||
#include <devices/common/viacuda.h>
|
||||
#include <devices/ethernet/mace.h>
|
||||
#include <devices/floppy/swim3.h>
|
||||
#include <devices/serial/escc.h>
|
||||
#include <devices/sound/awacs.h>
|
||||
#include <devices/video/displayid.h>
|
||||
#include <devices/video/pdmonboard.h>
|
||||
|
@ -38,6 +34,12 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|||
#include <cinttypes>
|
||||
#include <memory>
|
||||
|
||||
class EsccController;
|
||||
class MaceController;
|
||||
class Sc53C94;
|
||||
class ViaCuda;
|
||||
namespace Swim3 { class Swim3Ctrl; }
|
||||
|
||||
/** Interrupt related constants. */
|
||||
|
||||
/** CPU interrupt register bits. */
|
||||
|
|
|
@ -20,6 +20,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|||
*/
|
||||
|
||||
#include <cpu/ppc/ppcemu.h>
|
||||
#include <devices/deviceregistry.h>
|
||||
#include <devices/ioctrl/macio.h>
|
||||
#include <endianswap.h>
|
||||
#include <loguru.hpp>
|
||||
|
|
|
@ -20,6 +20,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|||
*/
|
||||
|
||||
#include <devices/memctrl/memctrlbase.h>
|
||||
#include <devices/common/mmiodevice.h>
|
||||
|
||||
#include <algorithm> // to shut up MSVC errors (:
|
||||
#include <cstring>
|
||||
|
|
|
@ -22,12 +22,12 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|||
#ifndef MEMORY_CONTROLLER_BASE_H
|
||||
#define MEMORY_CONTROLLER_BASE_H
|
||||
|
||||
#include <devices/common/mmiodevice.h>
|
||||
|
||||
#include <cinttypes>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
class MMIODevice;
|
||||
|
||||
// Common DRAM capacities.
|
||||
enum {
|
||||
DRAM_CAP_2MB = (1 << 21),
|
||||
|
|
|
@ -22,17 +22,14 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|||
/** MPC106 (Grackle) emulation. */
|
||||
|
||||
#include <devices/common/hwcomponent.h>
|
||||
#include <devices/common/mmiodevice.h>
|
||||
#include <devices/deviceregistry.h>
|
||||
#include <devices/memctrl/memctrlbase.h>
|
||||
#include <devices/memctrl/mpc106.h>
|
||||
#include <loguru.hpp>
|
||||
#include <memaccess.h>
|
||||
|
||||
#include <cinttypes>
|
||||
#include <cstring>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
MPC106::MPC106() : MemCtrlBase(), PCIDevice("Grackle"), PCIHost()
|
||||
{
|
||||
|
|
|
@ -34,14 +34,12 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|||
#ifndef MPC106_H
|
||||
#define MPC106_H
|
||||
|
||||
#include <devices/common/mmiodevice.h>
|
||||
#include <devices/common/pci/pcidevice.h>
|
||||
#include <devices/common/pci/pcihost.h>
|
||||
#include <devices/memctrl/memctrlbase.h>
|
||||
|
||||
#include <cinttypes>
|
||||
#include <memory>
|
||||
#include <unordered_map>
|
||||
|
||||
/** Grackle configuration space registers. */
|
||||
enum GrackleReg : uint32_t {
|
||||
|
|
|
@ -27,7 +27,6 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|||
#include <loguru.hpp>
|
||||
|
||||
#include <cinttypes>
|
||||
#include <memory>
|
||||
|
||||
using namespace Platinum;
|
||||
|
||||
|
|
|
@ -32,9 +32,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|||
#include <endianswap.h>
|
||||
#include <machines/machinebase.h>
|
||||
|
||||
#include <algorithm>
|
||||
#include <loguru.hpp>
|
||||
#include <memory>
|
||||
|
||||
AwacsBase::AwacsBase(std::string name)
|
||||
{
|
||||
|
|
|
@ -28,15 +28,16 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|||
#ifndef AWAC_H
|
||||
#define AWAC_H
|
||||
|
||||
#include <devices/common/dmacore.h>
|
||||
#include <devices/common/hwcomponent.h>
|
||||
#include <devices/common/i2c/i2c.h>
|
||||
#include <devices/sound/soundserver.h>
|
||||
|
||||
#include <cinttypes>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
class DmaOutChannel;
|
||||
class SoundServer;
|
||||
|
||||
/** Base class for the AWACs codecs. */
|
||||
class AwacsBase : public HWComponent {
|
||||
public:
|
||||
|
|
|
@ -27,7 +27,6 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|||
#include <devices/sound/burgundy.h>
|
||||
#include <endianswap.h>
|
||||
#include <loguru.hpp>
|
||||
#include <memaccess.h>
|
||||
|
||||
BurgundyCodec::BurgundyCodec(std::string name) : MacioSndCodec(name)
|
||||
{
|
||||
|
|
|
@ -22,9 +22,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|||
/** @file Block storage device implementation. */
|
||||
|
||||
#include <devices/storage/blockstoragedevice.h>
|
||||
#include <loguru.hpp>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
using namespace std;
|
||||
|
|
|
@ -25,7 +25,6 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|||
#define ATI_MACH64_GX_H
|
||||
|
||||
#include <devices/common/pci/pcidevice.h>
|
||||
#include <devices/video/atimach64defs.h>
|
||||
#include <devices/video/displayid.h>
|
||||
#include <devices/video/videoctrl.h>
|
||||
|
||||
|
|
|
@ -29,10 +29,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|||
#include <loguru.hpp>
|
||||
#include <memaccess.h>
|
||||
|
||||
#include <chrono>
|
||||
#include <cstdint>
|
||||
#include <map>
|
||||
#include <memory>
|
||||
|
||||
/* Mach64 post dividers. */
|
||||
static const int mach64_post_div[8] = {
|
||||
|
|
|
@ -24,11 +24,13 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|||
#ifndef PDM_ONBOARD_H
|
||||
#define PDM_ONBOARD_H
|
||||
|
||||
#include <devices/memctrl/hmc.h>
|
||||
#include <devices/video/videoctrl.h>
|
||||
|
||||
#include <cinttypes>
|
||||
|
||||
class HMC;
|
||||
class InterruptCtrl;
|
||||
|
||||
#define PDM_VMODE_OFF 0x1F
|
||||
|
||||
/** Max. size of our framebuffer in bytes (RGB 13-inch, 16 bpp) */
|
||||
|
|
|
@ -22,6 +22,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|||
/** @file Video Conroller base class implementation. */
|
||||
|
||||
#include <core/timermanager.h>
|
||||
#include <devices/common/hwinterrupt.h>
|
||||
#include <devices/video/videoctrl.h>
|
||||
#include <memaccess.h>
|
||||
|
||||
|
|
|
@ -24,13 +24,14 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|||
#ifndef VIDEO_CTRL_H
|
||||
#define VIDEO_CTRL_H
|
||||
|
||||
#include <core/hostevents.h>
|
||||
#include <devices/common/hwinterrupt.h>
|
||||
#include <devices/video/display.h>
|
||||
|
||||
#include <cinttypes>
|
||||
#include <functional>
|
||||
|
||||
class InterruptCtrl;
|
||||
class WindowEvent;
|
||||
|
||||
class VideoCtrlBase {
|
||||
public:
|
||||
VideoCtrlBase(int width = 640, int height = 480);
|
||||
|
|
|
@ -24,7 +24,6 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|||
#include <machines/machinebase.h>
|
||||
|
||||
#include <map>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
std::unique_ptr<MachineBase> gMachineObj = 0;
|
||||
|
|
|
@ -27,12 +27,13 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|||
#ifndef MACHINE_BASE_H
|
||||
#define MACHINE_BASE_H
|
||||
|
||||
#include <devices/common/hwcomponent.h>
|
||||
|
||||
#include <map>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
class HWComponent;
|
||||
enum HWCompType : uint64_t;
|
||||
|
||||
class MachineBase {
|
||||
public:
|
||||
MachineBase(std::string name);
|
||||
|
|
|
@ -22,15 +22,16 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|||
/** @file Constructs a Catalyst (Power Macintosh 7200) machine. */
|
||||
|
||||
#include <cpu/ppc/ppcemu.h>
|
||||
#include <devices/common/pci/bandit.h>
|
||||
#include <devices/ioctrl/macio.h>
|
||||
#include <devices/common/hwcomponent.h>
|
||||
#include <devices/common/pci/pcidevice.h>
|
||||
#include <devices/common/pci/pcihost.h>
|
||||
#include <devices/memctrl/platinum.h>
|
||||
#include <loguru.hpp>
|
||||
#include <machines/machinebase.h>
|
||||
#include <machines/machinefactory.h>
|
||||
#include <machines/machineproperties.h>
|
||||
#include <memctrl/memctrlbase.h>
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
int initialize_catalyst(std::string& id)
|
||||
|
|
|
@ -24,6 +24,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|||
Author: Max Poliakovski
|
||||
*/
|
||||
|
||||
#include <devices/common/hwcomponent.h>
|
||||
#include <devices/deviceregistry.h>
|
||||
#include <devices/memctrl/memctrlbase.h>
|
||||
#include <devices/sound/soundserver.h>
|
||||
|
@ -36,11 +37,10 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|||
#include <cinttypes>
|
||||
#include <cstring>
|
||||
#include <fstream>
|
||||
#include <functional>
|
||||
#include <tuple>
|
||||
#include <iostream>
|
||||
#include <iomanip>
|
||||
#include <map>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
|
|
|
@ -27,18 +27,16 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|||
#ifndef MACHINE_FACTORY_H
|
||||
#define MACHINE_FACTORY_H
|
||||
|
||||
#include <devices/deviceregistry.h>
|
||||
#include <machines/machinebase.h>
|
||||
#include <machines/machineproperties.h>
|
||||
|
||||
#include <fstream>
|
||||
#include <functional>
|
||||
#include <map>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
using namespace std;
|
||||
|
||||
struct DeviceDescription;
|
||||
|
||||
struct MachineDescription {
|
||||
string name;
|
||||
string description;
|
||||
|
|
|
@ -24,12 +24,15 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|||
*/
|
||||
|
||||
#include <cpu/ppc/ppcemu.h>
|
||||
#include <devices/common/hwcomponent.h>
|
||||
#include <devices/memctrl/psx.h>
|
||||
#include <devices/common/pci/pcidevice.h>
|
||||
#include <devices/common/pci/pcihost.h>
|
||||
#include <devices/ioctrl/macio.h>
|
||||
#include <machines/machinebase.h>
|
||||
#include <machines/machinefactory.h>
|
||||
#include <machines/machineproperties.h>
|
||||
#include <memctrl/memctrlbase.h>
|
||||
#include <loguru.hpp>
|
||||
|
||||
// TODO: move it to /cpu/ppc
|
||||
int get_cpu_pll_value(const uint64_t cpu_freq_hz) {
|
||||
|
|
|
@ -25,10 +25,11 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|||
*/
|
||||
|
||||
#include <cpu/ppc/ppcemu.h>
|
||||
#include <devices/common/hwcomponent.h>
|
||||
#include <devices/common/i2c/i2c.h>
|
||||
#include <devices/common/i2c/athens.h>
|
||||
#include <devices/common/i2c/i2cprom.h>
|
||||
#include <devices/common/machineid.h>
|
||||
#include <devices/ioctrl/macio.h>
|
||||
#include <devices/memctrl/mpc106.h>
|
||||
#include <devices/memctrl/spdram.h>
|
||||
#include <loguru.hpp>
|
||||
|
@ -37,7 +38,6 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|||
#include <machines/machineproperties.h>
|
||||
|
||||
#include <cinttypes>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
// Bit definitions for the Gossamer system register at 0xFF000004
|
||||
|
|
|
@ -25,7 +25,9 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|||
*/
|
||||
|
||||
#include <cpu/ppc/ppcemu.h>
|
||||
#include <devices/common/hwcomponent.h>
|
||||
#include <devices/common/machineid.h>
|
||||
#include <devices/common/mmiodevice.h>
|
||||
#include <devices/common/scsi/scsi.h>
|
||||
#include <devices/common/scsi/scsicdrom.h>
|
||||
#include <devices/common/scsi/scsihd.h>
|
||||
|
|
|
@ -20,8 +20,8 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|||
*/
|
||||
|
||||
#include "machineproperties.h"
|
||||
#include <loguru.hpp>
|
||||
|
||||
#include <algorithm>
|
||||
#include <cinttypes>
|
||||
#include <string>
|
||||
#include <sstream>
|
||||
|
|
|
@ -19,14 +19,12 @@ You should have received a copy of the GNU General Public License
|
|||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <loguru.hpp>
|
||||
|
||||
#include <cinttypes>
|
||||
#include <limits>
|
||||
#include <map>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <memory>
|
||||
|
||||
#ifndef MACHINE_PROPERTIES_H
|
||||
#define MACHINE_PROPERTIES_H
|
||||
|
|
|
@ -22,15 +22,14 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|||
/** @file Constructs a TNT (Power Macintosh 7500, 8500 etc) machine. */
|
||||
|
||||
#include <cpu/ppc/ppcemu.h>
|
||||
#include <devices/common/pci/bandit.h>
|
||||
#include <devices/ioctrl/macio.h>
|
||||
#include <devices/common/pci/pcihost.h>
|
||||
#include <devices/common/pci/pcidevice.h>
|
||||
#include <devices/memctrl/hammerhead.h>
|
||||
#include <loguru.hpp>
|
||||
#include <machines/machinebase.h>
|
||||
#include <machines/machinefactory.h>
|
||||
#include <machines/machineproperties.h>
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
int initialize_tnt(std::string& id)
|
||||
|
|
|
@ -25,6 +25,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|||
#include <devices/common/pci/dec21154.h>
|
||||
#include <devices/memctrl/mpc106.h>
|
||||
#include <devices/memctrl/spdram.h>
|
||||
#include <machines/machinebase.h>
|
||||
#include <machines/machinefactory.h>
|
||||
#include <machines/machineproperties.h>
|
||||
|
||||
|
|
5
main.cpp
5
main.cpp
|
@ -26,18 +26,15 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|||
#include <core/timermanager.h>
|
||||
#include <cpu/ppc/ppcemu.h>
|
||||
#include <debugger/debugger.h>
|
||||
#include <machines/machinebase.h>
|
||||
#include <machines/machinefactory.h>
|
||||
#include <machines/machineproperties.h>
|
||||
#include <utils/profiler.h>
|
||||
#include <main.h>
|
||||
|
||||
#include <cinttypes>
|
||||
#include <csignal>
|
||||
#include <cstring>
|
||||
#include <fstream>
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
#include <stdio.h>
|
||||
#include <CLI11.hpp>
|
||||
#include <loguru.hpp>
|
||||
|
||||
|
|
|
@ -21,7 +21,6 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|||
|
||||
#include "profiler.h"
|
||||
#include <iostream>
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
/** global profiler object */
|
||||
|
|
Loading…
Reference in New Issue
Block a user