Removed SNES specific devices from SystemBus

This commit is contained in:
Francesco Rigoni 2018-03-05 18:13:34 +01:00
parent c128c1cc82
commit 1a5385b2ee
2 changed files with 0 additions and 33 deletions

View File

@ -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<SystemBusDevice *> mDevices;
uint8_t *mPpuApuRegs;
uint8_t *mDspSuperFxRegs;
uint8_t *mOldStyleJoypadRegs;
uint8_t *mDmaPpu2Regs;
uint8_t *mCartridgeSRam;
};
#endif

View File

@ -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);
}