30 #include "EventScheduler.h" 49 friend class MOS6510Debug;
52 static const char *credit;
60 static const int MAX = 65536;
63 static const uint8_t SP_PAGE = 0x01;
90 bool irqAssertedOnPin;
105 uint_least16_t Register_ProgramCounter;
106 uint_least16_t Cycle_EffectiveAddress;
107 uint_least16_t Cycle_HighByteWrongEffectiveAddress;
108 uint_least16_t Cycle_Pointer;
111 uint8_t Register_StackPointer;
112 uint8_t Register_Accumulator;
118 uint_least16_t instrStartPC;
119 uint_least16_t instrOperand;
127 struct ProcessorCycle instrTable[0x101 << 3];
136 void eventWithoutSteals();
137 void eventWithSteals();
142 inline void IRQLoRequest();
143 inline void IRQHiRequest();
144 inline void interruptsAndNextOpcode();
145 inline void calculateInterruptTriggerCycle();
148 inline void fetchNextOpcode();
149 inline void throwAwayFetch();
150 inline void throwAwayRead();
151 inline void FetchDataByte();
152 inline void FetchLowAddr();
153 inline void FetchLowAddrX();
154 inline void FetchLowAddrY();
155 inline void FetchHighAddr();
156 inline void FetchHighAddrX();
157 inline void FetchHighAddrX2();
158 inline void FetchHighAddrY();
159 inline void FetchHighAddrY2();
160 inline void FetchLowEffAddr();
161 inline void FetchHighEffAddr();
162 inline void FetchHighEffAddrY();
163 inline void FetchHighEffAddrY2();
164 inline void FetchLowPointer();
165 inline void FetchLowPointerX();
166 inline void FetchHighPointer();
167 inline void FetchEffAddrDataByte ();
168 inline void PutEffAddrDataByte();
169 inline void PushLowPC();
170 inline void PushHighPC();
171 inline void PushSR();
172 inline void PopLowPC();
173 inline void PopHighPC();
175 inline void brkPushLowPC();
176 inline void WasteCycle();
179 inline void adc_instr();
180 inline void alr_instr();
181 inline void anc_instr();
182 inline void and_instr();
183 inline void ane_instr();
184 inline void arr_instr();
185 inline void asl_instr();
186 inline void asla_instr();
187 inline void aso_instr();
188 inline void axa_instr();
189 inline void axs_instr();
190 inline void bcc_instr();
191 inline void bcs_instr();
192 inline void beq_instr();
193 inline void bit_instr();
194 inline void bmi_instr();
195 inline void bne_instr();
196 inline void branch_instr(
bool condition);
197 inline void bpl_instr();
198 inline void brk_instr();
199 inline void bvc_instr();
200 inline void bvs_instr();
201 inline void clc_instr();
202 inline void cld_instr();
203 inline void cli_instr();
204 inline void clv_instr();
205 inline void cmp_instr();
206 inline void cpx_instr();
207 inline void cpy_instr();
208 inline void dcm_instr();
209 inline void dec_instr();
210 inline void dex_instr();
211 inline void dey_instr();
212 inline void eor_instr();
213 inline void inc_instr();
214 inline void ins_instr();
215 inline void inx_instr();
216 inline void iny_instr();
217 inline void jmp_instr();
218 inline void las_instr();
219 inline void lax_instr();
220 inline void lda_instr();
221 inline void ldx_instr();
222 inline void ldy_instr();
223 inline void lse_instr();
224 inline void lsr_instr();
225 inline void lsra_instr();
226 inline void oal_instr();
227 inline void ora_instr();
228 inline void pha_instr();
229 inline void pla_instr();
230 inline void plp_instr();
231 inline void rla_instr();
232 inline void rol_instr();
233 inline void rola_instr();
234 inline void ror_instr();
235 inline void rora_instr();
236 inline void rra_instr();
237 inline void rti_instr();
238 inline void rts_instr();
239 inline void sbx_instr();
240 inline void say_instr();
241 inline void sbc_instr();
242 inline void sec_instr();
243 inline void sed_instr();
244 inline void sei_instr();
245 inline void shs_instr();
246 inline void sta_instr();
247 inline void stx_instr();
248 inline void sty_instr();
249 inline void tax_instr();
250 inline void tay_instr();
251 inline void tsx_instr();
252 inline void txa_instr();
253 inline void txs_instr();
254 inline void tya_instr();
255 inline void xas_instr();
257 void illegal_instr();
276 virtual uint8_t
cpuRead(uint_least16_t addr) =0;
284 virtual void cpuWrite(uint_least16_t addr, uint8_t data) =0;
286 #ifdef PC64_TESTSUITE 287 virtual void loadFile (
const char *file) =0;
292 static const char *credits() {
return credit; }
294 void debug(
bool enable, FILE *out);
MOS6510(EventContext *context)
Definition: mos6510.cpp:1475
void setRDY(bool newRDY)
Definition: mos6510.cpp:116
void reset()
Definition: mos6510.cpp:2167
static const int SR_INTERRUPT
Status register interrupt bit.
Definition: mos6510.h:67
virtual void cpuWrite(uint_least16_t addr, uint8_t data)=0
virtual uint8_t cpuRead(uint_least16_t addr)=0
void triggerNMI()
Definition: mos6510.cpp:185
void triggerIRQ()
Definition: mos6510.cpp:199
void clearIRQ()
Definition: mos6510.cpp:213
void triggerRST()
Definition: mos6510.cpp:171