core:
- fixed Master Brightness (this is fix games with black screens ex. "Pirates of the Caribbean At Worlds End");
This commit is contained in:
parent
27786f835d
commit
6b49906cf5
|
@ -7,7 +7,10 @@
|
||||||
- Added transparency and fixed material alpha support and alpha testing on the 3D core [shash]
|
- Added transparency and fixed material alpha support and alpha testing on the 3D core [shash]
|
||||||
- Changed how depth initial values are calculated (fixes SM64DS skybox) [shash]
|
- Changed how depth initial values are calculated (fixes SM64DS skybox) [shash]
|
||||||
- Added SSE2 version for some matrix routines [CrazyMax]
|
- Added SSE2 version for some matrix routines [CrazyMax]
|
||||||
- Some fixes in core (New SMB don't freeze now) [CrazyMax]
|
- Fixes in IPC FIFO [CrazyMax]
|
||||||
|
- Add Geometry FIFO simulation (New SMB and others games not freeze now) [CrazyMax]
|
||||||
|
- Fix in capture display (many games with both 3D screen not blinking now) [CrazyMax]
|
||||||
|
- Fix in master brightness (this is fix games with black screens) [CrazyMax]
|
||||||
- Some optimizations in code [CrazyMax]
|
- Some optimizations in code [CrazyMax]
|
||||||
- Make matrix 4x4 multiply routines use W-coordinate. [zeromus]
|
- Make matrix 4x4 multiply routines use W-coordinate. [zeromus]
|
||||||
- Add many matrix and vector functions to matrix.cpp [zeromus]
|
- Add many matrix and vector functions to matrix.cpp [zeromus]
|
||||||
|
|
|
@ -277,9 +277,7 @@ static void GPU_resortBGs(GPU *gpu)
|
||||||
|
|
||||||
void GPU_setMasterBrightness (GPU *gpu, u16 val)
|
void GPU_setMasterBrightness (GPU *gpu, u16 val)
|
||||||
{
|
{
|
||||||
u8 temp = (val&31);
|
gpu->MasterBrightFactor = (val & 0x1F);
|
||||||
|
|
||||||
gpu->MasterBrightFactor = (temp > 16 ? 16 : temp);
|
|
||||||
gpu->MasterBrightMode = (val>>14);
|
gpu->MasterBrightMode = (val>>14);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2244,11 +2242,12 @@ static INLINE void GPU_ligne_DispCapture(u16 l)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static INLINE void GPU_ligne_Brightness(NDS_Screen * screen, u16 l)
|
static INLINE void GPU_ligne_MasterBrightness(NDS_Screen * screen, u16 l)
|
||||||
{
|
{
|
||||||
GPU * gpu = screen->gpu;
|
GPU * gpu = screen->gpu;
|
||||||
u8 * dst = GPU_screen + (screen->offset + l) * 512;
|
u8 * dst = GPU_screen + (screen->offset + l) * 512;
|
||||||
u16 i16;
|
u16 i16;
|
||||||
|
if (!gpu->MasterBrightFactor) return;
|
||||||
#ifndef HAVE_LIBGDKGLEXT_X11_1_0
|
#ifndef HAVE_LIBGDKGLEXT_X11_1_0
|
||||||
// damdoum :
|
// damdoum :
|
||||||
// brightness done with opengl
|
// brightness done with opengl
|
||||||
|
@ -2412,7 +2411,7 @@ void GPU_ligne(NDS_Screen * screen, u16 l)
|
||||||
|
|
||||||
if (gpu->core == GPU_MAIN)
|
if (gpu->core == GPU_MAIN)
|
||||||
GPU_ligne_DispCapture(l);
|
GPU_ligne_DispCapture(l);
|
||||||
GPU_ligne_Brightness(screen, l);
|
GPU_ligne_MasterBrightness(screen, l);
|
||||||
}
|
}
|
||||||
|
|
||||||
void gpu_savestate(std::ostream* os)
|
void gpu_savestate(std::ostream* os)
|
||||||
|
|
|
@ -1670,6 +1670,14 @@ static void FASTCALL _MMU_ARM9_write16(u32 adr, u16 val)
|
||||||
|
|
||||||
case REG_POWCNT1 :
|
case REG_POWCNT1 :
|
||||||
{
|
{
|
||||||
|
// TODO: make this later
|
||||||
|
#if 0
|
||||||
|
u8 _LCD = (val) & 0x01;
|
||||||
|
u8 _2DEngineA = (val>>1) & 0x01;
|
||||||
|
u8 _2DEngineB = (val>>9) & 0x01;
|
||||||
|
u8 _3DRender = (val>>2) & 0x01;
|
||||||
|
u8 _3DGeometry = (val>>3) & 0x01;
|
||||||
|
#endif
|
||||||
if(val & (1<<15))
|
if(val & (1<<15))
|
||||||
{
|
{
|
||||||
LOG("Main core on top\n");
|
LOG("Main core on top\n");
|
||||||
|
@ -2187,6 +2195,13 @@ static void FASTCALL _MMU_ARM9_write32(u32 adr, u32 val)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
case REG_DISPA_MASTERBRIGHT:
|
||||||
|
GPU_setMasterBrightness(MainScreen.gpu, val & 0xFFFF);
|
||||||
|
break;
|
||||||
|
case REG_DISPB_MASTERBRIGHT:
|
||||||
|
GPU_setMasterBrightness(SubScreen.gpu, val & 0xFFFF);
|
||||||
|
break;
|
||||||
|
|
||||||
case REG_DISPA_BLDCNT:
|
case REG_DISPA_BLDCNT:
|
||||||
{
|
{
|
||||||
GPU_setBLDCNT (MainScreen.gpu,val&0xffff);
|
GPU_setBLDCNT (MainScreen.gpu,val&0xffff);
|
||||||
|
|
Loading…
Reference in New Issue