From 1a5385b2ee7cf1adc6fe354e5c366f53fb77caba Mon Sep 17 00:00:00 2001 From: Francesco Rigoni Date: Mon, 5 Mar 2018 18:13:34 +0100 Subject: [PATCH] Removed SNES specific devices from SystemBus --- include/SystemBus.hpp | 15 --------------- src/SystemBus.cpp | 18 ------------------ 2 files changed, 33 deletions(-) diff --git a/include/SystemBus.hpp b/include/SystemBus.hpp index da489d0..d6c41b5 100644 --- a/include/SystemBus.hpp +++ b/include/SystemBus.hpp @@ -25,17 +25,8 @@ #include "SystemBusDevice.hpp" -#define PPU_APU_REGS_SIZE 0x200 -#define DSP_SUPERFX_REGS_SIZE 0x1000 -#define OLD_STYLE_JOYPAD_REGS_SIZE 0x100 -#define DMA_PPU2_REGS_SIZE 0x300 -#define CARTRIDGE_SRAM_SIZE 0x2000 - class SystemBus { public: - SystemBus(); - ~SystemBus(); - void registerDevice(SystemBusDevice *); void storeByte(const Address&, uint8_t); void storeTwoBytes(const Address&, uint16_t); @@ -46,12 +37,6 @@ class SystemBus { private: std::vector mDevices; - - uint8_t *mPpuApuRegs; - uint8_t *mDspSuperFxRegs; - uint8_t *mOldStyleJoypadRegs; - uint8_t *mDmaPpu2Regs; - uint8_t *mCartridgeSRam; }; #endif diff --git a/src/SystemBus.cpp b/src/SystemBus.cpp index 685cdf1..9b386b4 100644 --- a/src/SystemBus.cpp +++ b/src/SystemBus.cpp @@ -23,24 +23,6 @@ #define LOG_TAG "SystemBus" -SystemBus::SystemBus() { - mPpuApuRegs = new uint8_t[PPU_APU_REGS_SIZE]; - mDspSuperFxRegs = new uint8_t[DSP_SUPERFX_REGS_SIZE]; - mOldStyleJoypadRegs = new uint8_t[OLD_STYLE_JOYPAD_REGS_SIZE]; - mDmaPpu2Regs = new uint8_t[DMA_PPU2_REGS_SIZE]; - // TODO: allocate only if present on cartridge - mCartridgeSRam = new uint8_t[CARTRIDGE_SRAM_SIZE]; - -} - -SystemBus::~SystemBus() { - delete[] mPpuApuRegs; - delete[] mDspSuperFxRegs; - delete[] mOldStyleJoypadRegs; - delete[] mDmaPpu2Regs; - delete[] mCartridgeSRam; -} - void SystemBus::registerDevice(SystemBusDevice *device) { mDevices.push_back(device); }