• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ RDMEM函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: AddLog

inline void Cm6502::update_irq()
{
//    if (fp_log) fprintf(fp_log,"\n INT update_irq\n");
AddLog(LOG_CONSOLE,"updateIRQ\n");
    if(!(P & F_I)) {
        if (fp_log) fprintf(fp_log,"\n INT update_irq GO\n");

        AddLog(LOG_CONSOLE,"updateIRQ GOGOGO\n");
        EAD = IRQ_VEC;
        CYCLES(2);
        PUSH(PCH);
        PUSH(PCL);
        PUSH(P & ~F_B);
        P |= F_I;
        PCL = RDMEM(EAD);
        PCH = RDMEM(EAD + 1);
        CallSubLevel++;
        // call back the cpuintrf to let it clear the line
        //d_pic->intr_reti();
        irq_state = false;
        halt = false;
        AddLog(LOG_CONSOLE,"CPU RUNNING\n");
//        qWarning()<<"CPU RUNNING";
    }
    pending_irq = false;
}
开发者ID:pockemul,项目名称:PockEmul,代码行数:26,代码来源:m6502.cpp


示例2: m6502_get_reg

unsigned m6502_get_reg (int regnum)
{
	switch( regnum )
	{
		case REG_PC: return PCD;
		case M6502_PC: return m6502.pc.w.l;
		case REG_SP: return S;
		case M6502_S: return m6502.sp.b.l;
		case M6502_P: return m6502.p;
		case M6502_A: return m6502.a;
		case M6502_X: return m6502.x;
		case M6502_Y: return m6502.y;
		case M6502_EA: return m6502.ea.w.l;
		case M6502_ZP: return m6502.zp.w.l;
		case M6502_NMI_STATE: return m6502.nmi_state;
		case M6502_IRQ_STATE: return m6502.irq_state;
		case M6502_SO_STATE: return m6502.so_state;
		case M6502_SUBTYPE: return m6502.subtype;
		case REG_PREVIOUSPC: return m6502.ppc.w.l;
		default:
			if( regnum <= REG_SP_CONTENTS )
			{
				unsigned offset = S + 2 * (REG_SP_CONTENTS - regnum);
				if( offset < 0x1ff )
					return RDMEM( offset ) | ( RDMEM( offset + 1 ) << 8 );
			}
	}
	return 0;
}
开发者ID:Ezio-PS,项目名称:mame2003-libretro,代码行数:29,代码来源:m6502.c


示例3: sc61860_get_reg

unsigned sc61860_get_reg (int regnum)
{
	switch( regnum )
	{
	case SC61860_PC: return sc61860.pc;
	case SC61860_DP: return sc61860.dp;
	case SC61860_P: return sc61860.p;
	case SC61860_Q: return sc61860.q;
	case SC61860_R: return sc61860.r;
	case SC61860_CARRY: return sc61860.carry;
	case SC61860_ZERO: return sc61860.zero;
	case REG_PREVIOUSPC: return sc61860.oldpc;
#if 0
	case SATURN_NMI_STATE: return saturn.nmi_state;
	case SATURN_IRQ_STATE: return saturn.irq_state;
		default:
			if( regnum <= REG_SP_CONTENTS )
			{
				unsigned offset = S + 2 * (REG_SP_CONTENTS - regnum);
				if( offset < 0x1ff )
					return RDMEM( offset ) | ( RDMEM( offset + 1 ) << 8 );
			}
#endif
	}
	return 0;
}
开发者ID:AlanApter,项目名称:steamlink-sdk,代码行数:26,代码来源:sc61860.c


示例4: m4510_reset

void m4510_reset (void *param)
{
	m4510.insn = insn4510;

	/* wipe out the rest of the m65ce02 structure */
	/* read the reset vector into PC */
	/* reset z index and b bank */
	PCL = RDMEM(M4510_RST_VEC);
	PCH = RDMEM(M4510_RST_VEC+1);

	/* after reset in 6502 compatibility mode */
	m4510.sp.d = 0x01ff; /* high byte descriped in databook */
	m4510.z = 0;
	B = 0;
	m4510.p = F_E|F_B|F_I|F_Z;	/* set E, I and Z flags */
	m4510.pending_irq = 0;	/* nonzero if an IRQ is pending */
	m4510.after_cli = 0;		/* pending IRQ and last insn cleared I */
	m4510.irq_callback = NULL;

	/* don't know */
	m4510.high=0x8200;
	m4510.mem[7]=0x20000;

	CHANGE_PC;
}
开发者ID:libretro,项目名称:mame2000-libretro,代码行数:25,代码来源:m4510.c


示例5: m65ce02_set_irq_line

void m65ce02_set_irq_line(int irqline, int state)
{
	if (irqline == INPUT_LINE_NMI)
	{
		if (m65ce02.nmi_state == state) return;
		m65ce02.nmi_state = state;
		if( state != CLEAR_LINE )
		{
			LOG(("M65ce02#%d set_nmi_line(ASSERT)\n", cpu_getactivecpu()));
			EAD = M65CE02_NMI_VEC;
			m65ce02_ICount -= 7;
			PUSH(PCH);
			PUSH(PCL);
			PUSH(P & ~F_B);
			P = (P & ~F_D) | F_I;		/* knock out D and set I flag */
			PCL = RDMEM(EAD);
			PCH = RDMEM(EAD+1);
			LOG(("M65ce02#%d takes NMI ($%04x)\n", cpu_getactivecpu(), PCD));
			change_pc(PCD);
		}
	}
	else
	{
		m65ce02.irq_state = state;
		if( state != CLEAR_LINE )
		{
			LOG(("M65ce02#%d set_irq_line(ASSERT)\n", cpu_getactivecpu()));
			m65ce02.pending_irq = 1;
		}
	}
}
开发者ID:joolswills,项目名称:mameox,代码行数:31,代码来源:m65ce02.c


示例6: h6280_reset

static void h6280_reset(void *param)
{
	int i;

	/* wipe out the h6280 structure */
	memset(&h6280, 0, sizeof(h6280_Regs));

	/* set I and Z flags */
	P = _fI | _fZ;

    /* stack starts at 0x01ff */
	h6280.sp.d = 0x1ff;

    /* read the reset vector into PC */
	PCL = RDMEM(H6280_RESET_VEC);
	PCH = RDMEM((H6280_RESET_VEC+1));

	/* timer off by default */
	h6280.timer_status=0;
	h6280.timer_ack=1;

    /* clear pending interrupts */
	for (i = 0; i < 3; i++)
		h6280.irq_state[i] = CLEAR_LINE;
}
开发者ID:joolswills,项目名称:mameox,代码行数:25,代码来源:h6280.c


示例7: CPU_RESET

static CPU_RESET( m4510 )
{
	m4510_Regs *cpustate = get_safe_token(device);

	cpustate->insn = insn4510;

	/* wipe out the rest of the m65ce02 structure */
	/* read the reset vector into PC */
	/* reset z index and b bank */
	PCL = RDMEM(M4510_RST_VEC);
	PCH = RDMEM(M4510_RST_VEC+1);

	/* after reset in 6502 compatibility mode */
	cpustate->sp.d = 0x01ff; /* high byte descriped in databook */
	cpustate->z = 0;
	B = 0;
	cpustate->p = F_E|F_B|F_I|F_Z;	/* set E, I and Z flags */
	cpustate->interrupt_inhibit = 0;
	cpustate->pending_irq = 0;	/* nonzero if an IRQ is pending */
	cpustate->after_cli = 0;		/* pending IRQ and last insn cleared I */
	cpustate->irq_callback = NULL;

	/* don't know */
	cpustate->high=0x8200;
	cpustate->mem[7]=0x20000;

	cpustate->port = 0xff;
	cpustate->ddr = 0x00;
}
开发者ID:johkelly,项目名称:MAME_hi,代码行数:29,代码来源:m4510.c


示例8: m6509_get_reg

unsigned m6509_get_reg (int regnum)
{
	switch( regnum )
	{
		case M6509_PC: return m6509.pc.d;
		case M6509_S: return m6509.sp.b.l;
		case M6509_P: return m6509.p;
		case M6509_A: return m6509.a;
		case M6509_X: return m6509.x;
		case M6509_Y: return m6509.y;
		case M6509_PC_BANK: return m6509.pc_bank.b.h2;
		case M6509_IND_BANK: return m6509.ind_bank.b.h2;
		case M6509_EA: return m6509.ea.d;
		case M6509_ZP: return m6509.zp.b.l;
		case M6509_NMI_STATE: return m6509.nmi_state;
		case M6509_IRQ_STATE: return m6509.irq_state;
		case M6509_SO_STATE: return m6509.so_state;
		case REG_PREVIOUSPC: return m6509.ppc.w.l;
		default:
			if( regnum <= REG_SP_CONTENTS )
			{
				unsigned offset = S + 2 * (REG_SP_CONTENTS - regnum);
				if( offset < 0x1ff )
					return RDMEM( offset ) | ( RDMEM( offset + 1 ) << 8 );
			}
	}
	return 0;
}
开发者ID:Nebuleon,项目名称:mame4all,代码行数:28,代码来源:m6509.c


示例9: m65ce02_set_irq_line

static void m65ce02_set_irq_line(m65ce02_Regs *cpustate, int irqline, int state)
{
	if (irqline == INPUT_LINE_NMI)
	{
		if (cpustate->nmi_state == state) return;
		cpustate->nmi_state = state;
		if( state != CLEAR_LINE )
		{
			LOG(("M65ce02 '%s' set_nmi_line(ASSERT)\n", cpustate->device->tag()));
			EAD = M65CE02_NMI_VEC;
			cpustate->icount -= 7;
			PUSH(PCH);
			PUSH(PCL);
			PUSH(P & ~F_B);
			P = (P & ~F_D) | F_I;		/* knock out D and set I flag */
			PCL = RDMEM(EAD);
			PCH = RDMEM(EAD+1);
			LOG(("M65ce02 '%s' takes NMI ($%04x)\n", cpustate->device->tag(), PCD));
		}
	}
	else
	{
		cpustate->irq_state = state;
		if( state != CLEAR_LINE )
		{
			LOG(("M65ce02 '%s' set_irq_line(ASSERT)\n", cpustate->device->tag()));
			cpustate->pending_irq = 1;
		}
	}
}
开发者ID:bji,项目名称:libmame,代码行数:30,代码来源:m65ce02.c


示例10: CPU_RESET

static CPU_RESET( m6502 )
{
	m6502_Regs *cpustate = get_safe_token(device);
	/* wipe out the rest of the m6502 structure */
	/* read the reset vector into PC */
	PCL = RDMEM(M6502_RST_VEC);
	PCH = RDMEM(M6502_RST_VEC+1);

	cpustate->sp.d = 0x01ff;	/* stack pointer starts at page 1 offset FF */
	cpustate->p = F_T|F_I|F_Z|F_B|(P&F_D);	/* set T, I and Z flags */
	cpustate->pending_irq = 0;	/* nonzero if an IRQ is pending */
	cpustate->after_cli = 0;	/* pending IRQ and last insn cleared I */
	cpustate->irq_state = 0;
	cpustate->nmi_state = 0;
}
开发者ID:bji,项目名称:libmame,代码行数:15,代码来源:m6502.c


示例11: m6502_reset

static void m6502_reset(void)
{
	/* wipe out the rest of the m6502 structure */
	/* read the reset vector into PC */
	PCL = RDMEM(M6502_RST_VEC);
	PCH = RDMEM(M6502_RST_VEC+1);

	m6502.sp.d = 0x01ff;	/* stack pointer starts at page 1 offset FF */
	m6502.p = F_T|F_I|F_Z|F_B|(P&F_D);	/* set T, I and Z flags */
	m6502.pending_irq = 0;	/* nonzero if an IRQ is pending */
	m6502.after_cli = 0;	/* pending IRQ and last insn cleared I */
	m6502.irq_state = 0;
	m6502.nmi_state = 0;

	change_pc(PCD);
}
开发者ID:broftkd,项目名称:historic-mess,代码行数:16,代码来源:m6502.c


示例12: deco16_reset

static void deco16_reset (void)
{
	m6502_reset();
	m6502.subtype = SUBTYPE_DECO16;
	m6502.insn = insndeco16;

    PCL = RDMEM(DECO16_RST_VEC+1);
    PCH = RDMEM(DECO16_RST_VEC);

	m6502.sp.d = 0x01ff;	/* stack pointer starts at page 1 offset FF */
	m6502.p = F_T|F_I|F_Z|F_B|(P&F_D);	/* set T, I and Z flags */
	m6502.pending_irq = 0;	/* nonzero if an IRQ is pending */
	m6502.after_cli = 0;	/* pending IRQ and last insn cleared I */

	change_pc(PCD);
}
开发者ID:broftkd,项目名称:historic-mess,代码行数:16,代码来源:m6502.c


示例13: RDMEM

void Cm6502::Reset(void)
{
    if (fp_log) fprintf(fp_log,"\nRESET\n");
    PCL = RDMEM(RST_VEC);
    PCH = RDMEM(RST_VEC + 1);
    SPD = 0x01ff;
    P = F_T | F_I | F_Z | F_B | (P & F_D);

    icount = 0;
    pending_irq = after_cli = false;
    irq_state = nmi_state = so_state = false;
    halt = false;
    CallSubLevel = 0;
    AddLog(LOG_CONSOLE,"CPU RUNNING\n");
//    qWarning()<<"CPU RUNNING";
}
开发者ID:pockemul,项目名称:PockEmul,代码行数:16,代码来源:m6502.cpp


示例14: CYCLES

void Cm6502::run_one_opecode()
{
    // if an irq is pending, take it now
    if(nmi_state) {
        EAD = NMI_VEC;
        CYCLES(2);
        PUSH(PCH);
        PUSH(PCL);
        PUSH(P & ~F_B);
        P |= F_I;	// set I flag
        PCL = RDMEM(EAD);
        PCH = RDMEM(EAD + 1);
        CallSubLevel++;
        nmi_state = false;
        halt=false;
        AddLog(LOG_CONSOLE,"CPU RUNNING\n");
//        qWarning()<<"CPU RUNNING";
        if (fp_log) fprintf(fp_log,"\n INT NMI newpc:%04x\n",PCW);
    }
    else if(pending_irq) {
        if (halt) Reset();
        else update_irq();
    }
    if (halt) {
        CYCLES(50);
        P &= ~F_I;
        return;
    }

    prev_pc = pc.w.l;
    quint8 code = RDOP();
    OP(code);

    // check if the I flag was just reset (interrupts enabled)
    if(after_cli) {
        after_cli = false;
        if(irq_state) {
            if (fp_log) fprintf(fp_log,"\n INT after_cli irq\n");

            pending_irq = true;
        }
    }
    else if(pending_irq) {
        update_irq();
    }
}
开发者ID:pockemul,项目名称:PockEmul,代码行数:46,代码来源:m6502.cpp


示例15: m6502_reset

void m6502_reset(void *param)
{
	m6502.subtype = SUBTYPE_6502;
    m6502.insn = insn6502;

	/* wipe out the rest of the m6502 structure */
	/* read the reset vector into PC */
    PCL = RDMEM(M6502_RST_VEC);
    PCH = RDMEM(M6502_RST_VEC+1);
	m6502.sp.d = 0x0100 | (m6502.sp.b.l);	/* stack pointer (always 100 - 1FF) */
	m6502.p = F_T|F_I|F_Z;	/* set T, I and Z flags */
	m6502.pending_irq = 0;	/* nonzero if an IRQ is pending */
	m6502.after_cli = 0;	/* pending IRQ and last insn cleared I */
	m6502.irq_callback = NULL;

	change_pc16(PCD);
}
开发者ID:OS2World,项目名称:APP-EMULATION-MAME,代码行数:17,代码来源:m6502.c


示例16: m65ce02_take_irq

INLINE void m65ce02_take_irq(m65ce02_Regs *cpustate)
{
	if( !(P & F_I) )
	{
		EAD = M65CE02_IRQ_VEC;
		cpustate->icount -= 7;
		PUSH(PCH);
		PUSH(PCL);
		PUSH(P & ~F_B);
		P = (P & ~F_D) | F_I;		/* knock out D and set I flag */
		PCL = RDMEM(EAD);
		PCH = RDMEM(EAD+1);
		LOG(("M65ce02 '%s' takes IRQ ($%04x)\n", cpustate->device->tag(), PCD));
		/* call back the cpuintrf to let it clear the line */
		if (cpustate->irq_callback) (*cpustate->irq_callback)(cpustate->device, 0);
	}
	cpustate->pending_irq = 0;
}
开发者ID:bji,项目名称:libmame,代码行数:18,代码来源:m65ce02.c


示例17: m4510_take_irq

INLINE void m4510_take_irq(m4510_Regs *cpustate)
{
	if(( !(P & F_I) ) && (cpustate->interrupt_inhibit == 0))
	{
		EAD = M4510_IRQ_VEC;
		cpustate->icount -= 7;
		PUSH(PCH);
		PUSH(PCL);
		PUSH(P & ~F_B);
		P = (P & ~F_D) | F_I;		/* knock out D and set I flag */
		PCL = RDMEM(EAD);
		PCH = RDMEM(EAD+1);
		LOG(("M4510 '%s' takes IRQ ($%04x)\n", cpustate->device->tag, PCD));
		/* call back the cpuintrf to let it clear the line */
		if (cpustate->irq_callback) (*cpustate->irq_callback)(cpustate->device, 0);
	}
	cpustate->pending_irq = 0;
}
开发者ID:nitrologic,项目名称:emu,代码行数:18,代码来源:m4510.c


示例18: deco16_take_irq

INLINE void deco16_take_irq(m6502_Regs *cpustate)
{
	if( !(P & F_I) )
	{
		EAD = DECO16_IRQ_VEC;
		cpustate->icount -= 2;
		PUSH(PCH);
		PUSH(PCL);
		PUSH(P & ~F_B);
		P |= F_I;		/* set I flag */
		PCL = RDMEM(EAD+1);
		PCH = RDMEM(EAD);
		LOG(("M6502 '%s' takes IRQ ($%04x)\n", cpustate->device->tag(), PCD));
		/* call back the cpuintrf to let it clear the line */
		if (cpustate->irq_callback) (*cpustate->irq_callback)(cpustate->device, 0);
	}
	cpustate->pending_irq = 0;
}
开发者ID:bji,项目名称:libmame,代码行数:18,代码来源:m6502.c


示例19: m65ce02_reset

void m65ce02_reset (void *param)
{
	c65_map=(void(*)(int a, int x, int y, int z))param;
	m65ce02.insn = insn65ce02;

	/* wipe out the rest of the m65ce02 structure */
	/* read the reset vector into PC */
	/* reset z index and b bank */
	PCL = RDMEM(M65CE02_RST_VEC);
	PCH = RDMEM(M65CE02_RST_VEC+1);

	m65ce02.sp.d = 0x01ff;
	m65ce02.p = F_T|F_I|F_Z;	/* set T, I and Z flags */
	m65ce02.pending_irq = 0;	/* nonzero if an IRQ is pending */
	m65ce02.after_cli = 0;		/* pending IRQ and last insn cleared I */
	m65ce02.irq_callback = NULL;

	change_pc16(PCD);
}
开发者ID:cdrr,项目名称:MAME_hack,代码行数:19,代码来源:m65ce02.c


示例20: deco16_take_irq

INLINE void deco16_take_irq(void)
{
	if( !(P & F_I) )
	{
		EAD = DECO16_IRQ_VEC;
		m6502_ICount -= 7;
		PUSH(PCH);
		PUSH(PCL);
		PUSH(P & ~F_B);
		P |= F_I;		/* set I flag */
		PCL = RDMEM(EAD+1);
		PCH = RDMEM(EAD);
		LOG(("M6502#%d takes IRQ ($%04x)\n", cpu_getactivecpu(), PCD));
		/* call back the cpuintrf to let it clear the line */
		if (m6502.irq_callback) (*m6502.irq_callback)(0);
		change_pc(PCD);
	}
	m6502.pending_irq = 0;
}
开发者ID:broftkd,项目名称:historic-mess,代码行数:19,代码来源:m6502.c



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ RE函数代码示例发布时间:2022-05-30
下一篇:
C++ RDGetSqlValue函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap