corrects some error l787 & l797

(some objects were not drawn anymore -> used the prior formula)
This commit is contained in:
damdoum 2007-01-07 10:48:28 +00:00
parent 7e15fa37e5
commit 1fc939f31c
2 changed files with 169 additions and 168 deletions

View File

@ -563,7 +563,7 @@ void GPU_setBLDY(GPU *gpu, u16 v)
}
INLINE void renderline_setFinalColor(GPU *gpu,u32 passing,u8 bgnum,u8 *dst,u16 color) {
if (gpu->BLDCNT & (1 << bgnum)) /* the bg to draw has a special color effect */
if (0==1 && gpu->BLDCNT & (1 << bgnum)) /* the bg to draw has a special color effect */
{
switch (gpu->BLDCNT & 0xC0) /* type of special color effect */
{
@ -784,8 +784,8 @@ INLINE void renderline_textBG(GPU * gpu, u8 num, u8 * DST, u16 X, u16 Y, u16 LG)
line += (7 - (xoff&7));
for(; x < xfin; ++x, ++xoff)
{
if(*line) renderline_setFinalColor(gpu,0,num,dst,T1ReadWord(pal, *line << 1)) ;
// was: T2WriteWord(dst, 0, T1ReadWord(pal, *line << 1));
if(*line) renderline_setFinalColor(gpu,0,num,dst,T1ReadWord(pal, (*line + ((mapinfovalue>>12)&0xF)*0x100) << 1)) ;
// was: T2WriteWord(dst, 0, T1ReadWord(pal, (*line + ((mapinfovalue>>12)&0xF)*0x100) << 1));
dst += 2;
line--;
}
@ -794,8 +794,8 @@ INLINE void renderline_textBG(GPU * gpu, u8 num, u8 * DST, u16 X, u16 Y, u16 LG)
line += (xoff&7);
for(; x < xfin; ++x, ++xoff)
{
if(*line) renderline_setFinalColor(gpu,0,num,dst,T1ReadWord(pal, *line << 1)) ;
// was: T2WriteWord(dst, 0, T1ReadWord(pal, *line << 1));
if(*line) renderline_setFinalColor(gpu,0,num,dst,T1ReadWord(pal, (*line + ((mapinfovalue>>12)&0xF)*0x100) << 1)) ;
// was: T2WriteWord(dst, 0, T1ReadWord(pal, (*line + ((mapinfovalue>>12)&0xF)*0x100) << 1));
dst += 2;
line++;
}

View File

@ -76,13 +76,14 @@ armcp15_t *armcp15_new(armcpu_t * c)
return armcp15;
}
#define ACCESSTYPE(val,n) (((val) > (4*n)) & 0x0F)
#define ACCESSTYPE(val,n) (((val) >> (4*n)) & 0x0F)
#define SIZEIDENTIFIER(val) ((((val) >> 1) & 0x1F))
#define SIZEBINARY(val) (1 << (SIZEIDENTIFIER(val)+1))
#define MASKFROMREG(val) (~((SIZEBINARY(val)-1) | 0x3F))
#define SETFROMREG(val) ((val) & MASKFROMREG(val))
/* sets the precalculated regions to mask,set for the affected accesstypes */
void armcp15_setSingleRegionAccess(armcp15_t *armcp15,unsigned long dAccess,unsigned long iAccess,unsigned char num, unsigned long mask,unsigned long set) {
switch (ACCESSTYPE(dAccess,num)) {
case 4: /* UNP */
case 7: /* UNP */