Subject: [stella] 6507 opcode cycle table From: "Eric Ball/Markham/IBM" <eball@xxxxxxxxxx> Date: Thu, 25 Oct 2001 16:47:37 -0400 |
For ease of cycle counting, I've created the following opcode table. Note: the cycles given are color cycles, not CPU cycles. I also haven't included any of the undocumented/illegal opcodes. Imp Imm Zp ZpX Abs AbX AbY Ind InX InY bytes 1 2 2 2 3 3 3 3 2 2 ADC 6 9 12 12 12+3 12+3 18 15+3 AND 6 6 9 12 12+3 12+3 18 15+3 ASL 6 (A) 15 18 18 21 BIT 9 12 BRA 6/9+3 (BMI,BPL,BVS,BVC,BNE,BEQ,BCS,BCC) BRK 21 CMP 6 9 12 12 12+3 12+3 18 15+3 CPX 6 9 12 CPY 6 9 12 DEC 6 (XY) 15 18 18 21 EOR 6 9 12 12 12+3 12+3 18 15+3 FLAG 6 (CLV,SED,CLD,SEI,CLI,CLC,SEC) INC 6 (XY) 15 18 18 21 JMP 9 15 JSR 9 LDA 6 9 12 12 12+3 12+3 18 15+3 LDX 6 9 12 ZpY 12 12+3 LDY 6 9 12 12 12+3 LSR 6 (A) 15 18 18 21 NOP 6 ORA 6 6 9 12 12+3 12+3 18 15+3 PHA 9 (push A) PHP 9 (push condition code) PLA 12 (pop A) PLP 12 (pop codition code) ROL 6 (A) 15 18 18 21 ROR 6 (A) 15 18 18 21 RTI 18 RTS 18 STA 9 12 12 15 15 18 18 SBC 6 9 12 12 12+3 12+3 18 15+3 STX 9 12 ZpY 12 STY 9 12 12 TRAN 6 (TAX, TXA, TAY, TYA, TXS, TSX) The shorthand should be familiar to anyone who has used other opcode tables, but for completeness: Imp implicit, opcode only (including INX, INY, DEX, DEY) Imm immediate data (relative for branch) Zp zero page memory ZpX zero page address + X ZpY zero page address + Y (only used by LDX & STX) Abs absolute address AbX absolute address + X (extra 3 cycles for over page boundary) AbY absolute address + Y (extra 3 cycles for over page boundary) Ind indirect (absolute address) InX indirect (Zp + X) (extra 3 cycles for over page boundary) InY indirect (Zp) + Y (extra 3 cycles for over page boundary) Branches are 6 cycles if not taken, 9 if taken and 12 if taken over a page boundary - Archives (includes files) at http://www.biglist.com/lists/stella/archives/ Unsub & more at http://www.biglist.com/lists/stella/
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [stella] Stelladoc v2 status re, YanProulx | Thread | RE: [stella] 6507 opcode cycle tabl, Nicolás Olhaberry |
Re: [stella] Stelladoc v2 status re, B. Watson | Date | RE: [stella] OT: Programming, CS th, Kennehan, Richard |
Month |