6561 Die Shot Reversing Explorations

Modding and Technical Issues

Moderator: Moderators

User avatar
lance.ewing
Vic 20 Devotee
Posts: 264
Joined: Sat Nov 10, 2012 3:19 pm

Re: 6561 Die Shot Reversing Explorations

Postby lance.ewing » Sat Dec 02, 2017 11:27 am

I'm now going to take a look at the Screen Origin Y (CR1) vs Vertical Counter comparator. The following picture shows where this comparator is on the die shot, highlighted in red:

screen_origin_y_comparator_highlighted.jpg

It's been a while since I've shown a close up of the section of die shot being discussed in a post, so I thought I might do that this time since this comparator has quite a tidy layout. The picture below shows a close up of the area highlighted in red in the previous image:

screen_origin_y_comparator_die_shot.jpg

At the top of the image above, you'll see nine polysilicon lines coming in to the image from the area of the die shot above this section. The first line on the left is the interlaced bit and we can ignore this for the rest of this post since it is simply passing through. The other eight lines are carrying the eight bit values from CR1, i.e. the Screen Origin Y control register, which is immediately above this comparator.

At the bottom of the image, you'll see eight polysilicon lines coming in to the image from the area of the die shot below this section. These are bits 1-8 of the vertical counter (note that bit 0 is not used by this comparator). Most of the rest of the image is the comparator itself, being made up of eight identical 1-bit comparator cells.

In the image below, I have zoomed in closer on the top three of those 1-bit cells and have drawn around the diffusion (in green), polysilicon (in red), buried contacts (in blue), metal to diffusion contacts (in white), and metal to polysilicon contacts (in grey).

screen_origin_y_comparator_labelled.jpg

The following diagram shows the logic for the top one of these cells:

screen_origin_y_comparator_single_cell.png
screen_origin_y_comparator_single_cell.png (1.86 KiB) Viewed 85 times

The other two cells are identical, in fact all eight of the cells have identical logic. The outputs of all eight become inputs to an 8-input NOR gate, as shown in the following completed logisim diagram for the comparator:

screen_origin_y_comparator_logisim.png
screen_origin_y_comparator_logisim.png (10.61 KiB) Viewed 85 times

The output of the large NOR gate I have called SY COMPARE. This comparator compares the bits in CR1 (i.e. the Screen Origin Y value) with bits 1-8 of the vertical counter. SY COMPARE will go high when the two 8-bit values are equal and will be low in all other cases. I have included bit 0 of the vertical counter (VC0) in the diagram, and have it not connected to anything else in this diagram, to show that bit 0 of the vertical counter is not included in this comparison. This is why the Screen Origin Y value has a two line granularity. Incrementing the value in CR1 will cause the video matrix to move down two lines because this comparator only matches even vertical line values.

norm8332
Vic 20 Enthusiast
Posts: 164
Joined: Sun Nov 13, 2016 11:04 am
Location: USA

Re: 6561 Die Shot Reversing Explorations

Postby norm8332 » Sat Dec 02, 2017 5:10 pm

Still following this..(I love this stuff) :D I wonder if Kakemoms got that 6560 yet? Its been awhile since it was sent..long journey though.

User avatar
lance.ewing
Vic 20 Devotee
Posts: 264
Joined: Sat Nov 10, 2012 3:19 pm

Re: 6561 Die Shot Reversing Explorations

Postby lance.ewing » Sat Dec 02, 2017 5:23 pm

The Screen Origin X / Horizontal Counter comparator is to the left of the Screen Origin Y / Vertical Counter comparator. It is highlighted with a pink box in the following diagram of the die shot:

screen_origin_x_comparator_highlighted.jpg

This comparator is of an almost identical design to the comparator discussed in the previous post. Apart from having one cell less (i.e. seven instead of eight), the layout of this comparator is basically a mirror image of the previous comparator's layout. I was actually able to copy the polygons I traced around the previous comparator, flip them horizontally, and then move them in to place on top of this comparator. The polygons matched perfectly.

The following diagram shows what I created in logisim for this comparator:

screen_origin_x_comparator_logisim.png
screen_origin_x_comparator_logisim.png (9.13 KiB) Viewed 73 times

I've tried to keep things roughly as they are arranged in the die shot. So since the layout of this comparator is flipped horizontally when compared with the previous comparator, you'll notice that the outputs from the seven cells come out on the right side rather than the left.

This comparator compares the Screen Origin X value (SX0-SX6, i.e. the lower 7 bits of CR0) with bits 0 to 6 of the Horizontal Counter (HC0-HC6 in the diagram above). This time I've shown the counter bit values coming in from the left because that is the direction that these inputs come in from on the die shot. The large NOR gate has only seven inputs in this case. The output of the large NOR gate (which is also the output of the comparator as a whole) I've called SX COMPARE. It will go high when the Horizontal Counter value matches the Screen Origin X value.

As we know, the granularity of the Screen Origin X values is 4 pixels, e.g. increment this value by 1 and the video matrix moves 4 pixels to the right. In the case of this comparator, that is due to the fact that the pixel clock is four times the frequency of the clock signal that increments the Horizontal Counter. We've previously mentioned when discussing the Horizontal Counter that it counts up in VIC 20 machine cycles (i.e. at the rate of the output clock from the 6561). There are 71 cycles per line for the PAL 6561 chip, and four pixels for each of those cycles. The Horizontal Counter counts from 0 to 70 then resets back to 0. Since the Screen Origin X value is being compared directly with the Horizontal Counter value, the video matrix can only move in 4-pixel increments.

I thought that I'd now show a diagram with the two comparators side by side as they are on the die shot. The Interlace line does go down between the two as shown but has no effect and is just passing through:

screen_origin_comparators_logisim.png

User avatar
lance.ewing
Vic 20 Devotee
Posts: 264
Joined: Sat Nov 10, 2012 3:19 pm

Re: 6561 Die Shot Reversing Explorations

Postby lance.ewing » Sat Dec 02, 2017 5:50 pm

norm8332 wrote:Still following this..(I love this stuff) :D I wonder if Kakemoms got that 6560 yet? Its been awhile since it was sent..long journey though.

Yeah, I was wondering the same thing a few days ago. Looking forward to seeing the results.

User avatar
Kakemoms
Vic 20 Afficionado
Posts: 488
Joined: Sun Feb 15, 2015 8:45 am

Re: 6561 Die Shot Reversing Explorations

Postby Kakemoms » Tue Dec 05, 2017 7:32 am

Hi,

Well, the chip is in a mixure of nitric acid and sulphuric acid at 120C right now. The Epoxy is peeling away, but it is soooo slow. After one hour its not visibly thinner, but I guess it probably is. The large chip generates alot of black smear that solidifies instantly if one lifts it out of the hot beaker.

Anyway, I will take pictures once I get in to the actual chip. It may take some days to get there as its very slow and I have to babysit the hot acid. I will post the pictures here once they are ready.

norm8332
Vic 20 Enthusiast
Posts: 164
Joined: Sun Nov 13, 2016 11:04 am
Location: USA

Re: 6561 Die Shot Reversing Explorations

Postby norm8332 » Tue Dec 05, 2017 8:08 am

Glad to see it got there OK. Thanks for taking the time to try this. I still have another chip, I still might try rosin for the epoxy removal at a later date. The chip could probably be cut down a bit to reduce the amount of epoxy.

User avatar
Kakemoms
Vic 20 Afficionado
Posts: 488
Joined: Sun Feb 15, 2015 8:45 am

Re: 6561 Die Shot Reversing Explorations

Postby Kakemoms » Sat Dec 09, 2017 11:39 am

I had to go travel, so I couldn't finish the etch. I got about half way in 3 hours and will finish when I get back (in around a week). I don't think cutting is going to speed it up, and grinding isn't wise when you don't know were to stop... The safe way is nitric+sulphuric, and that should also leave most of the metal.


Return to “Hardware and Tech”

Who is online

Users browsing this forum: No registered users and 2 guests