Example #1
0
template<void (R65816::*op)()> void R65816::op_read_longx_w() {
  aa.l = op_readpc();
  aa.h = op_readpc();
  aa.b = op_readpc();
  rd.l = op_readlong(aa.d + regs.x.w + 0);
L rd.h = op_readlong(aa.d + regs.x.w + 1);
  call(op);
}
Example #2
0
template<void (CPUcore::*op)()> void CPUcore::op_read_long_w() {
  aa.l = op_readpc();
  aa.h = op_readpc();
  aa.b = op_readpc();
  rd.l = op_readlong(aa.d + 0);
L rd.h = op_readlong(aa.d + 1);
  call(op);
}
Example #3
0
template<void (R65816::*op)()> void R65816::op_read_ildpy_w() {
  dp = op_readpc();
  op_io_cond2();
  aa.l = op_readdp(dp + 0);
  aa.h = op_readdp(dp + 1);
  aa.b = op_readdp(dp + 2);
  rd.l = op_readlong(aa.d + regs.y.w + 0);
L rd.h = op_readlong(aa.d + regs.y.w + 1);
  call(op);
}
Example #4
0
template<void (CPUcore::*op)()> void CPUcore::op_read_ildp_w() {
  dp = op_readpc();
  op_io_cond2();
  aa.l = op_readdpn(dp + 0);
  aa.h = op_readdpn(dp + 1);
  aa.b = op_readdpn(dp + 2);
  rd.l = op_readlong(aa.d + 0);
L rd.h = op_readlong(aa.d + 1);
  call(op);
}
Example #5
0
template<int vectorE, int vectorN> void R65816::op_interrupt_e() {
  op_readpc();
  op_writestack(regs.pc.h);
  op_writestack(regs.pc.l);
  op_writestack(regs.p);
  rd.l = op_readlong(vectorE + 0);
  regs.pc.b = 0;
  regs.p.i = 1;
  regs.p.d = 0;
L rd.h = op_readlong(vectorE + 1);
  regs.pc.w = rd.w;
}
Example #6
0
template<void (R65816::*op)()> void R65816::op_read_long_b() {
  aa.l = op_readpc();
  aa.h = op_readpc();
  aa.b = op_readpc();
L rd.l = op_readlong(aa.d);
  call(op);
}
Example #7
0
template<void (CPUcore::*op)()> void CPUcore::op_read_longx_b() {
  aa.l = op_readpc();
  aa.h = op_readpc();
  aa.b = op_readpc();
L rd.l = op_readlong(aa.d + regs.x.w);
  call(op);
}
Example #8
0
template<int adjust> void R65816::op_move_w() {
  dp = op_readpc();
  sp = op_readpc();
  regs.db = dp;
  rd.l = op_readlong((sp << 16) | regs.x.w);
  op_writelong((dp << 16) | regs.y.w, rd.l);
  op_io();
  regs.x.w += adjust;
  regs.y.w += adjust;
L op_io();
  if(regs.a.w--) regs.pc.w -= 3;
}