6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Thu Nov 21, 2024 8:36 pm

All times are UTC




Post new topic Reply to topic  [ 213 posts ]  Go to page Previous  1, 2, 3, 4, 5 ... 15  Next
Author Message
 Post subject: Re: Breaking 6502 apart
PostPosted: Fri Jun 29, 2012 6:44 am 
Offline
User avatar

Joined: Fri Jun 22, 2012 7:39 am
Posts: 201
That analog **** makes my research more complicated :(

_________________
6502 addict


Top
 Profile  
Reply with quote  
 Post subject: Re: Breaking 6502 apart
PostPosted: Fri Jun 29, 2012 6:52 am 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10985
Location: England
I think you can treat it all as digital, in the sense that a transistor is a switch. But it is bidirectional... And you can't divide up the circuit purely into neat logic gates. There are some interesting combinations.

By the way, the dynamic latches are the exact reason why a single stepping circuit must be careful about whether it stops with the clock high or low. One case will be fine, the other will have the leaking storage and will not be reliable.

Cheers
Ed


Top
 Profile  
Reply with quote  
 Post subject: Re: Breaking 6502 apart
PostPosted: Fri Jun 29, 2012 6:56 am 
Offline
User avatar

Joined: Fri Jun 22, 2012 7:39 am
Posts: 201
Thanks Ed, things become more clear to me.. )

50 kHz makes those 2 ms discharge rate )

At 500 kHz halfclock will last only 2us, its 1000 times shorter than discharge period )

So in order to recognize such capacitors I just need to pay attention on long polysilicon wires ?

_________________
6502 addict


Top
 Profile  
Reply with quote  
 Post subject: Re: Breaking 6502 apart
PostPosted: Fri Jun 29, 2012 7:07 am 
Offline
User avatar

Joined: Fri Jun 22, 2012 7:39 am
Posts: 201
Oh, I know.... When I see mosfets connected in parralel next time, I will add capacitor in schematics =)

Edit: like that :

Image

_________________
6502 addict


Top
 Profile  
Reply with quote  
 Post subject: Re: Breaking 6502 apart
PostPosted: Fri Jun 29, 2012 7:46 am 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10985
Location: England
Well, you won't always have two transistors - in fact, usually you'll only have one. You'll see these nodes in the timing shift register in the first picture you posted - at top right there's a master-slave flip-flop made of two dynamic latches. More or less.

But you probably only want to annotate a capacitor when the latch is single and there's no recirculation.


Top
 Profile  
Reply with quote  
 Post subject: Re: Breaking 6502 apart
PostPosted: Mon Jul 02, 2012 8:08 am 
Offline
User avatar

Joined: Fri Jun 22, 2012 7:39 am
Posts: 201
Wrote small script which helps to understand which instructions are affected by decoder.

http://ogamespec.com/6502/decoder.htm

Type IR-line into input fiels and press "Decode". Script will highlight affected opcodes.

Example : XXX110X1

Image

_________________
6502 addict


Top
 Profile  
Reply with quote  
 Post subject: Re: Breaking 6502 apart
PostPosted: Mon Jul 02, 2012 8:30 am 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10985
Location: England
Neat! It wasn't working for me at first, but I realised I was hitting 'Enter' rather than clicking on the button.


Top
 Profile  
Reply with quote  
 Post subject: Re: Breaking 6502 apart
PostPosted: Mon Jul 02, 2012 7:23 pm 
Offline
User avatar

Joined: Fri Jun 22, 2012 7:39 am
Posts: 201
Todays speccy : Address pin

Image

Bonus: Youtube videos, capturing my 6502 tracing skills :mrgreen:

Part 1 : preparations
http://www.youtube.com/watch?v=dj-DcMYihp4

Part 2 : color scheme
http://www.youtube.com/watch?v=wTJygx3VAXY
http://www.youtube.com/watch?v=_Z0O-IdJRQc

Part 3 : transistor level
http://www.youtube.com/watch?v=y-q5643WVno

_________________
6502 addict


Top
 Profile  
Reply with quote  
 Post subject: Re: Breaking 6502 apart
PostPosted: Tue Jul 03, 2012 10:06 am 
Offline
User avatar

Joined: Fri Jun 22, 2012 7:39 am
Posts: 201
Todays speccy : SYNC

Color :
Image

Transistor level :
Image

Logic:
SYNC = sync (driven by internal signal through amplifiers)
Image Image

_________________
6502 addict


Top
 Profile  
Reply with quote  
 Post subject: Re: Breaking 6502 apart
PostPosted: Tue Jul 03, 2012 2:18 pm 
Offline
User avatar

Joined: Fri Jun 22, 2012 7:39 am
Posts: 201
Found error in data latch (missing vias).

Updated transistor level schematics :

Image

_________________
6502 addict


Top
 Profile  
Reply with quote  
 Post subject: Re: Breaking 6502 apart
PostPosted: Tue Jul 03, 2012 5:42 pm 
Offline
User avatar

Joined: Fri Jun 22, 2012 7:39 am
Posts: 201
I completed reversing of data bus logic :)

Image

Code:
PHI1:
if (DL_ADL) ADL = DL;
if (DL_ADH) ADH = DL;
if (DL_DB) DB = DL;
DOR = DB;

PHI2:
if (RW == 0) DATA = DOR;
DL = DATA;
ADL = ADH = DB = 0xFF;

_________________
6502 addict


Top
 Profile  
Reply with quote  
 Post subject: Re: Breaking 6502 apart
PostPosted: Wed Jul 04, 2012 2:32 pm 
Offline
User avatar

Joined: Fri Jun 22, 2012 7:39 am
Posts: 201
Started random logic :)

Image

Simple explanation :

Image

_________________
6502 addict


Top
 Profile  
Reply with quote  
 Post subject: Re: Breaking 6502 apart
PostPosted: Thu Jul 05, 2012 8:43 pm 
Offline
User avatar

Joined: Fri Jun 22, 2012 7:39 am
Posts: 201
Todays speccy : Registers X, Y, S

Color (bit 0):
Image

Transistor level:
Image

Logic:
Code:
PHI1:
if ( Y/SB ) SB = Y;
if ( SB/Y ) Y = SB;
if ( X/SB ) SB = X;
if ( SB/X ) X = SB;
if ( S/ADL) ADL = S;
if ( S/SB ) SB = S;
if ( SB/S ) S = SB;
if ( S/S ) S = S;

PHI2:
SB = 0xFF;

_________________
6502 addict


Top
 Profile  
Reply with quote  
 Post subject: Re: Breaking 6502 apart
PostPosted: Fri Jul 06, 2012 11:26 am 
Offline
User avatar

Joined: Fri Jun 22, 2012 7:39 am
Posts: 201
Todays speccy : Predecode Register

Image

Image

_________________
6502 addict


Top
 Profile  
Reply with quote  
 Post subject: Re: Breaking 6502 apart
PostPosted: Fri Jul 06, 2012 11:56 am 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10985
Location: England
Instantly recognisable! You notice how the first transistors from the databus are huge? I think that's to make the inverter's logic threshold a bit lower, which it needs to be because the databus is at TTL levels. Fortunately, it makes no difference to a logic sim. A big pulldown is a more eager one, so the output flips at a lower input voltage than it otherwise would.

You see the same thing in the next gate, after phi2, because the pass transistor transmits a degraded logic 1. The ClearIR inputs are normal sized by comparison. (As discussed previously, those PDn nodes are storage nodes.)

Cheers
Ed


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 213 posts ]  Go to page Previous  1, 2, 3, 4, 5 ... 15  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 4 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: