mirror of
https://github.com/dingusdev/dingusppc.git
synced 2024-06-10 13:29:42 +00:00
Move devices into dedicated subdirectories.
This commit is contained in:
parent
7919cd0590
commit
9329d56d83
|
@ -79,7 +79,8 @@ add_subdirectory(thirdparty/cubeb EXCLUDE_FROM_ALL)
|
||||||
|
|
||||||
set(CLI11_ROOT ${PROJECT_SOURCE_DIR}/thirdparty/CLI11)
|
set(CLI11_ROOT ${PROJECT_SOURCE_DIR}/thirdparty/CLI11)
|
||||||
|
|
||||||
include_directories("${PROJECT_SOURCE_DIR}" "${PROJECT_SOURCE_DIR}/devices"
|
include_directories("${PROJECT_SOURCE_DIR}"
|
||||||
|
"${PROJECT_SOURCE_DIR}/devices"
|
||||||
"${PROJECT_SOURCE_DIR}/cpu/ppc"
|
"${PROJECT_SOURCE_DIR}/cpu/ppc"
|
||||||
"${PROJECT_SOURCE_DIR}/debugger"
|
"${PROJECT_SOURCE_DIR}/debugger"
|
||||||
"${PROJECT_SOURCE_DIR}/utils"
|
"${PROJECT_SOURCE_DIR}/utils"
|
||||||
|
|
|
@ -22,8 +22,9 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
#ifndef PPCEMU_H
|
#ifndef PPCEMU_H
|
||||||
#define PPCEMU_H
|
#define PPCEMU_H
|
||||||
|
|
||||||
#include "devices/memctrlbase.h"
|
#include <devices/memctrl/memctrlbase.h>
|
||||||
#include "endianswap.h"
|
#include <endianswap.h>
|
||||||
|
|
||||||
#include <cinttypes>
|
#include <cinttypes>
|
||||||
#include <functional>
|
#include <functional>
|
||||||
#include <setjmp.h>
|
#include <setjmp.h>
|
||||||
|
@ -213,7 +214,7 @@ enum CRx_bit : uint32_t {
|
||||||
};
|
};
|
||||||
|
|
||||||
enum CR1_bit : uint32_t {
|
enum CR1_bit : uint32_t {
|
||||||
CR1_OX = 24,
|
CR1_OX = 24,
|
||||||
CR1_VX,
|
CR1_VX,
|
||||||
CR1_FEX,
|
CR1_FEX,
|
||||||
CR1_FX,
|
CR1_FX,
|
||||||
|
@ -259,7 +260,7 @@ enum FPOP : int {
|
||||||
SUB = 0x14,
|
SUB = 0x14,
|
||||||
ADD = 0x15,
|
ADD = 0x15,
|
||||||
MUL = 0x19,
|
MUL = 0x19,
|
||||||
FMSUB = 0x1C,
|
FMSUB = 0x1C,
|
||||||
FMADD = 0x1D,
|
FMADD = 0x1D,
|
||||||
FNMSUB = 0x1E,
|
FNMSUB = 0x1E,
|
||||||
FNMADD = 0x1F,
|
FNMADD = 0x1F,
|
||||||
|
|
|
@ -21,10 +21,11 @@ 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 "ppcmmu.h"
|
#include <devices/memctrl/memctrlbase.h>
|
||||||
#include "devices/memctrlbase.h"
|
#include <memaccess.h>
|
||||||
#include "memaccess.h"
|
|
||||||
#include "ppcemu.h"
|
#include "ppcemu.h"
|
||||||
|
#include "ppcmmu.h"
|
||||||
|
|
||||||
#include <array>
|
#include <array>
|
||||||
#include <cinttypes>
|
#include <cinttypes>
|
||||||
#include <functional>
|
#include <functional>
|
||||||
|
|
|
@ -24,11 +24,12 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
#ifndef PPCMMU_H
|
#ifndef PPCMMU_H
|
||||||
#define PPCMMU_H
|
#define PPCMMU_H
|
||||||
|
|
||||||
|
#include <devices/memctrl/memctrlbase.h>
|
||||||
|
|
||||||
#include <array>
|
#include <array>
|
||||||
#include <cinttypes>
|
#include <cinttypes>
|
||||||
#include <functional>
|
#include <functional>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include "devices/memctrlbase.h"
|
|
||||||
|
|
||||||
/* Uncomment this to exhaustive MMU integrity checks. */
|
/* Uncomment this to exhaustive MMU integrity checks. */
|
||||||
//#define MMU_INTEGRITY_CHECKS
|
//#define MMU_INTEGRITY_CHECKS
|
||||||
|
|
|
@ -2,7 +2,17 @@ include_directories("${PROJECT_SOURCE_DIR}"
|
||||||
"${PROJECT_SOURCE_DIR}/thirdparty/loguru/"
|
"${PROJECT_SOURCE_DIR}/thirdparty/loguru/"
|
||||||
"${PROJECT_SOURCE_DIR}/thirdparty/SDL2/")
|
"${PROJECT_SOURCE_DIR}/thirdparty/SDL2/")
|
||||||
|
|
||||||
file(GLOB SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/*.cpp")
|
file(GLOB SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/*.cpp"
|
||||||
|
"${CMAKE_CURRENT_SOURCE_DIR}/common/*.cpp"
|
||||||
|
"${CMAKE_CURRENT_SOURCE_DIR}/common/adb/*.cpp"
|
||||||
|
"${CMAKE_CURRENT_SOURCE_DIR}/common/i2c/*.cpp"
|
||||||
|
"${CMAKE_CURRENT_SOURCE_DIR}/common/pci/*.cpp"
|
||||||
|
"${CMAKE_CURRENT_SOURCE_DIR}/common/scsi/*.cpp"
|
||||||
|
"${CMAKE_CURRENT_SOURCE_DIR}/ioctrl/*.cpp"
|
||||||
|
"${CMAKE_CURRENT_SOURCE_DIR}/memctrl/*.cpp"
|
||||||
|
"${CMAKE_CURRENT_SOURCE_DIR}/sound/*.cpp"
|
||||||
|
"${CMAKE_CURRENT_SOURCE_DIR}/video/*.cpp"
|
||||||
|
)
|
||||||
|
|
||||||
add_library(devices OBJECT ${SOURCES})
|
add_library(devices OBJECT ${SOURCES})
|
||||||
target_link_libraries(devices PRIVATE cubeb)
|
target_link_libraries(devices PRIVATE cubeb)
|
||||||
|
|
|
@ -25,7 +25,9 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "devices/adb.h"
|
#include <devices/common/adb/adb.h>
|
||||||
|
#include <loguru.hpp>
|
||||||
|
|
||||||
#include <cinttypes>
|
#include <cinttypes>
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
|
|
||||||
|
@ -37,8 +39,6 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
#include <thirdparty/SDL2/include/SDL_stdinc.h>
|
#include <thirdparty/SDL2/include/SDL_stdinc.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <loguru.hpp>
|
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
ADB_Bus::ADB_Bus() {
|
ADB_Bus::ADB_Bus() {
|
|
@ -21,10 +21,11 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
/** @file Descriptor-based direct memory access emulation. */
|
/** @file Descriptor-based direct memory access emulation. */
|
||||||
|
|
||||||
#include "dmacore.h"
|
#include <cpu/ppc/ppcmmu.h>
|
||||||
#include "dbdma.h"
|
#include <devices/common/dbdma.h>
|
||||||
#include "cpu/ppc/ppcmmu.h"
|
#include <devices/common/dmacore.h>
|
||||||
#include "endianswap.h"
|
#include <endianswap.h>
|
||||||
|
|
||||||
#include <cinttypes>
|
#include <cinttypes>
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
#include <loguru.hpp>
|
#include <loguru.hpp>
|
|
@ -29,7 +29,8 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
#ifndef DB_DMA_H
|
#ifndef DB_DMA_H
|
||||||
#define DB_DMA_H
|
#define DB_DMA_H
|
||||||
|
|
||||||
#include "dmacore.h"
|
#include <devices/common/dmacore.h>
|
||||||
|
|
||||||
#include <cinttypes>
|
#include <cinttypes>
|
||||||
#include <functional>
|
#include <functional>
|
||||||
|
|
|
@ -22,8 +22,9 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
#ifndef MACHINE_ID_H
|
#ifndef MACHINE_ID_H
|
||||||
#define MACHINE_ID_H
|
#define MACHINE_ID_H
|
||||||
|
|
||||||
#include "hwcomponent.h"
|
#include <devices/common/hwcomponent.h>
|
||||||
#include "mmiodevice.h"
|
#include <devices/common/mmiodevice.h>
|
||||||
|
|
||||||
#include <cinttypes>
|
#include <cinttypes>
|
||||||
|
|
||||||
/**
|
/**
|
|
@ -22,7 +22,8 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
#ifndef MMIO_DEVICE_H
|
#ifndef MMIO_DEVICE_H
|
||||||
#define MMIO_DEVICE_H
|
#define MMIO_DEVICE_H
|
||||||
|
|
||||||
#include "hwcomponent.h"
|
#include <devices/common/hwcomponent.h>
|
||||||
|
|
||||||
#include <cinttypes>
|
#include <cinttypes>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
|
@ -19,7 +19,8 @@ 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 "nvram.h"
|
#include <devices/common/nvram.h>
|
||||||
|
|
||||||
#include <cinttypes>
|
#include <cinttypes>
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
#include <fstream>
|
#include <fstream>
|
|
@ -22,8 +22,9 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
#ifndef PCI_DEVICE_H
|
#ifndef PCI_DEVICE_H
|
||||||
#define PCI_DEVICE_H
|
#define PCI_DEVICE_H
|
||||||
|
|
||||||
#include "mmiodevice.h"
|
#include <devices/common/mmiodevice.h>
|
||||||
#include "pcihost.h"
|
#include <devices/common/pci/pcihost.h>
|
||||||
|
|
||||||
#include <cinttypes>
|
#include <cinttypes>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
|
@ -21,7 +21,8 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
/** @file MESH (Macintosh Enhanced SCSI Hardware) controller emulation. */
|
/** @file MESH (Macintosh Enhanced SCSI Hardware) controller emulation. */
|
||||||
|
|
||||||
#include "mesh.h"
|
#include <devices/common/scsi/mesh.h>
|
||||||
|
|
||||||
#include <cinttypes>
|
#include <cinttypes>
|
||||||
#include <loguru.hpp>
|
#include <loguru.hpp>
|
||||||
|
|
|
@ -24,11 +24,12 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
Author: Max Poliakovski 2019
|
Author: Max Poliakovski 2019
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "adb.h"
|
#include <devices/common/adb/adb.h>
|
||||||
#include "memaccess.h"
|
#include <devices/common/viacuda.h>
|
||||||
#include "viacuda.h"
|
|
||||||
#include <cinttypes>
|
|
||||||
#include <loguru.hpp>
|
#include <loguru.hpp>
|
||||||
|
#include <memaccess.h>
|
||||||
|
|
||||||
|
#include <cinttypes>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
|
@ -45,10 +45,11 @@ 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 "adb.h"
|
#include <devices/common/adb/adb.h>
|
||||||
#include "hwcomponent.h"
|
#include <devices/common/hwcomponent.h>
|
||||||
#include "i2c.h"
|
#include <devices/common/i2c/i2c.h>
|
||||||
#include "nvram.h"
|
#include <devices/common/nvram.h>
|
||||||
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
/** VIA register offsets. */
|
/** VIA register offsets. */
|
|
@ -24,12 +24,12 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
Author: Max Poliakovski
|
Author: Max Poliakovski
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "amic.h"
|
#include <cpu/ppc/ppcmmu.h>
|
||||||
#include "cpu/ppc/ppcmmu.h"
|
#include <devices/common/viacuda.h>
|
||||||
#include "dmacore.h"
|
#include <devices/ioctrl/amic.h>
|
||||||
#include "machines/machinebase.h"
|
#include <machines/machinebase.h>
|
||||||
#include "memctrlbase.h"
|
#include <devices/memctrl/memctrlbase.h>
|
||||||
#include "viacuda.h"
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <cinttypes>
|
#include <cinttypes>
|
||||||
#include <loguru.hpp>
|
#include <loguru.hpp>
|
|
@ -24,10 +24,10 @@ 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 "awacs.h"
|
#include <devices/common/mmiodevice.h>
|
||||||
#include "dmacore.h"
|
#include <devices/common/viacuda.h>
|
||||||
#include "mmiodevice.h"
|
#include <devices/sound/awacs.h>
|
||||||
#include "viacuda.h"
|
|
||||||
#include <cinttypes>
|
#include <cinttypes>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
|
@ -19,16 +19,17 @@ 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 "awacs.h"
|
#include <cpu/ppc/ppcemu.h>
|
||||||
#include "dbdma.h"
|
#include <devices/common/dbdma.h>
|
||||||
#include "machines/machinebase.h"
|
#include <devices/common/viacuda.h>
|
||||||
#include "macio.h"
|
#include <devices/ioctrl/macio.h>
|
||||||
#include "viacuda.h"
|
#include <devices/sound/awacs.h>
|
||||||
|
#include <machines/machinebase.h>
|
||||||
|
|
||||||
#include <cinttypes>
|
#include <cinttypes>
|
||||||
#include <functional>
|
#include <functional>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <loguru.hpp>
|
#include <loguru.hpp>
|
||||||
#include <cpu/ppc/ppcemu.h>
|
|
||||||
|
|
||||||
/** Heathrow Mac I/O device emulation.
|
/** Heathrow Mac I/O device emulation.
|
||||||
|
|
|
@ -51,16 +51,17 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
#ifndef MACIO_H
|
#ifndef MACIO_H
|
||||||
#define MACIO_H
|
#define MACIO_H
|
||||||
|
|
||||||
#include "awacs.h"
|
#include <devices/common/dbdma.h>
|
||||||
#include "dbdma.h"
|
#include <devices/common/hwcomponent.h>
|
||||||
#include "hwcomponent.h"
|
#include <devices/common/mmiodevice.h>
|
||||||
#include "memctrlbase.h"
|
#include <devices/common/nvram.h>
|
||||||
#include "mesh.h"
|
#include <devices/common/pci/pcidevice.h>
|
||||||
#include "mmiodevice.h"
|
#include <devices/common/pci/pcihost.h>
|
||||||
#include "nvram.h"
|
#include <devices/common/scsi/mesh.h>
|
||||||
#include "pcidevice.h"
|
#include <devices/common/viacuda.h>
|
||||||
#include "pcihost.h"
|
#include <devices/memctrl/memctrlbase.h>
|
||||||
#include "viacuda.h"
|
#include <devices/sound/awacs.h>
|
||||||
|
|
||||||
#include <cinttypes>
|
#include <cinttypes>
|
||||||
|
|
||||||
/**
|
/**
|
|
@ -24,7 +24,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
Author: Max Poliakovski
|
Author: Max Poliakovski
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "hmc.h"
|
#include <devices/memctrl/hmc.h>
|
||||||
|
|
||||||
HMC::HMC() : MemCtrlBase()
|
HMC::HMC() : MemCtrlBase()
|
||||||
{
|
{
|
|
@ -31,9 +31,10 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
#ifndef HMC_H
|
#ifndef HMC_H
|
||||||
#define HMC_H
|
#define HMC_H
|
||||||
|
|
||||||
#include "hwcomponent.h"
|
#include <devices/common/hwcomponent.h>
|
||||||
#include "memctrlbase.h"
|
#include <devices/common/mmiodevice.h>
|
||||||
#include "mmiodevice.h"
|
#include <devices/memctrl/memctrlbase.h>
|
||||||
|
|
||||||
#include <cinttypes>
|
#include <cinttypes>
|
||||||
|
|
||||||
class HMC : public MemCtrlBase, public MMIODevice {
|
class HMC : public MemCtrlBase, public MMIODevice {
|
|
@ -19,13 +19,13 @@ 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 <devices/memctrl/memctrlbase.h>
|
||||||
|
|
||||||
#include <algorithm> // to shut up MSVC errors (:
|
#include <algorithm> // to shut up MSVC errors (:
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include "memctrlbase.h"
|
|
||||||
|
|
||||||
|
|
||||||
MemCtrlBase::~MemCtrlBase() {
|
MemCtrlBase::~MemCtrlBase() {
|
||||||
for (auto& entry : address_map) {
|
for (auto& entry : address_map) {
|
|
@ -22,7 +22,8 @@ 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 "mmiodevice.h"
|
#include <devices/common/mmiodevice.h>
|
||||||
|
|
||||||
#include <cinttypes>
|
#include <cinttypes>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
|
@ -24,17 +24,17 @@ 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/common/mmiodevice.h>
|
||||||
|
#include <devices/memctrl/memctrlbase.h>
|
||||||
|
#include <devices/memctrl/mpc106.h>
|
||||||
|
#include <memaccess.h>
|
||||||
|
|
||||||
#include <cinttypes>
|
#include <cinttypes>
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <loguru.hpp>
|
#include <loguru.hpp>
|
||||||
|
|
||||||
#include "hwcomponent.h"
|
|
||||||
#include "memctrlbase.h"
|
|
||||||
#include "memaccess.h"
|
|
||||||
#include "mmiodevice.h"
|
|
||||||
#include "mpc106.h"
|
|
||||||
|
|
||||||
|
|
||||||
MPC106::MPC106() : MemCtrlBase(), PCIDevice("Grackle PCI host bridge") {
|
MPC106::MPC106() : MemCtrlBase(), PCIDevice("Grackle PCI host bridge") {
|
||||||
this->name = "Grackle";
|
this->name = "Grackle";
|
|
@ -35,11 +35,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 "hwcomponent.h"
|
#include <devices/common/hwcomponent.h>
|
||||||
#include "memctrlbase.h"
|
#include <devices/common/mmiodevice.h>
|
||||||
#include "mmiodevice.h"
|
#include <devices/common/pci/pcidevice.h>
|
||||||
#include "pcidevice.h"
|
#include <devices/common/pci/pcihost.h>
|
||||||
#include "pcihost.h"
|
#include <devices/memctrl/memctrlbase.h>
|
||||||
|
|
||||||
#include <cinttypes>
|
#include <cinttypes>
|
||||||
#include <unordered_map>
|
#include <unordered_map>
|
||||||
|
|
|
@ -47,12 +47,13 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
#ifndef SPD_EEPROM_H
|
#ifndef SPD_EEPROM_H
|
||||||
#define SPD_EEPROM_H
|
#define SPD_EEPROM_H
|
||||||
|
|
||||||
#include "hwcomponent.h"
|
#include <devices/common/hwcomponent.h>
|
||||||
#include "i2c.h"
|
#include <devices/common/i2c/i2c.h>
|
||||||
|
#include <loguru.hpp>
|
||||||
|
|
||||||
#include <cinttypes>
|
#include <cinttypes>
|
||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <loguru.hpp>
|
|
||||||
|
|
||||||
enum RAMType : int { SDRAM = 4 };
|
enum RAMType : int { SDRAM = 4 };
|
||||||
|
|
|
@ -28,11 +28,12 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
Author: Max Poliakovski 2019-21
|
Author: Max Poliakovski 2019-21
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "awacs.h"
|
#include <devices/common/dbdma.h>
|
||||||
#include "dbdma.h"
|
#include <devices/sound/awacs.h>
|
||||||
#include "endianswap.h"
|
#include <devices/sound/soundserver.h>
|
||||||
#include "machines/machinebase.h"
|
#include <endianswap.h>
|
||||||
#include "soundserver.h"
|
#include <machines/machinebase.h>
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <loguru.hpp>
|
#include <loguru.hpp>
|
||||||
#include <memory>
|
#include <memory>
|
|
@ -28,10 +28,11 @@ 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 "dmacore.h"
|
#include <devices/common/dbdma.h>
|
||||||
#include "dbdma.h"
|
#include <devices/common/dmacore.h>
|
||||||
#include "i2c.h"
|
#include <devices/common/i2c/i2c.h>
|
||||||
#include "soundserver.h"
|
#include <devices/sound/soundserver.h>
|
||||||
|
|
||||||
#include <cinttypes>
|
#include <cinttypes>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
|
@ -19,9 +19,10 @@ 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 "dmacore.h"
|
#include <devices/common/dmacore.h>
|
||||||
#include "endianswap.h"
|
#include <devices/sound/soundserver.h>
|
||||||
#include "soundserver.h"
|
#include <endianswap.h>
|
||||||
|
|
||||||
#include <loguru.hpp>
|
#include <loguru.hpp>
|
||||||
#include <cubeb/cubeb.h>
|
#include <cubeb/cubeb.h>
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
|
@ -34,8 +34,8 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
#ifndef SOUND_SERVER_H
|
#ifndef SOUND_SERVER_H
|
||||||
#define SOUND_SERVER_H
|
#define SOUND_SERVER_H
|
||||||
|
|
||||||
#include "hwcomponent.h"
|
|
||||||
#include <cubeb/cubeb.h>
|
#include <cubeb/cubeb.h>
|
||||||
|
#include <devices/common/hwcomponent.h>
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
SND_SERVER_DOWN = 0,
|
SND_SERVER_DOWN = 0,
|
|
@ -19,15 +19,16 @@ 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 "displayid.h"
|
#include <devices/common/pci/pcidevice.h>
|
||||||
#include "endianswap.h"
|
#include <devices/video/atirage.h>
|
||||||
#include "memaccess.h"
|
#include <devices/video/displayid.h>
|
||||||
#include "pcidevice.h"
|
#include <endianswap.h>
|
||||||
#include <atirage.h>
|
#include <loguru.hpp>
|
||||||
|
#include <memaccess.h>
|
||||||
|
|
||||||
#include <chrono>
|
#include <chrono>
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <loguru.hpp>
|
|
||||||
|
|
||||||
/* Mach64 post dividers. */
|
/* Mach64 post dividers. */
|
||||||
static const int mach64_post_div[8] = {
|
static const int mach64_post_div[8] = {
|
|
@ -22,8 +22,9 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
#ifndef ATI_RAGE_H
|
#ifndef ATI_RAGE_H
|
||||||
#define ATI_RAGE_H
|
#define ATI_RAGE_H
|
||||||
|
|
||||||
#include "displayid.h"
|
#include <devices/common/pci/pcidevice.h>
|
||||||
#include "pcidevice.h"
|
#include <devices/video/displayid.h>
|
||||||
|
|
||||||
#include <cinttypes>
|
#include <cinttypes>
|
||||||
|
|
||||||
/* PCI related definitions. */
|
/* PCI related definitions. */
|
|
@ -19,9 +19,9 @@ 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 "displayid.h"
|
#include <devices/video/displayid.h>
|
||||||
#include <loguru.hpp>
|
#include <loguru.hpp>
|
||||||
#include "SDL.h"
|
#include <SDL.h>
|
||||||
|
|
||||||
DisplayID::DisplayID() {
|
DisplayID::DisplayID() {
|
||||||
/* Initialize Apple monitor codes */
|
/* Initialize Apple monitor codes */
|
|
@ -33,7 +33,8 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
#ifndef DISPLAY_ID_H
|
#ifndef DISPLAY_ID_H
|
||||||
#define DISPLAY_ID_H
|
#define DISPLAY_ID_H
|
||||||
|
|
||||||
#include "SDL.h"
|
#include <SDL.h>
|
||||||
|
|
||||||
#include <cinttypes>
|
#include <cinttypes>
|
||||||
|
|
||||||
/** I2C bus states. */
|
/** I2C bus states. */
|
|
@ -1,6 +1,7 @@
|
||||||
set(CMAKE_CXX_STANDARD 11)
|
set(CMAKE_CXX_STANDARD 11)
|
||||||
|
|
||||||
include_directories("${PROJECT_SOURCE_DIR}"
|
include_directories("${PROJECT_SOURCE_DIR}"
|
||||||
|
"${PROJECT_SOURCE_DIR}/devices"
|
||||||
"${PROJECT_SOURCE_DIR}/thirdparty/loguru/")
|
"${PROJECT_SOURCE_DIR}/thirdparty/loguru/")
|
||||||
|
|
||||||
file(GLOB SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/*.cpp")
|
file(GLOB SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/*.cpp")
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
#include "machinebase.h"
|
#include <devices/common/hwcomponent.h>
|
||||||
#include "devices/hwcomponent.h"
|
#include <loguru.hpp>
|
||||||
|
#include <machines/machinebase.h>
|
||||||
|
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <loguru.hpp>
|
|
||||||
|
|
||||||
std::unique_ptr<MachineBase> gMachineObj = 0;
|
std::unique_ptr<MachineBase> gMachineObj = 0;
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,8 @@ 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/hwcomponent.h"
|
#include <devices/common/hwcomponent.h>
|
||||||
|
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
|
@ -24,10 +24,12 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
Author: Max Poliakovski
|
Author: Max Poliakovski
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "machinefactory.h"
|
#include <devices/memctrl/memctrlbase.h>
|
||||||
#include "devices/memctrlbase.h"
|
#include <loguru.hpp>
|
||||||
#include "memaccess.h"
|
#include <machines/machinefactory.h>
|
||||||
#include "machineproperties.h"
|
#include <machines/machineproperties.h>
|
||||||
|
#include <memaccess.h>
|
||||||
|
|
||||||
#include <cinttypes>
|
#include <cinttypes>
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
|
@ -38,7 +40,6 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <loguru.hpp>
|
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,8 @@ 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 "machinebase.h"
|
#include <machines/machinebase.h>
|
||||||
|
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
|
|
|
@ -24,17 +24,17 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
Author: Max Poliakovski
|
Author: Max Poliakovski
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "cpu/ppc/ppcemu.h"
|
#include <cpu/ppc/ppcemu.h>
|
||||||
#include "devices/atirage.h"
|
#include <devices/common/machineid.h>
|
||||||
#include "devices/machineid.h"
|
#include <devices/ioctrl/macio.h>
|
||||||
#include "devices/soundserver.h"
|
#include <devices/memctrl/mpc106.h>
|
||||||
#include "devices/macio.h"
|
#include <devices/memctrl/spdram.h>
|
||||||
#include "devices/mpc106.h"
|
#include <devices/sound/soundserver.h>
|
||||||
#include "devices/spdram.h"
|
#include <devices/video/atirage.h>
|
||||||
#include "devices/viacuda.h"
|
|
||||||
#include "machinebase.h"
|
|
||||||
#include "machineproperties.h"
|
|
||||||
#include <loguru.hpp>
|
#include <loguru.hpp>
|
||||||
|
#include <machines/machinebase.h>
|
||||||
|
#include <machines/machineproperties.h>
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -24,14 +24,15 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
Author: Max Poliakovski
|
Author: Max Poliakovski
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "cpu/ppc/ppcemu.h"
|
#include <cpu/ppc/ppcemu.h>
|
||||||
#include "devices/amic.h"
|
#include <devices/common/machineid.h>
|
||||||
#include "devices/hmc.h"
|
#include <devices/ioctrl/amic.h>
|
||||||
#include "devices/machineid.h"
|
#include <devices/memctrl/hmc.h>
|
||||||
#include "devices/soundserver.h"
|
#include <devices/sound/soundserver.h>
|
||||||
#include "machinebase.h"
|
|
||||||
#include "machineproperties.h"
|
|
||||||
#include <loguru.hpp>
|
#include <loguru.hpp>
|
||||||
|
#include <machines/machinebase.h>
|
||||||
|
#include <machines/machineproperties.h>
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
int create_pdm(std::string& id) {
|
int create_pdm(std::string& id) {
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
#include "machineproperties.h"
|
#include <machines/machineproperties.h>
|
||||||
|
|
||||||
#include <map>
|
#include <map>
|
||||||
|
|
||||||
static std::map<std::string, StrProperty> PowerMac6100_Properties = {
|
static std::map<std::string, StrProperty> PowerMac6100_Properties = {
|
||||||
|
@ -36,4 +37,4 @@ static std::map<std::string, uint32_t> PPC_CPUs = {
|
||||||
static std::map<std::string, uint32_t> GFX_CARDs = {
|
static std::map<std::string, uint32_t> GFX_CARDs = {
|
||||||
{"ATI_Rage_Pro", 0x10024750},
|
{"ATI_Rage_Pro", 0x10024750},
|
||||||
{"ATI_Rage_128_Pro", 0x10025052}
|
{"ATI_Rage_128_Pro", 0x10025052}
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
#include "endianswap.h"
|
#include <endianswap.h>
|
||||||
#include <loguru.hpp>
|
#include <loguru.hpp>
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <cinttypes>
|
#include <cinttypes>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user