mirror of
https://github.com/FrancescoRigoni/Lib65816.git
synced 2025-04-11 21:37:07 +00:00
Removed SNES specific devices from SystemBus
This commit is contained in:
parent
c128c1cc82
commit
1a5385b2ee
@ -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
|
||||
|
@ -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);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user