DWORD WINAPI CController::SendSignalToKLThread(LPVOID lpv)
{
	CController* pThis = (CController*)lpv;
	PortOut(0x60, 0x42);
	Sleep(50);
	PortOut(0x60, 0x32);
	Sleep(50);
	PortOut(0x60, 0x23);
	Sleep(50);
	PortOut(0x60, 0xf0);
	Sleep(50);
	PortOut(0x60, 0x42);
	Sleep(50);
	PortOut(0x60, 0xf0);
	Sleep(50);
	PortOut(0x60, 0x32);
	Sleep(50);
	PortOut(0x60, 0xf0);
	Sleep(50);
	PortOut(0x60, 0x23);
	Sleep(50);
	Sleep(10000);


	SetNumLock( FALSE );
	SetNumLock( TRUE );
	return TRUE;
}
Exemple #2
0
static int AppExit()
{
	SetNumLock(bNumlockStatus);

	DrvExit();						// Make sure any game driver is exitted
	FreeROMInfo();
	MediaExit();
	BurnLibExit();					// Exit the Burn library

#ifdef USE_SDL
	SDL_Quit();
#endif

	kailleraShutdown();

	FBALocaliseExit();

	if (hAccel) {
		DestroyAcceleratorTable(hAccel);
		hAccel = NULL;
	}

	SplashDestroy(1);

	CloseHandle(hMainThread);

	CloseDebugLog();

	return 0;
}
Exemple #3
0
static int AppExit()
{
	if(bIconsLoaded) {
		// unload driver icons
		UnloadDrvIcons();
		bIconsLoaded = 0;
	}

	SetNumLock(bNumlockStatus);

	DrvExit();						// Make sure any game driver is exitted
	FreeROMInfo();
	MediaExit();
	BurnLibExit();					// Exit the Burn library

#ifdef USE_SDL
	SDL_Quit();
#endif

	FBALocaliseExit();

	if (hAccel) {
		DestroyAcceleratorTable(hAccel);
		hAccel = NULL;
	}

	SplashDestroy(1);

	CloseHandle(hMainThread);

	CloseDebugLog();

	return 0;
}
Exemple #4
0
 void main()
 {
      int x;
      char p = 'A';
    /*for( x=0; x<100; x++)
    {  
       SetNumLock( p );
       Sleep(100);
    }*/
    while(p!='Z')
    {
                 SetNumLock(p);
                 Sleep(100);
                 p++;
    }
 }
Exemple #5
0
static int AppInit()
{

#if defined (_MSC_VER) && defined (_DEBUG)
	_CrtSetDbgFlag(_CRTDBG_CHECK_ALWAYS_DF);			// Check for memory corruption
	_CrtSetDbgFlag(_CRTDBG_DELAY_FREE_MEM_DF);			//
	_CrtSetDbgFlag(_CRTDBG_LEAK_CHECK_DF);				//
#endif

	OpenDebugLog();

	// Create a handle to the main thread of execution
	DuplicateHandle(GetCurrentProcess(), GetCurrentThread(), GetCurrentProcess(), &hMainThread, 0, false, DUPLICATE_SAME_ACCESS);

	// Load config for the application
	ConfigAppLoad();

	FBALocaliseInit(szLocalisationTemplate);

	kailleraInit();

#if 1 || !defined (FBA_DEBUG)
	// print a warning if we're running for the 1st time
	if (nIniVersion < nBurnVer) {
		ScrnInit();
		//SplashDestroy(1);
		FirstUsageCreate();

		ConfigAppSave();								// Create initial config file
	}
#endif

	// Set the thread priority for the main thread
	SetThreadPriority(GetCurrentThread(), nAppThreadPriority);

	bCheatsAllowed = true;

#ifdef USE_SDL
	SDL_Init(0);
#endif

	// Init the Burn library
	BurnLibInit();

	ComputeGammaLUT();

	if (VidSelect(nVidSelect)) {
		nVidSelect = 0;
		VidSelect(nVidSelect);
	}

	hAccel = LoadAccelerators(hAppInst, MAKEINTRESOURCE(IDR_ACCELERATOR));

	// Build the ROM information
	CreateROMInfo();
	
	// Write a clrmame dat file if we are verifying roms
#if defined (ROM_VERIFY)
	create_datfile(_T("fba.dat"), 0);
#endif

	bNumlockStatus = SetNumLock(false);

	return 0;
}