mirror of
https://github.com/zoriya/ComSquare.git
synced 2026-06-04 18:46:11 +00:00
Merge branch 'master' of https://github.com/AnonymusRaccoon/ComSquare into APU
This commit is contained in:
+1
-1
@@ -370,7 +370,7 @@ namespace ComSquare::APU
|
||||
explicit APU(std::shared_ptr<MemoryMap> &map);
|
||||
APU(const APU &) = default;
|
||||
APU &operator=(const APU &) = default;
|
||||
~APU() = default;
|
||||
~APU() override = default;
|
||||
|
||||
//! @brief Read from the internal APU register.
|
||||
//! @param addr The address to read from. The address 0x00 should refer to the first byte of the register.
|
||||
|
||||
@@ -685,6 +685,7 @@ namespace ComSquare::CPU
|
||||
CPU(const CPU &) = default;
|
||||
CPU &operator=(const CPU &) = delete;
|
||||
~CPU() override = default;
|
||||
|
||||
//! @brief This function continue to execute the Cartridge code.
|
||||
//! @return The number of CPU cycles that elapsed
|
||||
virtual unsigned update();
|
||||
|
||||
@@ -56,6 +56,8 @@ namespace ComSquare::Memory
|
||||
|
||||
void MemoryBus::mapComponents(SNES &console)
|
||||
{
|
||||
this->_memoryAccessors.clear();
|
||||
|
||||
// The WRam and PU registers are always mapped at the same address no matter the mapping mode.
|
||||
console.wram->setMemoryRegion(0x7E, 0x7F, 0x0000, 0xFFFF);
|
||||
this->_memoryAccessors.push_back(console.wram);
|
||||
|
||||
+8
-2
@@ -42,8 +42,10 @@ namespace ComSquare
|
||||
cpuDebug->focus();
|
||||
if (pause)
|
||||
cpuDebug->pause();
|
||||
} else
|
||||
} else {
|
||||
this->cpu = std::make_shared<Debugger::CPUDebug>(*this->cpu, *this);
|
||||
this->_bus->mapComponents(*this);
|
||||
}
|
||||
#else
|
||||
std::cerr << "Debugging features are not enabled. You can't enable the debugger." << std::endl;
|
||||
(void)pause;
|
||||
@@ -53,6 +55,7 @@ namespace ComSquare
|
||||
void SNES::disableCPUDebugging()
|
||||
{
|
||||
this->cpu = std::make_shared<CPU::CPU>(*this->cpu);
|
||||
this->_bus->mapComponents(*this);
|
||||
}
|
||||
|
||||
void SNES::enableRamViewer()
|
||||
@@ -94,8 +97,10 @@ namespace ComSquare
|
||||
#ifdef DEBUGGER_ENABLED
|
||||
if (this->apu->isDebugger())
|
||||
std::static_pointer_cast<Debugger::APUDebug>(this->apu)->focus();
|
||||
else
|
||||
else {
|
||||
this->apu = std::make_shared<Debugger::APUDebug>(*this->apu, *this);
|
||||
this->_bus->mapComponents(*this);
|
||||
}
|
||||
#else
|
||||
std::cerr << "Debugging features are not enabled. You can't enable the debugger." << std::endl;
|
||||
#endif
|
||||
@@ -104,6 +109,7 @@ namespace ComSquare
|
||||
void SNES::disableAPUDebugging()
|
||||
{
|
||||
this->apu = std::make_shared<APU::APU>(*this->apu);
|
||||
this->_bus->mapComponents(*this);
|
||||
}
|
||||
|
||||
void SNES::enableMemoryBusDebugging()
|
||||
|
||||
Reference in New Issue
Block a user