本文整理汇总了C#中xnamame036.mame.UIntSubArray类的典型用法代码示例。如果您正苦于以下问题:C# UIntSubArray类的具体用法?C# UIntSubArray怎么用?C# UIntSubArray使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
UIntSubArray类属于xnamame036.mame命名空间,在下文中一共展示了UIntSubArray类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: m68000_dbf
static void m68000_dbf()
{
UIntSubArray d_reg = new UIntSubArray(m68k_cpu.dr, (int)m68k_cpu.ir & 7);
uint res = ((d_reg[0] - 1) & 0xffff);
d_reg[0] = (uint)((d_reg[0]) & ~0xffff) | res;
if (res != 0xffff)
{
; /* auto-disable (see m68kcpu.h) */
m68k_cpu.pc += (uint)MAKE_INT_16(m68ki_read_16(m68k_cpu.pc));
m68k_clks_left[0] -= (10);
return;
}
m68k_cpu.pc += 2;
m68k_clks_left[0] -= (14);
}
示例2: m68000_abcd_rr
static void m68000_abcd_rr()
{
UIntSubArray d_dst = new UIntSubArray(m68k_cpu.dr, (int)(m68k_cpu.ir >> 9) & 7);
uint src = (m68k_cpu.dr[m68k_cpu.ir & 7]);
uint dst = d_dst[0];
uint res = ((src) & 0x0f) + ((dst) & 0x0f) + ((m68k_cpu.x_flag != 0) ? 1u : 0u);
if (res > 9)
res += 6;
res += ((src) & 0xf0) + ((dst) & 0xf0);
if ((m68k_cpu.x_flag = m68k_cpu.c_flag = (res > 0x99) ? 1u : 0) != 0)
res -= 0xa0;
d_dst[0] = (uint)((d_dst[0]) & ~0xff) | ((res) & 0xff);
m68k_cpu.n_flag = ((res) & 0x80); /* officially undefined */
if (((res) & 0xff) != 0)
m68k_cpu.not_z_flag = 1;
m68k_clks_left[0] -= (6);
}
示例3: m68000_nbcd_d
static void m68000_nbcd_d()
{
UIntSubArray d_dst = new UIntSubArray(m68k_cpu.dr, m68k_cpu.ir & 7);
uint dst = d_dst[0];
uint res = ((0x9a - dst - (((m68k_cpu.x_flag != 0) ? 1u : 0u))) & 0xff);
if (res != 0x9a)
{
if ((res & 0x0f) == 0xa)
res = (res & 0xf0) + 0x10;
d_dst[0] = (uint)((d_dst[0]) & ~0xff) | res;
if (res != 0)
m68k_cpu.not_z_flag = 1;
m68k_cpu.c_flag = m68k_cpu.x_flag = 1;
}
else
m68k_cpu.c_flag = m68k_cpu.x_flag = 0;
m68k_clks_left[0] -= (6);
}
示例4: m68000_movep_er_16
static void m68000_movep_er_16()
{
uint ea = (m68k_cpu.ar[m68k_cpu.ir & 7]) + (uint)MAKE_INT_16(((m68ki_read_imm_16()) & 0xffff));
UIntSubArray d_dst = new UIntSubArray(m68k_cpu.dr, (int)(m68k_cpu.ir >> 9) & 7);
d_dst[0] =(uint) ((d_dst[0]) & ~0xffff) | ((m68ki_read_8(ea) << 8) + m68ki_read_8(ea + 2));
m68k_clks_left[0] -= (16);
}
示例5: m68000_move_dd_i_32
static void m68000_move_dd_i_32()
{
uint res = m68ki_read_imm_32();
UIntSubArray d_dst = new UIntSubArray(m68k_cpu.dr, (int)(m68k_cpu.ir >> 9) & 7);
d_dst[0] = res;
m68k_cpu.n_flag = ((res) & 0x80000000);
m68k_cpu.not_z_flag = res;
m68k_cpu.v_flag = m68k_cpu.c_flag = 0;
m68k_clks_left[0] -= (4 + 8);
}
示例6: m68000_move_dd_di_32
static void m68000_move_dd_di_32()
{
uint res = m68ki_read_32(((m68k_cpu.ar[m68k_cpu.ir & 7]) + (uint)MAKE_INT_16(m68ki_read_imm_16())));
UIntSubArray d_dst = new UIntSubArray(m68k_cpu.dr, (int)(m68k_cpu.ir >> 9) & 7);
d_dst[0] = res;
m68k_cpu.n_flag = ((res) & 0x80000000);
m68k_cpu.not_z_flag = res;
m68k_cpu.v_flag = m68k_cpu.c_flag = 0;
m68k_clks_left[0] -= (4 + 12);
}
示例7: m68000_divs_i_16
static void m68000_divs_i_16()
{
UIntSubArray d_dst = new UIntSubArray(m68k_cpu.dr, (int)(m68k_cpu.ir >> 9) & 7);
int src = MAKE_INT_16(m68ki_read_imm_16());
m68k_cpu.c_flag = 0;
if (src != 0)
{
int quotient = MAKE_INT_32(d_dst[0]) / src;
int remainder = MAKE_INT_32(d_dst[0]) % src;
if (quotient == MAKE_INT_16(quotient))
{
m68k_cpu.not_z_flag = (uint)quotient;
m68k_cpu.n_flag = (uint)((quotient) & 0x8000);
m68k_cpu.v_flag = 0;
d_dst[0] = (uint)(((quotient) & 0xffff) | (remainder << 16));
m68k_clks_left[0] -= (158 + 4);
return;
}
m68k_cpu.v_flag = 1;
m68k_clks_left[0] -= (158 + 4);
return;
}
m68ki_interrupt(5);
}
示例8: m68000_move_dd_pi_16
static void m68000_move_dd_pi_16()
{
uint res = m68ki_read_16((((m68k_cpu.ar[m68k_cpu.ir & 7]) += 2) - 2));
UIntSubArray d_dst = new UIntSubArray(m68k_cpu.dr, (int)(m68k_cpu.ir >> 9) & 7);
d_dst[0] = (uint)((d_dst[0]) & ~0xffff) | res;
m68k_cpu.n_flag = ((res) & 0x8000);
m68k_cpu.not_z_flag = res;
m68k_cpu.v_flag = m68k_cpu.c_flag = 0;
m68k_clks_left[0] -= (4 + 4);
}
示例9: m68000_lsl_r_32
static void m68000_lsl_r_32()
{
UIntSubArray d_dst = new UIntSubArray(m68k_cpu.dr, m68k_cpu.ir & 7);
uint shift = (m68k_cpu.dr[(m68k_cpu.ir >> 9) & 7]) & 0x3f;
uint src = d_dst[0];
uint res = (src << (int)shift);
m68k_clks_left[0] -= (int)((shift << 1) + 8);
if (shift != 0)
{
if (shift < 32)
{
d_dst[0] = res;
m68k_cpu.x_flag = m68k_cpu.c_flag = (src >> (int)(32 - shift)) & 1;
m68k_cpu.n_flag = ((res) & 0x80000000);
m68k_cpu.not_z_flag = res;
m68k_cpu.v_flag = 0;
return;
}
d_dst[0] = 0;
m68k_cpu.x_flag = m68k_cpu.c_flag = (shift == 32 ? src & 1 : 0);
m68k_cpu.n_flag = 0;
m68k_cpu.not_z_flag = 0;
m68k_cpu.v_flag = 0;
return;
}
m68k_cpu.c_flag = 0;
m68k_cpu.n_flag = ((res) & 0x80000000);
m68k_cpu.not_z_flag = res;
m68k_cpu.v_flag = 0;
}
示例10: m68000_mulu_i_16
static void m68000_mulu_i_16()
{
UIntSubArray d_dst = new UIntSubArray(m68k_cpu.dr, (int)(m68k_cpu.ir >> 9) & 7);
uint res = m68ki_read_imm_16() * ((d_dst[0]) & 0xffff);
d_dst[0] = res;
m68k_cpu.not_z_flag = res;
m68k_cpu.n_flag = ((res) & 0x80000000);
m68k_cpu.v_flag = m68k_cpu.c_flag = 0;
m68k_clks_left[0] -= (54 + 4);
}
示例11: m68000_mulu_pcdi_16
static void m68000_mulu_pcdi_16()
{
UIntSubArray d_dst = new UIntSubArray(m68k_cpu.dr, (int)(m68k_cpu.ir >> 9) & 7);
uint old_pc = (m68k_cpu.pc += 2) - 2;
uint ea = old_pc + (uint)MAKE_INT_16(m68ki_read_16(old_pc));
uint res = m68ki_read_16(ea) * ((d_dst[0]) & 0xffff);
d_dst[0] = res;
m68k_cpu.not_z_flag = res;
m68k_cpu.n_flag = ((res) & 0x80000000);
m68k_cpu.v_flag = m68k_cpu.c_flag = 0;
m68k_clks_left[0] -= (54 + 8);
}
示例12: m68000_muls_pcix_16
static void m68000_muls_pcix_16()
{
UIntSubArray d_dst = new UIntSubArray(m68k_cpu.dr, (int)(m68k_cpu.ir >> 9) & 7);
uint res = (uint)MAKE_INT_16(m68ki_read_16(m68ki_get_ea_pcix())) * (uint)MAKE_INT_16(((d_dst[0]) & 0xffff));
d_dst[0] = res;
m68k_cpu.not_z_flag = res;
m68k_cpu.n_flag = ((res) & 0x80000000);
m68k_cpu.v_flag = m68k_cpu.c_flag = 0;
m68k_clks_left[0] -= (54 + 10);
}
示例13: m68020_cas2_32
static void m68020_cas2_32()
{
if ((m68k_cpu.mode & (4 | 8)) != 0)
{
uint word2 = m68ki_read_imm_32();
UIntSubArray r_src1 = new UIntSubArray(m68k_cpu.dr,(int)(word2 >> 16) & 7);
uint ea1 = m68k_cpu_dar[word2 >> 31][(int)(word2 >> 28) & 7];
uint dst1 = m68ki_read_32(ea1);
uint res1 = (dst1 - r_src1[0]);
UIntSubArray r_src2 = new UIntSubArray(m68k_cpu.dr, (int)word2 & 7);
uint ea2 = m68k_cpu_dar[word2 >> 15][(int)(word2 >> 12) & 7];
uint dst2 = m68ki_read_32(ea2);
uint res2;
; /* auto-disable (see m68kcpu.h) */
m68k_cpu.n_flag = ((res1) & 0x80000000);
m68k_cpu.not_z_flag = res1;
m68k_cpu.v_flag = (((~r_src1[0] & dst1 & ~res1) | (r_src1[0] & ~dst1 & res1)) & 0x80000000);
m68k_cpu.c_flag = (((r_src1[0] & ~dst1) | (res1 & ~dst1) | (r_src1[0] & res1)) & 0x80000000);
if (m68k_cpu.not_z_flag==0)
{
res2 = (dst2 - r_src2[0]);
m68k_cpu.n_flag = ((res2) & 0x80000000);
m68k_cpu.not_z_flag = res2;
m68k_cpu.v_flag = (((~r_src2[0] & dst2 & ~res2) | (r_src2[0] & ~dst2 & res2)) & 0x80000000);
m68k_cpu.c_flag = (((r_src2[0] & ~dst2) | (res2 & ~dst2) | (r_src2[0] & res2)) & 0x80000000);
if (m68k_cpu.not_z_flag==0)
{
m68ki_write_32(ea1, m68k_cpu.dr[(word2 >> 22) & 7]);
m68ki_write_32(ea2, m68k_cpu.dr[(word2 >> 6) & 7]);
m68k_clks_left[0] -= (22);
return;
}
}
r_src1[0] = dst1;
r_src2[0] = dst2;
m68k_clks_left[0] -= (25);
return;
}
m68000_illegal();
}
示例14: m68020_cas_al_32
static void m68020_cas_al_32()
{
if ((m68k_cpu.mode & (4 | 8)) != 0)
{
uint word2 = m68ki_read_imm_16();
uint ea = m68ki_read_imm_32();
uint dst = m68ki_read_32(ea);
UIntSubArray d_src = new UIntSubArray(m68k_cpu.dr,(int)word2 & 7);
uint res = (dst - d_src[0]);
; /* auto-disable (see m68kcpu.h) */
m68k_cpu.n_flag = ((res) & 0x80000000);
m68k_cpu.not_z_flag = res;
m68k_cpu.v_flag = (((~d_src[0] & dst & ~res) | (d_src[0] & ~dst & res)) & 0x80000000);
m68k_cpu.c_flag = (((d_src[0] & ~dst) | (res & ~dst) | (d_src[0] & res)) & 0x80000000);
if (m68k_cpu.not_z_flag!=0)
d_src[0] = dst;
else
m68ki_write_32(ea, m68k_cpu.dr[(word2 >> 6) & 7]);
m68k_clks_left[0] -= (15 + 16);
return;
}
m68000_illegal();
}
示例15: m68000_add_er_i_32
static void m68000_add_er_i_32()
{
UIntSubArray d_dst = new UIntSubArray(m68k_cpu.dr, (int)(m68k_cpu.ir >> 9) & 7);
uint src = m68ki_read_imm_32();
uint dst = d_dst[0];
uint res = d_dst[0] = (src + dst);
m68k_cpu.n_flag = ((res) & 0x80000000);
m68k_cpu.not_z_flag = res;
m68k_cpu.v_flag = (((src & dst & ~res) | (~src & ~dst & res)) & 0x80000000);
m68k_cpu.x_flag = m68k_cpu.c_flag = (((src & dst) | (~res & dst) | (src & ~res)) & 0x80000000);
m68k_clks_left[0] -= (6 + 10);
}