From eaa517b63be6b13244bc3e4cff44be73f98cb90b Mon Sep 17 00:00:00 2001
From: dingusdev <52434309+dingusdev@users.noreply.github.com>
Date: Mon, 1 Jul 2019 19:15:33 -0700
Subject: [PATCH] Add files via upload
The first attempt at uploading new files.
---
dingusppc.cbp | 71 ++
macioserial.cpp | 41 +
macioserial.h | 22 +
macscsi.c | 1 +
macscsi.cpp | 31 +
macscsi.h | 21 +
macswim3.cpp | 29 +
macswim3.h | 19 +
main.cpp | 859 +++++++++++++++
makefile | 50 +
mpc106.c | 1 +
mpc106.cpp | 164 +++
mpc106.h | 32 +
openpic.cpp | 34 +
openpic.h | 21 +
poweropcodes.cpp | 795 ++++++++++++++
ppcemumain.h | 762 ++++++++++++++
ppcfpopcodes.cpp | 679 ++++++++++++
ppcgekkoopcodes.cpp | 32 +
ppcmemory.cpp | 991 ++++++++++++++++++
ppcmemory.h | 42 +
ppcopcodes.cpp | 2411 +++++++++++++++++++++++++++++++++++++++++++
viacuda.cpp | 153 +++
viacuda.h | 48 +
24 files changed, 7309 insertions(+)
create mode 100644 dingusppc.cbp
create mode 100644 macioserial.cpp
create mode 100644 macioserial.h
create mode 100644 macscsi.c
create mode 100644 macscsi.cpp
create mode 100644 macscsi.h
create mode 100644 macswim3.cpp
create mode 100644 macswim3.h
create mode 100644 main.cpp
create mode 100644 makefile
create mode 100644 mpc106.c
create mode 100644 mpc106.cpp
create mode 100644 mpc106.h
create mode 100644 openpic.cpp
create mode 100644 openpic.h
create mode 100644 poweropcodes.cpp
create mode 100644 ppcemumain.h
create mode 100644 ppcfpopcodes.cpp
create mode 100644 ppcgekkoopcodes.cpp
create mode 100644 ppcmemory.cpp
create mode 100644 ppcmemory.h
create mode 100644 ppcopcodes.cpp
create mode 100644 viacuda.cpp
create mode 100644 viacuda.h
diff --git a/dingusppc.cbp b/dingusppc.cbp
new file mode 100644
index 0000000..f4bdcc7
--- /dev/null
+++ b/dingusppc.cbp
@@ -0,0 +1,71 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/macioserial.cpp b/macioserial.cpp
new file mode 100644
index 0000000..a3c7f1c
--- /dev/null
+++ b/macioserial.cpp
@@ -0,0 +1,41 @@
+//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;
+
+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;
+ }
+ machine_iocontrolmem_mem[mac_serial_address] = serial_read_byte;
+}
+void mac_serial_write(){
+ if (mac_serial_address >=0x3013020){
+ mac_serial_address -= 0x20;
+ }
+ serial_write_byte = machine_iocontrolmem_mem[mac_serial_address];
+}
diff --git a/macioserial.h b/macioserial.h
new file mode 100644
index 0000000..3ac8a4e
--- /dev/null
+++ b/macioserial.h
@@ -0,0 +1,22 @@
+//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.c b/macscsi.c
new file mode 100644
index 0000000..d3f5a12
--- /dev/null
+++ b/macscsi.c
@@ -0,0 +1 @@
+
diff --git a/macscsi.cpp b/macscsi.cpp
new file mode 100644
index 0000000..725f1dd
--- /dev/null
+++ b/macscsi.cpp
@@ -0,0 +1,31 @@
+//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
new file mode 100644
index 0000000..1293dfc
--- /dev/null
+++ b/macscsi.h
@@ -0,0 +1,21 @@
+//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
new file mode 100644
index 0000000..3c20060
--- /dev/null
+++ b/macswim3.cpp
@@ -0,0 +1,29 @@
+//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
new file mode 100644
index 0000000..68763de
--- /dev/null
+++ b/macswim3.h
@@ -0,0 +1,19 @@
+//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
new file mode 100644
index 0000000..58dd2ff
--- /dev/null
+++ b/main.cpp
@@ -0,0 +1,859 @@
+//DingusPPC - Prototype 5bf2
+//Written by divingkatae
+//(c)2018-20 (theweirdo)
+//Please ask for permission
+//if you want to distribute this.
+//(divingkatae#1017 on Discord)
+
+//The main runfile - main.cpp
+//This is where the magic begins
+
+#include
+#include