Remove device stubs (davbus, serial, SWIM etc).

This commit is contained in:
Maxim Poliakovski 2019-10-14 19:34:14 +02:00
parent ddb303c5c0
commit c5fa279ad4
10 changed files with 0 additions and 286 deletions

View File

@ -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 <iostream>
#include <cstring>
#include <cinttypes>
#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);
}

View File

@ -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

View File

@ -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 <iostream>
#include <cinttypes>
#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];
}

View File

@ -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

View File

@ -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 <iostream>
#include <cstring>
#include <cinttypes>
#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(){
}

View File

@ -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

View File

@ -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 <iostream>
#include <cinttypes>
#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;
}

View File

@ -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

View File

@ -19,8 +19,6 @@
#include <ctime>
#include <stdexcept>
#include "ppcemumain.h"
#include "macioserial.h"
#include "macswim3.h"
#include "ppcmemory.h"
#include "devices/mpc106.h"
#include "openpic.h"

View File

@ -14,15 +14,12 @@
#include <array>
#include <thread>
#include <atomic>
#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<uint32_t> pte_storage;