您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ BURN_ENDIAN_SWAP_INT16函数代码示例

51自学网 2021-06-01 19:53:58
  C++
这篇教程C++ BURN_ENDIAN_SWAP_INT16函数代码示例写得很实用,希望能帮到您。

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

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

示例1: DrvReset

static INT32 DrvReset(){	// Reset machine	if (Cps == 2 || PangEEP || Cps1Qs == 1 || CpsBootlegEEPROM) EEPROMReset();        //HACK    if (glob_ffingeron&&virtual_stick_on) {        wait_control=60;        glob_framecpt=0;        glob_replay_last_dx16=glob_replay_last_dy16=0;        glob_delta_dy16=0;        glob_replay_last_fingerOn=0;    }    //	SekOpen(0);	SekReset();	SekClose();	if (((Cps & 1) && !Cps1DisablePSnd) || ((Cps == 2) && !Cps2DisableQSnd)) {		ZetOpen(0);		ZetReset();		ZetClose();	}	if (Cps == 2) {		// Disable beam-synchronized interrupts		*((UINT16*)(CpsReg + 0x4E)) = BURN_ENDIAN_SWAP_INT16(0x0200);		*((UINT16*)(CpsReg + 0x50)) = BURN_ENDIAN_SWAP_INT16(nCpsNumScanlines);		*((UINT16*)(CpsReg + 0x52)) = BURN_ENDIAN_SWAP_INT16(nCpsNumScanlines);	}	SekOpen(0);	CpsMapObjectBanks(0);	SekClose();	nCpsCyclesExtra = 0;	if (((Cps == 2) && !Cps2DisableQSnd) || Cps1Qs == 1) {			// Sound init (QSound)		QsndReset();	}		if (CpsRunResetCallbackFunction) {		CpsRunResetCallbackFunction();	}		HiscoreReset();	return 0;}
开发者ID:coca8cola,项目名称:iFBA,代码行数:50,


示例2: CavePalUpdate4Bit

INT32 CavePalUpdate4Bit(INT32 nOffset, INT32 nNumPalettes){	INT32 i, j;	UINT16* ps = (UINT16*)CavePalSrc + nOffset;	UINT16* pc;	UINT32* pd;	UINT16 c;	if (CaveRecalcPalette) {		for (i = 0; i < 0 + nNumPalettes; i++) {			pc = CavePalCopy + (i << 8);			pd = CavePalette + (i << 8);			for (j = 0; j < 16; j++, ps++, pc++, pd++) {				c = *ps;				*pc = c;				*pd = CalcCol(BURN_ENDIAN_SWAP_INT16(c));			}		}		CaveRecalcPalette = 0;		return 0;	}	for (i = 0; i < 0 + nNumPalettes; i++) {		pc = CavePalCopy + (i << 8);		pd = CavePalette + (i << 8);		for (j = 0; j < 16; j++, ps++, pc++, pd++) {			c = *ps;			if (*pc != c) {				*pc = c;				*pd = CalcCol(BURN_ENDIAN_SWAP_INT16(c));			}		}	}	return 0;}
开发者ID:CaptainCPS,项目名称:FBAlphaRL,代码行数:49,


示例3: pgm_decrypt_dw2

void pgm_decrypt_dw2(){	UINT16 *src = (UINT16 *)PGM68KROM;	for (INT32 i = 0; i<nPGM68KROMLen/2; i++) {		UINT16 x = BURN_ENDIAN_SWAP_INT16(src[i]);		if ((i & 0x020890) == 0x000000)				      x ^= 0x0002;		if ((i & 0x020000) == 0x020000 && (i & 0x001500) != 0x001400) x ^= 0x0002;		if ((i & 0x020400) == 0x000000 && (i & 0x002010) != 0x002010) x ^= 0x0400;		if ((i & 0x020000) == 0x020000 && (i & 0x000148) != 0x000140) x ^= 0x0400;			src[i] = BURN_ENDIAN_SWAP_INT16(x);	}}
开发者ID:aquasnake,项目名称:fba-sdl,代码行数:15,


示例4: pgm_decrypt_dw3

void pgm_decrypt_dw3(){	UINT16 *src = (UINT16 *)PGM68KROM;	for (INT32 i = 0; i < nPGM68KROMLen/2; i++) {		UINT16 x = BURN_ENDIAN_SWAP_INT16(src[i]);		if ((i & 0x005460) == 0x001400) x ^= 0x0100;		if ((i & 0x005450) == 0x001040) x ^= 0x0100;		if ((i & 0x005e00) == 0x001c00) x ^= 0x0040;		if ((i & 0x005580) == 0x001100) x ^= 0x0040;		src[i] = BURN_ENDIAN_SWAP_INT16(x);	}}
开发者ID:aquasnake,项目名称:fba-sdl,代码行数:15,


示例5: pgm_decrypt_killbld

void pgm_decrypt_killbld(){	UINT16 *src = (UINT16 *)PGM68KROM;	for (INT32 i = 0; i < nPGM68KROMLen/2; i++) {		UINT16 x = BURN_ENDIAN_SWAP_INT16(src[i]);		if ((i & 0x006d00) == 0x000400) x ^= 0x0008;		if ((i & 0x006c80) == 0x000880) x ^= 0x0008;		if ((i & 0x007500) == 0x002400) x ^= 0x1000;		if ((i & 0x007600) == 0x003200) x ^= 0x1000;		src[i] = BURN_ENDIAN_SWAP_INT16(x);	}}
开发者ID:aquasnake,项目名称:fba-sdl,代码行数:15,


示例6: pgm_decode_kovqhsgs_tile_data

void pgm_decode_kovqhsgs_tile_data(UINT8 *source){	INT32 i, j;	UINT16 *src = (UINT16*)source;	UINT16 *dst = (UINT16*)BurnMalloc(0x800000);	for (i = 0; i < 0x800000 / 2; i++)	{		j = BITSWAP24(i, 23, 22, 9, 8, 21, 18, 0, 1, 2, 3, 16, 15, 14, 13, 12, 11, 10, 19, 20, 17, 7, 6, 5, 4);		dst[j] = BURN_ENDIAN_SWAP_INT16(BITSWAP16(BURN_ENDIAN_SWAP_INT16(src[i]), 1, 14, 8, 7, 0, 15, 6, 9, 13, 2, 5, 10, 12, 3, 4, 11));	}	memcpy (src, dst, 0x800000);	BurnFree (dst);}
开发者ID:aquasnake,项目名称:fba-sdl,代码行数:17,


示例7: K053246Write

void K053246Write(INT32 offset, INT32 data){	if (data & 0x10000) { // handle it as a word		*((UINT16*)(K053246Regs + (offset & 6))) = BURN_ENDIAN_SWAP_INT16(data);	} else {		K053246Regs[offset & 7] = data;	}}
开发者ID:CaptainCPS,项目名称:FBAlphaRL,代码行数:8,


示例8: K053247Write

void K053247Write(INT32 offset, INT32 data){	if (data & 0x10000) { // use word		*((UINT16*)(K053247Ram + (offset & 0xffe))) = BURN_ENDIAN_SWAP_INT16(data);	} else {		K053247Ram[offset & 0xfff] = data;	}}
开发者ID:CaptainCPS,项目名称:FBAlphaRL,代码行数:8,


示例9: pgm_decode_kovqhsgs_program

static void pgm_decode_kovqhsgs_program(){	INT32 i, j;	UINT16 *src = (UINT16*)PGM68KROM;	UINT16 *dst = (UINT16*)BurnMalloc(0x400000);	for (i = 0; i < 0x400000 / 2; i++)	{		j = BITSWAP24(i, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 6, 7, 5, 4, 3, 2, 1, 0);		dst[j] = BURN_ENDIAN_SWAP_INT16(BITSWAP16(BURN_ENDIAN_SWAP_INT16(src[i]), 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 4, 5, 3, 2, 1, 0));	}	memcpy (src, dst, 0x400000);	BurnFree (dst);}
开发者ID:aquasnake,项目名称:fba-sdl,代码行数:17,


示例10: pgm_decrypt_svg

void pgm_decrypt_svg(){	UINT16 *src = (UINT16 *)PGMUSER0;	for (INT32 i = 0; i < nPGMExternalARMLen/2; i++) {		UINT16 x = BURN_ENDIAN_SWAP_INT16(src[i]);		if ((i & 0x040080) != 0x000080) x ^= 0x0001;		if ((i & 0x004008) == 0x004008) x ^= 0x0002;		if ((i & 0x080030) == 0x080010) x ^= 0x0004;		if ((i & 0x000042) != 0x000042) x ^= 0x0008;		if ((i & 0x048100) == 0x048000) x ^= 0x0010;		if ((i & 0x002004) != 0x000004) x ^= 0x0020;		if ((i & 0x011800) != 0x010000) x ^= 0x0040;		if ((i & 0x000820) == 0x000820) x ^= 0x0080;		src[i] = BURN_ENDIAN_SWAP_INT16(x);	}}
开发者ID:aquasnake,项目名称:fba-sdl,代码行数:19,


示例11: read_half

uint16_t read_half(addr_t address){    address &= 0xFFFFFFFF;    UINT8 *pr = g_mmap->MemMap[PFN(address)];    if ((uintptr_t)pr >= MIPS_MAXHANDLER) {        return BURN_ENDIAN_SWAP_INT16(fast_read<uint16_t>(pr, address));    }    return g_mmap->ReadHalf[(uintptr_t)pr](address);}
开发者ID:spectrenoir06,项目名称:libretro-fba,代码行数:10,


示例12: pgm_decrypt_ddp2

void pgm_decrypt_ddp2(){	UINT16 *src = (UINT16 *)PGMUSER0;	for (INT32 i = 0; i < nPGMExternalARMLen/2; i++) {    		UINT16 x = BURN_ENDIAN_SWAP_INT16(src[i]);		if ((i & 0x0480) != 0x0080) x ^= 0x0001;		if ((i & 0x0042) != 0x0042) x ^= 0x0008;		if ((i & 0x8100) == 0x8000) x ^= 0x0010;		if ((i & 0x2004) != 0x0004) x ^= 0x0020;		if ((i & 0x1800) != 0x0000) x ^= 0x0040;		if ((i & 0x0820) == 0x0820) x ^= 0x0080;		x ^= ddp2_tab[(i >> 1) & 0xff] << 8;		src[i] = BURN_ENDIAN_SWAP_INT16(x);	}}
开发者ID:aquasnake,项目名称:fba-sdl,代码行数:19,


示例13: write_half

void write_half(addr_t address, uint16_t value){    address &= 0xFFFFFFFF;    UINT8 *pr = g_mmap->MemMap[PAGE_WADD + PFN(address)];    if ((uintptr_t)pr >= MIPS_MAXHANDLER) {        fast_write<uint16_t>(pr, address, BURN_ENDIAN_SWAP_INT16(value));        return;    }    g_mmap->WriteHalf[(uintptr_t)pr](address, value);}
开发者ID:spectrenoir06,项目名称:libretro-fba,代码行数:11,


示例14: pgm_decrypt_puzlstar

void pgm_decrypt_puzlstar(){	UINT16 *src = (UINT16 *)PGM68KROM;	for (INT32 i = 0; i < nPGM68KROMLen/2; i++) {		UINT16 x = BURN_ENDIAN_SWAP_INT16(src[i]);		if ((i & 0x40480) != 0x00080) x ^= 0x0001;		if ((i & 0x00030) == 0x00010) x ^= 0x0004;		if ((i & 0x00242) != 0x00042) x ^= 0x0008;		if ((i & 0x08100) == 0x08000) x ^= 0x0010;		if ((i & 0x22004) != 0x00004) x ^= 0x0020;		if ((i & 0x11800) != 0x10000) x ^= 0x0040;		if ((i & 0x04820) == 0x04820) x ^= 0x0080;		x ^= puzlstar_tab[i & 0xff] << 8;		src[i] = BURN_ENDIAN_SWAP_INT16(x);	}}
开发者ID:aquasnake,项目名称:fba-sdl,代码行数:20,


示例15: pgm_decrypt_happy6in1

void pgm_decrypt_happy6in1(){	UINT16 *src = (UINT16*)PGMUSER0;	for (INT32 i = 0; i < nPGMExternalARMLen/2; i++) {		UINT16 x = BURN_ENDIAN_SWAP_INT16(src[i]);		if ((i & 0x040480) != 0x000080) x ^= 0x0001;		if ((i & 0x104008) == 0x104008) x ^= 0x0002;		if ((i & 0x080030) == 0x080010) x ^= 0x0004;		if ((i & 0x000242) != 0x000042) x ^= 0x0008;		if ((i & 0x048100) == 0x048000) x ^= 0x0010;		if ((i & 0x002004) != 0x000004) x ^= 0x0020;		if ((i & 0x011800) != 0x010000) x ^= 0x0040;		if ((i & 0x000820) == 0x000820) x ^= 0x0080;		x ^= happy6in1_tab[(i >> 1) & 0xff] << 8;		src[i] = BURN_ENDIAN_SWAP_INT16(x);	}}
开发者ID:aquasnake,项目名称:fba-sdl,代码行数:21,


示例16: pgm_decrypt_espgaluda

void pgm_decrypt_espgaluda(){	UINT16 *src = (UINT16 *)PGM68KROM;	for (INT32 i = 0; i < nPGM68KROMLen/2; i++) {		UINT16 x = BURN_ENDIAN_SWAP_INT16(src[i]);		if ((i & 0x040480) != 0x000080) x ^= 0x0001;		if ((i & 0x084008) == 0x084008) x ^= 0x0002;		if ((i & 0x000030) == 0x000010) x ^= 0x0004;		if ((i & 0x000042) != 0x000042) x ^= 0x0008;		if ((i & 0x048100) == 0x048000) x ^= 0x0010;		if ((i & 0x022004) != 0x000004) x ^= 0x0020;		if ((i & 0x011800) != 0x010000) x ^= 0x0040;		if ((i & 0x000820) == 0x000820) x ^= 0x0080;		x ^= espgal_tab[i & 0xff] << 8;		src[i] = BURN_ENDIAN_SWAP_INT16(x);	}}
开发者ID:aquasnake,项目名称:fba-sdl,代码行数:21,


示例17: pgm_decrypt_ketsui

void pgm_decrypt_ketsui(){	UINT16 *src = (UINT16 *)PGM68KROM;	for (INT32 i = 0; i < nPGM68KROMLen/2; i++) {		UINT16 x = BURN_ENDIAN_SWAP_INT16(src[i]);		if ((i & 0x040480) != 0x000080) x ^= 0x0001;		if ((i & 0x004008) == 0x004008) x ^= 0x0002;		if ((i & 0x080030) == 0x000010) x ^= 0x0004; // due to address starting at 0 and not 100000/2!		if ((i & 0x000042) != 0x000042) x ^= 0x0008;		if ((i & 0x008100) == 0x008000) x ^= 0x0010;		if ((i & 0x002004) != 0x000004) x ^= 0x0020;		if ((i & 0x011800) != 0x010000) x ^= 0x0040;		if ((i & 0x000820) == 0x000820) x ^= 0x0080;		x ^= ketsui_tab[i & 0xff] << 8;		src[i] = BURN_ENDIAN_SWAP_INT16(x);	}}
开发者ID:aquasnake,项目名称:fba-sdl,代码行数:21,


示例18: DrvReset

static INT32 DrvReset(){	// Reset machine	if (Cps == 2 || PangEEP || Cps1Qs == 1 || CpsBootlegEEPROM) EEPROMReset();	SekOpen(0);	SekReset();	SekClose();	if (((Cps & 1) && !Cps1DisablePSnd) || ((Cps == 2) && !Cps2DisableQSnd)) {		ZetOpen(0);		ZetReset();		ZetClose();	}	if (Cps == 2) {		// Disable beam-synchronized interrupts		*((UINT16*)(CpsReg + 0x4E)) = BURN_ENDIAN_SWAP_INT16(0x0200);		*((UINT16*)(CpsReg + 0x50)) = BURN_ENDIAN_SWAP_INT16(nCpsNumScanlines);		*((UINT16*)(CpsReg + 0x52)) = BURN_ENDIAN_SWAP_INT16(nCpsNumScanlines);	}	SekOpen(0);	CpsMapObjectBanks(0);	SekClose();	nCpsCyclesExtra = 0;	if (((Cps == 2) && !Cps2DisableQSnd) || Cps1Qs == 1) {			// Sound init (QSound)		QsndReset();	}		if (CpsRunResetCallbackFunction) {		CpsRunResetCallbackFunction();	}		HiscoreReset();	return 0;}
开发者ID:tigerking,项目名称:fba-libretro,代码行数:40,


示例19: pgm_decrypt_svgpcb

void pgm_decrypt_svgpcb(){	UINT16 *src = (UINT16 *)PGMUSER0;	for (INT32 i = 0; i < nPGMExternalARMLen/2; i++) {		UINT16 x = BURN_ENDIAN_SWAP_INT16(src[i]);		// preliminary!		if ((i & 0x040080) != 0x000080) x ^= 0x0001; // ok?		if ((i & 0x084008) == 0x084008) x ^= 0x0002;		if ((i & 0x080030) == 0x080010) x ^= 0x0004;		if ((i & 0x000242) != 0x000042) x ^= 0x0008; // ok?		if ((i & 0x048100) == 0x048000) x ^= 0x0010; //		if ((i & 0x022004) != 0x000004) x ^= 0x0020; // ok?		if ((i & 0x011800) != 0x010000) x ^= 0x0040;		if ((i & 0x000820) == 0x000820) x ^= 0x0080;		x ^= svgpcb_tab[(i >> 1) & 0xff] << 8;		src[i] = BURN_ENDIAN_SWAP_INT16(x);	}}
开发者ID:aquasnake,项目名称:fba-sdl,代码行数:22,


示例20: fuuki32_write_word

void __fastcall fuuki32_write_word(UINT32 address, UINT16 data){	if ((address & 0xffffe0) == 0x8c0000) {		if (address == 0x8c001c) {			DrvRasterPos[0] = data & 0xff;		}		*((UINT16*)(DrvVidRegs + (address & 0x1e))) = BURN_ENDIAN_SWAP_INT16(data);		return;	}	if ((address & 0xffffe0) == 0x903fe0) {		cpu_sync();		DrvShareRAM[(address & 0x1f) >> 1] = data & 0xff;		return;	}
开发者ID:Cpasjuste,项目名称:libarcade,代码行数:19,


示例21: kovsh_asic27a_read_word

static UINT16 __fastcall kovsh_asic27a_read_word(UINT32 address){	if ((address & 0xffffc0) == 0x4f0000) {		return BURN_ENDIAN_SWAP_INT16(*((UINT16*)(PGMARMShareRAM + (address & 0x3e))));	}	switch (address)	{		case 0x500000:		case 0x600000:			pgm_cpu_sync();			return kovsh_lowlatch_arm_w;		case 0x500002:		case 0x600002:			pgm_cpu_sync();			return kovsh_highlatch_arm_w;	}	return 0;}
开发者ID:Cpasjuste,项目名称:libarcade,代码行数:21,


示例22: Cps2Frame

INT32 Cps2Frame(){	INT32 nDisplayEnd, nNext;									// variables to keep track of executed 68K cyles	INT32 i;	if (CpsReset) {		DrvReset();	}//	extern INT32 prevline;//	prevline = -1;	SekNewFrame();	if (!Cps2DisableQSnd) QsndNewFrame();	nCpsCycles = (INT32)(((INT64)nCPS68KClockspeed * nBurnCPUSpeedAdjust) / 0x0100);	SekOpen(0);	SekSetCyclesScanline(nCpsCycles / nCpsNumScanlines);	CpsRwGetInp();											// Update the input port values		// Check the volumes every 5 frames or so#if 0	if (GetCurrentFrame() % 5 == 0) {		if (Cps2VolUp) Cps2Volume++;		if (Cps2VolDwn) Cps2Volume--;				if (Cps2Volume > 39) Cps2Volume = 39;		if (Cps2Volume < 0) Cps2Volume = 0;				QscSetRoute(BURN_SND_QSND_OUTPUT_1, Cps2Volume / 39.0, BURN_SND_ROUTE_LEFT);		QscSetRoute(BURN_SND_QSND_OUTPUT_2, Cps2Volume / 39.0, BURN_SND_ROUTE_RIGHT);	}#endif		nDisplayEnd = nCpsCycles * (nFirstLine + 224) / nCpsNumScanlines;	// Account for VBlank	nInterrupt = 0;   memset(nRasterline, 0, MAX_RASTER + 2 * sizeof(nRasterline[0]));	// Determine which (if any) of the line counters generates the first IRQ	bEnableAutoIrq50 = bEnableAutoIrq52 = false;	nIrqLine50 = nIrqLine52 = nCpsNumScanlines;	if (BURN_ENDIAN_SWAP_INT16(*((UINT16*)(CpsReg + 0x50))) & 0x8000) {		bEnableAutoIrq50 = true;	}	if (bEnableAutoIrq50 || (BURN_ENDIAN_SWAP_INT16(*((UINT16*)(CpsReg + 0x4E))) & 0x0200) == 0) {		nIrqLine50 = (BURN_ENDIAN_SWAP_INT16(*((UINT16*)(CpsReg + 0x50))) & 0x01FF);	}	if (BURN_ENDIAN_SWAP_INT16(*((UINT16*)(CpsReg + 0x52))) & 0x8000) {		bEnableAutoIrq52 = true;	}	if (bEnableAutoIrq52 || (BURN_ENDIAN_SWAP_INT16(*((UINT16*)(CpsReg + 0x4E))) & 0x0200) == 0) {		nIrqLine52 = (BURN_ENDIAN_SWAP_INT16(*((UINT16*)(CpsReg + 0x52))) & 0x01FF);	}	ScheduleIRQ();	SekIdle(nCpsCyclesExtra);	if (nIrqCycles < nCpsCycles * nFirstLine / nCpsNumScanlines) {		SekRun(nIrqCycles);		DoIRQ();	}	nNext = nCpsCycles * nFirstLine / nCpsNumScanlines;	if (SekTotalCycles() < nNext) {		SekRun(nNext - SekTotalCycles());	}	CopyCpsReg(0);										// Get inititial copy of registers	CopyCpsFrg(0);										//	if (nIrqLine >= nCpsNumScanlines && (BURN_ENDIAN_SWAP_INT16(*((UINT16*)(CpsReg + 0x4E))) & 0x0200) == 0) {		nIrqLine50 = BURN_ENDIAN_SWAP_INT16(*((UINT16*)(CpsReg + 0x50))) & 0x01FF;		nIrqLine52 = BURN_ENDIAN_SWAP_INT16(*((UINT16*)(CpsReg + 0x52))) & 0x01FF;		ScheduleIRQ();	}	{		nNext = (nDisplayEnd) / 3;			// find out next cycle count to run to		while (nNext > nIrqCycles && nInterrupt < MAX_RASTER) {			SekRun(nIrqCycles - SekTotalCycles());			DoIRQ();		}		SekRun(nNext - SekTotalCycles());				// run cpu		nNext = (2 * nDisplayEnd) / 3;			// find out next cycle count to run to		while (nNext > nIrqCycles && nInterrupt < MAX_RASTER) {			SekRun(nIrqCycles - SekTotalCycles());			DoIRQ();		}		SekRun(nNext - SekTotalCycles());				// run cpu		nNext = (3 * nDisplayEnd) / 3;			// find out next cycle count to run to		while (nNext > nIrqCycles && nInterrupt < MAX_RASTER) {			SekRun(nIrqCycles - SekTotalCycles());			DoIRQ();		}//.........这里部分代码省略.........
开发者ID:tigerking,项目名称:fba-libretro,代码行数:101,


示例23: kovsh_asic27a_arm7_write_word

static void kovsh_asic27a_arm7_write_word(UINT32 address, UINT16 data){	if ((address & 0xffffff80) == 0x50800000) {	// written... but never read?		*((UINT16*)(PGMARMShareRAM + ((address>>1) & 0x3e))) = BURN_ENDIAN_SWAP_INT16(data);		return;	}
开发者ID:Cpasjuste,项目名称:libarcade,代码行数:6,


示例24: PC090OJDrawSprites

void PC090OJDrawSprites(UINT8 *pSrc){	UINT16 *VideoRam = (UINT16*)PC090OJRam;		INT32 PC090OJCtrl = BURN_ENDIAN_SWAP_INT16(VideoRam[0xdff]);		INT32 Offset;	INT32 SpriteColBank = (PC090OJSpriteCtrl & 0x0f) << 4;		for (Offset = 0x400 - 4; Offset >= 0; Offset -= 4)	{		INT32 xFlip, yFlip;		INT32 x, y;		INT32 Data, Code, Colour;		Data = BURN_ENDIAN_SWAP_INT16(VideoRam[Offset + 0]);		yFlip = (Data & 0x8000) >> 15;		xFlip = (Data & 0x4000) >> 14;		Colour = (Data & 0x000f) | SpriteColBank | PC090OJPaletteOffset;		Code = BURN_ENDIAN_SWAP_INT16(VideoRam[Offset + 2]) & 0x1fff;		if (Code >= PC090OJNumTiles) {			Code %= PC090OJNumTiles; // ok? Mod seems to work fine for bonze.		}		x = BURN_ENDIAN_SWAP_INT16(VideoRam[Offset + 3]) & 0x1ff;		y = BURN_ENDIAN_SWAP_INT16(VideoRam[Offset + 1]) & 0x1ff;		if (x > 0x140) x -= 0x200;		if (y > 0x140) y -= 0x200;				if (!(PC090OJCtrl & 1))	{			x = 320 - x - 16;			y = 256 - y - 16;			xFlip = !xFlip;			yFlip = !yFlip;		}		x -= PC090OJXOffset;		y -= PC090OJYOffset;		if (x > 16 && x < (nScreenWidth - 16) && y > 16 && y < (nScreenHeight - 16)) {			if (xFlip) {				if (yFlip) {					Render16x16Tile_Mask_FlipXY(pTransDraw, Code, x, y, Colour, 4, 0, 0, pSrc);				} else {					Render16x16Tile_Mask_FlipX(pTransDraw, Code, x, y, Colour, 4, 0, 0, pSrc);				}			} else {				if (yFlip) {					Render16x16Tile_Mask_FlipY(pTransDraw, Code, x, y, Colour, 4, 0, 0, pSrc);				} else {					Render16x16Tile_Mask(pTransDraw, Code, x, y, Colour, 4, 0, 0, pSrc);				}			}		} else {			if (xFlip) {				if (yFlip) {					Render16x16Tile_Mask_FlipXY_Clip(pTransDraw, Code, x, y, Colour, 4, 0, 0, pSrc);				} else {					Render16x16Tile_Mask_FlipX_Clip(pTransDraw, Code, x, y, Colour, 4, 0, 0, pSrc);				}			} else {				if (yFlip) {					Render16x16Tile_Mask_FlipY_Clip(pTransDraw, Code, x, y, Colour, 4, 0, 0, pSrc);				} else {					Render16x16Tile_Mask_Clip(pTransDraw, Code, x, y, Colour, 4, 0, 0, pSrc);				}			}		}	}}
开发者ID:CaptainCPS,项目名称:FBAlphaRL,代码行数:72,


示例25: BurnHighCol

	INT32 r, g, b;	r = (nColour & 0x7C00) >> 7;	// Red 	r |= r >> 5;	g = (nColour & 0x03E0) >> 2;	// Green	g |= g >> 5;	b = (nColour & 0x001F) << 3;	// Blue	b |= b >> 5;	return BurnHighCol(r, g, b, 0);}void __fastcall PgmPaletteWriteWord(UINT32 sekAddress, UINT16 wordValue){	sekAddress = (sekAddress - 0xa00000) >> 1;	PGMPalRAM[sekAddress] =BURN_ENDIAN_SWAP_INT16(wordValue);	RamCurPal[sekAddress] = CalcCol(wordValue);}void __fastcall PgmPaletteWriteByte(UINT32 sekAddress, UINT8 byteValue){	sekAddress -= 0xa00000;	UINT8 *pal = (UINT8*)PGMPalRAM;	pal[sekAddress ^ 1] = byteValue;	RamCurPal[sekAddress >> 1] = CalcCol(PGMPalRAM[sekAddress >> 1]);}UINT8 __fastcall PgmZ80PortRead(UINT16 port){	switch (port >> 8)
开发者ID:Kauhsa,项目名称:fba-libretro,代码行数:31,



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


C++ BUSNAME函数代码示例
C++ BUILTIN_TYPE函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。