Core/burn/drv/neogeo/neogeo.cpp
// This function loads the 68K ROMs
This function loads the 68K ROMs
This function loads the 68K ROMs
INT32 NeoLoadCode(INT32 nOffset, INT32 nNum, UINT8* pDest)
{
    struct BurnRomInfo ri;
	for (INT32 i = 0; i < nNum; i++) {
		ri.nLen = 0;
		BurnDrvGetRomInfo(&ri, nOffset + i);
		if ((BurnDrvGetHardwareCode() & HARDWARE_SNK_P32) && (i == 0))
		{
			if (BurnLoadRom(pDest + 0, nOffset + i + 0, 2)) return 1;
			if (BurnLoadRom(pDest + 1, nOffset + i + 1, 2)) return 1;
			for (UINT32 j = 0; j < ri.nLen << 1; j+=4)
				BurnByteswap(pDest + j + 1, 2);
			i++;
			pDest += ri.nLen << 1;
			continue;
		}
		if (BurnLoadRom(pDest, nOffset + i, 1)) {
			return 1;
		}
		if ((BurnDrvGetHardwareCode() & HARDWARE_SNK_SWAPP) && (i == 0)) {
			for (UINT32 j = 0; j < (ri.nLen / 2); j++) {
				INT32 k = pDest[j];
				pDest[j] = pDest[j + (ri.nLen / 2)];
				pDest[j + (ri.nLen / 2)] = k;
			}
		}
		pDest += ri.nLen;
	}
	return 0;
}
INT32 NeoLoadCode ( INT32 nOffset , INT32 nNum , UINT8 * pDest ) { struct BurnRomInfo ri ; for ( INT32 i = 0 ; i < nNum ; i ++ ) { ri . nLen = 0 ; BurnDrvGetRomInfo ( & ri , nOffset + i ) ; if ( ( BurnDrvGetHardwareCode ( ) & HARDWARE_SNK_P32 ) && ( i == 0 ) ) { if ( BurnLoadRom ( pDest + 0 , nOffset + i + 0 , 2 ) ) return 1 ; if ( BurnLoadRom ( pDest + 1 , nOffset + i + 1 , 2 ) ) return 1 ; for ( UINT32 j = 0 ; j < ri . nLen << 1 ; j += 4 ) BurnByteswap ( pDest + j + 1 , 2 ) ; i ++ ; pDest += ri . nLen << 1 ; continue ; } if ( BurnLoadRom ( pDest , nOffset + i , 1 ) ) { return 1 ; } if ( ( BurnDrvGetHardwareCode ( ) & HARDWARE_SNK_SWAPP ) && ( i == 0 ) ) { for ( UINT32 j = 0 ; j < ( ri . nLen / 2 ) ; j ++ ) { INT32 k = pDest [ j ] ; pDest [ j ] = pDest [ j + ( ri . nLen / 2 ) ] ; pDest [ j + ( ri . nLen / 2 ) ] = k ; } } pDest += ri . nLen ; } return 0 ; }
This function loads the 68K ROMs
This function loads the 68K ROMs