mirror of
https://github.com/dingusdev/dingusppc.git
synced 2024-12-23 21:29:28 +00:00
Remove device stubs (davbus, serial, SWIM etc).
This commit is contained in:
parent
ddb303c5c0
commit
c5fa279ad4
35
davbus.cpp
35
davbus.cpp
@ -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);
|
||||
}
|
22
davbus.h
22
davbus.h
@ -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
|
||||
|
102
macioserial.cpp
102
macioserial.cpp
@ -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];
|
||||
|
||||
}
|
@ -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
|
31
macscsi.cpp
31
macscsi.cpp
@ -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(){
|
||||
|
||||
}
|
||||
|
21
macscsi.h
21
macscsi.h
@ -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
|
29
macswim3.cpp
29
macswim3.cpp
@ -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;
|
||||
}
|
19
macswim3.h
19
macswim3.h
@ -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
|
2
main.cpp
2
main.cpp
@ -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"
|
||||
|
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user