Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- UINT16 addr = tms.nametbl + ( ( y & 0xF8 ) << 2 );
- // for ( INT32 x = TMS9928A_HORZ_DISPLAY_START; x < TMS9928A_HORZ_DISPLAY_START + 256; x+= 8, addr+=2 )
- for ( UINT32 x = 0; x < 32; x++, addr++, p+=4 )
- {
- UINT8 charcode = readvmem( addr );
- UINT8 pattern = readvmem( tms.pattern + ( charcode << 3 ) + ( y & 7 ) );
- UINT8 colour = readvmem( tms.colour + ( charcode >> 3 ) );
- UINT32 bg = colour & 0x0f;
- UINT32 tab[4];
- tab[0]=bg|bg<<4;
- if(pattern!=0)
- {
- UINT32 fg = colour >> 4;
- tab[1] = fg|(*tab&0xf0);
- tab[2] = colour;
- tab[3] = fg|(colour&0xf0);
- p[0] = tab[(pattern>>6)&3];
- p[1] = tab[(pattern>>4)&3];
- p[2] = tab[(pattern>>2)&3];
- p[3] = tab[(pattern>>0)&3];
- }
- else
- p[0] = p[1] = p[2] = p[3] = *tab;
- }
- }
- break;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement