Core/burn/drv/sms/sms.cpp
// A change in CRam - update the color in Mdraw
A change in CRam - update the color in Mdraw
A change in CRam - update the color in Mdraw
void MdrawCramChange(INT32 a)
{
	INT32 s,c;
	if (MastEx&MX_GG)
	{
		a>>=1; a&=0x1f; s=((UINT16 *)CRam)[a];
		c =s&0xfff;      
	}
	else
	{
		a&=0x1f; 
		s=CRam[a];
		c =(s&0x30)<<6; 
		c|=(s&0x0c)<<4; 
		c|=(s&0x03)<<2; 
	}
	mdraw.Pal[a]=(UINT16)c; 
	mdraw.PalChange=1;
}
void MdrawCramChange ( INT32 a ) { INT32 s , c ; if ( MastEx & MX_GG ) { a >>= 1 ; a &= 0x1f ; s = ( ( UINT16 * ) CRam ) [ a ] ; c = s & 0xfff ; } else { a &= 0x1f ; s = CRam [ a ] ; c = ( s & 0x30 ) << 6 ; c |= ( s & 0x0c ) << 4 ; c |= ( s & 0x03 ) << 2 ; } mdraw . Pal [ a ] = ( UINT16 ) c ; mdraw . PalChange = 1 ; }
A change in CRam - update the color in Mdraw
A change in CRam - update the color in Mdraw
//	static INT32 i = 0; // Game gear color // -> BBBBGGGGRRRR // Master System color // -> BB0000000000 // -> 0000GG000000 // -> 00000000RR00