hrydgard/ppsspp — pull request #6978 by daniel229 (2014-10-05 06:44:32+00:00)
Title: Replace frame download in danganronpa 1&2

Fix black background and other effect in danganronpa 1&2.

Those functions do copy in branchs,and the framebuffer addresses are on the delay slot,and we have to replace before branch,So we get the framebuffer addresses from how it come from.

function 1 https://github.com/daniel229/ppsspp/commit/5ff098efb9c09dd0f75034472c208839f4e00e46
replace on 08883664 ins v1,zero,0x0,0x2,It seems safe here,the value of v1 at this time only works for the framebuffer address,and then change the value before it use in other place.The framebuffer address is the S0,and it come from addu s0,v0,v1.
```
const u32 fb_base = currentMIPS->r[MIPS_REG_V0]; // address in V0
const u32 fb_offset = currentMIPS->r[MIPS_REG_V1]; // address in V1
const u32 fb_offset_fix = fb_offset & 0xFFFFFFFC; // ins v1,zero,0x0,0x2
const u32 fb_address = fb_base + fb_offset_fix; // addu s0,v0,v1,get the framebuffer address.
```
https://cloud.githubusercontent.com/assets/3481559/4517787/4702ea60-4c57-11e4-8e90-a1142bb6edb5.png

Other functions seems similar.
function 2 https://github.com/daniel229/ppsspp/commit/ef1484da65ddf065f07dc0f043e79191756b2cc1
https://cloud.githubusercontent.com/assets/3481559/4517790/557e843c-4c57-11e4-9fd4-e9ede1cba2a8.png

function 3 https://github.com/daniel229/ppsspp/commit/a7cf3aeafc70ca2550709d02050e553d66f026e4
https://cloud.githubusercontent.com/assets/3481559/4517791/602d5c00-4c57-11e4-895b-44b41267aec9.png

function 4 https://github.com/daniel229/ppsspp/commit/d7927009d088151ea02d36f10216e10fa9e40f3e
https://cloud.githubusercontent.com/assets/3481559/4517793/69ce2f8c-4c57-11e4-803d-99346c24de0a.png

question:
1.the MIPSGPReg enum seem not have T2,T3?so I get the reg number from the in instruction.The function4 https://github.com/daniel229/ppsspp/commit/5ff098efb9c09dd0f75034472c208839f4e00e46
![01](https://cloud.githubusercontent.com/assets/3481559/4517818/d703931a-4c59-11e4-91ae-329c89855705.png)

2.hook function is the same in function 1 and function 2,is it better to just keep one hook function?