summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTony Wasserka <neobrainx@gmail.com>2014-06-05 13:21:05 +0200
committerTony Wasserka <neobrainx@gmail.com>2014-06-05 13:21:05 +0200
commite2cfb7f0fa2f47eff9c18adb482bd61b1824e464 (patch)
tree4782158fd506dd7cc2fae48c865a509d55fac8b7
parent81842bc4d4bf0987bcca68ca5eab12da9b31bdd5 (diff)
parent776e36b10ab6fb0118a82411fb757003856aedb8 (diff)
Merge pull request #448 from lioncash/fifo-cleanup
Expand GetBPRegInfo to include the rest of the BP registers.
-rw-r--r--Source/Core/VideoCommon/BPMemory.h162
-rw-r--r--Source/Core/VideoCommon/BPStructs.cpp414
2 files changed, 475 insertions, 101 deletions
diff --git a/Source/Core/VideoCommon/BPMemory.h b/Source/Core/VideoCommon/BPMemory.h
index 2b1774261e..d8598f2cc1 100644
--- a/Source/Core/VideoCommon/BPMemory.h
+++ b/Source/Core/VideoCommon/BPMemory.h
@@ -11,88 +11,88 @@
#pragma pack(4)
-#define BPMEM_GENMODE 0x00
+#define BPMEM_GENMODE 0x00
#define BPMEM_DISPLAYCOPYFILTER 0x01 // 0x01 + 4
-#define BPMEM_IND_MTXA 0x06 // 0x06 + (3 * 3)
-#define BPMEM_IND_MTXB 0x07 // 0x07 + (3 * 3)
-#define BPMEM_IND_MTXC 0x08 // 0x08 + (3 * 3)
-#define BPMEM_IND_IMASK 0x0F
-#define BPMEM_IND_CMD 0x10 // 0x10 + 16
-#define BPMEM_SCISSORTL 0x20
-#define BPMEM_SCISSORBR 0x21
-#define BPMEM_LINEPTWIDTH 0x22
-#define BPMEM_PERF0_TRI 0x23
-#define BPMEM_PERF0_QUAD 0x24
-#define BPMEM_RAS1_SS0 0x25
-#define BPMEM_RAS1_SS1 0x26
-#define BPMEM_IREF 0x27
-#define BPMEM_TREF 0x28 // 0x28 + 8
-#define BPMEM_SU_SSIZE 0x30 // 0x30 + (2 * 8)
-#define BPMEM_SU_TSIZE 0x31 // 0x31 + (2 * 8)
-#define BPMEM_ZMODE 0x40
-#define BPMEM_BLENDMODE 0x41
-#define BPMEM_CONSTANTALPHA 0x42
-#define BPMEM_ZCOMPARE 0x43
-#define BPMEM_FIELDMASK 0x44
-#define BPMEM_SETDRAWDONE 0x45
-#define BPMEM_BUSCLOCK0 0x46
-#define BPMEM_PE_TOKEN_ID 0x47
-#define BPMEM_PE_TOKEN_INT_ID 0x48
-#define BPMEM_EFB_TL 0x49
-#define BPMEM_EFB_BR 0x4A
-#define BPMEM_EFB_ADDR 0x4B
-#define BPMEM_MIPMAP_STRIDE 0x4D
-#define BPMEM_COPYYSCALE 0x4E
-#define BPMEM_CLEAR_AR 0x4F
-#define BPMEM_CLEAR_GB 0x50
-#define BPMEM_CLEAR_Z 0x51
-#define BPMEM_TRIGGER_EFB_COPY 0x52
-#define BPMEM_COPYFILTER0 0x53
-#define BPMEM_COPYFILTER1 0x54
-#define BPMEM_CLEARBBOX1 0x55
-#define BPMEM_CLEARBBOX2 0x56
-#define BPMEM_CLEAR_PIXEL_PERF 0x57
-#define BPMEM_REVBITS 0x58
-#define BPMEM_SCISSOROFFSET 0x59
-#define BPMEM_PRELOAD_ADDR 0x60
-#define BPMEM_PRELOAD_TMEMEVEN 0x61
-#define BPMEM_PRELOAD_TMEMODD 0x62
-#define BPMEM_PRELOAD_MODE 0x63
-#define BPMEM_LOADTLUT0 0x64
-#define BPMEM_LOADTLUT1 0x65
-#define BPMEM_TEXINVALIDATE 0x66
-#define BPMEM_PERF1 0x67
-#define BPMEM_FIELDMODE 0x68
-#define BPMEM_BUSCLOCK1 0x69
-#define BPMEM_TX_SETMODE0 0x80 // 0x80 + 4
-#define BPMEM_TX_SETMODE1 0x84 // 0x84 + 4
-#define BPMEM_TX_SETIMAGE0 0x88 // 0x88 + 4
-#define BPMEM_TX_SETIMAGE1 0x8C // 0x8C + 4
-#define BPMEM_TX_SETIMAGE2 0x90 // 0x90 + 4
-#define BPMEM_TX_SETIMAGE3 0x94 // 0x94 + 4
-#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
-#define BPMEM_TX_SETIMAGE1_4 0xAC // 0xA4 + 4
-#define BPMEM_TX_SETIMAGE2_4 0xB0 // 0xB0 + 4
-#define BPMEM_TX_SETIMAGE3_4 0xB4 // 0xB4 + 4
-#define BPMEM_TX_SETLUT_4 0xB8 // 0xB8 + 4
-#define BPMEM_TEV_COLOR_ENV 0xC0 // 0xC0 + (2 * 16)
-#define BPMEM_TEV_ALPHA_ENV 0xC1 // 0xC1 + (2 * 16)
-#define BPMEM_TEV_REGISTER_L 0xE0 // 0xE0 + (2 * 4)
-#define BPMEM_TEV_REGISTER_H 0xE1 // 0xE1 + (2 * 4)
-#define BPMEM_FOGRANGE 0xE8 // 0xE8 + 6
-#define BPMEM_FOGPARAM0 0xEE
-#define BPMEM_FOGBMAGNITUDE 0xEF
-#define BPMEM_FOGBEXPONENT 0xF0
-#define BPMEM_FOGPARAM3 0xF1
-#define BPMEM_FOGCOLOR 0xF2
-#define BPMEM_ALPHACOMPARE 0xF3
-#define BPMEM_BIAS 0xF4
-#define BPMEM_ZTEX2 0xF5
-#define BPMEM_TEV_KSEL 0xF6 // 0xF6 + 8
-#define BPMEM_BP_MASK 0xFE
+#define BPMEM_IND_MTXA 0x06 // 0x06 + (3 * 3)
+#define BPMEM_IND_MTXB 0x07 // 0x07 + (3 * 3)
+#define BPMEM_IND_MTXC 0x08 // 0x08 + (3 * 3)
+#define BPMEM_IND_IMASK 0x0F
+#define BPMEM_IND_CMD 0x10 // 0x10 + 16
+#define BPMEM_SCISSORTL 0x20
+#define BPMEM_SCISSORBR 0x21
+#define BPMEM_LINEPTWIDTH 0x22
+#define BPMEM_PERF0_TRI 0x23
+#define BPMEM_PERF0_QUAD 0x24
+#define BPMEM_RAS1_SS0 0x25
+#define BPMEM_RAS1_SS1 0x26
+#define BPMEM_IREF 0x27
+#define BPMEM_TREF 0x28 // 0x28 + 8
+#define BPMEM_SU_SSIZE 0x30 // 0x30 + (2 * 8)
+#define BPMEM_SU_TSIZE 0x31 // 0x31 + (2 * 8)
+#define BPMEM_ZMODE 0x40
+#define BPMEM_BLENDMODE 0x41
+#define BPMEM_CONSTANTALPHA 0x42
+#define BPMEM_ZCOMPARE 0x43
+#define BPMEM_FIELDMASK 0x44
+#define BPMEM_SETDRAWDONE 0x45
+#define BPMEM_BUSCLOCK0 0x46
+#define BPMEM_PE_TOKEN_ID 0x47
+#define BPMEM_PE_TOKEN_INT_ID 0x48
+#define BPMEM_EFB_TL 0x49
+#define BPMEM_EFB_BR 0x4A
+#define BPMEM_EFB_ADDR 0x4B
+#define BPMEM_MIPMAP_STRIDE 0x4D
+#define BPMEM_COPYYSCALE 0x4E
+#define BPMEM_CLEAR_AR 0x4F
+#define BPMEM_CLEAR_GB 0x50
+#define BPMEM_CLEAR_Z 0x51
+#define BPMEM_TRIGGER_EFB_COPY 0x52
+#define BPMEM_COPYFILTER0 0x53
+#define BPMEM_COPYFILTER1 0x54
+#define BPMEM_CLEARBBOX1 0x55
+#define BPMEM_CLEARBBOX2 0x56
+#define BPMEM_CLEAR_PIXEL_PERF 0x57
+#define BPMEM_REVBITS 0x58
+#define BPMEM_SCISSOROFFSET 0x59
+#define BPMEM_PRELOAD_ADDR 0x60
+#define BPMEM_PRELOAD_TMEMEVEN 0x61
+#define BPMEM_PRELOAD_TMEMODD 0x62
+#define BPMEM_PRELOAD_MODE 0x63
+#define BPMEM_LOADTLUT0 0x64
+#define BPMEM_LOADTLUT1 0x65
+#define BPMEM_TEXINVALIDATE 0x66
+#define BPMEM_PERF1 0x67
+#define BPMEM_FIELDMODE 0x68
+#define BPMEM_BUSCLOCK1 0x69
+#define BPMEM_TX_SETMODE0 0x80 // 0x80 + 4
+#define BPMEM_TX_SETMODE1 0x84 // 0x84 + 4
+#define BPMEM_TX_SETIMAGE0 0x88 // 0x88 + 4
+#define BPMEM_TX_SETIMAGE1 0x8C // 0x8C + 4
+#define BPMEM_TX_SETIMAGE2 0x90 // 0x90 + 4
+#define BPMEM_TX_SETIMAGE3 0x94 // 0x94 + 4
+#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
+#define BPMEM_TX_SETIMAGE1_4 0xAC // 0xA4 + 4
+#define BPMEM_TX_SETIMAGE2_4 0xB0 // 0xB0 + 4
+#define BPMEM_TX_SETIMAGE3_4 0xB4 // 0xB4 + 4
+#define BPMEM_TX_SETTLUT_4 0xB8 // 0xB8 + 4
+#define BPMEM_TEV_COLOR_ENV 0xC0 // 0xC0 + (2 * 16)
+#define BPMEM_TEV_ALPHA_ENV 0xC1 // 0xC1 + (2 * 16)
+#define BPMEM_TEV_REGISTER_L 0xE0 // 0xE0 + (2 * 4)
+#define BPMEM_TEV_REGISTER_H 0xE1 // 0xE1 + (2 * 4)
+#define BPMEM_FOGRANGE 0xE8 // 0xE8 + 6
+#define BPMEM_FOGPARAM0 0xEE
+#define BPMEM_FOGBMAGNITUDE 0xEF
+#define BPMEM_FOGBEXPONENT 0xF0
+#define BPMEM_FOGPARAM3 0xF1
+#define BPMEM_FOGCOLOR 0xF2
+#define BPMEM_ALPHACOMPARE 0xF3
+#define BPMEM_BIAS 0xF4
+#define BPMEM_ZTEX2 0xF5
+#define BPMEM_TEV_KSEL 0xF6 // 0xF6 + 8
+#define BPMEM_BP_MASK 0xFE
// Tev/combiner things
diff --git a/Source/Core/VideoCommon/BPStructs.cpp b/Source/Core/VideoCommon/BPStructs.cpp
index 0a1ca5c936..1ef06c5716 100644
--- a/Source/Core/VideoCommon/BPStructs.cpp
+++ b/Source/Core/VideoCommon/BPStructs.cpp
@@ -545,7 +545,7 @@ static void BPWritten(const BPCmd& bp)
// BPMEM_TX_SETTLUT - Format, TMEM Offset (offset of TLUT from start of TMEM high bank > > 5)
// -------------------------------
case BPMEM_TX_SETTLUT:
- case BPMEM_TX_SETLUT_4:
+ case BPMEM_TX_SETTLUT_4:
return;
// ---------------------------------------------------
@@ -688,12 +688,131 @@ void GetBPRegInfo(const u8* data, std::string* name, std::string* desc)
// TODO: same as BPMEM_DISPLAYCOPYFILTER
break;
- case BPMEM_EFB_TL: // 0x49
- {
- SetRegName(BPMEM_EFB_TL);
- X10Y10 left_top; left_top.hex = cmddata;
- *desc = StringFromFormat("Left: %d\nTop: %d", left_top.x, left_top.y);
- }
+ case BPMEM_IND_MTXA: // 0x06
+ case BPMEM_IND_MTXA+3:
+ case BPMEM_IND_MTXA+6:
+ SetRegName(BPMEM_IND_MTXA);
+ // TODO: Description
+ break;
+
+ case BPMEM_IND_MTXB: // 0x07
+ case BPMEM_IND_MTXB+3:
+ case BPMEM_IND_MTXB+6:
+ SetRegName(BPMEM_IND_MTXB);
+ // TODO: Descriptio
+ break;
+
+ case BPMEM_IND_MTXC: // 0x08
+ case BPMEM_IND_MTXC+3:
+ case BPMEM_IND_MTXC+6:
+ SetRegName(BPMEM_IND_MTXC);
+ // TODO: Description
+ break;
+
+ case BPMEM_IND_IMASK: // 0x0F
+ SetRegName(BPMEM_IND_IMASK);
+ // TODO: Description
+ break;
+
+ case BPMEM_IND_CMD: // 0x10
+ case BPMEM_IND_CMD+1:
+ case BPMEM_IND_CMD+2:
+ case BPMEM_IND_CMD+3:
+ case BPMEM_IND_CMD+4:
+ case BPMEM_IND_CMD+5:
+ case BPMEM_IND_CMD+6:
+ case BPMEM_IND_CMD+7:
+ case BPMEM_IND_CMD+8:
+ case BPMEM_IND_CMD+9:
+ case BPMEM_IND_CMD+10:
+ case BPMEM_IND_CMD+11:
+ case BPMEM_IND_CMD+12:
+ case BPMEM_IND_CMD+13:
+ case BPMEM_IND_CMD+14:
+ case BPMEM_IND_CMD+15:
+ SetRegName(BPMEM_IND_CMD);
+ // TODO: Description
+ break;
+
+ case BPMEM_SCISSORTL: // 0x20
+ SetRegName(BPMEM_SCISSORTL);
+ // TODO: Description
+ break;
+
+ case BPMEM_SCISSORBR: // 0x21
+ SetRegName(BPMEM_SCISSORBR);
+ // TODO: Description
+ break;
+
+ case BPMEM_LINEPTWIDTH: // 0x22
+ SetRegName(BPMEM_LINEPTWIDTH);
+ // TODO: Description
+ break;
+
+ case BPMEM_PERF0_TRI: // 0x23
+ SetRegName(BPMEM_PERF0_TRI);
+ // TODO: Description
+ break;
+
+ case BPMEM_PERF0_QUAD: // 0x24
+ SetRegName(BPMEM_PERF0_QUAD);
+ // TODO: Description
+ break;
+
+ case BPMEM_RAS1_SS0: // 0x25
+ SetRegName(BPMEM_RAS1_SS0);
+ // TODO: Description
+ break;
+
+ case BPMEM_RAS1_SS1: // 0x26
+ SetRegName(BPMEM_RAS1_SS1);
+ // TODO: Description
+ break;
+
+ case BPMEM_IREF: // 0x27
+ SetRegName(BPMEM_IREF);
+ // TODO: Description
+ break;
+
+ case BPMEM_TREF: // 0x28
+ case BPMEM_TREF+1:
+ case BPMEM_TREF+2:
+ case BPMEM_TREF+3:
+ case BPMEM_TREF+4:
+ case BPMEM_TREF+5:
+ case BPMEM_TREF+6:
+ case BPMEM_TREF+7:
+ SetRegName(BPMEM_TREF);
+ // TODO: Description
+ break;
+
+ case BPMEM_SU_SSIZE: // 0x30
+ case BPMEM_SU_SSIZE+2:
+ case BPMEM_SU_SSIZE+4:
+ case BPMEM_SU_SSIZE+6:
+ case BPMEM_SU_SSIZE+8:
+ case BPMEM_SU_SSIZE+10:
+ case BPMEM_SU_SSIZE+12:
+ case BPMEM_SU_SSIZE+14:
+ SetRegName(BPMEM_SU_SSIZE);
+ // TODO: Description
+ break;
+
+ case BPMEM_SU_TSIZE: // 0x31
+ case BPMEM_SU_TSIZE+2:
+ case BPMEM_SU_TSIZE+4:
+ case BPMEM_SU_TSIZE+6:
+ case BPMEM_SU_TSIZE+8:
+ case BPMEM_SU_TSIZE+10:
+ case BPMEM_SU_TSIZE+12:
+ case BPMEM_SU_TSIZE+14:
+ SetRegName(BPMEM_SU_TSIZE);
+ // TODO: Description
+ break;
+
+ case BPMEM_ZMODE: // 0x40
+ SetRegName(BPMEM_ZMODE);
+ // TODO: Description
break;
case BPMEM_BLENDMODE: // 0x41
@@ -718,7 +837,12 @@ void GetBPRegInfo(const u8* data, std::string* name, std::string* desc)
}
break;
- case BPMEM_ZCOMPARE:
+ case BPMEM_CONSTANTALPHA: // 0x42
+ SetRegName(BPMEM_CONSTANTALPHA);
+ // TODO: Description
+ break;
+
+ case BPMEM_ZCOMPARE: // 0x43
{
SetRegName(BPMEM_ZCOMPARE);
PEControl config; config.hex = cmddata;
@@ -731,6 +855,39 @@ void GetBPRegInfo(const u8* data, std::string* name, std::string* desc)
}
break;
+ case BPMEM_FIELDMASK: // 0x44
+ SetRegName(BPMEM_FIELDMASK);
+ // TODO: Description
+ break;
+
+ case BPMEM_SETDRAWDONE: // 0x45
+ SetRegName(BPMEM_SETDRAWDONE);
+ // TODO: Description
+ break;
+
+ case BPMEM_BUSCLOCK0: // 0x46
+ SetRegName(BPMEM_BUSCLOCK0);
+ // TODO: Description
+ break;
+
+ case BPMEM_PE_TOKEN_ID: // 0x47
+ SetRegName(BPMEM_PE_TOKEN_ID);
+ // TODO: Description
+ break;
+
+ case BPMEM_PE_TOKEN_INT_ID: // 0x48
+ SetRegName(BPMEM_PE_TOKEN_INT_ID);
+ // TODO: Description
+ break;
+
+ case BPMEM_EFB_TL: // 0x49
+ {
+ SetRegName(BPMEM_EFB_TL);
+ X10Y10 left_top; left_top.hex = cmddata;
+ *desc = StringFromFormat("Left: %d\nTop: %d", left_top.x, left_top.y);
+ }
+ break;
+
case BPMEM_EFB_BR: // 0x4A
{
// TODO: Misleading name, should be BPMEM_EFB_WH instead
@@ -745,6 +902,11 @@ void GetBPRegInfo(const u8* data, std::string* name, std::string* desc)
*desc = StringFromFormat("Target address (32 byte aligned): 0x%06X", cmddata << 5);
break;
+ case BPMEM_MIPMAP_STRIDE: // 0x4D
+ SetRegName(BPMEM_MIPMAP_STRIDE);
+ // TODO: Description
+ break;
+
case BPMEM_COPYYSCALE: // 0x4E
SetRegName(BPMEM_COPYYSCALE);
*desc = StringFromFormat("Scaling factor (XFB copy only): 0x%X (%f or inverted %f)", cmddata, (float)cmddata/256.f, 256.f/(float)cmddata);
@@ -804,6 +966,133 @@ void GetBPRegInfo(const u8* data, std::string* name, std::string* desc)
// TODO: Description
break;
+ case BPMEM_CLEARBBOX1: // 0x55
+ SetRegName(BPMEM_CLEARBBOX1);
+ // TODO: Description
+ break;
+
+ case BPMEM_CLEARBBOX2: // 0x56
+ SetRegName(BPMEM_CLEARBBOX2);
+ // TODO: Description
+ break;
+
+ case BPMEM_CLEAR_PIXEL_PERF: // 0x57
+ SetRegName(BPMEM_CLEAR_PIXEL_PERF);
+ // TODO: Description
+ break;
+
+ case BPMEM_REVBITS: // 0x58
+ SetRegName(BPMEM_REVBITS);
+ // TODO: Description
+ break;
+
+ case BPMEM_SCISSOROFFSET: // 0x59
+ SetRegName(BPMEM_SCISSOROFFSET);
+ // TODO: Description
+ break;
+
+ case BPMEM_PRELOAD_ADDR: // 0x60
+ SetRegName(BPMEM_PRELOAD_ADDR);
+ // TODO: Description
+ break;
+
+ case BPMEM_PRELOAD_TMEMEVEN: // 0x61
+ SetRegName(BPMEM_PRELOAD_TMEMEVEN);
+ // TODO: Description
+ break;
+
+ case BPMEM_PRELOAD_TMEMODD: // 0x62
+ SetRegName(BPMEM_PRELOAD_TMEMODD);
+ // TODO: Description
+ break;
+
+ case BPMEM_PRELOAD_MODE: // 0x63
+ SetRegName(BPMEM_PRELOAD_MODE);
+ // TODO: Description
+ break;
+
+ case BPMEM_LOADTLUT0: // 0x64
+ SetRegName(BPMEM_LOADTLUT0);
+ // TODO: Description
+ break;
+
+ case BPMEM_LOADTLUT1: // 0x65
+ SetRegName(BPMEM_LOADTLUT1);
+ // TODO: Description
+ break;
+
+ case BPMEM_TEXINVALIDATE: // 0x66
+ SetRegName(BPMEM_TEXINVALIDATE);
+ // TODO: Description
+ break;
+
+ case BPMEM_PERF1: // 0x67
+ SetRegName(BPMEM_PERF1);
+ // TODO: Description
+ break;
+
+ case BPMEM_FIELDMODE: // 0x68
+ SetRegName(BPMEM_FIELDMODE);
+ // TODO: Description
+ break;
+
+ case BPMEM_BUSCLOCK1: // 0x69
+ SetRegName(BPMEM_BUSCLOCK1);
+ // TODO: Description
+ break;
+
+ case BPMEM_TX_SETMODE0: // 0x80
+ case BPMEM_TX_SETMODE0+1:
+ case BPMEM_TX_SETMODE0+2:
+ case BPMEM_TX_SETMODE0+3:
+ SetRegName(BPMEM_TX_SETMODE0);
+ // TODO: Description
+ break;
+
+ case BPMEM_TX_SETMODE1: // 0x84
+ case BPMEM_TX_SETMODE1+1:
+ case BPMEM_TX_SETMODE1+2:
+ case BPMEM_TX_SETMODE1+3:
+ SetRegName(BPMEM_TX_SETMODE1);
+ // TODO: Description
+ break;
+
+ case BPMEM_TX_SETIMAGE0: // 0x88
+ case BPMEM_TX_SETIMAGE0+1:
+ case BPMEM_TX_SETIMAGE0+2:
+ case BPMEM_TX_SETIMAGE0+3:
+ case BPMEM_TX_SETIMAGE0_4: // 0xA8
+ case BPMEM_TX_SETIMAGE0_4+1:
+ case BPMEM_TX_SETIMAGE0_4+2:
+ case BPMEM_TX_SETIMAGE0_4+3:
+ SetRegName(BPMEM_TX_SETIMAGE0);
+ // TODO: Description
+ break;
+
+ case BPMEM_TX_SETIMAGE1: // 0x8C
+ case BPMEM_TX_SETIMAGE1+1:
+ case BPMEM_TX_SETIMAGE1+2:
+ case BPMEM_TX_SETIMAGE1+3:
+ case BPMEM_TX_SETIMAGE1_4: // 0xAC
+ case BPMEM_TX_SETIMAGE1_4+1:
+ case BPMEM_TX_SETIMAGE1_4+2:
+ case BPMEM_TX_SETIMAGE1_4+3:
+ SetRegName(BPMEM_TX_SETIMAGE1);
+ // TODO: Description
+ break;
+
+ case BPMEM_TX_SETIMAGE2: // 0x90
+ case BPMEM_TX_SETIMAGE2+1:
+ case BPMEM_TX_SETIMAGE2+2:
+ case BPMEM_TX_SETIMAGE2+3:
+ case BPMEM_TX_SETIMAGE2_4: // 0xB0
+ case BPMEM_TX_SETIMAGE2_4+1:
+ case BPMEM_TX_SETIMAGE2_4+2:
+ case BPMEM_TX_SETIMAGE2_4+3:
+ SetRegName(BPMEM_TX_SETIMAGE2);
+ // TODO: Description
+ break;
+
case BPMEM_TX_SETIMAGE3: // 0x94
case BPMEM_TX_SETIMAGE3+1:
case BPMEM_TX_SETIMAGE3+2:
@@ -819,6 +1108,18 @@ void GetBPRegInfo(const u8* data, std::string* name, std::string* desc)
}
break;
+ case BPMEM_TX_SETTLUT: // 0x98
+ case BPMEM_TX_SETTLUT+1:
+ case BPMEM_TX_SETTLUT+2:
+ case BPMEM_TX_SETTLUT+3:
+ case BPMEM_TX_SETTLUT_4: // 0xB8
+ case BPMEM_TX_SETTLUT_4+1:
+ case BPMEM_TX_SETTLUT_4+2:
+ case BPMEM_TX_SETTLUT_4+3:
+ SetRegName(BPMEM_TX_SETTLUT);
+ // TODO: Description
+ break;
+
case BPMEM_TEV_COLOR_ENV: // 0xC0
case BPMEM_TEV_COLOR_ENV+2:
case BPMEM_TEV_COLOR_ENV+4:
@@ -912,18 +1213,91 @@ void GetBPRegInfo(const u8* data, std::string* name, std::string* desc)
break;
}
- case BPMEM_ALPHACOMPARE: // 0xF3
- {
- SetRegName(BPMEM_ALPHACOMPARE);
- AlphaTest test; test.hex = cmddata;
- const char* functions[] = { "NEVER", "LESS", "EQUAL", "LEQUAL", "GREATER", "NEQUAL", "GEQUAL", "ALWAYS" };
- const char* logic[] = { "AND", "OR", "XOR", "XNOR" };
- *desc = StringFromFormat("Test 1: %s (ref: %#02x)\n"
- "Test 2: %s (ref: %#02x)\n"
- "Logic: %s\n",
- functions[test.comp0], (int)test.ref0, functions[test.comp1], (int)test.ref1, logic[test.logic]);
- break;
- }
+ case BPMEM_TEV_REGISTER_L: // 0xE0
+ case BPMEM_TEV_REGISTER_L+2:
+ case BPMEM_TEV_REGISTER_L+4:
+ case BPMEM_TEV_REGISTER_L+6:
+ SetRegName(BPMEM_TEV_REGISTER_L);
+ // TODO: Description
+ break;
+
+ case BPMEM_TEV_REGISTER_H: // 0xE1
+ case BPMEM_TEV_REGISTER_H+2:
+ case BPMEM_TEV_REGISTER_H+4:
+ case BPMEM_TEV_REGISTER_H+6:
+ SetRegName(BPMEM_TEV_REGISTER_H);
+ // TODO: Description
+ break;
+
+ case BPMEM_FOGRANGE: // 0xE8
+ case BPMEM_FOGRANGE+1:
+ case BPMEM_FOGRANGE+2:
+ case BPMEM_FOGRANGE+3:
+ case BPMEM_FOGRANGE+4:
+ case BPMEM_FOGRANGE+5:
+ SetRegName(BPMEM_FOGRANGE);
+ // TODO: Description
+ break;
+
+ case BPMEM_FOGPARAM0: // 0xEE
+ SetRegName(BPMEM_FOGPARAM0);
+ // TODO: Description
+ break;
+
+ case BPMEM_FOGBMAGNITUDE: // 0xEF
+ SetRegName(BPMEM_FOGBMAGNITUDE);
+ // TODO: Description
+ break;
+
+ case BPMEM_FOGBEXPONENT: // 0xF0
+ SetRegName(BPMEM_FOGBEXPONENT);
+ // TODO: Description
+ break;
+
+ case BPMEM_FOGPARAM3: // 0xF1
+ SetRegName(BPMEM_FOGPARAM3);
+ // TODO: Description
+ break;
+
+ case BPMEM_FOGCOLOR: // 0xF2
+ SetRegName(BPMEM_FOGCOLOR);
+ // TODO: Description
+ break;
+
+ case BPMEM_ALPHACOMPARE: // 0xF3
+ {
+ SetRegName(BPMEM_ALPHACOMPARE);
+ AlphaTest test; test.hex = cmddata;
+ const char* functions[] = { "NEVER", "LESS", "EQUAL", "LEQUAL", "GREATER", "NEQUAL", "GEQUAL", "ALWAYS" };
+ const char* logic[] = { "AND", "OR", "XOR", "XNOR" };
+ *desc = StringFromFormat("Test 1: %s (ref: %#02x)\n"
+ "Test 2: %s (ref: %#02x)\n"
+ "Logic: %s\n",
+ functions[test.comp0], (int)test.ref0, functions[test.comp1], (int)test.ref1, logic[test.logic]);
+ break;
+ }
+
+ case BPMEM_BIAS: // 0xF4
+ SetRegName(BPMEM_BIAS);
+ // TODO: Description
+ break;
+
+ case BPMEM_ZTEX2: // 0xF5
+ SetRegName(BPMEM_ZTEX2);
+ // TODO: Description
+ break;
+
+ case BPMEM_TEV_KSEL: // 0xF6
+ case BPMEM_TEV_KSEL+1:
+ case BPMEM_TEV_KSEL+2:
+ case BPMEM_TEV_KSEL+3:
+ case BPMEM_TEV_KSEL+4:
+ case BPMEM_TEV_KSEL+5:
+ case BPMEM_TEV_KSEL+6:
+ case BPMEM_TEV_KSEL+7:
+ SetRegName(BPMEM_TEV_KSEL);
+ // TODO: Description
+ break;
#undef SetRegName
}