mirror of
https://github.com/azahar-emu/azahar.git
synced 2025-04-28 21:57:59 +03:00
Pica/DebugUtils: Add breakpoint functionality.
This commit is contained in:
parent
706f9c5574
commit
2c71ec7052
5 changed files with 204 additions and 2 deletions
|
@ -34,6 +34,9 @@ static inline void WritePicaReg(u32 id, u32 value, u32 mask) {
|
|||
u32 old_value = registers[id];
|
||||
registers[id] = (old_value & ~mask) | (value & mask);
|
||||
|
||||
if (g_debug_context)
|
||||
g_debug_context->OnEvent(DebugContext::Event::CommandLoaded, reinterpret_cast<void*>(&id));
|
||||
|
||||
DebugUtils::OnPicaRegWrite(id, registers[id]);
|
||||
|
||||
switch(id) {
|
||||
|
@ -43,6 +46,9 @@ static inline void WritePicaReg(u32 id, u32 value, u32 mask) {
|
|||
{
|
||||
DebugUtils::DumpTevStageConfig(registers.GetTevStages());
|
||||
|
||||
if (g_debug_context)
|
||||
g_debug_context->OnEvent(DebugContext::Event::IncomingPrimitiveBatch, nullptr);
|
||||
|
||||
const auto& attribute_config = registers.vertex_attributes;
|
||||
const u8* const base_address = Memory::GetPointer(attribute_config.GetBaseAddress());
|
||||
|
||||
|
@ -132,6 +138,10 @@ static inline void WritePicaReg(u32 id, u32 value, u32 mask) {
|
|||
clipper_primitive_assembler.SubmitVertex(output, Clipper::ProcessTriangle);
|
||||
}
|
||||
geometry_dumper.Dump();
|
||||
|
||||
if (g_debug_context)
|
||||
g_debug_context->OnEvent(DebugContext::Event::FinishedPrimitiveBatch, nullptr);
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -229,6 +239,9 @@ static inline void WritePicaReg(u32 id, u32 value, u32 mask) {
|
|||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (g_debug_context)
|
||||
g_debug_context->OnEvent(DebugContext::Event::CommandProcessed, reinterpret_cast<void*>(&id));
|
||||
}
|
||||
|
||||
static std::ptrdiff_t ExecuteCommandBlock(const u32* first_command_word) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue