6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Sun May 05, 2024 3:46 pm

All times are UTC




Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: Tue Oct 25, 2016 9:18 pm 
Offline
User avatar

Joined: Tue Oct 25, 2016 8:56 pm
Posts: 360
Hi! First off, let me thank you all in advance for your help. I have found this forum, and many of the places linked from it including Garth's 6502 Primer is be absolutely invaluable. I have no doubt it will continue to be so.

To my current design:

I want to enable single-stepping on an instruction-by-instruction basis, using the RDY and SYNC signals on the WDC 65C02. I have designed a circuit (see attachment), which was in part inspired by Thrashbarg's design and the circuit suggested on page 12 of The Apple I manual.

There's nothing wrong with Thrashbarg's design in itself, but I wanted to reduce the number of different types of component, and the 74HC123's datasheet has some omninous warnings about the dangers of the timing capacitor ruining things under certain circumstances. The Apple circuit seemed to me a much simpler solution, though I don't think its a complete design as it doesn't appear to actually work as drawn and doesn't have any debounce in place. As a bonus, I had a free flip-flop I used for an NMI button, which I'll use like a software 'Abort' button, similar to Garth's.

I'm hoping that someone might kindly look over my circuit for any potential pitfalls I've missed, and also perhaps help me further reduce the component count. In particular, I would love to be able to use actual momentary SPST switches for the Step and NMI buttons rather than SPDT, and I have a sneaking suspicion that not all of the flip-flops are strictly necessary.

Thank you.

P.S. The attachment is an excerpt from the larger computer design, hence the high part numbers. I can provide the whole design if necessary.


Attachments:
File comment: 65C02 single-stepping circuit schematic using SYNC and RDY, v1.
singlestep.png
singlestep.png [ 46.02 KiB | Viewed 2100 times ]

_________________
Want to design a PCB for your project? I strongly recommend KiCad. Its free, its multiplatform, and its easy to learn!
Also, I maintain KiCad libraries of Retro Computing and Arduino components you might find useful.
Top
 Profile  
Reply with quote  
PostPosted: Sun Dec 04, 2016 12:28 am 
Offline
User avatar

Joined: Tue Oct 25, 2016 8:56 pm
Posts: 360
For the record, I've ultimately decided to roll with this circuit as-is, after finding some suitable SPDT PCB-mount switches.

_________________
Want to design a PCB for your project? I strongly recommend KiCad. Its free, its multiplatform, and its easy to learn!
Also, I maintain KiCad libraries of Retro Computing and Arduino components you might find useful.


Top
 Profile  
Reply with quote  
PostPosted: Sun Dec 04, 2016 7:39 am 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8173
Location: Midwestern USA
In response to your concern about parts count, if you are using a genuine WDC 65C02 you can easily single-step it by use of the fact that it is permissible to stop the Ø2 clock in either phase. Garth Wilson has published a circuit for doing so on his website. His circuit produces one complete cycle per pushbutton press. That's not the same as single-cycling instructions, as it stops the clock during each step of each instruction, rather than when the 'C02 is ready to fetch the next opcode. The ability to halt on each cycle can be useful for debugging hardware issues.

_________________
x86?  We ain't got no x86.  We don't NEED no stinking x86!


Top
 Profile  
Reply with quote  
PostPosted: Wed Dec 07, 2016 9:41 pm 
Offline
User avatar

Joined: Tue Oct 25, 2016 8:56 pm
Posts: 360
Indeed, I think I saw that, though I'm more interested in single-stepping than single-cycling. I've certainly spent a lot of time raiding Garth's website. I've got a switch to disconnect the clock generator and a probe connection point; the plan was to allow an external clock to drive the system if necessary. However I could just as easily wire up the linked one-shot pulse generator to provide a single-cycling if required, provided I only press the button while the switch is in the off position.

_________________
Want to design a PCB for your project? I strongly recommend KiCad. Its free, its multiplatform, and its easy to learn!
Also, I maintain KiCad libraries of Retro Computing and Arduino components you might find useful.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 13 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: