From 87d7ec9556a256cd217ae185613d4e7523fd8a47 Mon Sep 17 00:00:00 2001 From: Blue Date: Wed, 19 Jun 2019 18:16:20 +0200 Subject: [PATCH] Removed unused Device interface --- ProjectPSX/Devices/InterruptController.cs | 2 +- ProjectPSX/Devices/JOYPAD.cs | 6 +++--- ProjectPSX/Devices/TIMERS.cs | 10 +++------- 3 files changed, 7 insertions(+), 11 deletions(-) diff --git a/ProjectPSX/Devices/InterruptController.cs b/ProjectPSX/Devices/InterruptController.cs index 501dd6f..a5e654a 100644 --- a/ProjectPSX/Devices/InterruptController.cs +++ b/ProjectPSX/Devices/InterruptController.cs @@ -1,7 +1,7 @@ using System; namespace ProjectPSX.Devices { - public class InterruptController : Device { + public class InterruptController { private uint ISTAT; //IF Trigger that needs to be ack private uint IMASK; //IE Global Interrupt enable diff --git a/ProjectPSX/Devices/JOYPAD.cs b/ProjectPSX/Devices/JOYPAD.cs index 565653d..c82e4e6 100644 --- a/ProjectPSX/Devices/JOYPAD.cs +++ b/ProjectPSX/Devices/JOYPAD.cs @@ -4,7 +4,7 @@ using System.Collections.Generic; using System.Windows.Forms; namespace ProjectPSX { - internal class JOYPAD : Device { + internal class JOYPAD { private Queue JOY_TX_DATA = new Queue(8); //1F801040h JOY_TX_DATA(W) private Queue JOY_RX_DATA = new Queue(8); //1F801040h JOY_RX_DATA(R) FIFO @@ -76,7 +76,7 @@ namespace ProjectPSX { baudrateTimer = (int)(JOY_BAUD * baudrateReloadFactor) & ~0x1; } - public new void write(Width w, uint addr, uint value) { + public void write(Width w, uint addr, uint value) { switch (addr & 0xFF) { case 0x40: //Console.WriteLine("[JOYPAD] TX DATA ENQUEUE " + value.ToString("x2")); @@ -139,7 +139,7 @@ namespace ProjectPSX { clkOutputPolarity = ((value >> 8) & 0x1) != 0; } - public new uint load(Width w, uint addr) { + public uint load(Width w, uint addr) { switch (addr & 0xFF) { case 0x40: if (JOY_RX_DATA.Count == 0) { diff --git a/ProjectPSX/Devices/TIMERS.cs b/ProjectPSX/Devices/TIMERS.cs index 7521e68..314dded 100644 --- a/ProjectPSX/Devices/TIMERS.cs +++ b/ProjectPSX/Devices/TIMERS.cs @@ -1,7 +1,7 @@ using System; namespace ProjectPSX.Devices { - public class TIMERS : Device { + public class TIMERS { TIMER[] timer = new TIMER[3]; @@ -11,13 +11,13 @@ namespace ProjectPSX.Devices { timer[2] = new TIMER(); } - public new void write(Width w, uint addr, uint value) { + public void write(Width w, uint addr, uint value) { int timerNumber = (int)(addr & 0xF0) >> 4; timer[timerNumber].write(w, addr, value); //Console.WriteLine("[TIMER] Write on" + ((addr & 0xF0) >> 4).ToString("x8") + " Value " + value.ToString("x8")); } - public new uint load(Width w, uint addr) { + public uint load(Width w, uint addr) { int timerNumber = (int)(addr & 0xF0) >> 4; //Console.WriteLine("[TIMER] load on" + ((addr & 0xF0) >> 4).ToString("x8") + " Value " + timer[timerNumber].load(w, addr).ToString("x4")); return timer[timerNumber].load(w, addr); @@ -34,8 +34,6 @@ namespace ProjectPSX.Devices { private ushort counterValue; private uint counterTargetValue; - int counter2div8; - private byte syncEnable; private byte syncMode; private byte resetCounterOnTarget; @@ -162,8 +160,6 @@ namespace ProjectPSX.Devices { return false; } - /* -*/ } private void setCounterMode(uint value) {