static void xencons_close(struct tty_struct *tty, struct file *filp) { unsigned long flags; if (DUMMY_TTY(tty)) return; down(&tty_sem); if (tty->count != 1) { up(&tty_sem); return; } /* Prevent other threads from re-opening this tty. */ set_bit(TTY_CLOSING, &tty->flags); up(&tty_sem); tty->closing = 1; tty_wait_until_sent(tty, 0); if (DRV(tty->driver)->flush_buffer != NULL) DRV(tty->driver)->flush_buffer(tty); if (tty->ldisc.flush_buffer != NULL) tty->ldisc.flush_buffer(tty); tty->closing = 0; spin_lock_irqsave(&xencons_lock, flags); xencons_tty = NULL; spin_unlock_irqrestore(&xencons_lock, flags); }
void W45C5() // W45C5 { DRV(); // DRV Push((Read16(Pop())&0xFF)==0?1:0); // C@ 0= if (Pop() == 0) return; W454E(); // W454E DRV(); // DRV C_ex__2(); // C!_2 }
void _st_ASKMOUNT_gt_() // <ASKMOUNT> { Exec("CR"); // call of word 0x26ee '(CR)' PRINT("Place disk containing file", 26); // (.") Exec("CR"); // call of word 0x26ee '(CR)' NAM(); // NAM Push(8); _dash_TRAILING(); // -TRAILING Exec("TYPE"); // call of word 0x2690 '(TYPE)' PRINT(".", 1); // (.") TYP(); // TYP Push(3); Exec("TYPE"); // call of word 0x2690 '(TYPE)' PRINT(" into ", 6); // (.") DRV(); // DRV Push(Read16(Pop())&0xFF); // C@ if (Read16(regsp) != 0) Push(Read16(regsp)); // ?DUP if (Pop() != 0) { PRINT("drive ", 6); // (.") Push(Pop() + 0x0040); // 0x0040 + Exec("EMIT"); // call of word 0x2731 '(EMIT)' } else { PRINT("any drive", 9); // (.") } Exec("CR"); // call of word 0x26ee '(CR)' PRINT("and press any key when ready.", 29); // (.") Exec("KEY_1"); // call of word 0x25d7 '(KEY)' Pop(); // DROP }
void SMARTOPEN() // SMARTOPEN { unsigned short int a, b; OPEN(); // OPEN Push(Read16(regsp)); // DUP if (Pop() == 0) return; DRV(); // DRV Push((Read16(Pop())&0xFF)==0?1:0); // C@ 0= if (Pop() == 0) return; a = Pop(); // >R W45C5(); // W45C5 DRV(); // DRV Push(Read16(Pop())&0xFF); // C@ while(1) { DRV(); // DRV Push(Read16(Pop())&0xFF); // C@ W45D9(); // W45D9 _2DUP(); // 2DUP Push((Pop()==Pop())?1:0); // = Push(!Pop() & a); // NOT I AND if (Pop() == 0) break; DRV(); // DRV C_ex__2(); // C!_2 OPEN(); // OPEN Push(a); // R> Pop(); // DROP b = Pop(); // >R } Pop(); Pop(); // 2DROP Push(a); // R> Push(Read16(regsp)); // DUP if (Pop() == 0) return; Push(0); DRV(); // DRV C_ex__2(); // C!_2 }
void DR3() // DR3 { Push(0x4425); // '[FILE]' Push(0x05dc); SYSUTIL(); // SYSUTIL Push(Read16(pp__i_FCB)); // 'FCB @ NAM(); // NAM DRV(); // DRV Push(Read16(Pop())&0xFF); // C@ Push(1); Push(Read16(cc_DOS_dash_FILE) + 1); // DOS-FILE 1+ _st_MOUNT_gt_(); // <MOUNT> Pop(); // DROP }
void DR2() // DR2 { Push(0x4425); // '[FILE]' Push(0x02d0); SYSTEM(); // SYSTEM Push(Read16(pp__i_FCB)); // 'FCB @ NAM(); // NAM DRV(); // DRV Push(Read16(Pop())&0xFF); // C@ Push(1); Push(Read16(cc_DOS_dash_FILE)); // DOS-FILE _st_MOUNT_gt_(); // <MOUNT> Pop(); // DROP }
static void xencons_wait_until_sent(struct tty_struct *tty, int timeout) { unsigned long orig_jiffies = jiffies; if (DUMMY_TTY(tty)) return; while (DRV(tty->driver)->chars_in_buffer(tty)) { set_current_state(TASK_INTERRUPTIBLE); schedule_timeout(1); if (signal_pending(current)) break; if (timeout && time_after(jiffies, orig_jiffies + timeout)) break; } set_current_state(TASK_RUNNING); }
void DOSMOUNT() // DOSMOUNT { unsigned short int a; a = Pop(); // >R INIT(); // INIT while(1) { Push(a); // I FCBPFAS(); // FCBPFAS Push(Read16(Pop())); // @ Push(pp__i_FCB); // 'FCB Store(); // ! SMARTOPEN(); // SMARTOPEN Push(Read16(regsp)); // DUP if (Pop() == 0) break; Pop(); // DROP FLUSH(); // FLUSH INIT(); // INIT Push(a); // I FCBPFAS(); // FCBPFAS Push(Read16(Pop())); // @ Push(pp__i_FCB); // 'FCB Store(); // ! Push(pp_ASKMOUNT); // ASKMOUNT GetEXECUTE(); // @EXECUTE } Push(0x0400); RECSIZE(); // RECSIZE Store(); // ! FILESIZE(); // FILESIZE _2_at_(); // 2@ SWAP(); // SWAP Push(0x0400); M_slash_(); // M/ SWAP(); // SWAP Pop(); // DROP DRV(); // DRV Push(Read16(Pop())&0xFF); // C@ Push(a); // R> DRIVENUMBERS(); // DRIVENUMBERS C_ex__2(); // C!_2 }
// Read in the config file for the whole application int ConfigAppLoad() { TCHAR szConfig[MAX_PATH]; TCHAR szLine[1024]; FILE* h; #ifdef _UNICODE setlocale(LC_ALL, ""); #endif CreateConfigName(szConfig); if ((h = _tfopen(szConfig, _T("rt"))) == NULL) { return 1; } // Go through each line of the config file while (_fgetts(szLine, sizeof(szLine), h)) { int nLen = _tcslen(szLine); // Get rid of the linefeed at the end if (szLine[nLen - 1] == 10) { szLine[nLen - 1] = 0; nLen--; } #define VAR(x) { TCHAR* szValue = LabelCheck(szLine,_T(#x)); \ if (szValue) x = _tcstol(szValue, NULL, 0); } #define VAR64(x) { TCHAR* szValue = LabelCheck(szLine,_T(#x)); \ if (szValue) x = (long long)_tcstod(szValue, NULL); } #define FLT(x) { TCHAR* szValue = LabelCheck(szLine,_T(#x)); \ if (szValue) x = _tcstod(szValue, NULL); } #define STR(x) { TCHAR* szValue = LabelCheck(szLine,_T(#x) _T(" ")); \ if (szValue) _tcscpy(x,szValue); } #define PAT(x) { TCHAR* szValue = LabelCheck(szLine,_T(#x) _T(" ")); \ if (szValue) { _tcscpy(x, szValue); UpdatePath(x); } } #define DRV(x) { TCHAR* szValue = LabelCheck(szLine,_T(#x) _T(" ")); \ if (szValue) x = NameToDriver(szValue); } VAR(nIniVersion); // Emulation VAR(bBurnUseASMCPUEmulation); // Video VAR(nVidDepth); VAR(nVidRefresh); VAR(nVidRotationAdjust); // horizontal oriented VAR(nVidHorWidth); VAR(nVidHorHeight); VAR(bVidArcaderesHor); VAR(VidPreset[0].nWidth); VAR(VidPreset[0].nHeight); VAR(VidPreset[1].nWidth); VAR(VidPreset[1].nHeight); VAR(VidPreset[2].nWidth); VAR(VidPreset[2].nHeight); VAR(VidPreset[3].nWidth); VAR(VidPreset[3].nHeight); VAR(nScreenSizeHor); // vertical oriented VAR(nVidVerWidth); VAR(nVidVerHeight); VAR(bVidArcaderesVer); VAR(VidPresetVer[0].nWidth); VAR(VidPresetVer[0].nHeight); VAR(VidPresetVer[1].nWidth); VAR(VidPresetVer[1].nHeight); VAR(VidPresetVer[2].nWidth); VAR(VidPresetVer[2].nHeight); VAR(VidPresetVer[3].nWidth); VAR(VidPresetVer[3].nHeight); VAR(nScreenSizeVer); VAR(nWindowSize); VAR(nWindowPosX); VAR(nWindowPosY); VAR(bDoGamma); VAR(bVidUseHardwareGamma); VAR(bHardwareGammaOnly); FLT(nGamma); VAR(bVidFullStretch); VAR(bVidCorrectAspect); VAR(bVidAutoSwitchFull); VAR(bVidTripleBuffer); VAR(bVidVSync); VAR(bVidDWMCore); VAR(bVidScanlines); VAR(nVidScanIntensity); VAR(bMonitorAutoCheck); VAR(nVidScrnAspectX); VAR(nVidScrnAspectY); VAR(bForce60Hz); VAR(bAlwaysDrawFrames); VAR(nVidSelect); VAR(nVidBlitterOpt[0]); VAR64(nVidBlitterOpt[1]); VAR(nVidBlitterOpt[2]); VAR(nVidBlitterOpt[3]); VAR(nVidBlitterOpt[4]); // DirectDraw blitter VAR(bVidScanHalf); // Direct3D blitter VAR(bVidBilinear); VAR(bVidScanDelay); VAR(bVidScanRotate); VAR(bVidScanBilinear); VAR(nVidFeedbackIntensity); VAR(nVidFeedbackOverSaturation); FLT(fVidScreenAngle); FLT(fVidScreenCurvature); VAR(bVidForce16bit); VAR(nVidTransferMethod); // DirectX Graphics blitter FLT(dVidCubicB); FLT(dVidCubicC); // DirectX Graphics 9 Alt blitter VAR(bVidDX9Bilinear); VAR(bVidHardwareVertex); VAR(bVidMotionBlur); // Sound VAR(nAudSelect); VAR(nAudSegCount); VAR(nInterpolation); VAR(nFMInterpolation); VAR(nAudSampleRate[0]); VAR(nAudDSPModule[0]); VAR(nAudSampleRate[1]); VAR(nAudDSPModule[1]); // Other STR(szLocalisationTemplate); VAR(nVidSDisplayStatus); VAR(nMinChatFontSize); VAR(nMaxChatFontSize); VAR(bModelessMenu); VAR(nSplashTime); VAR(bDrvSaveAll); VAR(nAppThreadPriority); VAR(bAlwaysProcessKeyboardInput); VAR(bAutoPause); VAR(bSaveInputs); VAR(nCDEmuSelect); PAT(CDEmuImage); VAR(nLoadMenuShowX); VAR(nLoadMenuBoardTypeFilter); VAR(nLoadMenuGenreFilter); VAR(nLoadMenuFamilyFilter); STR(szAppRomPaths[0]); STR(szAppRomPaths[1]); STR(szAppRomPaths[2]); STR(szAppRomPaths[3]); STR(szAppRomPaths[4]); STR(szAppRomPaths[5]); STR(szAppRomPaths[6]); STR(szAppRomPaths[7]); STR(szNeoCDGamesDir); STR(szAppPreviewsPath); STR(szAppTitlesPath); STR(szAppCheatsPath); STR(szAppHiscorePath); STR(szAppSamplesPath); STR(szAppIpsPath); STR(szNeoCDCoverDir); VAR(bNoChangeNumLock); VAR(EnableHiscores); VAR(nIpsSelectedLanguage); STR(szPrevGames[0]); STR(szPrevGames[1]); STR(szPrevGames[2]); STR(szPrevGames[3]); STR(szPrevGames[4]); STR(szPrevGames[5]); STR(szPrevGames[6]); STR(szPrevGames[7]); STR(szPrevGames[8]); STR(szPrevGames[9]); // MVS cartridges DRV(nBurnDrvSelect[0]); DRV(nBurnDrvSelect[1]); DRV(nBurnDrvSelect[2]); DRV(nBurnDrvSelect[3]); DRV(nBurnDrvSelect[4]); DRV(nBurnDrvSelect[5]); VAR(bNeoCDListScanSub); VAR(bNeoCDListScanOnlyISO); // Default Controls VAR(nPlayerDefaultControls[0]); STR(szPlayerDefaultIni[0]); VAR(nPlayerDefaultControls[1]); STR(szPlayerDefaultIni[1]); VAR(nPlayerDefaultControls[2]); STR(szPlayerDefaultIni[2]); VAR(nPlayerDefaultControls[3]); STR(szPlayerDefaultIni[3]); #undef DRV #undef PAT #undef STR #undef FLT #undef VAR #undef VAR64 } fclose(h); return 0; }
// Write out the config file for the whole application int ConfigAppSave() { TCHAR szConfig[MAX_PATH]; FILE *h; if (bCmdOptUsed) { return 1; } #ifdef _UNICODE setlocale(LC_ALL, ""); #endif CreateConfigName(szConfig); if ((h = _tfopen(szConfig, _T("wt"))) == NULL) { return 1; } // Write title _ftprintf(h, _T("// ") _T(APP_TITLE) _T(" v%s --- Main Config File\n\n"), szAppBurnVer); _ftprintf(h, _T("// Don't edit this file manually unless you know what you're doing\n")); _ftprintf(h, _T("// ") _T(APP_TITLE) _T(" will restore default settings when this file is deleted\n")); #define VAR(x) _ftprintf(h, _T(#x) _T(" %d\n"), x) #define VAR64(x) _ftprintf(h, _T(#x) _T(" %lf\n"), (float)x) #define FLT(x) _ftprintf(h, _T(#x) _T(" %lf\n"), x) #define STR(x) _ftprintf(h, _T(#x) _T(" %s\n"), x) #define DRV(x) _ftprintf(h, _T(#x) _T(" %s\n"), DriverToName(x)) _ftprintf(h, _T("\n// The application version this file was saved from\n")); // We can't use the macros for this! _ftprintf(h, _T("nIniVersion 0x%06X"), nBurnVer); _ftprintf(h, _T("\n\n\n")); _ftprintf(h, _T("// --- emulation --------------------------------------------------------------\n")); _ftprintf(h, _T("\n// If non-zero, use A68K for MC68000 emulation\n")); VAR(bBurnUseASMCPUEmulation); _ftprintf(h, _T("\n\n\n")); _ftprintf(h, _T("// --- Video ------------------------------------------------------------------\n")); // Horizontal oriented _ftprintf(h, _T("\n// (Horizontal Oriented) The display mode to use for fullscreen\n")); VAR(nVidHorWidth); VAR(nVidHorHeight); _ftprintf(h, _T("\n// (Horizontal Oriented) If non-zero, use the same fullscreen resolution as the original arcade game\n")); VAR(bVidArcaderesHor); _ftprintf(h, _T("\n// (Horizontal Oriented) The preset resolutions appearing in the menu\n")); VAR(VidPreset[0].nWidth); VAR(VidPreset[0].nHeight); VAR(VidPreset[1].nWidth); VAR(VidPreset[1].nHeight); VAR(VidPreset[2].nWidth); VAR(VidPreset[2].nHeight); VAR(VidPreset[3].nWidth); VAR(VidPreset[3].nHeight); _ftprintf(h, _T("\n// (Horizontal Oriented) Full-screen size (0 = use display mode variables)\n")); VAR(nScreenSizeHor); // Vertical oriented _ftprintf(h, _T("\n// (Vertical Oriented) The display mode to use for fullscreen\n")); VAR(nVidVerWidth); VAR(nVidVerHeight); _ftprintf(h, _T("\n// (Vertical Oriented) If non-zero, use the same fullscreen resolution as the original arcade game\n")); VAR(bVidArcaderesVer); _ftprintf(h, _T("\n// (Vertical Oriented) The preset resolutions appearing in the menu\n")); VAR(VidPresetVer[0].nWidth); VAR(VidPresetVer[0].nHeight); VAR(VidPresetVer[1].nWidth); VAR(VidPresetVer[1].nHeight); VAR(VidPresetVer[2].nWidth); VAR(VidPresetVer[2].nHeight); VAR(VidPresetVer[3].nWidth); VAR(VidPresetVer[3].nHeight); _ftprintf(h, _T("\n// (Vertical Oriented) Full-screen size (0 = use display mode variables)\n")); VAR(nScreenSizeVer); _ftprintf(h, _T("\n// Full-screen bit depth\n")); VAR(nVidDepth); _ftprintf(h, _T("\n// Specify the refresh rate, 0 = default (changing this will not work with many video cards)\n")); VAR(nVidRefresh); _ftprintf(h, _T("\n// If non-zero, do not rotate the graphics for vertical games\n")); VAR(nVidRotationAdjust); _ftprintf(h, _T("\n// Initial window size (0 = autosize)\n")); VAR(nWindowSize); _ftprintf(h, _T("\n// Window position\n")); VAR(nWindowPosX); VAR(nWindowPosY); _ftprintf(h, _T("\n// If non-zero, perform gamma correction\n")); VAR(bDoGamma); _ftprintf(h, _T("\n// If non-zero, use the video hardware to correct gamma\n")); VAR(bVidUseHardwareGamma); _ftprintf(h, _T("\n// If non-zero, don't fall back on software gamma correction\n")); VAR(bHardwareGammaOnly); _ftprintf(h, _T("\n// Gamma to correct with\n")); FLT(nGamma); _ftprintf(h, _T("\n// If non-zero, auto-switch to fullscreen after loading game\n")); VAR(bVidAutoSwitchFull); _ftprintf(h, _T("\n// If non-zero, allow stretching of the image to any size\n")); VAR(bVidFullStretch); _ftprintf(h, _T("\n// If non-zero, stretch the image to the largest size preserving aspect ratio\n")); VAR(bVidCorrectAspect); _ftprintf(h, _T("\n// If non-zero, try to use a triple buffer in fullscreen\n")); VAR(bVidTripleBuffer); _ftprintf(h, _T("\n// If non-zero, try to synchronise blits with the display\n")); VAR(bVidVSync); _ftprintf(h, _T("\n// If non-zero, try to enable custom DWM parameters on Windows 7, this fixes frame stuttering problems.\n")); VAR(bVidDWMCore); _ftprintf(h, _T("\n// Transfer method: 0 = blit from system memory / use driver/DirectX texture management;\n")); _ftprintf(h, _T("// 1 = copy to a video memory surface, then use bltfast();\n")); _ftprintf(h, _T("// -1 = autodetect for DirectDraw, equals 1 for Direct3D\n")); VAR(nVidTransferMethod); _ftprintf(h, _T("\n// If non-zero, draw scanlines to simulate a low-res monitor\n")); VAR(bVidScanlines); _ftprintf(h, _T("\n// Maximum scanline intensity\n")); VAR(nVidScanIntensity); _ftprintf(h, _T("\n// If non-zero, rotate scanlines and RGB effects for rotated games\n")); VAR(bVidScanRotate); _ftprintf(h, _T("\n// The selected blitter module\n")); VAR(nVidSelect); _ftprintf(h, _T("\n// Options for the blitter modules\n")); VAR(nVidBlitterOpt[0]); VAR64(nVidBlitterOpt[1]); VAR(nVidBlitterOpt[2]); VAR(nVidBlitterOpt[3]); VAR(nVidBlitterOpt[4]); _ftprintf(h, _T("\n// If non-zero, attempt to auto-detect the monitor aspect ratio\n")); VAR(bMonitorAutoCheck); _ftprintf(h, _T("\n// The aspect ratio of the monitor\n")); VAR(nVidScrnAspectX); VAR(nVidScrnAspectY); _ftprintf(h, _T("\n// If non-zero, force all games to use a 60Hz refresh rate\n")); VAR(bForce60Hz); _ftprintf(h, _T("\n// If non-zero, skip frames when needed to keep the emulation running at full speed\n")); VAR(bAlwaysDrawFrames); _ftprintf(h, _T("\n")); _ftprintf(h, _T("// --- DirectDraw blitter module settings -------------------------------------\n")); _ftprintf(h, _T("\n// If non-zero, draw scanlines at 50%% intensity\n")); VAR(bVidScanHalf); _ftprintf(h, _T("\n")); _ftprintf(h, _T("// --- Direct3D 7 blitter module settings -------------------------------------\n")); _ftprintf(h, _T("\n// If non-zero, use bi-linear filtering to display the image\n")); VAR(bVidBilinear); _ftprintf(h, _T("\n// If non-zero, simulate slow phosphors (feedback)\n")); VAR(bVidScanDelay); _ftprintf(h, _T("\n// If non-zero, use bi-linear filtering for the scanlines\n")); VAR(bVidScanBilinear); _ftprintf(h, _T("\n// Feedback amount for slow phosphor simulation\n")); VAR(nVidFeedbackIntensity); _ftprintf(h, _T("\n// Oversaturation amount for slow phosphor simulation\n")); VAR(nVidFeedbackOverSaturation); _ftprintf(h, _T("\n// Angle at wich the emulated screen is tilted (in radians)\n")); FLT(fVidScreenAngle); _ftprintf(h, _T("\n// Angle of the sphere segment used for the 3D screen (in radians)\n")); FLT(fVidScreenCurvature); _ftprintf(h, _T("\n// If non-zero, force 16 bit emulation even in 32-bit screenmodes\n")); VAR(bVidForce16bit); _ftprintf(h, _T("\n")); _ftprintf(h, _T("// --- DirectX Graphics 9 blitter module settings -----------------------------\n")); _ftprintf(h, _T("\n// The filter parameters for the cubic filter\n")); FLT(dVidCubicB); FLT(dVidCubicC); _ftprintf(h, _T("\n")); _ftprintf(h, _T("// --- DirectX Graphics 9 Alt blitter module settings -------------------------\n")); _ftprintf(h, _T("\n// If non-zero, use bi-linear filtering to display the image\n")); VAR(bVidDX9Bilinear); _ftprintf(h, _T("\n// If non-zero, use hardware vertex to display the image\n")); VAR(bVidHardwareVertex); _ftprintf(h, _T("\n// If non-zero, use motion blur to display the image\n")); VAR(bVidMotionBlur); _ftprintf(h, _T("\n\n\n")); _ftprintf(h, _T("// --- Sound ------------------------------------------------------------------\n")); _ftprintf(h, _T("\n// The selected audio plugin\n")); VAR(nAudSelect); _ftprintf(h, _T("\n// Number of frames in sound buffer (= sound lag)\n")); VAR(nAudSegCount); _ftprintf(h, _T("\n// The order of PCM/ADPCM interpolation\n")); VAR(nInterpolation); _ftprintf(h, _T("\n// The order of FM interpolation\n")); VAR(nFMInterpolation); _ftprintf(h, _T("\n")); _ftprintf(h, _T("// --- DirectSound plugin settings --------------------------------------------\n")); _ftprintf(h, _T("\n// Sample rate\n")); VAR(nAudSampleRate[0]); _ftprintf(h, _T("\n// DSP module to use for sound enhancement: 0 = none, 1 = low-pass filter\n")); VAR(nAudDSPModule[0]); _ftprintf(h, _T("\n")); _ftprintf(h, _T("// --- XAudio2 plugin settings ------------------------------------------------\n")); _ftprintf(h, _T("\n// Sample rate\n")); VAR(nAudSampleRate[1]); _ftprintf(h, _T("\n// DSP module to use for sound enhancement: 0 = none, 1 = low-pass filter, 2 = reverb\n")); VAR(nAudDSPModule[1]); _ftprintf(h, _T("\n\n\n")); _ftprintf(h, _T("// --- UI ---------------------------------------------------------------------\n")); _ftprintf(h, _T("\n// Filename of the active UI translation template\n")); STR(szLocalisationTemplate); _ftprintf(h, _T("\n// 1 = display pause/record/replay/kaillera icons in the upper right corner of the display\n")); VAR(nVidSDisplayStatus); _ftprintf(h, _T("\n// Minimum height (in pixels) of the font used for the Kaillera chat function (used for arcade resolution)\n")); VAR(nMinChatFontSize); _ftprintf(h, _T("\n// Maximum height (in pixels) of the font used for the Kaillera chat function (used for 1280x960 or higher).\n")); VAR(nMaxChatFontSize); _ftprintf(h, _T("\n// Make the menu modeless\n")); VAR(bModelessMenu); _ftprintf(h, _T("\n// Minimum length of time to display the splash screen (in milliseconds)\n")); VAR(nSplashTime); _ftprintf(h, _T("\n// If non-zero, load and save all ram (the state)\n")); VAR(bDrvSaveAll); _ftprintf(h, _T("\n// The thread priority for the application. Do *NOT* edit this manually\n")); VAR(nAppThreadPriority); _ftprintf(h, _T("\n// If non-zero, process keyboard input even when the application loses focus\n")); VAR(bAlwaysProcessKeyboardInput); _ftprintf(h, _T("\n// If non-zero, pause when the application loses focus\n")); VAR(bAutoPause); _ftprintf(h, _T("\n// If non-zero, save the inputs for each game\n")); VAR(bSaveInputs); _ftprintf(h, _T("\n\n\n")); _ftprintf(h, _T("// --- CD emulation -----------------------------------------------------------\n")); _ftprintf(h, _T("\n // The selected CD emulation module\n")); VAR(nCDEmuSelect); _ftprintf(h, _T("\n // The path to the CD image to use (.cue or .iso)\n")); STR(CDEmuImage); _ftprintf(h, _T("\n\n\n")); _ftprintf(h, _T("// --- Load Game Dialogs ------------------------------------------------------\n")); _ftprintf(h, _T("\n// Load game dialog options\n")); VAR(nLoadMenuShowX); _ftprintf(h, _T("\n// Load game dialog board type filter options\n")); VAR(nLoadMenuBoardTypeFilter); _ftprintf(h, _T("\n// Load game dialog genre filter options\n")); VAR(nLoadMenuGenreFilter); _ftprintf(h, _T("\n// Load game dialog family filter options\n")); VAR(nLoadMenuFamilyFilter); _ftprintf(h, _T("\n// The paths to search for rom zips (include trailing backslash)\n")); STR(szAppRomPaths[0]); STR(szAppRomPaths[1]); STR(szAppRomPaths[2]); STR(szAppRomPaths[3]); STR(szAppRomPaths[4]); STR(szAppRomPaths[5]); STR(szAppRomPaths[6]); STR(szAppRomPaths[7]); _ftprintf(h, _T("\n// The path to search for Neo Geo CDZ isos\n")); STR(szNeoCDGamesDir); _ftprintf(h, _T("\n// The paths to search for support files (include trailing backslash)\n")); STR(szAppPreviewsPath); STR(szAppTitlesPath); STR(szAppCheatsPath); STR(szAppHiscorePath); STR(szAppSamplesPath); STR(szAppIpsPath); STR(szNeoCDCoverDir); _ftprintf(h, _T("\n// The cartridges to use for emulation of an MVS system\n")); DRV(nBurnDrvSelect[0]); DRV(nBurnDrvSelect[1]); DRV(nBurnDrvSelect[2]); DRV(nBurnDrvSelect[3]); DRV(nBurnDrvSelect[4]); DRV(nBurnDrvSelect[5]); _ftprintf(h, _T("\n// Neo Geo CD Load Game Dialog options\n")); VAR(bNeoCDListScanSub); VAR(bNeoCDListScanOnlyISO); _ftprintf(h, _T("\n\n\n")); _ftprintf(h, _T("// --- miscellaneous ---------------------------------------------------------\n")); _ftprintf(h, _T("\n// If non-zero, don't change the status of the Num Lock key.\n")); VAR(bNoChangeNumLock); _ftprintf(h, _T("\n// If non-zero, enable high score saving support.\n")); VAR(EnableHiscores); _ftprintf(h, _T("\n// The language index to use for the IPS Patch Manager dialog.\n")); VAR(nIpsSelectedLanguage); _ftprintf(h, _T("\n// Previous games list.\n")); STR(szPrevGames[0]); STR(szPrevGames[1]); STR(szPrevGames[2]); STR(szPrevGames[3]); STR(szPrevGames[4]); STR(szPrevGames[5]); STR(szPrevGames[6]); STR(szPrevGames[7]); STR(szPrevGames[8]); STR(szPrevGames[9]); _ftprintf(h, _T("\n// Player default controls, number is the index of the configuration in the input dialog\n")); VAR(nPlayerDefaultControls[0]); STR(szPlayerDefaultIni[0]); VAR(nPlayerDefaultControls[1]); STR(szPlayerDefaultIni[1]); VAR(nPlayerDefaultControls[2]); STR(szPlayerDefaultIni[2]); VAR(nPlayerDefaultControls[3]); STR(szPlayerDefaultIni[3]); _ftprintf(h, _T("\n\n\n")); #undef DRV #undef STR #undef FLT #undef VAR #undef VAR64 fclose(h); return 0; }
static int __init xencons_init(void) { int rc; if (!is_running_on_xen()) return -ENODEV; if (xc_mode == XC_OFF) return 0; if (!is_initial_xendomain()) { rc = xencons_ring_init(); if (rc) return rc; } xencons_driver = alloc_tty_driver((xc_mode == XC_TTY) ? MAX_NR_CONSOLES : 1); if (xencons_driver == NULL) return -ENOMEM; DRV(xencons_driver)->name = "xencons"; DRV(xencons_driver)->major = TTY_MAJOR; DRV(xencons_driver)->type = TTY_DRIVER_TYPE_SERIAL; DRV(xencons_driver)->subtype = SERIAL_TYPE_NORMAL; DRV(xencons_driver)->init_termios = tty_std_termios; DRV(xencons_driver)->flags = TTY_DRIVER_REAL_RAW | TTY_DRIVER_RESET_TERMIOS | TTY_DRIVER_NO_DEVFS; DRV(xencons_driver)->termios = xencons_termios; DRV(xencons_driver)->termios_locked = xencons_termios_locked; switch (xc_mode) { case XC_XVC: DRV(xencons_driver)->name = "xvc"; DRV(xencons_driver)->major = XEN_XVC_MAJOR; DRV(xencons_driver)->minor_start = XEN_XVC_MINOR; DRV(xencons_driver)->name_base = xc_num; break; case XC_SERIAL: DRV(xencons_driver)->name = "ttyS"; DRV(xencons_driver)->minor_start = 64 + xc_num; DRV(xencons_driver)->name_base = xc_num; break; default: DRV(xencons_driver)->name = "tty"; DRV(xencons_driver)->minor_start = 1; DRV(xencons_driver)->name_base = 1; break; } tty_set_operations(xencons_driver, &xencons_ops); if ((rc = tty_register_driver(DRV(xencons_driver))) != 0) { printk("WARNING: Failed to register Xen virtual " "console driver as '%s%d'\n", DRV(xencons_driver)->name, DRV(xencons_driver)->name_base); put_tty_driver(xencons_driver); xencons_driver = NULL; return rc; } tty_register_device(xencons_driver, 0, NULL); if (is_initial_xendomain()) { xencons_priv_irq = bind_virq_to_irqhandler( VIRQ_CONSOLE, 0, xencons_priv_interrupt, 0, "console", NULL); BUG_ON(xencons_priv_irq < 0); } printk("Xen virtual console successfully installed as %s%d\n", DRV(xencons_driver)->name, xc_num); /* Check about framebuffer messing up the console */ if (!is_initial_xendomain() && !xenbus_exists(XBT_NIL, "device", "vfb")) { /* FIXME: this is ugly */ unregister_console(&kcons_info); kcons_info.flags |= CON_CONSDEV; register_console(&kcons_info); } return 0; }