6561 Die Shot Reversing Explorations

Modding and Technical Issues

Moderator: Moderators

Post Reply
User avatar
eslapion
ultimate expander
Posts: 5458
Joined: Fri Jun 23, 2006 7:50 pm
Location: Canada
Occupation: 8bit addict

Re: 6561 Die Shot Reversing Explorations

Post by eslapion »

cbmeeks wrote:Having a similar book detailing the 6561 and perhaps creating an open source design for a modern VIC-20 would be an absolute joy. Something that is cycle accurate but uses modern parts (and isn't 100% in an FPGA).
The 6560/6561 is the only main component of the VIC-20 which isn't completely documented.

The 6522 is still available in the form of the W65C22N from Western Design Center (I write the whole name because a couple of times I've had people reply me that Western Digital doesn't make anything that resembles the VIA...) and there is a complete enough VHDL version of the VIA.

The 6502 is available in a couple of different forms, the most impressive of which is the large MOnSter 6502 which implies every single transistor is documented.

Having an equivalent level of documentation for the VIC-I is extremely valuable.

I am somewhat saddened by the fact the present exercice does not include the NTSC 6560 but I guess it's only a matter of time.
Be normal.
lance.ewing
Vic 20 Afficionado
Posts: 413
Joined: Sat Nov 10, 2012 3:19 pm
Website: https://sites.google.com/site/mos6561vic/

Re: 6561 Die Shot Reversing Explorations

Post by lance.ewing »

eslapion wrote:The 6522 is still available in the form of the W65C22N from Western Design Center (I write the whole name because a couple of times I've had people reply me that Western Digital doesn't make anything that resembles the VIA...)
This is probably known to most of you already, but I was surprised to learn while reading the Bagnall book that Western Design Center was founded by the former MOS employee (Bill Mensch) that (the book implies) single-handedly designed the original MOS 6522 chip. I find it really cool that this company is still going these days and still makes 6522 compatible chips.
eslapion wrote:The 6502 is available in a couple of different forms, the most impressive of which is the large MOnSter 6502 which implies every single transistor is documented.
I want one of those (don't we all). Yeah, the visual6502 JavaScript simulation of the 6502 at the silicon level reveals pretty much everything as well.
eslapion wrote:I am somewhat saddened by the fact the present exercice does not include the NTSC 6560 but I guess it's only a matter of time.
Hopefully if Kakemoms gets that last 1/4 epoxy off the 6560, the die shots would follow shortly after and we'll get to see what it looks like. The 6560 came before the 6561, with the PAL chip being a modification of the NTSC chip. So I'm expecting it to be very similar. It is the differences that will be interesting.
User avatar
Radical Brad
Vic 20 Devotee
Posts: 256
Joined: Sat Jun 24, 2017 8:18 pm
Website: http://www.AtomicZombie.com
Location: Kakabeka Falls, ONT
Occupation: hACKER

Re: 6561 Die Shot Reversing Explorations

Post by Radical Brad »

WDC also makes this lovely IC in DIP format for us breadboard fanatics...

Image

I wonder if any of the original 6560 design files might still exist someplace?
A roll of long lost vellum paper collecting dust in some old warehouse?

That would be a real find for sure.

Brad
lance.ewing wrote:This is probably known to most of you already, but I was surprised to learn while reading the Bagnall book that Western Design Center was founded by the former MOS employee (Bill Mensch) that (the book implies) single-handedly designed the original MOS 6522 chip. I find it really cool that this company is still going these days and still makes 6522 compatible chips.
User avatar
Mike
Herr VC
Posts: 4816
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Re: 6561 Die Shot Reversing Explorations

Post by Mike »

Radical Brad wrote:I wonder if any of the original 6560 design files might still exist someplace?
A roll of long lost vellum paper collecting dust in some old warehouse?
See here: Possible MOS tech docs find, just a few days ago.
User avatar
Radical Brad
Vic 20 Devotee
Posts: 256
Joined: Sat Jun 24, 2017 8:18 pm
Website: http://www.AtomicZombie.com
Location: Kakabeka Falls, ONT
Occupation: hACKER

Re: 6561 Die Shot Reversing Explorations

Post by Radical Brad »

Hopefully, it will reveal the mother load!
Mike wrote:
Radical Brad wrote:I wonder if any of the original 6560 design files might still exist someplace?
A roll of long lost vellum paper collecting dust in some old warehouse?
See here: Possible MOS tech docs find, just a few days ago.
User avatar
eslapion
ultimate expander
Posts: 5458
Joined: Fri Jun 23, 2006 7:50 pm
Location: Canada
Occupation: 8bit addict

Re: 6561 Die Shot Reversing Explorations

Post by eslapion »

Radical Brad wrote:WDC also makes this lovely IC in DIP format for us breadboard fanatics...
I got a few samples of these about 10 years ago. The beauty is they consume only a few mA when running at 1MHz but there are compatibility issues, even when you reroute a few pins as suggested on the WDC web site.
Be normal.
Kakemoms
Vic 20 Nerd
Posts: 740
Joined: Sun Feb 15, 2015 8:45 am

Re: 6561 Die Shot Reversing Explorations

Post by Kakemoms »

Radical Brad wrote:Hopefully, it will reveal the mother load!
Mike wrote:
Radical Brad wrote:I wonder if any of the original 6560 design files might still exist someplace?
A roll of long lost vellum paper collecting dust in some old warehouse?
See here: Possible MOS tech docs find, just a few days ago.
Its a nice thought, but I doubt that these tapes are going to reveal anything about the 6560 design. I hope that I am wrong, but since the 6560 was designed in 1976-1977, it was probably laid out with paper and transferred to rubylith. I am not sure when MOS got everything into design computers, but maybe someone here knows more about that.
lance.ewing
Vic 20 Afficionado
Posts: 413
Joined: Sat Nov 10, 2012 3:19 pm
Website: https://sites.google.com/site/mos6561vic/

Re: 6561 Die Shot Reversing Explorations

Post by lance.ewing »

Kakemoms wrote:Its a nice thought, but I doubt that these tapes are going to reveal anything about the 6560 design. I hope that I am wrong, but since the 6560 was designed in 1976-1977, it was probably laid out with paper and transferred to rubylith. I am not sure when MOS got everything into design computers, but maybe someone here knows more about that.
I've been thinking the same thing, i.e. its unlikely they'll find anything about the 6560. I would love it if they do though. According to the Brian Bagnall book, they were still doing it by hand, like they did with the 6502, at the point that the VIC chip was originally created. The 1976/77 6560 chip would have been different from what we have in the VIC 20 though.

After reading "Commodore: A Company on the Edge", I'm tending to think now that what was in the Attack UFO arcade machine was the original 1976/77 6560 chip. What we have in the VIC 20 has had parts of the abandoned 6564 incorporated into it. This was done in 1980/81, i.e. the modification of the original design to include the supposedly better colour generation capabilities of the 6564 (and potentially improved sound generation, although that isn't as clear from reading the book) was done about three years after the original 6560 chip was designed. What I'm not sure about is whether they had design software at that point, in 1980/1. I'll have to go back and read those sections of the book again. But given that they were modifying an existing design that was done by hand, and doing it under immense time pressure, I'd put my money on the VIC 20 version still being a done by hand design. Surely they must have digitised it at some point though, perhaps years later.
lance.ewing
Vic 20 Afficionado
Posts: 413
Joined: Sat Nov 10, 2012 3:19 pm
Website: https://sites.google.com/site/mos6561vic/

Re: 6561 Die Shot Reversing Explorations

Post by lance.ewing »

Over the past 10 days, I've been busy tracing around all of the diffusion, polysilicon, and contacts in the top left quadrant of the die shot. This is where the address computation logic lives. I thought that I'd just keep tracing around everything in this area before attempting to reverse the logic. So over the next few weeks, I intend to add a number of posts that are looking at this part of the die.

Before I do that though, I wanted to take a look at a part of the die shot that I haven't really mentioned that much in the past. I think this is because it is one of the first parts of the die that I took a close look at, so in my mind its trivial. The main reason I wanted to show it now though is because of a part of it that is of relevance to the address computation logic. So let's start with an image from the die shot:
address_and_data_lines.jpg
You will certainly have to click on the image to get a closer look. The darker grey bits at the top and bottom, with the vertical metal lines, are mostly some of the control registers. The horizontal metal lines in the centre are the data and address lines that are used to select the various control registers and to store and retrieve data from those control registers. The polysilicon, diffusion and contacts "behind" those horizontal lines in the centre are the register selection logic. The address lines are used to determine what control register is being read from or written to. Perhaps in a future post I'll take a closer look at one of the control registers to see how it is selected. I think I might have done that at some point last year, but it won't hurt to do it again.

The main reason for this post was to draw your attention to a group of vertical lines to the left of centre, or about one third from the left. If you have the full die shot image, you'll be able to zoom in and see that there are eleven lines of diffusion and polysilicon. These lines alternate from polysilicon to diffusion to polysilicon to diffusion, etc. Over the past few months, we've been looking at areas of the die shot that have allowed me to identify all eleven of these lines, and all eleven of these lines are relevant in some way to the address computation logic. All eleven of these signals go from bottom to top, carrying various signals from the bottom half of the die up to the address computation logic.

The following image takes a closer look at the eleven lines I'm referring to:
address_computation_input_lines.jpg
They are eleven vertical lines crossing over the metal lines and are alternating polysilicon (pink), diffusion (green), polysilicon (pink), diffusion (green), etc, the whole way across.

I have identified these lines, from left to right, as follows:

CDC3 : Cell Depth Counter bit 3 (only relevant for double height characters)
HCC0' : Horizontal Cell Counter bit (inverse)
BV9 : Bit 7 of control register 2, part of the video matrix start address
D : Bit 0 of control register 3, i.e. selection of double height characters (D=1 is 16 line characters, D=0 is 8 line characters)
VSYNC : Vertical Sync signal
START NEW LINE' : Start of new line (inverse), i.e. inverse of horizontal counter reset.
CDC LAST VALUE' : Cell Depth Counter last value signal (inverse)
INCR VIDEO MATRIX CNTR' : Increment the video matrix counter (inverse). Same signal increments Horizontal Cell Counter.
CDC0 : Cell Depth Counter bit 0
CDC1 : Cell Depth Counter bit 1
CDC2 : Cell Depth Counter bit 2
Kakemoms
Vic 20 Nerd
Posts: 740
Joined: Sun Feb 15, 2015 8:45 am

Re: 6561 Die Shot Reversing Explorations

Post by Kakemoms »

lance.ewing wrote: I've been thinking the same thing, i.e. its unlikely they'll find anything about the 6560. I would love it if they do though. According to the Brian Bagnall book, they were still doing it by hand, like they did with the 6502, at the point that the VIC chip was originally created. The 1976/77 6560 chip would have been different from what we have in the VIC 20 though.

After reading "Commodore: A Company on the Edge", I'm tending to think now that what was in the Attack UFO arcade machine was the original 1976/77 6560 chip. What we have in the VIC 20 has had parts of the abandoned 6564 incorporated into it. This was done in 1980/81, i.e. the modification of the original design to include the supposedly better colour generation capabilities of the 6564 (and potentially improved sound generation, although that isn't as clear from reading the book) was done about three years after the original 6560 chip was designed. What I'm not sure about is whether they had design software at that point, in 1980/1. I'll have to go back and read those sections of the book again. But given that they were modifying an existing design that was done by hand, and doing it under immense time pressure, I'd put my money on the VIC 20 version still being a done by hand design. Surely they must have digitised it at some point though, perhaps years later.
Well, I haven't looked so hard on how many revisions the 6560 was made in, but its probaby a few. While the Amiga ICs were simulated using spice, I doubt they did anything like that on the 6560. A revision could be a simple fix due to some sort of problem (noise, bleeding colors or alike), or simply a different production site. I will try to ask around to try to find out more about it.

I would think the first vic-1001 contained the original design as it was a test product. The reason to populate the Vic-20 with 1K chips was to use up a stock of these, and I doubt that Mr. Tramiel would have ordered a new batch of 6560s.. But if one could get hold of one of those early 6560s, it would be possible to check that.
lance.ewing
Vic 20 Afficionado
Posts: 413
Joined: Sat Nov 10, 2012 3:19 pm
Website: https://sites.google.com/site/mos6561vic/

Re: 6561 Die Shot Reversing Explorations

Post by lance.ewing »

Kakemoms wrote:Well, I haven't looked so hard on how many revisions the 6560 was made in, but its probaby a few. While the Amiga ICs were simulated using spice, I doubt they did anything like that on the 6560. A revision could be a simple fix due to some sort of problem (noise, bleeding colors or alike), or simply a different production site. I will try to ask around to try to find out more about it.
There is a sequence of numbers on the die shot below the 6561E PAL text that I have wondered might relate to a revision.
Kakemoms wrote:I would think the first vic-1001 contained the original design as it was a test product. The reason to populate the Vic-20 with 1K chips was to use up a stock of these, and I doubt that Mr. Tramiel would have ordered a new batch of 6560s.. But if one could get hold of one of those early 6560s, it would be possible to check that.
I'm not sure how much to take what is said in the Brian Bagnall book as gospel, but it certainly presents the events such that the 6560 used in the VIC 20 was a modification to the original chip, the multi colour mode being one of the additions. Given that it was very difficult for them to find buyers for the original 6560 chip, they are unlikely to have had much of a stockpile of those. I think Bob Yannes was more concerned with finding a use for the chip design rather than of a stock pile of chips when he put together the original microPET prototype.

Was the VIC-1001 completely compatible with the later VIC 20s sold in the US with regards to the VIC chip functionality? If not, then what were the differences?
Kakemoms
Vic 20 Nerd
Posts: 740
Joined: Sun Feb 15, 2015 8:45 am

Re: 6561 Die Shot Reversing Explorations

Post by Kakemoms »

lance.ewing wrote: There is a sequence of numbers on the die shot below the 6561E PAL text that I have wondered might relate to a revision.

I'm not sure how much to take what is said in the Brian Bagnall book as gospel, but it certainly presents the events such that the 6560 used in the VIC 20 was a modification to the original chip, the multi colour mode being one of the additions. Given that it was very difficult for them to find buyers for the original 6560 chip, they are unlikely to have had much of a stockpile of those. I think Bob Yannes was more concerned with finding a use for the chip design rather than of a stock pile of chips when he put together the original microPET prototype.

Was the VIC-1001 completely compatible with the later VIC 20s sold in the US with regards to the VIC chip functionality? If not, then what were the differences?
MOS ICs can be named 6509R4 or alike (e.g. Revision 4), but it depends on the place of manufacture. They had very little standarization on naming conventions, so it looks like it was mostly up to the actual manufacturing site..

Well, its not gospel, but if you look at a February 1980 datasheet, its specified to have two color modes. And this is certainly before the Vic-20 (according to the same book you mention), and date suggests its the datasheet of the 6560 used in the Ryoto Electric arcade machine. Maybe the "original" 6560 was just made in a few samples and never used for anything, while the multicolor-version that was used in 1980 was the same in both Ryoto and Vic-1001.
lance.ewing
Vic 20 Afficionado
Posts: 413
Joined: Sat Nov 10, 2012 3:19 pm
Website: https://sites.google.com/site/mos6561vic/

Re: 6561 Die Shot Reversing Explorations

Post by lance.ewing »

Kakemoms wrote:Well, its not gospel, but if you look at a February 1980 datasheet, its specified to have two color modes. And this is certainly before the Vic-20 (according to the same book you mention),
Hmmm, I'm curious about these dates now. Are we certain that that datasheet is from February 1980 as the 6502.org site claims? I'd like to verify that.

I'm going to skim through the book again now to see if I can pull out a few important dates mentioned...
  • Late 1978: Al Charpentier meets with Bob Yannes, a senior at Villanova University. Bob sees the VIC-I chip and is interested in playing around with it for his senior year project, so Al sends him some samples.
  • June 1979: Bob Yannes joins Commodore straight out of College.
  • Late 1979: Work began on a 40-column version of the 6560 called the 6562. Al Charpentier gave Bob Yannes the task of designing the 6562 circuitry. He basically took the original 6560 chip and "hacked" it over a 1-2 week period.
  • January 1980: CES show where TOI system was demoed. It used the 6562 chip that Bob Yannes had helped develop.
  • Early-ish 1980: 6562 abandoned after Tramiel realised it relied on fast, expensive SRAM.
  • Between January 1980 and June 1980: Work began on the 6564, which was supposedly a 6562 redesigned to work with slower DRAM. As part of this, Bob Yannes designed the video output to support multi-colour mode. At some point around here, this multi-colour mode from the 6564 was dropped back in to the 6560 design.
  • Approaching mid-1980: It became clear that the June deadline to produce a cheaper 40-column chip wasn't going to happen. Too many issues with the timing of the 6564.
  • Spring 1980: Sinclair ZX80 is released. Bob Yannes sees an opportunity to use the VIC-I chip in a simple ZX80-like machine. Begins work on the microPET prototype in his bedroom.
  • May 1980: MicroPET prototype shown to Tramiel. He says "Ship it".
  • June 1980: Apparently the MicroPET was at the June CES show.
  • September 1980: VIC-1001 debuted in a Japanese department store.
Kakemoms wrote:and date suggests its the datasheet of the 6560 used in the Ryoto Electric arcade machine. Maybe the "original" 6560 was just made in a few samples and never used for anything, while the multicolor-version that was used in 1980 was the same in both Ryoto and Vic-1001.
The separate emulations that MAME, groepaz, and myself have done of Attack UFO suggests it didn't have a multi-colour mode. Well certainly not in the way described in that datasheet. If the Attack UFO emulation were to leave the multi-colour mode enabled, then the resulting screen would look a bit of a mess for certain lines of characters. It is also clear that the Attack UFO version of the 6560 didn't have the reverse mode. If it did then the screen would be mostly reversed.
Kakemoms
Vic 20 Nerd
Posts: 740
Joined: Sun Feb 15, 2015 8:45 am

Re: 6561 Die Shot Reversing Explorations

Post by Kakemoms »

lance.ewing wrote: I'm going to skim through the book again now to see if I can pull out a few important dates mentioned...

The separate emulations that MAME, groepaz, and myself have done of Attack UFO suggests it didn't have a multi-colour mode. Well certainly not in the way described in that datasheet. If the Attack UFO emulation were to leave the multi-colour mode enabled, then the resulting screen would look a bit of a mess for certain lines of characters. It is also clear that the Attack UFO version of the 6560 didn't have the reverse mode. If it did then the screen would be mostly reversed.
Well.. history.. freely retold from memory. It is certainly as close as we are ever going to get, but dates tend to slip or slide over the years.. Anyway, the datasheet first page certainly states "2/80", so that would fix that.


Edit: Actually, if you read "Compute! Mapping the VIC", it reads:
"37888-38399 $9400-$95FF COLORMAPS* (handy location)
Screen color map (8K+ expanded VIC-20).
Bits 4-7 = not there
Bit 3 = multicolor if set to 1 or normal if set to 0
Bits 0-2 = foreground color value 0-7"

So, multicolor mode can be set in the code, and the screen will not show multicolor if color RAM bit 3 (line DB11, pin5) is pulled LOW.

Edit (again): In case reverse bit is on, and multicolor pin 5 is pulled LOW, all the data needs to be reversed in order for the screen to show properly. If one could get access to the original ROM, that should be the first thing to check. If data is not reversed (and reverse bit is on), then the 6560 has to be a different version...
lance.ewing
Vic 20 Afficionado
Posts: 413
Joined: Sat Nov 10, 2012 3:19 pm
Website: https://sites.google.com/site/mos6561vic/

Re: 6561 Die Shot Reversing Explorations

Post by lance.ewing »

Kakemoms wrote:Well.. history.. freely retold from memory. It is certainly as close as we are ever going to get, but dates tend to slip or slide over the years.. Anyway, the datasheet first page certainly states "2/80", so that would fix that.
Yeah, I agree. I'm starting to think that the memories of the events around those two 1980 CES shows must have been confused over time. That 2/80 date seems fairly conclusive. If the timeline in the book is correct, then the multi-colour mode was added only weeks prior to that datasheet being created. I guess that is possible, but it doesn't really seem to fit.

I'm wondering whether Bob Yannes confused parts of the 6562 and 6564 development and perhaps he added the multi colour mode at the time he was working on the 6562 rather than 6564. That would have allowed it to have existed for perhaps a few months before February 1980. One comment in the Bagnall book implied that the 6562 was a two week hack to make the 6560 produce 40 columns and then quickly abandoned after that January 1980 CES show, but this doesn't really agree with some of the evidence. The 6562 was still in the 1981 Component Data Catalog, and the only photo of a 6562 that I've found online has a 0781 date on it.

http://www.floodgap.com/retrobits/ckb/s ... m-6562.jpg

Any ideas what Data Catalog this 6562 document came from? http://archive.6502.org/datasheets/mos_ ... 63_vic.pdf
It is a different version than what is in the 1981 Component Data Catalog for the 6562, which contains a much fuller version.
Kakemoms wrote:So, multicolor mode can be set in the code, and the screen will not show multicolor if color RAM bit 3 (line DB11, pin5) is pulled LOW.
Yeah, I'm aware of that. I was thinking of doing exactly that if I ever happen to attempt building an Attack UFO clone in hardware using the VIC 20 version of the 6560. The problem is that the game is putting a 1 in the colour RAM bit 3 for at least two of the colours used on the screen. If it is doing that for specific characters on screen, then it is highly likely that that colour data line is wired up in the original Attack UFO machine. The screenshots of the MAME emulation suggest that there are two different shades of blue, i.e. the darker blue of one set of UFOs and lighter blue of the barriers at the bottom. Those lighter blue barriers are using one of the colours where there is a 1 in bit 3 of the colour RAM.
Kakemoms wrote:Edit (again): In case reverse bit is on, and multicolor pin 5 is pulled LOW, all the data needs to be reversed in order for the screen to show properly. If one could get access to the original ROM, that should be the first thing to check. If data is not reversed (and reverse bit is on), then the 6560 has to be a different version...
My assumption is that the ROM images available online are the unmodified ROM data. There is no reason I can think of for the MAME team to have modified the ROMs. Isn't it their goal to build an emulator to run the unmodified ROMs? It's the code of their emulator that they change to make it run a new set of game ROMs, usually by building a driver that specifies what chips are used by that machine. In the case of Attack UFO, they had to alter their 6560 chip emulation so that it didn't support multi colour mode or the reverse mode when running Attack UFO. If altering the ROMs was an option for them, then they wouldn't have needed to add Attack UFO specific customisations to their 6560 emulation. So I think those would be the original ROMs.
Post Reply