[ 2488334 ] fix (SPP affine rotation display bug)

also start capturing register disp3dcnt but not using it for anything yet
This commit is contained in:
zeromus 2009-01-31 23:45:12 +00:00
parent 0f8211ec84
commit 3bb392c413
3 changed files with 29 additions and 5 deletions

View File

@ -1,6 +1,6 @@
0.9 -> 0/10
General/Core:
bug: SF [ 2550645 ] Super Princess Peach: crash when starting a puzzle [zeromus]
bug: [ 2550645 ] Super Princess Peach: crash when starting a puzzle [zeromus]
bug: win32: fix spu wav file writer (regression from 0.8) [zeromus]
bug: More variables added to savestate. Savestates probably invalidated.
@ -14,6 +14,7 @@ Graphics:
bug: fix texture coordinate generation from normal (fixes environment mapping) [zeromus]
bug: fix display capturing from 2d+3d source when display mode is display-vram [zeromus]
bug: more correct mosaic effects [zeromus]
bug: [ 2488334 ].3 added affine BG parameter writebacks to support hdma of params instead of only auto mode [zeromus]
enh: dont memcmp for texcache validity when the texture banks arent unmapping (speedup) [zeromus]
Mac OS X Port:

View File

@ -1702,8 +1702,8 @@ FORCEINLINE void rot_scale_op(GPU * gpu, u8 * dst, u16 H, s32 X, s32 Y, s16 PA,
u32 i;
s32 auxX, auxY;
x.val = X + (s32)PB*(s32)H;
y.val = Y + (s32)PD*(s32)H;
x.val = X + (s32)H;
y.val = Y + (s32)H;
for(i = 0; i < LG; ++i)
{
@ -1817,6 +1817,8 @@ void lineRot(GPU * gpu, u8 num, u16 l, u8 * DST)
parms->BGxPC,
parms->BGxPD,
256);
parms->BGxX += parms->BGxPB;
parms->BGxY += parms->BGxPD;
}
void lineExtRot(GPU * gpu, u8 num, u16 l, u8 * DST)
@ -1835,6 +1837,8 @@ void lineExtRot(GPU * gpu, u8 num, u16 l, u8 * DST)
parms->BGxPC,
parms->BGxPD,
256);
parms->BGxX += parms->BGxPB;
parms->BGxY += parms->BGxPD;
}
void textBG(GPU * gpu, u8 num, u8 * DST)
@ -2905,9 +2909,9 @@ static void GPU_ligne_layer(NDS_Screen * screen, u16 l)
gpu3D->NDS_3D_GetLine(l, 0, 255, line3Dcolor, line3Dalpha);
for(int k = 0, q = 0; k < 256; k++)
for(int k = 0; k < 256; k++)
{
q = ((k + hofs) & 0x1FF);
int q = ((k + hofs) & 0x1FF);
if(line3Dcolor[q] & 0x8000)
gpu->setFinalColor3D(gpu, (k << 1), dst, line3Dcolor[q], line3Dalpha[q], k);

View File

@ -1569,6 +1569,19 @@ static void FASTCALL _MMU_ARM9_write08(u32 adr, u8 val)
{
switch(adr)
{
case REG_DISPA_DISP3DCNT:
{
u32 &disp3dcnt = MainScreen.gpu->dispx_st->dispA_DISP3DCNT.val;
disp3dcnt = (disp3dcnt&0xFF00) | val;
break;
}
case REG_DISPA_DISP3DCNT+1:
{
u32 &disp3dcnt = MainScreen.gpu->dispx_st->dispA_DISP3DCNT.val;
disp3dcnt = (disp3dcnt&0x00FF) | (val<<8);
break;
}
case REG_DISPA_WIN0H:
GPU_setWIN0_H1(MainScreen.gpu, val);
break ;
@ -1781,6 +1794,12 @@ static void FASTCALL _MMU_ARM9_write16(u32 adr, u16 val)
// Address is an IO register
switch(adr)
{
case REG_DISPA_DISP3DCNT:
{
MainScreen.gpu->dispx_st->dispA_DISP3DCNT.val = val;
break;
}
// Alpha test reference value - Parameters:1
case 0x04000340:
{