mirror of
https://github.com/jpd002/Play-.git
synced 2025-04-28 13:47:57 +03:00
Remove hardcoded RAM size.
This commit is contained in:
parent
0f4ab46586
commit
b51dbf274f
9 changed files with 22 additions and 5 deletions
|
@ -1,5 +1,4 @@
|
|||
#ifndef _DEBUGGABLE_H_
|
||||
#define _DEBUGGABLE_H_
|
||||
#pragma once
|
||||
|
||||
#include "MIPS.h"
|
||||
#include "BiosDebugInfoProvider.h"
|
||||
|
@ -16,5 +15,3 @@ public:
|
|||
|
||||
CBiosDebugInfoProvider* biosDebugInfoProvider;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
@ -39,6 +39,11 @@ uint8* CPsfSubSystem::GetRam()
|
|||
return m_iop.m_ram;
|
||||
}
|
||||
|
||||
uint32 CPsfSubSystem::GetRamSize()
|
||||
{
|
||||
return PS2::IOP_RAM_SIZE;
|
||||
}
|
||||
|
||||
CSpuBase& CPsfSubSystem::GetSpuCore(unsigned int coreId)
|
||||
{
|
||||
if(coreId == 0)
|
||||
|
|
|
@ -14,6 +14,7 @@ namespace Iop
|
|||
void Reset() override;
|
||||
CMIPS& GetCpu() override;
|
||||
uint8* GetRam() override;
|
||||
uint32 GetRamSize() override;
|
||||
Iop::CSpuBase& GetSpuCore(unsigned int) override;
|
||||
|
||||
#ifdef DEBUGGER_INCLUDED
|
||||
|
|
|
@ -145,6 +145,11 @@ uint8* CPsfVm::GetRam()
|
|||
return m_subSystem->GetRam();
|
||||
}
|
||||
|
||||
uint32 CPsfVm::GetRamSize()
|
||||
{
|
||||
return m_subSystem->GetRamSize();
|
||||
}
|
||||
|
||||
CSpuBase& CPsfVm::GetSpuCore(unsigned int coreId)
|
||||
{
|
||||
return m_subSystem->GetSpuCore(coreId);
|
||||
|
|
|
@ -28,6 +28,7 @@ public:
|
|||
|
||||
CMIPS& GetCpu();
|
||||
uint8* GetRam();
|
||||
uint32 GetRamSize();
|
||||
Iop::CSpuBase& GetSpuCore(unsigned int);
|
||||
|
||||
void SetSubSystem(const PsfVmSubSystemPtr&);
|
||||
|
|
|
@ -15,6 +15,7 @@ public:
|
|||
virtual void Reset() = 0;
|
||||
virtual CMIPS& GetCpu() = 0;
|
||||
virtual uint8* GetRam() = 0;
|
||||
virtual uint32 GetRamSize() = 0;
|
||||
virtual Iop::CSpuBase& GetSpuCore(unsigned int) = 0;
|
||||
|
||||
virtual void Update(bool, CSoundHandler*) = 0;
|
||||
|
|
|
@ -69,6 +69,11 @@ uint8* CPsfSubSystem::GetRam()
|
|||
return m_ram;
|
||||
}
|
||||
|
||||
uint32 CPsfSubSystem::GetRamSize()
|
||||
{
|
||||
return m_ramSize;
|
||||
}
|
||||
|
||||
CPsfBios& CPsfSubSystem::GetBios()
|
||||
{
|
||||
return m_bios;
|
||||
|
|
|
@ -25,6 +25,7 @@ namespace Psp
|
|||
void Reset() override;
|
||||
CMIPS& GetCpu() override;
|
||||
uint8* GetRam() override;
|
||||
uint32 GetRamSize() override;
|
||||
Iop::CSpuBase& GetSpuCore(unsigned int) override;
|
||||
|
||||
#ifdef DEBUGGER_INCLUDED
|
||||
|
|
|
@ -41,8 +41,9 @@ DebuggerWindow::~DebuggerWindow()
|
|||
void DebuggerWindow::Reset()
|
||||
{
|
||||
auto debugInfo = m_virtualMachine.GetDebugInfo();
|
||||
uint32 ramSize = m_virtualMachine.GetRamSize();
|
||||
m_debugView = std::make_unique<CDebugView>(this, ui->mdiArea, m_virtualMachine, &debugInfo.GetCpu(),
|
||||
debugInfo.Step, debugInfo.biosDebugInfoProvider, "CPU", 0x400000);
|
||||
debugInfo.Step, debugInfo.biosDebugInfoProvider, "CPU", ramSize);
|
||||
|
||||
m_findCallersRequestConnection = m_debugView->GetDisassemblyWindow()->FindCallersRequested.Connect(
|
||||
[&](uint32 address) { OnFindCallersRequested(address); });
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue