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