Myth: The 6502 Cannot Single Cycle!

13,810
0
Published 2024-07-17
JLCPCB $2 for 1-8 layer PCB jlcpcb.com/?from=Anders_N
Sign Up Here to Get $60 New User Coupons

Let's figure out if Single Cycling an original 6502 CPU is impossible just because it's an NMOS version with dynamic registers - didn't Steve Wozniak make a circuit for the Apple 1 for exactly that purpose?

Single Cycle Board, 65uino and Programmer available here: www.imania.dk/samlesaet-hobbyelektronik-og-ic-er.h…
Shipping available to 51 destinations worldwide.

Schematic and KiCAD project files for the Single Cycle Board: github.com/AndersBNielsen/6502-Single-Cycle-Board

Complete schematic, source code and everything about the 65uino (including the source code used for the programmer):
github.com/AndersBNielsen/65uino

Check out my other projects on Hackaday.io: hackaday.io/projects/hacker/1216846

Join the free clubhouse on Discord: discord.gg/kmhbxAjQc3
Let's chat about what you like best about old chips, electronics, breadboards and hacking all sorts of things!

Check out my other 6502-inspired videos:    • 6502 Computer  

Join this channel to get access to perks that let you see videos early and make you stand out in comments:
youtube.com/channel/UC1XztF03rWRJJ4Gt3csya0A/join


Song: Sam Day - BE THE ONE (WinWel Remix)
Music provided by NoCopyrightSounds
Free Download/Stream: ncs.io/BTO\_WW
Watch: ncs.lnk.to/BTO\_WWAT/youtube

All Comments (21)
  • I tried to debunk so many myths like that on various Commodore forums and was pelted with insults. I was even expelled from Lemon64. Making videos like yours requires lots of efforts and I didn't have the energy and time.
  • @blarghblargh
    ohhhh cool! I heard this information about the registers losing data with no clock refresh, and was a bit disappointed. I am interested in running a real 6502 as a hardware unit test and source of truth against an emulator I want to make, so this information should be pretty useful.
  • What shocking news, I had a 6502 on my bike and could never work out why I had to keep peddling. The shop that sold me it said it would certainly cycle, I took it back and he said I must have installed it wrong. It never worked properly and now I know why, so after showing the shop your video I asked for my money back. He said since I bought it over 10 years ago it had probably has failed anyway. So if you can make known to all cycle outlets of your findings, this will help a lot of people.
  • @phill6859
    I never realised that people thought you could not do it. Several 80s computers from the 80s used the rdy line to stall the CPU when the graphics chip needed cycles (even when the ram ran twice the speed of the CPU and the graphics chip, with each getting access alternately). Even the Atari 2600 6507 has a rdy pin, but single stepping it will cause the screen to fall apart.
  • @jxtq27
    Oh, you mean single step not single cycle. Now I understand.
  • @phils_arcade
    This is very interesting, love how simple the final board looks. Can you single step Z80 range of processors as well?
  • @johncloar1692
    Nice project, looks like a lot of fun. Thanks for the video.
  • @NorthWay_no
    Slightly confused here; didn't both the Ataris and the C= 64 have special pins to let the gfx chip halt the cpu? Was that working different from what you described here?
  • Guess of what this is a step towards: Making a computer that is in a function and form factor similar to an Altair 8080, but using a nice 6502 chip instead of an 8080.
  • @weirdboyjim
    Interesting, I didn't know that about the early 6502's.
  • @MCPicoli
    But what happens if the clock speed gets down to zero hertz (regardless of the circuit shown), specially if using the older versions of the processor? I think part of the myth may still be true - not being able to run if single clock cycles are fed to it. In the video the 6502 still receives the clock at full speed, but execution is "gated" by the RDY pin.
  • @tigheklory
    This is fun, it would be cool if you used segmented displays for the output!
  • It would be a bit more complex, but I'd think it should be possible to adapt that concept to make a break point debugger as well. E.g. feed all the relevant pins into a RAM chip's address-in pins and use one of the data-out pins as break signal. (Thought at that point, just using another CPU to track things might be easier and cheaper.)
  • @bryede
    4:08 I don't think the C64's 6510 CPU has SYNC capability.
  • Thanks for the great video! It consists of only two D-FF, so maybe this is the minimum configuration. In my case, I configured it with two JK-FFs and NAND gates. And in my case, when I do a CPU RESET with the CPU stopped, in rare cases the RESET sequence is not performed correctly, so I added a circuit to keep the CPU in RUN state during the RESET period.
  • So that wasn't exactly an intentional feature, but Woz never really cared what features were intentional when he was looking for them.
  • @keiyakins
    i mostly just heard to get the cmos version becsuse they're easier to find and interface with modern othrr chips