Core/burn/drv/sega/sys16_fd1094.cpp
/* startup function, to be called from DRIVER_INIT (once on startup) */
startup function, to be called from DRIVER_INIT (once on startup)
startup function to be called from DRIVER_INIT ( once on startup )
void fd1094_driver_init(INT32 nCPU)
{
	INT32 i;
	nFD1094CPU = nCPU;
	if (nFD1094CPU == 0) {
		fd1094_cpuregion = (UINT16*)System16Rom;
		fd1094_cpuregionsize = System16RomSize;
	}
	if (nFD1094CPU == 1) {
		fd1094_cpuregion = (UINT16*)System16Rom2;
		fd1094_cpuregionsize = System16Rom2Size;
	}
	if (nFD1094CPU >= 2) {
		bprintf(PRINT_ERROR, _T("Invalid CPU called for FD1094 Driver Init\n"));
	}
	fd1094_key = System16Key;
	if (!fd1094_key)
		return;
	for (i=0;i<S16_NUMCACHE;i++)
	{
		fd1094_cacheregion[i]=(UINT16*)BurnMalloc(fd1094_cpuregionsize);
	}
	for (i=0;i<S16_NUMCACHE;i++) fd1094_cached_states[i] = -1;
	fd1094_current_cacheposition = 0;
	fd1094_state = -1;
	if (System16RomSize > 0x0fffff) System18Banking = true;
}
void fd1094_driver_init ( INT32 nCPU ) { INT32 i ; nFD1094CPU = nCPU ; if ( nFD1094CPU == 0 ) { fd1094_cpuregion = ( UINT16 * ) System16Rom ; fd1094_cpuregionsize = System16RomSize ; } if ( nFD1094CPU == 1 ) { fd1094_cpuregion = ( UINT16 * ) System16Rom2 ; fd1094_cpuregionsize = System16Rom2Size ; } if ( nFD1094CPU >= 2 ) { bprintf ( PRINT_ERROR , _T ( " \n " ) ) ; } fd1094_key = System16Key ; if ( ! fd1094_key ) return ; for ( i = 0 ; i < S16_NUMCACHE ; i ++ ) { fd1094_cacheregion [ i ] = ( UINT16 * ) BurnMalloc ( fd1094_cpuregionsize ) ; } for ( i = 0 ; i < S16_NUMCACHE ; i ++ ) fd1094_cached_states [ i ] = -1 ; fd1094_current_cacheposition = 0 ; fd1094_state = -1 ; if ( System16RomSize > 0x0fffff ) System18Banking = true ; }
startup function, to be called from DRIVER_INIT (once on startup)
startup function to be called from DRIVER_INIT ( once on startup )
/* punt if no key; this allows us to be called even for non-FD1094 games */ /* flush the cached state array */