From e4a9faeba413744160e36c57c12b1bf154af8835 Mon Sep 17 00:00:00 2001 From: omegadox Date: Sun, 26 Jul 2009 09:52:35 +0000 Subject: GFX: updated Dates, code formatting cleanup, code cleanup / organization, some unknown BPs uncovered, fixed OGL's config dialog bug, added another shader DSPHLE: Some warning fixes and added some logging for unknown voice cases Please report if anything has broken. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3884 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Core/VideoCommon/Src/OpcodeDecoding.cpp | 33 +++++++++----------------- 1 file changed, 11 insertions(+), 22 deletions(-) (limited to 'Source/Core/VideoCommon/Src/OpcodeDecoding.cpp') diff --git a/Source/Core/VideoCommon/Src/OpcodeDecoding.cpp b/Source/Core/VideoCommon/Src/OpcodeDecoding.cpp index d0b8bb7ece..50b7ad2972 100644 --- a/Source/Core/VideoCommon/Src/OpcodeDecoding.cpp +++ b/Source/Core/VideoCommon/Src/OpcodeDecoding.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2003-2008 Dolphin Project. +// Copyright (C) 2003-2009 Dolphin Project. // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by @@ -54,7 +54,7 @@ static void ExecuteDisplayList(u32 address, u32 size) u8* startAddress = Memory_GetPtr(address); //Avoid the crash if Memory_GetPtr failed .. - if (startAddress!=0) + if (startAddress != 0) { g_pVideoData = startAddress; @@ -87,8 +87,9 @@ bool FifoCommandRunnable() switch (Cmd) { - case GX_NOP: - // Hm, this means that we scan over nop streams pretty slowly... + case GX_NOP: // Hm, this means that we scan over nop streams pretty slowly... + case GX_CMD_INVL_VC: // Invalidate Vertex Cache - no parameters + case 0x44: // zelda 4 swords calls it and checks the metrics registers after that iCommandSize = 1; break; @@ -100,6 +101,7 @@ bool FifoCommandRunnable() case GX_LOAD_INDX_B: case GX_LOAD_INDX_C: case GX_LOAD_INDX_D: + case GX_LOAD_BP_REG: iCommandSize = 5; break; @@ -107,19 +109,6 @@ bool FifoCommandRunnable() iCommandSize = 9; break; - case 0x44: - iCommandSize = 1; - // zelda 4 swords calls it and checks the metrics registers after that - break; - - case GX_CMD_INVL_VC: // invalid vertex cache - no parameter? - iCommandSize = 1; - break; - - case GX_LOAD_BP_REG: - iCommandSize = 5; - break; - case GX_LOAD_XF_REG: { // check if we can read the header @@ -154,8 +143,9 @@ bool FifoCommandRunnable() } else { + // TODO(Omega): Maybe dump FIFO to file on this error char szTemp[1024]; - sprintf(szTemp, "GFX: Unknown Opcode (0x%x).\n" + sprintf(szTemp, "GFX FIFO: Unknown Opcode (0x%x).\n" "This means one of the following:\n" "* The emulated GPU got desynced, disabling dual core can help\n" "* Command stream corrupted by some spurious memory bug\n" @@ -256,13 +246,12 @@ static void Decode() } break; - case 0x44: + case 0x44: // zelda 4 swords calls it and checks the metrics registers after that DEBUG_LOG(VIDEO, "GX 0x44: %08x", Cmd); - // zelda 4 swords calls it and checks the metrics registers after that break; - case GX_CMD_INVL_VC:// Invalidate (vertex cache?) - DEBUG_LOG(VIDEO, "Invalidate (vertex cache?)"); + case GX_CMD_INVL_VC: // Invalidate Vertex Cache + DEBUG_LOG(VIDEO, "Invalidate (vertex cache?)"); break; case GX_LOAD_BP_REG: //0x61 -- cgit v1.2.3