当前位置: 首页>>代码示例>>C++>>正文


C++ SysPrintf函数代码示例

本文整理汇总了C++中SysPrintf函数的典型用法代码示例。如果您正苦于以下问题:C++ SysPrintf函数的具体用法?C++ SysPrintf怎么用?C++ SysPrintf使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了SysPrintf函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: PAD__init

long PAD__init(long flags) {
    SysPrintf("start PAD_init()\r\n");
    PadFlags |= flags;
    /* Read Configuration here */
    SysPrintf("end PAD_init()\r\n");
    return PSE_PAD_ERR_SUCCESS;
}
开发者ID:Astraljam,项目名称:pcsx-revolution,代码行数:7,代码来源:PlugPAD.c

示例2: CDR__close

long CDR__close(void) {
    SysPrintf("start CDR_close()\r\n");
    fclose(CD.cd);
    free(CD.tl);
    SysPrintf("end CDR_close()\r\n");
    return 0;
}
开发者ID:AlexBu,项目名称:pcsx,代码行数:7,代码来源:PlugCD.c

示例3: LoadMcd

void LoadMcd(int mcd, char *str) {
	FILE *f;
	char *data = NULL;

	if (mcd != 1 && mcd != 2)
		return;

	if (mcd == 1) {
		data = Mcd1Data;
		cardh1[1] |= 8; // mark as new
	}
	if (mcd == 2) {
		data = Mcd2Data;
		cardh2[1] |= 8;
	}

	McdDisable[mcd - 1] = 0;
	if (str == NULL || strcmp(str, "none") == 0) {
		McdDisable[mcd - 1] = 1;
		return;
	}
	if (*str == 0)
		return;

	f = fopen(str, "rb");
	if (f == NULL) {
		SysPrintf(_("The memory card %s doesn't exist - creating it\n"), str);
		CreateMcd(str);
		f = fopen(str, "rb");
		if (f != NULL) {
			struct stat buf;

			if (stat(str, &buf) != -1) {
				if (buf.st_size == MCD_SIZE + 64)
					fseek(f, 64, SEEK_SET);
				else if(buf.st_size == MCD_SIZE + 3904)
					fseek(f, 3904, SEEK_SET);
			}
			fread(data, 1, MCD_SIZE, f);
			fclose(f);
		}
		else
			SysMessage(_("Memory card %s failed to load!\n"), str);
	}
	else {
		struct stat buf;
		SysPrintf(_("Loading memory card %s\n"), str);
		if (stat(str, &buf) != -1) {
			if (buf.st_size == MCD_SIZE + 64)
				fseek(f, 64, SEEK_SET);
			else if(buf.st_size == MCD_SIZE + 3904)
				fseek(f, 3904, SEEK_SET);
		}
		fread(data, 1, MCD_SIZE, f);
		fclose(f);
	}
}
开发者ID:AlexBu,项目名称:pcsx_rearmed,代码行数:57,代码来源:sio.c

示例4: emu_on_new_cd

void emu_on_new_cd(int show_hud_msg)
{
	ClearAllCheats();
	parse_cwcheat();

	if (Config.HLE) {
		SysPrintf("note: running with HLE BIOS, expect compatibility problems\n");
		SysPrintf("----------------------------------------------------------\n");
	}

	if (show_hud_msg) {
		snprintf(hud_msg, sizeof(hud_msg), BOOT_MSG);
		hud_new_msg = 3;
	}
}
开发者ID:BlackLotus,项目名称:pcsxr-libretro,代码行数:15,代码来源:main.c

示例5: PAD__open

long PAD__open(void)
{

	SysPrintf("start PAD1_open()\r\n");

	return 0;
}
开发者ID:libretro,项目名称:ps3sx,代码行数:7,代码来源:PlugPAD.c

示例6: CDR__open

long CDR__open(void)
{
	char str[256];
	
    SysPrintf("start CDR_open()\r\n");

    //	newCD("/cd/cd.bin");
	strcpy(str, CDConfiguration.dn);
	strcat(str, "/");
	strcat(str, CDConfiguration.fn);
	
	newCD(str);

    SysPrintf("end CDR_open()\r\n");
    return 0;
}
开发者ID:AlexBu,项目名称:pcsx,代码行数:16,代码来源:PlugCD.c

示例7: psxMemReset

void psxMemReset() {
	FILE *f = NULL;
	char Bios[256];

	memset(psxM, 0, 0x00200000);
	memset(psxP, 0, 0x00010000);

	if(!Config.HLE)
	{
		sprintf(Bios, "%s%s", Config.BiosDir, Config.Bios);
		f = fopen(Bios, "rb");

		if (f == NULL) {
			SysPrintf ("BIOS NOT FOUND: %s", Bios);
			gp2x_timer_delay(2000);
			memset(psxR, 0, 0x80000);
			Config.HLE = 1;
		}
		else {
			fread(psxR, 1, 0x80000, f);
			fclose(f);
		}
	}
	else
	{
		memset(psxR, 0, 0x80000);
	}
}
开发者ID:flpstr,项目名称:Psx4all,代码行数:28,代码来源:mem.cpp

示例8: SaveStateGz

int SaveStateGz(gzFile f, long* gzsize) {
	int Size;
	unsigned char pMemGpuPic[SZ_GPUPIC];

	//if (f == NULL) return -1;

	gzwrite(f, (void *)PcsxrHeader, sizeof(PcsxrHeader));
	gzwrite(f, (void *)&SaveVersion, sizeof(u32));
	gzwrite(f, (void *)&Config.HLE, sizeof(boolean));

	if (gzsize)GPU_getScreenPic(pMemGpuPic); // Not necessary with ephemeral saves
	gzwrite(f, pMemGpuPic, SZ_GPUPIC);

	if (Config.HLE)
		psxBiosFreeze(1);

	gzwrite(f, psxM, 0x00200000);
	gzwrite(f, psxR, 0x00080000);
	gzwrite(f, psxH, 0x00010000);
	gzwrite(f, (void *)&psxRegs, sizeof(psxRegs));

	// gpu
	if (!gpufP)gpufP = (GPUFreeze_t *)malloc(sizeof(GPUFreeze_t));
	gpufP->ulFreezeVersion = 1;
	GPU_freeze(1, gpufP);
	gzwrite(f, gpufP, sizeof(GPUFreeze_t));

	// SPU Plugin cannot change during run, so we query size info just once per session
	if (!spufP) {
		spufP = (SPUFreeze_t *)malloc(offsetof(SPUFreeze_t, SPUPorts)); // only first 3 elements (up to Size)        
		SPU_freeze(2, spufP);
		Size = spufP->Size;
		SysPrintf("SPUFreezeSize %i/(%i)\n", Size, offsetof(SPUFreeze_t, SPUPorts));
		free(spufP);
		spufP = (SPUFreeze_t *) malloc(Size);
		spufP->Size = Size;

		if (spufP->Size <= 0) {
			gzclose(f);
			free(spufP);
			spufP = NULL;
			return 1; // error
		}
	}
	// spu
	gzwrite(f, &(spufP->Size), 4);
	SPU_freeze(1, spufP);
	gzwrite(f, spufP, spufP->Size);

	sioFreeze(f, 1);
	cdrFreeze(f, 1);
	psxHwFreeze(f, 1);
	psxRcntFreeze(f, 1);
	mdecFreeze(f, 1);

	if(gzsize)*gzsize = gztell(f);
	gzclose(f);

	return 0;
}
开发者ID:SonofUgly,项目名称:PCSX-Reloaded,代码行数:60,代码来源:misc.c

示例9: psxException

void psxException(u32 code, u32 bd) {
	// Set the Cause
	psxRegs.CP0.n.Cause = (psxRegs.CP0.n.Cause & 0x300) | code;

	// Set the EPC & PC
	if (bd) {
#ifdef PSXCPU_LOG
		PSXCPU_LOG("bd set!!!\n");
#endif
		SysPrintf("bd set!!!\n");
		psxRegs.CP0.n.Cause |= 0x80000000;
		psxRegs.CP0.n.EPC = (psxRegs.pc - 4);
	} else
		psxRegs.CP0.n.EPC = (psxRegs.pc);

	if (psxRegs.CP0.n.Status & 0x400000)
		psxRegs.pc = 0xbfc00180;
	else
		psxRegs.pc = 0x80000080;

	// Set the Status
	psxRegs.CP0.n.Status = (psxRegs.CP0.n.Status &~0x3f) |
						  ((psxRegs.CP0.n.Status & 0xf) << 2);

	if (Config.HLE) psxBiosException();
}
开发者ID:LibXenonProject,项目名称:pcsxr-xenon,代码行数:26,代码来源:r3000a.c

示例10: _rcntTestTarget

static void __fastcall _rcntTestTarget( int i )
{
	if( psxCounters[i].count < psxCounters[i].target ) return;

	PSXCNT_LOG("IOP Counter[%d] target 0x%I64x >= 0x%I64x (mode: %x)\n",
		i, psxCounters[i].count, psxCounters[i].target, psxCounters[i].mode);

	if (psxCounters[i].mode & IOPCNT_INT_TARGET)
	{
		// Target interrupt

		if(psxCounters[i].mode & 0x80)
			psxCounters[i].mode &= ~0x0400; // Interrupt flag
		psxCounters[i].mode |= 0x0800; // Target flag

		psxHu32(0x1070) |= psxCounters[i].interrupt;
	}
	
	if (psxCounters[i].mode & 0x08)
	{
		// Reset on target
		psxCounters[i].count -= psxCounters[i].target;
		if(!(psxCounters[i].mode & 0x40))
		{
			SysPrintf("Counter %x repeat intr not set on zero ret, ignoring target\n", i);
			psxCounters[i].target |= IOPCNT_FUTURE_TARGET;
		}
	} else psxCounters[i].target |= IOPCNT_FUTURE_TARGET;
}
开发者ID:0xZERO3,项目名称:PCSX2-rr-lua,代码行数:29,代码来源:IopCounters.cpp

示例11: psxRcnt5Wmode

void psxRcnt5Wmode(u32 value)
{
	PSXCNT_LOG("IOP Counter[5] writeMode = %lx\n", value);

	psxCounters[5].mode = value;
	psxCounters[5].mode|= 0x0400;

	switch(value & 0x6000)
	{
		case 0x0000: psxCounters[5].rate = 1; break;
		case 0x2000: psxCounters[5].rate = 8; break;
		case 0x4000: psxCounters[5].rate = 16; break;
		case 0x6000: psxCounters[5].rate = 256; break;
	}
	// Need to set a rate and target
	if((psxCounters[5].mode & 0x7) == 0x7 || (psxCounters[5].mode & 0x7) == 0x1)
	{
		SysPrintf("Gate set on IOP C5, disabling\n");
		psxCounters[5].mode |= IOPCNT_STOPPED;
	}
	
	psxCounters[5].count = 0;
	psxCounters[5].sCycleT = psxRegs.cycle;
	psxCounters[5].target &= 0xffffffff;
	_rcntSet( 5 );
}
开发者ID:0xZERO3,项目名称:PCSX2-rr-lua,代码行数:26,代码来源:IopCounters.cpp

示例12: _ext_memRead16

mem16_t __fastcall _ext_memRead16(u32 mem)
{
	switch (p)
	{
		case 1: // hwm
			return hwRead16(mem);
		case 2: // psh
			return psxHwRead16(mem);
		case 4: // b80
			MEM_LOG("b800000 Memory read16 address %x\n", mem);
			return 0;
		case 5: // ba0
			return ba0R16(mem);
		case 6: // gsm
			return gsRead16(mem);

		case 7: // dev9
		{
			mem16_t retval = DEV9read16(mem & ~0xa4000000);
			SysPrintf("DEV9 read16 %8.8lx: %4.4lx\n", mem & ~0xa4000000, retval);
			return retval;
		}

		case 8: // spu2
			return SPU2read(mem);
	}
	MEM_LOG("Unknown Memory read16  from address %8.8x\n", mem);
	cpuTlbMissR(mem, cpuRegs.branch);
	return 0;
}
开发者ID:mfitz21,项目名称:pcsx2-rr,代码行数:30,代码来源:Memory.cpp

示例13: LoadMcd

void LoadMcd(int mcd, char *str) {
	FILE *f;
	char *data = NULL;

	if (mcd == 1) data = Mcd1Data;
	if (mcd == 2) data = Mcd2Data;

	if (*str == 0) {
		sprintf(str, "%s/.pcsxr/memcards/card%d.mcd", getenv("HOME"), mcd); // TODO: maybe just whine and quit..
		SysPrintf(_("No memory card value was specified - using a default card %s\n"), str);
	}
	f = fopen(str, "rb");
	if (f == NULL) {
		SysPrintf(_("The memory card %s doesn't exist - creating it\n"), str);
		CreateMcd(str);
		f = fopen(str, "rb");
		if (f != NULL) {
			struct stat buf;

			if (stat(str, &buf) != -1) {
				if (buf.st_size == MCD_SIZE + 64)
					fseek(f, 64, SEEK_SET);
				else if(buf.st_size == MCD_SIZE + 3904)
					fseek(f, 3904, SEEK_SET);
			}
			fread(data, 1, MCD_SIZE, f);
			fclose(f);
		}
		else
			SysMessage(_("Memory card %s failed to load!\n"), str);
	}
	else {
		struct stat buf;
		SysPrintf(_("Loading memory card %s\n"), str);
		if (stat(str, &buf) != -1) {
			if (buf.st_size == MCD_SIZE + 64)
				fseek(f, 64, SEEK_SET);
			else if(buf.st_size == MCD_SIZE + 3904)
				fseek(f, 3904, SEEK_SET);
		}
		fread(data, 1, MCD_SIZE, f);
		fclose(f);
	}

	// flag indicating entries have not yet been read (i.e. new card plugged)
	cardh[1] |= MCDST_CHANGED;
}
开发者ID:Asmodean-,项目名称:PCSXR,代码行数:47,代码来源:sio.c

示例14: ClosePlugins

void ClosePlugins() {
	int ret;

	ret = CDR_close();
	if (ret < 0) { SysPrintf("Error Closing CDR Plugin\n"); return; }
	ret = SPU_close();
	if (ret < 0) { SysPrintf("Error Closing SPU Plugin\n"); return; }
	ret = PAD1_close();
	if (ret < 0) { SysPrintf("Error Closing PAD1 Plugin\n"); return; }
	ret = PAD2_close();
	if (ret < 0) { SysPrintf("Error Closing PAD2 Plugin\n"); return; }
	ret = GPU_close();
	if (ret < 0) { SysPrintf("Error Closing GPU Plugin\n"); return; }

	if (Config.UseNet) {
		NET_pause();
	}
}
开发者ID:emukidid,项目名称:pcsxgc,代码行数:18,代码来源:Plugin.c

示例15: emu_core_init

int emu_core_init(void)
{
	SysPrintf("Starting PCSX-ReARMed " REV "\n");

	if (EmuInit() == -1) {
		SysPrintf("PSX emulator couldn't be initialized.\n");
		return -1;
	}

	LoadMcds(Config.Mcd1, Config.Mcd2);

#ifdef DEBUG
	if (Config.Debug)
		StartDebugger();
#endif

	return 0;
}
开发者ID:BlackLotus,项目名称:pcsxr-libretro,代码行数:18,代码来源:main.c


注:本文中的SysPrintf函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。