Core/burn/drv/neogeo/neogeo.cpp
// ----------------------------------------------------------------------------
// Graphics decoding for MVS/AES
Graphics decoding for MVS/AES
Graphics decoding for MVS / AES
void NeoDecodeSprites(UINT8* pDest, INT32 nSize)
{
	for (INT32 i = 0; i < 8; i++) {
		UINT8* pStart = pDest + i * (nSize >> 3);
		UINT8* pEnd = pStart + (nSize >> 3);
		INT32 nStep = 8;
		if (BurnDrvGetHardwareCode() & (HARDWARE_SNK_CMC42 | HARDWARE_SNK_CMC50)) {
			nStep *= 4;
		}
		BurnUpdateProgress(1.0 / nStep, i ? NULL : _T("Preprocessing graphics..."), 0);
		for (UINT8* pTile = pStart; pTile < pEnd; pTile += 128) {
			UINT32 data[32];
			for (INT32 y = 0; y < 16; y++) {
				UINT32 n = 0;
				for (INT32 x = 0; x < 8; x++) {
					UINT32 m = ((pTile[67 + (y << 2)] >> x) & 1) << 3;
					m |= ((pTile[65 + (y << 2)] >> x) & 1) << 2;
					m |= ((pTile[66 + (y << 2)] >> x) & 1) << 1;
					m |= ((pTile[64 + (y << 2)] >> x) & 1) << 0;
					n |= m << (x << 2);
				}
				data[(y << 1) + 0] = n;
				n = 0;
				for (INT32 x = 0; x < 8; x++) {
					UINT32 m = ((pTile[3 + (y << 2)] >> x) & 1) << 3;
					m |= ((pTile[1 + (y << 2)] >> x) & 1) << 2;
					m |= ((pTile[2 + (y << 2)] >> x) & 1) << 1;
					m |= ((pTile[0 + (y << 2)] >> x) & 1) << 0;
					n |= m << (x << 2);
				}
				data[(y << 1) + 1] = n;
			}
			for (INT32 n = 0; n < 32; n++) {
				((UINT32*)pTile)[n] = data[n];
			}
		}
	}
}
void NeoDecodeSprites ( UINT8 * pDest , INT32 nSize ) { for ( INT32 i = 0 ; i < 8 ; i ++ ) { UINT8 * pStart = pDest + i * ( nSize >> 3 ) ; UINT8 * pEnd = pStart + ( nSize >> 3 ) ; INT32 nStep = 8 ; if ( BurnDrvGetHardwareCode ( ) & ( HARDWARE_SNK_CMC42 | HARDWARE_SNK_CMC50 ) ) { nStep *= 4 ; } BurnUpdateProgress ( 1.0 / nStep , i ? NULL : _T ( " " ) , 0 ) ; for ( UINT8 * pTile = pStart ; pTile < pEnd ; pTile += 128 ) { UINT32 data [ 32 ] ; for ( INT32 y = 0 ; y < 16 ; y ++ ) { UINT32 n = 0 ; for ( INT32 x = 0 ; x < 8 ; x ++ ) { UINT32 m = ( ( pTile [ 67 + ( y << 2 ) ] >> x ) & 1 ) << 3 ; m |= ( ( pTile [ 65 + ( y << 2 ) ] >> x ) & 1 ) << 2 ; m |= ( ( pTile [ 66 + ( y << 2 ) ] >> x ) & 1 ) << 1 ; m |= ( ( pTile [ 64 + ( y << 2 ) ] >> x ) & 1 ) << 0 ; n |= m << ( x << 2 ) ; } data [ ( y << 1 ) + 0 ] = n ; n = 0 ; for ( INT32 x = 0 ; x < 8 ; x ++ ) { UINT32 m = ( ( pTile [ 3 + ( y << 2 ) ] >> x ) & 1 ) << 3 ; m |= ( ( pTile [ 1 + ( y << 2 ) ] >> x ) & 1 ) << 2 ; m |= ( ( pTile [ 2 + ( y << 2 ) ] >> x ) & 1 ) << 1 ; m |= ( ( pTile [ 0 + ( y << 2 ) ] >> x ) & 1 ) << 0 ; n |= m << ( x << 2 ) ; } data [ ( y << 1 ) + 1 ] = n ; } for ( INT32 n = 0 ; n < 32 ; n ++ ) { ( ( UINT32 * ) pTile ) [ n ] = data [ n ] ; } } } }
Graphics decoding for MVS/AES
Graphics decoding for MVS / AES
//	double dProgress = 0.0; //	if (nSize > 0x04000000) { //		nSize = 0x04000000; //	} /*	if ((BurnDrvGetHardwareCode() & HARDWARE_PUBLIC_MASK) == HARDWARE_SNK_DEDICATED_PCB) {
		dProgress = 1.0 / 32.0;
	} else if (BurnDrvGetHardwareCode() & (HARDWARE_SNK_CMC42 | HARDWARE_SNK_CMC50)) {
		dProgress = 1.0 / 24.0;
	} else {
		dProgress = 1.0 /  8.0;
	}*/ //		BurnUpdateProgress(dProgress, i ? NULL : _T("Preprocessing graphics...")/*, BST_PROCESS_GRA*/, 0); // Pre-process the sprite graphics