diff options
| author | omegadox <omegadox@gmail.com> | 2009-04-06 16:10:45 +0000 |
|---|---|---|
| committer | omegadox <omegadox@gmail.com> | 2009-04-06 16:10:45 +0000 |
| commit | 80d48a08d805b4faa16ea1107f466884ae873634 (patch) | |
| tree | a7eb8487f2885faf3b6b82cb7e4291afb8575d96 /Source/Core/VideoCommon | |
| parent | 67834f960e6ba8405b77453d61d025491396ff51 (diff) | |
Change "BreakPoint" to "Bypass", YAGD says BP REG is a "Bypass Raster State Register"
Also some cleanup in BPStructs and I think this should be SETTLUT not LOADTLUT, because there is already a LOADTLUT earlier in the reg list.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2898 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source/Core/VideoCommon')
| -rw-r--r-- | Source/Core/VideoCommon/Src/BPFunctions.h | 26 | ||||
| -rw-r--r-- | Source/Core/VideoCommon/Src/BPMemory.cpp | 6 | ||||
| -rw-r--r-- | Source/Core/VideoCommon/Src/BPMemory.h | 5 | ||||
| -rw-r--r-- | Source/Core/VideoCommon/Src/BPStructs.cpp | 66 |
4 files changed, 52 insertions, 51 deletions
diff --git a/Source/Core/VideoCommon/Src/BPFunctions.h b/Source/Core/VideoCommon/Src/BPFunctions.h index 76dc49f54f..e0d252b0bc 100644 --- a/Source/Core/VideoCommon/Src/BPFunctions.h +++ b/Source/Core/VideoCommon/Src/BPFunctions.h @@ -37,23 +37,23 @@ enum };
void FlushPipeline();
-void SetGenerationMode(const BreakPoint &bp);
-void SetScissor(const BreakPoint &bp);
-void SetLineWidth(const BreakPoint &bp);
-void SetDepthMode(const BreakPoint &bp);
-void SetBlendMode(const BreakPoint &bp);
-void SetDitherMode(const BreakPoint &bp);
-void SetLogicOpMode(const BreakPoint &bp);
-void SetColorMask(const BreakPoint &bp);
+void SetGenerationMode(const Bypass &bp);
+void SetScissor(const Bypass &bp);
+void SetLineWidth(const Bypass &bp);
+void SetDepthMode(const Bypass &bp);
+void SetBlendMode(const Bypass &bp);
+void SetDitherMode(const Bypass &bp);
+void SetLogicOpMode(const Bypass &bp);
+void SetColorMask(const Bypass &bp);
float GetRendererTargetScaleX();
float GetRendererTargetScaleY();
-void CopyEFB(const BreakPoint &bp, const TRectangle &rc, const u32 &address, const bool &fromZBuffer, const bool &isIntensityFmt, const u32 ©fmt, const bool &scaleByHalf);
-void RenderToXFB(const BreakPoint &bp, const TRectangle &multirc, const float &yScale, const float &xfbLines, u8* pXFB, const u32 &dstWidth, const u32 &dstHeight);
-void ClearScreen(const BreakPoint &bp, const TRectangle &multirc);
-void RestoreRenderState(const BreakPoint &bp);
+void CopyEFB(const Bypass &bp, const TRectangle &rc, const u32 &address, const bool &fromZBuffer, const bool &isIntensityFmt, const u32 ©fmt, const bool &scaleByHalf);
+void RenderToXFB(const Bypass &bp, const TRectangle &multirc, const float &yScale, const float &xfbLines, u8* pXFB, const u32 &dstWidth, const u32 &dstHeight);
+void ClearScreen(const Bypass &bp, const TRectangle &multirc);
+void RestoreRenderState(const Bypass &bp);
u8 *GetPointer(const u32 &address);
bool GetConfig(const int &type);
-void SetSamplerState(const BreakPoint &bp);
+void SetSamplerState(const Bypass &bp);
};
#endif // _BPFUNCTIONS_H_
\ No newline at end of file diff --git a/Source/Core/VideoCommon/Src/BPMemory.cpp b/Source/Core/VideoCommon/Src/BPMemory.cpp index a055fbcaeb..01634c40ba 100644 --- a/Source/Core/VideoCommon/Src/BPMemory.cpp +++ b/Source/Core/VideoCommon/Src/BPMemory.cpp @@ -24,7 +24,7 @@ BPMemory bpmem; // The plugin must implement this. -void BPWritten(const BreakPoint& bp); +void BPWritten(const Bypass& bp); // Call browser: OpcodeDecoding.cpp ExecuteDisplayList > Decode() > LoadBPReg() void LoadBPReg(u32 value0) @@ -35,7 +35,7 @@ void LoadBPReg(u32 value0) int newval = (oldval & ~bpmem.bpMask) | (value0 & bpmem.bpMask); int changes = (oldval ^ newval) & 0xFFFFFF; - BreakPoint bp = {opcode, changes, newval}; + Bypass bp = {opcode, changes, newval}; //reset the mask register if (opcode != 0xFE) @@ -61,7 +61,7 @@ void BPReload() // Cases in which we DON'T want to reload the BP continue; default: - BreakPoint bp = {i, 0xFFFFFF, ((u32*)&bpmem)[i]}; + Bypass bp = {i, 0xFFFFFF, ((u32*)&bpmem)[i]}; BPWritten(bp); } } diff --git a/Source/Core/VideoCommon/Src/BPMemory.h b/Source/Core/VideoCommon/Src/BPMemory.h index 43e7ce114c..9ff834941f 100644 --- a/Source/Core/VideoCommon/Src/BPMemory.h +++ b/Source/Core/VideoCommon/Src/BPMemory.h @@ -62,6 +62,7 @@ #define BPMEM_COPYFILTER1 0x54 #define BPMEM_CLEARBBOX1 0x55 #define BPMEM_CLEARBBOX2 0x56 +#define BPMEM_UNKNOWN 0xFF #define BPMEM_SCISSOROFFSET 0x59 #define BPMEM_LOADTLUT0 0x64 #define BPMEM_LOADTLUT1 0x65 @@ -75,7 +76,7 @@ #define BPMEM_TX_SETIMAGE1 0x8C // 0x8C + 4 #define BPMEM_TX_SETIMAGE2 0x90 // 0x90 + 4 #define BPMEM_TX_SETIMAGE3 0x94 // 0x94 + 4 -#define BPMEM_TX_LOADTLUT_0 0x98 // 0x98 + 4, This smells wrong, I think it should be SET +#define BPMEM_TX_SETTLUT 0x98 // 0x98 + 4 #define BPMEM_TX_SETMODE0_4 0xA0 // 0xA0 + 4 #define BPMEM_TX_SETMODE1_4 0xA4 // 0xA4 + 4 #define BPMEM_TX_SETIMAGE0_4 0xA8 // 0xA8 + 4 @@ -821,7 +822,7 @@ union UPE_Copy // All of BP memory ////////////////////////////////////////////////////////////////////////// -struct BreakPoint +struct Bypass { int address; int changes; diff --git a/Source/Core/VideoCommon/Src/BPStructs.cpp b/Source/Core/VideoCommon/Src/BPStructs.cpp index 82463df07a..6d9419449d 100644 --- a/Source/Core/VideoCommon/Src/BPStructs.cpp +++ b/Source/Core/VideoCommon/Src/BPStructs.cpp @@ -37,7 +37,7 @@ void BPInit() }
// ----------------------------------------------------------------------------------------------------------
-// Write to the BreakPoint Memory
+// Write to the Bypass Memory
/* ------------------
Called:
At the end of every: OpcodeDecoding.cpp ExecuteDisplayList > Decode() > LoadBPReg
@@ -46,7 +46,7 @@ void BPInit() getting rid of dynamic dispatch. Unfortunately, few games use DLs properly - most\
just stuff geometry in them and don't put state changes there. */
// ----------------------------------------------------------------------------------------------------------
-void BPWritten(const BreakPoint& bp)
+void BPWritten(const Bypass& bp)
{
// --------------------------------------------------------------------------------------------------------
@@ -324,6 +324,7 @@ void BPWritten(const BreakPoint& bp) case BPMEM_BP_MASK: // Masks
case BPMEM_IND_IMASK:
break;
+ case BPMEM_UNKNOWN: // This is always set to 0xF at boot of any game, so this sounds like a useless reg
// ------------------------------------------------
// On Default, we try to look for other things
@@ -341,6 +342,8 @@ void BPWritten(const BreakPoint& bp) case BPMEM_TREF+6:
case BPMEM_TREF+7:
break;
+ // -------------------------------------
+ // This could be Level Of Detail control for Wrap
case BPMEM_SU_SSIZE: // Texture Wrap Size U?
case BPMEM_SU_TSIZE: // Texture Wrap Size V?
case BPMEM_SU_SSIZE+2:
@@ -366,57 +369,54 @@ void BPWritten(const BreakPoint& bp) case BPMEM_TX_SETMODE1+1:
case BPMEM_TX_SETMODE1+2:
case BPMEM_TX_SETMODE1+3:
+ case BPMEM_TX_SETMODE0_4:
+ case BPMEM_TX_SETMODE0_4+1:
+ case BPMEM_TX_SETMODE0_4+2:
+ case BPMEM_TX_SETMODE0_4+3:
+ case BPMEM_TX_SETMODE1_4:
+ case BPMEM_TX_SETMODE1_4+1:
+ case BPMEM_TX_SETMODE1_4+2:
+ case BPMEM_TX_SETMODE1_4+3:
SetSamplerState(bp);
break;
- case BPMEM_TX_SETIMAGE0: // Texture Size ?
+ case BPMEM_TX_SETIMAGE0:
case BPMEM_TX_SETIMAGE0+1:
case BPMEM_TX_SETIMAGE0+2:
case BPMEM_TX_SETIMAGE0+3:
+ case BPMEM_TX_SETIMAGE0_4:
+ case BPMEM_TX_SETIMAGE0_4+1:
+ case BPMEM_TX_SETIMAGE0_4+2:
+ case BPMEM_TX_SETIMAGE0_4+3:
case BPMEM_TX_SETIMAGE1:
case BPMEM_TX_SETIMAGE1+1:
case BPMEM_TX_SETIMAGE1+2:
case BPMEM_TX_SETIMAGE1+3:
+ case BPMEM_TX_SETIMAGE1_4:
+ case BPMEM_TX_SETIMAGE1_4+1:
+ case BPMEM_TX_SETIMAGE1_4+2:
+ case BPMEM_TX_SETIMAGE1_4+3:
case BPMEM_TX_SETIMAGE2:
case BPMEM_TX_SETIMAGE2+1:
case BPMEM_TX_SETIMAGE2+2:
case BPMEM_TX_SETIMAGE2+3:
+ case BPMEM_TX_SETIMAGE2_4:
+ case BPMEM_TX_SETIMAGE2_4+1:
+ case BPMEM_TX_SETIMAGE2_4+2:
+ case BPMEM_TX_SETIMAGE2_4+3:
case BPMEM_TX_SETIMAGE3: // Texture Pointer
case BPMEM_TX_SETIMAGE3+1:
case BPMEM_TX_SETIMAGE3+2:
case BPMEM_TX_SETIMAGE3+3:
- break;
- case BPMEM_TX_LOADTLUT_0: // wtf? Load TLUT 0 here ?? (THIS HAS TO BE SET TLUT NOT LOAD TLUT !! :P, mistake found in YAGD!)
- case BPMEM_TX_LOADTLUT_0+1:
- case BPMEM_TX_LOADTLUT_0+2:
- case BPMEM_TX_LOADTLUT_0+3:
- break;
- case BPMEM_TX_SETMODE0_4: // This is Mode 0 for Index 5 to 8
- case BPMEM_TX_SETMODE0_4+1:
- case BPMEM_TX_SETMODE0_4+2:
- case BPMEM_TX_SETMODE0_4+3:
- case BPMEM_TX_SETMODE1_4: // This is Mode 1 for Index 5 to 8
- case BPMEM_TX_SETMODE1_4+1:
- case BPMEM_TX_SETMODE1_4+2:
- case BPMEM_TX_SETMODE1_4+3:
- break;
- case BPMEM_TX_SETIMAGE0_4: // This is Image 0 for Index 5 to 8
- case BPMEM_TX_SETIMAGE0_4+1:
- case BPMEM_TX_SETIMAGE0_4+2:
- case BPMEM_TX_SETIMAGE0_4+3:
- case BPMEM_TX_SETIMAGE1_4: // This is Image 1 for Index 5 to 8
- case BPMEM_TX_SETIMAGE1_4+1:
- case BPMEM_TX_SETIMAGE1_4+2:
- case BPMEM_TX_SETIMAGE1_4+3:
- case BPMEM_TX_SETIMAGE2_4: // This is Image 2 for Index 5 to 8
- case BPMEM_TX_SETIMAGE2_4+1:
- case BPMEM_TX_SETIMAGE2_4+2:
- case BPMEM_TX_SETIMAGE2_4+3:
- case BPMEM_TX_SETIMAGE3_4: // This is Image 3 for Index 5 to 8
+ case BPMEM_TX_SETIMAGE3_4:
case BPMEM_TX_SETIMAGE3_4+1:
case BPMEM_TX_SETIMAGE3_4+2:
case BPMEM_TX_SETIMAGE3_4+3:
break;
- case BPMEM_TX_SETLUT_4: // This is Setting TLUT for Index 5 to 8
+ case BPMEM_TX_SETTLUT:
+ case BPMEM_TX_SETTLUT+1:
+ case BPMEM_TX_SETTLUT+2:
+ case BPMEM_TX_SETTLUT+3:
+ case BPMEM_TX_SETLUT_4:
case BPMEM_TX_SETLUT_4+1:
case BPMEM_TX_SETLUT_4+2:
case BPMEM_TX_SETLUT_4+3:
@@ -495,7 +495,7 @@ void BPWritten(const BreakPoint& bp) case BPMEM_TEV_ALPHA_ENV+32:
break;
default:
- WARN_LOG(VIDEO, "Unknown BreakPoint opcode: address = %08x value = %08x", bp.address, bp.newvalue);
+ WARN_LOG(VIDEO, "Unknown Bypass opcode: address = %08x value = %08x", bp.address, bp.newvalue);
}
}
|
