mirror of https://github.com/PCSX2/pcsx2.git
Read EE threads from bios (thanks @gregory38)
This commit is contained in:
parent
5b14f7de64
commit
5f7a3a8ca9
|
@ -267,7 +267,8 @@ set(pcsx2DebugToolsSources
|
|||
DebugTools/DisR3000A.cpp
|
||||
DebugTools/DisR5900asm.cpp
|
||||
DebugTools/DisVU0Micro.cpp
|
||||
DebugTools/DisVU1Micro.cpp)
|
||||
DebugTools/DisVU1Micro.cpp
|
||||
DebugTools/BiosDebugData.cpp)
|
||||
|
||||
# DebugTools headers
|
||||
set(pcsx2DebugToolsHeaders
|
||||
|
@ -282,7 +283,8 @@ set(pcsx2DebugToolsHeaders
|
|||
DebugTools/Debug.h
|
||||
DebugTools/DisASm.h
|
||||
DebugTools/DisVUmicro.h
|
||||
DebugTools/DisVUops.h)
|
||||
DebugTools/DisVUops.h
|
||||
DebugTools/BiosDebugData.h)
|
||||
|
||||
# gui sources
|
||||
set(pcsx2GuiSources
|
||||
|
|
|
@ -0,0 +1,28 @@
|
|||
#include "PrecompiledHeader.h"
|
||||
#include "BiosDebugData.h"
|
||||
#include "../Memory.h"
|
||||
|
||||
std::vector<EEThread> getEEThreads()
|
||||
{
|
||||
std::vector<EEThread> threads;
|
||||
|
||||
if (CurrentBiosInformation == NULL)
|
||||
return threads;
|
||||
|
||||
u32 start = CurrentBiosInformation->threadListAddr & 0x3fffff;
|
||||
for (int tid = 0; tid < 256; tid++)
|
||||
{
|
||||
EEThread thread;
|
||||
|
||||
EEInternalThread* internal = (EEInternalThread*) PSM(start+tid*sizeof(EEInternalThread));
|
||||
if (internal->status != THS_BAD)
|
||||
{
|
||||
thread.tid = tid;
|
||||
thread.data = *internal;
|
||||
threads.push_back(thread);
|
||||
}
|
||||
}
|
||||
|
||||
return threads;
|
||||
}
|
||||
|
|
@ -0,0 +1,50 @@
|
|||
#pragma once
|
||||
#include "Pcsx2Types.h"
|
||||
#include "../ps2/BiosTools.h"
|
||||
|
||||
struct EEInternalThread { // internal struct
|
||||
u32 prev;
|
||||
u32 next;
|
||||
int status;
|
||||
u32 entry;
|
||||
u32 stack;
|
||||
u32 gpReg;
|
||||
short currentPriority;
|
||||
short initPriority;
|
||||
int waitType;
|
||||
int semaId;
|
||||
int wakeupCount;
|
||||
int attr;
|
||||
int option;
|
||||
u32 entry_init;
|
||||
int argc;
|
||||
u32 argstring;
|
||||
u32 stack_bottom; //FIXME
|
||||
int stackSize;
|
||||
u32 root;
|
||||
u32 heap_base;
|
||||
};
|
||||
|
||||
enum {
|
||||
THS_BAD = 0x00,
|
||||
THS_RUN = 0x01,
|
||||
THS_READY = 0x02,
|
||||
THS_WAIT = 0x04,
|
||||
THS_SUSPEND = 0x08,
|
||||
THS_WAIT_SUSPEND = 0x0C,
|
||||
THS_DORMANT = 0x10,
|
||||
};
|
||||
|
||||
enum {
|
||||
WAIT_NONE = 0,
|
||||
WAIT_WAKEUP_REQ = 1,
|
||||
WAIT_SEMA = 2,
|
||||
};
|
||||
|
||||
struct EEThread
|
||||
{
|
||||
u32 tid;
|
||||
EEInternalThread data;
|
||||
};
|
||||
|
||||
std::vector<EEThread> getEEThreads();
|
|
@ -426,6 +426,7 @@
|
|||
<ClCompile Include="..\..\DebugTools\Breakpoints.cpp" />
|
||||
<ClCompile Include="..\..\DebugTools\DebugInterface.cpp" />
|
||||
<ClCompile Include="..\..\DebugTools\DisassemblyManager.cpp" />
|
||||
<ClCompile Include="..\..\DebugTools\BiosDebugData.cpp" />
|
||||
<ClCompile Include="..\..\DebugTools\ExpressionParser.cpp" />
|
||||
<ClCompile Include="..\..\DebugTools\MIPSAnalyst.cpp" />
|
||||
<ClCompile Include="..\..\DebugTools\MipsAssembler.cpp" />
|
||||
|
@ -712,6 +713,7 @@
|
|||
<ClInclude Include="..\..\DebugTools\Breakpoints.h" />
|
||||
<ClInclude Include="..\..\DebugTools\DebugInterface.h" />
|
||||
<ClInclude Include="..\..\DebugTools\DisassemblyManager.h" />
|
||||
<ClInclude Include="..\..\DebugTools\BiosDebugData.h" />
|
||||
<ClInclude Include="..\..\DebugTools\ExpressionParser.h" />
|
||||
<ClInclude Include="..\..\DebugTools\MIPSAnalyst.h" />
|
||||
<ClInclude Include="..\..\DebugTools\MipsAssembler.h" />
|
||||
|
|
|
@ -820,6 +820,9 @@
|
|||
<ClCompile Include="..\..\DebugTools\MipsAssembler.cpp">
|
||||
<Filter>System\Ps2\Debug</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\DebugTools\BiosDebugData.cpp">
|
||||
<Filter>System\Ps2\Debug</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\DebugTools\MipsAssemblerTables.cpp">
|
||||
<Filter>System\Ps2\Debug</Filter>
|
||||
</ClCompile>
|
||||
|
@ -1236,6 +1239,9 @@
|
|||
<ClInclude Include="..\..\DebugTools\MipsAssembler.h">
|
||||
<Filter>System\Ps2\Debug</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\DebugTools\BiosDebugData.h">
|
||||
<Filter>System\Ps2\Debug</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\DebugTools\MipsAssemblerTables.h">
|
||||
<Filter>System\Ps2\Debug</Filter>
|
||||
</ClInclude>
|
||||
|
|
|
@ -411,6 +411,7 @@
|
|||
<ClCompile Include="..\..\DebugTools\Breakpoints.cpp" />
|
||||
<ClCompile Include="..\..\DebugTools\DebugInterface.cpp" />
|
||||
<ClCompile Include="..\..\DebugTools\DisassemblyManager.cpp" />
|
||||
<ClCompile Include="..\..\DebugTools\BiosDebugData.cpp" />
|
||||
<ClCompile Include="..\..\DebugTools\ExpressionParser.cpp" />
|
||||
<ClCompile Include="..\..\DebugTools\MIPSAnalyst.cpp" />
|
||||
<ClCompile Include="..\..\DebugTools\MipsAssembler.cpp" />
|
||||
|
@ -698,6 +699,7 @@
|
|||
<ClInclude Include="..\..\DebugTools\Breakpoints.h" />
|
||||
<ClInclude Include="..\..\DebugTools\DebugInterface.h" />
|
||||
<ClInclude Include="..\..\DebugTools\DisassemblyManager.h" />
|
||||
<ClInclude Include="..\..\DebugTools\BiosDebugData.h" />
|
||||
<ClInclude Include="..\..\DebugTools\ExpressionParser.h" />
|
||||
<ClInclude Include="..\..\DebugTools\MIPSAnalyst.h" />
|
||||
<ClInclude Include="..\..\DebugTools\MipsAssembler.h" />
|
||||
|
|
|
@ -835,6 +835,9 @@
|
|||
<ClCompile Include="..\..\DebugTools\MipsAssembler.cpp">
|
||||
<Filter>System\Ps2\Debug</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\DebugTools\BiosDebugData.cpp">
|
||||
<Filter>System\Ps2\Debug</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\DebugTools\MipsAssemblerTables.cpp">
|
||||
<Filter>System\Ps2\Debug</Filter>
|
||||
</ClCompile>
|
||||
|
@ -1251,6 +1254,9 @@
|
|||
<ClInclude Include="..\..\DebugTools\MipsAssembler.h">
|
||||
<Filter>System\Ps2\Debug</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\DebugTools\BiosDebugData.h">
|
||||
<Filter>System\Ps2\Debug</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\DebugTools\MipsAssemblerTables.h">
|
||||
<Filter>System\Ps2\Debug</Filter>
|
||||
</ClInclude>
|
||||
|
|
|
@ -411,6 +411,7 @@
|
|||
<ClCompile Include="..\..\DebugTools\Breakpoints.cpp" />
|
||||
<ClCompile Include="..\..\DebugTools\DebugInterface.cpp" />
|
||||
<ClCompile Include="..\..\DebugTools\DisassemblyManager.cpp" />
|
||||
<ClCompile Include="..\..\DebugTools\BiosDebugData.cpp" />
|
||||
<ClCompile Include="..\..\DebugTools\ExpressionParser.cpp" />
|
||||
<ClCompile Include="..\..\DebugTools\MIPSAnalyst.cpp" />
|
||||
<ClCompile Include="..\..\DebugTools\MipsAssembler.cpp" />
|
||||
|
@ -698,6 +699,7 @@
|
|||
<ClInclude Include="..\..\DebugTools\Breakpoints.h" />
|
||||
<ClInclude Include="..\..\DebugTools\DebugInterface.h" />
|
||||
<ClInclude Include="..\..\DebugTools\DisassemblyManager.h" />
|
||||
<ClInclude Include="..\..\DebugTools\BiosDebugData.h" />
|
||||
<ClInclude Include="..\..\DebugTools\ExpressionParser.h" />
|
||||
<ClInclude Include="..\..\DebugTools\MIPSAnalyst.h" />
|
||||
<ClInclude Include="..\..\DebugTools\MipsAssembler.h" />
|
||||
|
@ -938,4 +940,4 @@
|
|||
<ImportGroup Label="ExtensionTargets">
|
||||
<Import Project="$(VCTargetsPath)\BuildCustomizations\masm.targets" />
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
</Project>
|
|
@ -850,6 +850,9 @@
|
|||
<ClCompile Include="..\..\DebugTools\MipsAssembler.cpp">
|
||||
<Filter>System\Ps2\Debug</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\DebugTools\BiosDebugData.cpp">
|
||||
<Filter>System\Ps2\Debug</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\..\Patch.h">
|
||||
|
@ -1263,6 +1266,9 @@
|
|||
<ClInclude Include="..\..\DebugTools\MipsAssembler.h">
|
||||
<Filter>System\Ps2\Debug</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\DebugTools\BiosDebugData.h">
|
||||
<Filter>System\Ps2\Debug</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="..\..\..\3rdparty\wxWidgets\include\wx\msw\wx.rc">
|
||||
|
@ -1345,4 +1351,4 @@
|
|||
<Filter>AppHost\Resources</Filter>
|
||||
</CustomBuild>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
</Project>
|
Loading…
Reference in New Issue