6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Fri Nov 22, 2024 12:41 pm

All times are UTC




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Single step the 6502
PostPosted: Mon Mar 03, 2003 1:20 pm 
Offline

Joined: Sun Feb 16, 2003 10:48 pm
Posts: 8
Can someone give me a quick explination on how to single step the 6502 processor? Is it just a matter of hooking up the RDY line to +V and have a switch on that line so it goes high every time I push the switch? Then push the switch every time I want to execute an instruction?

Thank you.
Ken Guenther


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Mon Mar 03, 2003 3:15 pm 
Offline

Joined: Wed Sep 04, 2002 4:08 pm
Posts: 57
Location: Iowa
Ken,

The RDY line is more of an on/off line; while high, the 6502 runs, while low, the 6502 stops. However, there are catches. If you pull RDY low at the wrong time (in reference to phase-2), the 6502 will lock up and have to be reset. Also, the plain NMOS 6502 cannot be stopped on a write cycle, but the CMOS 65C02 can.

This is crude, but on my SBC, I used a jumper to hold RDY high; when it's removed, a resistor pulls it low. I used this to do a simple test of the bus, where I could freeze it and examine the bus using a simple meter. The program under test executed seven bus cycles in a loop, so it was trial and error to get the correct access to be frozen when I pulled the jumper (and, sometimes, the processor did lock up). Crude, but for my purpose it got the job done.

To single-step the bus cycles, you must take into account phase-2, and only assert RDY for one bus cycle--then bring it low again. To single step instructions, you must use SYNC. A flip-flop circuit should do the trick; I've never built one, but maybe someone else can help here. I think a solution may have been posted to this forum, so just do a search.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Mon Mar 03, 2003 9:48 pm 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8543
Location: Southern California
> I think a solution may have been posted to this forum, so just do a search.

You'll find the recent discussion on this by going to
6502.org Forum Index -> Hardware
and then clicking on "6502 Hardware Single-step". At the time of this writing, it's four lines down from this subject just started, but the subject lines are sorted by last post date so that might change. In any case, you'll be able to find it easily.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Tue Mar 04, 2003 12:29 am 
Offline

Joined: Sun Feb 16, 2003 10:48 pm
Posts: 8
GARTHWILSON wrote:
> I think a solution may have been posted to this forum, so just do a search.

You'll find the recent discussion on this by going to
6502.org Forum Index -> Hardware
and then clicking on "6502 Hardware Single-step". At the time of this writing, it's four lines down from this subject just started, but the subject lines are sorted by last post date so that might change. In any case, you'll be able to find it easily.


Sorry... I'll open my eyes a little wider next time before I speak :-)


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: Google [Bot] and 32 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: