111 |
byte Op; |
byte Op; |
112 |
Op = mem(Addr); |
Op = mem(Addr); |
113 |
debugf(("Op6502(%04x,%02x) PC:%04x\n", Addr, Op, R->PC.W)); |
debugf(("Op6502(%04x,%02x) PC:%04x\n", Addr, Op, R->PC.W)); |
114 |
|
return Op; |
115 |
} |
} |
116 |
|
|
117 |
/** Loop6502() ***********************************************/ |
/** Loop6502() ***********************************************/ |
173 |
call_pv("Arch::init", G_DISCARD | G_NOARGS ); |
call_pv("Arch::init", G_DISCARD | G_NOARGS ); |
174 |
|
|
175 |
pull_R(R); |
pull_R(R); |
176 |
printf("run CPU\n"); |
int cycles = SvIV( get_sv("M6502::run_for", FALSE) ); |
177 |
|
printf("run CPU for %d cycles\n", cycles); |
178 |
dump_R; |
dump_R; |
179 |
//Run6502(R); |
//Run6502(R); |
180 |
Exec6502(R, DEFAULT_RUN); |
Exec6502(R, cycles); |
181 |
dump_R; |
dump_R; |
182 |
push_R(R); |
push_R(R); |
183 |
printf("end of CPU run\n"); |
printf("end of CPU run\n"); |