rasterize: fix clear image support; gpu: fix a 2d obj mode; and a fix to vram diagnostics printing
This commit is contained in:
parent
a0c9689b6f
commit
6e05ab43a1
|
@ -1385,12 +1385,6 @@ template<bool MOSAIC> INLINE void renderline_textBG(GPU * gpu, u16 XBG, u16 YBG,
|
|||
{
|
||||
color = T1ReadWord(pal, ((currLine&0xF) + tilePalette) << 1);
|
||||
gpu->__setFinalColorBck<MOSAIC>(color,x,currLine&0xF);
|
||||
|
||||
extern int currFrameCounter;
|
||||
if(currFrameCounter == 0x20 && nds.VCount == 0x48) {
|
||||
int zzz=9;
|
||||
}
|
||||
|
||||
x++; xoff++;
|
||||
}
|
||||
|
||||
|
@ -2163,15 +2157,14 @@ void GPU::_spriteRender(u8 * dst, u8 * dst_alpha, u8 * typeTab, u8 * prioTab)
|
|||
}
|
||||
else
|
||||
{
|
||||
//NOT TESTED:
|
||||
//2d mapping:
|
||||
|
||||
if (dispCnt->OBJ_BMP_2D_dim) // 256*256
|
||||
{
|
||||
//verified by heroes of mana FMV intro
|
||||
if (dispCnt->OBJ_BMP_2D_dim)
|
||||
//256*256, verified by heroes of mana FMV intro
|
||||
src = (u8 *)MMU_RenderMapToLCD(gpu->sprMem + (((spriteInfo->TileIndex&0x3E0) * 64 + (spriteInfo->TileIndex&0x1F) *8 + ( y << 8)) << 1));
|
||||
}
|
||||
else // 128 * 512
|
||||
src = (u8 *)MMU_RenderMapToLCD(gpu->sprMem + (((spriteInfo->TileIndex&0x3F0) * 64 + (spriteInfo->TileIndex&0x0F) *8 + ( y << 8)) << 1));
|
||||
else
|
||||
//128*512, verified by harry potter and the order of the phoenix conversation portraits
|
||||
src = (u8 *)MMU_RenderMapToLCD(gpu->sprMem + (((spriteInfo->TileIndex&0x3F0) * 64 + (spriteInfo->TileIndex&0x0F) *8 + ( y << 7)) << 1));
|
||||
}
|
||||
|
||||
if (!src) {
|
||||
|
|
|
@ -468,7 +468,7 @@ struct VramConfiguration {
|
|||
std::string describe() {
|
||||
std::stringstream ret;
|
||||
for(int i=0;i<VRAM_BANKS;i++) {
|
||||
ret << (char)(i+'A') << ": " << banks[0].ofs << " " << describePurpose(banks[i].purpose) << std::endl;
|
||||
ret << (char)(i+'A') << ": " << banks[i].ofs << " " << describePurpose(banks[i].purpose) << std::endl;
|
||||
}
|
||||
return ret.str();
|
||||
}
|
||||
|
|
|
@ -2350,12 +2350,6 @@ static void gfx3d_Control_cache()
|
|||
gfx3d.enableAntialiasing = BIT4(v);
|
||||
gfx3d.enableEdgeMarking = BIT5(v);
|
||||
gfx3d.enableClearImage = BIT14(v);
|
||||
|
||||
//other junk
|
||||
if (v&(1<<14))
|
||||
{
|
||||
LOG("Enabled BITMAP background mode\n");
|
||||
}
|
||||
}
|
||||
|
||||
void gfx3d_Control(u32 v)
|
||||
|
|
|
@ -1255,11 +1255,11 @@ static void SoftRastRender()
|
|||
for(int y=0;y<192;y++)
|
||||
for(int x=0;x<256;x++) {
|
||||
|
||||
//this hasnt been tested
|
||||
//TODO - dont do this if we are mapped to blank memory (such as in sonic chronicles)
|
||||
//this is tested by harry potter and the order of the phoenix.
|
||||
//TODO (optimization) dont do this if we are mapped to blank memory (such as in sonic chronicles)
|
||||
//(or use a special zero fill in the bulk clearing above)
|
||||
u16 col = *clearImage;
|
||||
dstColor->color = RGB15TO32(255*(col>>15),col);
|
||||
dstColor->color = RGB15TO5555(col,31*(col>>15));
|
||||
|
||||
//this is tested quite well in the sonic chronicles main map mode
|
||||
//where depth values are used for trees etc you can walk behind
|
||||
|
|
Loading…
Reference in New Issue