diff --git a/davbus.cpp b/davbus.cpp deleted file mode 100644 index 86f13ea..0000000 --- a/davbus.cpp +++ /dev/null @@ -1,35 +0,0 @@ -//DingusPPC - Prototype 5bf2 -//Written by divingkatae -//(c)2018-20 (theweirdo) -//Please ask for permission -//if you want to distribute this. -//(divingkatae#1017 on Discord) - -//Functionality for the DAVBus (Sound Bus + Screamer?) - -#include -#include -#include -#include "ppcemumain.h" - -uint32_t davbus_address; -uint32_t davbus_write_word; -uint32_t davbus_read_word; - -void davbus_init(){ - -} - -void davbus_read(){ - davbus_read_word = (uint32_t)(machine_upperiocontrol_mem[davbus_address++]); - davbus_read_word = (uint32_t)((machine_upperiocontrol_mem[davbus_address++]) << 8); - davbus_read_word = (uint32_t)((machine_upperiocontrol_mem[davbus_address++]) << 16); - davbus_read_word = (uint32_t)((machine_upperiocontrol_mem[davbus_address]) << 24); -} - -void davbus_write(){ - machine_upperiocontrol_mem[davbus_address++] = (uint8_t)(davbus_write_word); - machine_upperiocontrol_mem[davbus_address++] = (uint8_t)((davbus_write_word) >> 8); - machine_upperiocontrol_mem[davbus_address++] = (uint8_t)((davbus_write_word) >> 16); - machine_upperiocontrol_mem[davbus_address] = (uint8_t)((davbus_write_word) >> 24); -} diff --git a/davbus.h b/davbus.h deleted file mode 100644 index 0f60a16..0000000 --- a/davbus.h +++ /dev/null @@ -1,22 +0,0 @@ -//DingusPPC - Prototype 5bf2 -//Written by divingkatae -//(c)2018-20 (theweirdo) -//Please ask for permission -//if you want to distribute this. -//(divingkatae#1017 on Discord) - -//Functionality for the DAVBus (Sound Bus + Screamer?) - -#ifndef DAVBUS_H_ -#define DAVBUS_H_ - -extern uint32_t davbus_address; -extern uint32_t davbus_write_word; -extern uint32_t davbus_read_word; - -extern void davbus_init(); -extern void davbus_read(); -extern void davbus_write(); - -#endif - diff --git a/macioserial.cpp b/macioserial.cpp deleted file mode 100644 index 5961ccd..0000000 --- a/macioserial.cpp +++ /dev/null @@ -1,102 +0,0 @@ -//DingusPPC - Prototype 5bf2 -//Written by divingkatae -//(c)2018-20 (theweirdo) -//Please ask for permission -//if you want to distribute this. -//(divingkatae#1017 on Discord) - -//Functionality for the Serial Ports -// Based on the Zilog Z8530 SCC chip - -#include -#include -#include "macioserial.h" -#include "ppcemumain.h" - -uint32_t mac_serial_address; -uint8_t serial_write_byte; -uint8_t serial_read_byte; - -bool w7_prime; - -void mac_serial_init(){ - machine_iocontrolmem_mem[0x3013004] = 0x04; - machine_iocontrolmem_mem[0x3013009] = 0xC0; - machine_iocontrolmem_mem[0x301300B] = 0x08; - machine_iocontrolmem_mem[0x301300E] = 0x30; - machine_iocontrolmem_mem[0x301300F] = 0xF8; - machine_iocontrolmem_mem[0x3013010] = 0x44; - machine_iocontrolmem_mem[0x3013011] = 0x06; -} - -void mac_serial_read(){ - if (mac_serial_address >=0x3013020){ - mac_serial_address -= 0x20; - } - - if (w7_prime){ - if (((machine_iocontrolmem_mem[0x301301F] >> 2) & 0x1) & ((machine_iocontrolmem_mem[0x3013007] >> 6) & 0x1)){ - switch(mac_serial_address){ - case 0x14: case 0x15: - serial_read_byte = machine_iocontrolmem_mem[(mac_serial_address - 0x10)]; - break; - case 0x19: - serial_read_byte = machine_iocontrolmem_mem[0x3]; - break; - case 0x1B: - serial_read_byte = machine_iocontrolmem_mem[0x10]; - break; - case 0x1E: - serial_read_byte = machine_iocontrolmem_mem[0x07]; - break; - default: - serial_read_byte = machine_iocontrolmem_mem[mac_serial_address]; - break; - } - } - } - else{ - if ((machine_iocontrolmem_mem[0x301300F] >> 2) & 0x1){ - switch(mac_serial_address){ - case 0x14: case 0x15: - serial_read_byte = machine_iocontrolmem_mem[(mac_serial_address - 4)]; - break; - case 0x19: case 0x1B: - serial_read_byte = machine_iocontrolmem_mem[(mac_serial_address + 4)]; - break; - default: - serial_read_byte = machine_iocontrolmem_mem[mac_serial_address]; - break; - } - } - else { - switch(mac_serial_address){ - case 0x14: case 0x15: case 0x16: case 0x17: - serial_read_byte = machine_iocontrolmem_mem[(mac_serial_address - 4)]; - case 0x19: case 0x1B: - serial_read_byte = machine_iocontrolmem_mem[(mac_serial_address + 4)]; - break; - default: - serial_read_byte = machine_iocontrolmem_mem[mac_serial_address]; - break; - } - } - } -} - -void mac_serial_write(){ - if (mac_serial_address >=0x3013020){ - mac_serial_address -= 0x20; - } - machine_iocontrolmem_mem[mac_serial_address] = serial_write_byte; - - if ((machine_iocontrolmem_mem[0x0F]) & 0x1){ - w7_prime = true; - } - else{ - w7_prime = false; - } - - machine_iocontrolmem_mem[(mac_serial_address + 0x10)] = machine_iocontrolmem_mem[mac_serial_address]; - -} diff --git a/macioserial.h b/macioserial.h deleted file mode 100644 index 3ac8a4e..0000000 --- a/macioserial.h +++ /dev/null @@ -1,22 +0,0 @@ -//DingusPPC - Prototype 5bf2 -//Written by divingkatae -//(c)2018-20 (theweirdo) -//Please ask for permission -//if you want to distribute this. -//(divingkatae#1017 on Discord) - -//Functionality for the Serial Ports -// Based on the Zilog Z8530 SCC chip - -#ifndef MAC_IO_SERIAL_H -#define MAC_IO_SERIAL_H - -extern uint32_t mac_serial_address; -extern uint8_t serial_write_byte; -extern uint8_t serial_read_byte; - -extern void mac_serial_init(); -extern void mac_serial_read(); -extern void mac_serial_write(); - -#endif diff --git a/macscsi.cpp b/macscsi.cpp deleted file mode 100644 index 725f1dd..0000000 --- a/macscsi.cpp +++ /dev/null @@ -1,31 +0,0 @@ -//DingusPPC - Prototype 5bf2 -//Written by divingkatae -//(c)2018-20 (theweirdo) -//Please ask for permission -//if you want to distribute this. -//(divingkatae#1017 on Discord) - -//Functionality for the SCSI - -#include -#include -#include -#include "ppcemumain.h" -#include "macscsi.h" - -uint32_t macscsi_address; -uint8_t macscsi_write_byte; -uint8_t macscsi_read_byte; - -void macscsi_init(){ - -} - -void macscsi_read(){ - -} - -void macscsi_write(){ - -} - diff --git a/macscsi.h b/macscsi.h deleted file mode 100644 index 1293dfc..0000000 --- a/macscsi.h +++ /dev/null @@ -1,21 +0,0 @@ -//DingusPPC - Prototype 5bf2 -//Written by divingkatae -//(c)2018-20 (theweirdo) -//Please ask for permission -//if you want to distribute this. -//(divingkatae#1017 on Discord) - -//Functionality for the SCSI - -#ifndef MACSCSI_H_ -#define MACSCSI_H_ - -extern uint32_t macscsi_address; -extern uint8_t macscsi_write_byte; -extern uint8_t macscsi_read_byte; - -extern void macscsi_init(); -extern void macscsi_read(); -extern void macscsi_write(); - -#endif diff --git a/macswim3.cpp b/macswim3.cpp deleted file mode 100644 index 3c20060..0000000 --- a/macswim3.cpp +++ /dev/null @@ -1,29 +0,0 @@ -//DingusPPC - Prototype 5bf2 -//Written by divingkatae -//(c)2018-20 (theweirdo) -//Please ask for permission -//if you want to distribute this. -//(divingkatae#1017 on Discord) - -//Functionality for the Swim 3 Floppy Drive - -#include -#include -#include "macswim3.h" -#include "ppcemumain.h" - -uint32_t mac_swim3_address; -uint8_t swim3_write_byte; -uint8_t swim3_read_byte; - -void mac_swim3_init(){ - machine_iocontrolmem_mem[0x3015C00] = 0xF0; -} - -void mac_swim3_read(){ - swim3_read_byte = machine_iocontrolmem_mem[mac_swim3_address]; -} - -void mac_swim3_write(){ - machine_iocontrolmem_mem[mac_swim3_address] = swim3_write_byte; -} diff --git a/macswim3.h b/macswim3.h deleted file mode 100644 index 68763de..0000000 --- a/macswim3.h +++ /dev/null @@ -1,19 +0,0 @@ -//DingusPPC - Prototype 5bf2 -//Written by divingkatae -//(c)2018-20 (theweirdo) -//Please ask for permission -//if you want to distribute this. -//(divingkatae#1017 on Discord) - -#ifndef MAC_SWIM3_H -#define MAC_SWIM3_H - -extern uint32_t mac_swim3_address; -extern uint8_t swim3_write_byte; -extern uint8_t swim3_read_byte; - -extern void mac_swim3_init(); -extern void mac_swim3_read(); -extern void mac_swim3_write(); - -#endif // MAC_IO_SERIAL_H diff --git a/main.cpp b/main.cpp index df342a1..4421166 100644 --- a/main.cpp +++ b/main.cpp @@ -19,8 +19,6 @@ #include #include #include "ppcemumain.h" -#include "macioserial.h" -#include "macswim3.h" #include "ppcmemory.h" #include "devices/mpc106.h" #include "openpic.h" diff --git a/ppcmemory.cpp b/ppcmemory.cpp index 8c8dc0b..a8b4970 100644 --- a/ppcmemory.cpp +++ b/ppcmemory.cpp @@ -14,15 +14,12 @@ #include #include #include -#include "macioserial.h" -#include "macswim3.h" #include "ppcemumain.h" #include "ppcmemory.h" #include "openpic.h" #include "devices/memctrlbase.h" #include "devices/mmiodevice.h" #include "devices/mpc106.h" -#include "davbus.h" std::vector pte_storage;