6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Sat Nov 23, 2024 5:45 am

All times are UTC




Post new topic Reply to topic  [ 15 posts ] 
Author Message
 Post subject: 65816 Documentation
PostPosted: Fri Feb 07, 2020 12:34 am 
Offline

Joined: Tue Feb 04, 2020 11:38 pm
Posts: 6
Hello,
I'm Jake, (first post). I've been working on a project to create chip labels and dove down the rabbit hole of the 65816 after talking to Garth a bit over email and reading some of his website. During this trek I have edited some of the PDF's I have come across in an attempt to make them slightly more useful to me. The following are the ones I've uploaded to Archive.org.

This is the GTE datasheet edited to remove scan artifacts, added OCR, and bookmarks:
https://archive.org/details/gteg65sc816datasheetocrbm/page/n0/mode/1up
This is the GTE databook that is posted in the documents section of 6502.org but revised with working OCR and bookmarks:
https://archive.org/details/gtemicrocircuitsdatabookjan1984ocrbm/page/n0/mode/1up
This is the current WDC Datasheet for the W65C816S I simply added bookmarks to this one:
https://archive.org/details/w65c816s_bm/page/n0/mode/1up
This is the original unmodified patent for the W65C816 (I got it from google patents after lots of searching):
https://archive.org/details/us4739475/page/n0/mode/1up

I was really trying to find other datasheets for the 816 that might show differences in specs. The GTE version looks like it's pretty much a copy of the original WDC sheet with a few parts missing. The patent has the original full datasheet embedded in it. I also have a copy of the original WDC datasheet I found in a book from Applied Engineering.https://archive.org/details/AE_65816_16bit_Card_Software_Developers_Guide/page/n9/mode/2up

What I haven't found are a full CMD datasheet or anything from Rockwell, Synertek or others on the 816.

I found multiple references for the entire 816 instruction set in 100+ page detail within a couple of books on the Apple IIgs. The entire books are posted on the Archive:
https://archive.org/details/appleiigsmachinelanguageforbeginners/page/n485/mode/2up
https://archive.org/details/ProgrammingTheAppleIIGS/page/n87/mode/2up
https://archive.org/details/ProgrammingTheAppleIIGS/page/n385/mode/2up

Just to be clear, I edit PDF's using a free Linux toolchain that consists of the following command line utilities: pdftk, qpdf, pdfbeads, pdftotext, pdfimages, imagemagick, and graphicsmagick. I use a GUI tool called ScanTailor to remove scan artifacts and edit margins after converting every page to either TIF or PNG formatted images. I'm then using pdfbeads to recombine the images with the compressed text. This is then passed through an old Windows PDF viewer called PDFXCview (using wine on Linux). This viewer has built in OCR software that can add an embedded OCR text overlay without modifying the original content stream. This combination of separating the images from the text, adding text compression, removing non-white scan artifacts, and adding the OCR layer discreetly is how I'm making these much smaller than they often are otherwise. The OCR isn't perfect but it is above average for most content on the internet. The last step I usually do is add a bookmark link index. The pdftk utility can dump a copy of the basic PDF metadata (author/creation date/software used to make the original/page size/orientation/etc). If this text file is modified with bookmark data and the information is updated with pdftk, bookmarks can be added to an existing datasheet. Unfortunately, the bookmarks are not linked to the actual line reference like some commercial software is capable of generating, but instead are just a page linked reference. The first time the PDF is opened with these new bookmarks it may take a bit longer to load too. I don't have issues with it after the first time loading. I am no expert here, but have done a tiny bit of reading about PDF forensics. My understanding is that the metadata is not replaced with a utility like this, the metadata is more like a stack where the new data is simply pushed onto the last. This may be what causes the load times to shift. On larger documents that have more trouble I will often use qpdf's --linearize command. I think it might help but honestly haven't tested it scientifically or anything. I mention all of this to try to let everyone know I'm not just passing these through some online PDF compression site or anything. I've usually gone through a document several times line by line while editing and modifying them. My process is usually improving the original document when it is something scanned from a book. ScanTailor has tools to adjust the line thicknesses and otherwise tune the output. In the worst cases I remove a bad page and edit it in GIMP before adding it back into the document.
The only exception to calling a document "improved" are instances where I am editing a digitally generated original. The WDC W65C816S is a good example. All I did was add bookmarks, it's 511 lines with a begin command, title, nesting level, and page number for each link. Most of the time this adds less than 100kb to the file but it is around 1MB with the 816S. It may be the removal of the original compression that is causing this. I try do not add compression randomly with online tools as this can degrade a document, and I don't want to remove an original digital text layer in favor of OCR either.

As an interesting aside, the W65C816S's PDF metadata is actually signed by William D. Mensch Jr. I believe that means he wrote and created the document himself.
Attachment:
MetadataFromW65C816S.png
MetadataFromW65C816S.png [ 75.26 KiB | Viewed 1663 times ]


Anyways...maybe someone finds this info useful in the future, and maybe someone can point me towards other 65816 datasheets that are evading my searches (I already have the 2 page CMD thing from the 6502 docs repository). I have one chip with a VL65C816-04P part number and am totally clueless who made it or where that datasheet might be hiding.
-Jake

Chip Labels:
https://github.com/Upcycle-Electronics/ChipLabels


Top
 Profile  
Reply with quote  
 Post subject: Re: 65816 Documentation
PostPosted: Fri Feb 07, 2020 1:37 am 
Offline
User avatar

Joined: Fri Dec 11, 2009 3:50 pm
Posts: 3367
Location: Ontario, Canada
Welcome, Jake, and thanks for sharing your efforts.

I seem to have at least some of the additional info you seek. Re the VL65C816-04P, here's a screenshot from a large VLSI document squirreled away on my HDD. Dated 1988, it lists all their products. Unfortunately, I'm not handy with PDF's, and can't readily extract the relevant pages from this 26 MB file!

I've sent the entire document to you by PM. Thought it'd be too big, but apparently not...!

-- Jeff


Attachments:
VLSI '816.png
VLSI '816.png [ 148.42 KiB | Viewed 1652 times ]

_________________
In 1988 my 65C02 got six new registers and 44 new full-speed instructions!
https://laughtonelectronics.com/Arcana/ ... mmary.html
Top
 Profile  
Reply with quote  
 Post subject: Re: 65816 Documentation
PostPosted: Fri Feb 07, 2020 5:54 am 
Offline

Joined: Mon May 21, 2018 8:09 pm
Posts: 1462
In this WDC datasheet from February 1991, the formatting is a lot cruder but higher-speed models are listed than in the GTE datasheet. There is also the infamous note, right at the end, which describes a timing issue and a workaround involving inserting NOPs after SEP/REP instructions. I haven't found that note in any other '816 datasheet or programming manual.


Attachments:
WDCIS00025-1.pdf [4.25 MiB]
Downloaded 102 times
Top
 Profile  
Reply with quote  
 Post subject: Re: 65816 Documentation
PostPosted: Sun Feb 09, 2020 3:24 am 
Offline

Joined: Tue Feb 04, 2020 11:38 pm
Posts: 6
Thanks Jefyll and Chromatix.
I did not have the VLSI databook or this WDC version for 1991.

Firstly, I should have mentioned, for those not familiar with Archive.org, PDF files are listed for download just below the streaming viewer. I'm not a big fan of their viewer but the Archive is probably the most secure place to publicly upload such information.

Secondly, most of databooks on the Archive are done by an organization called Bit-Savers. They also list their files on their own website here:
http://www.bitsavers.org/
The '88 VLSI databook is posted on their site as well. However I took the time to rework it anyways and add bookmarks. It also has my OCR text. I could only get mine down to 16.9MB instead of 26MB. Not a huge difference, but it was 632 pages (633 if you count the totally blank 2nd page I removed). My OCR is not really better or worse than the original. I compared the text in MELD. I got more 1's and 0's but the old one got better I/L's and H/R's. It's clear that neither OCR was finely tuned. As far as what I have done and posted on the Archive, the bookmarks and OCR text are only visible in the actual PDF. The streaming viewer does not have text or metadata navigation features.
This is the link to the complete Databook:
https://archive.org/details/1988vlsidatabookocrbm/page/n0/mode/2up

I also went ahead and broke out the 65816, 65NC02, and 6522 datasheets from the VLSI databook. I went ahead and added bookmarks to the 65816 and 6502. All three have my OCR text embedded.
VL65C816 Datasheet
https://archive.org/details/vl65c816datasheetvlsi1988ocrbm/page/n0/mode/2up
VL65NC02 Datasheet
https://archive.org/details/vl65nc02datasheetvlsi1988ocrbm/page/n0/mode/2up
VL6522
https://archive.org/details/vl6522vl65c22vl65c22vdatasheetvlsi1988/page/n0/mode/2up

I also made a list of Logic Databooks available on the Archive and finally got around to posting it here if anyone is interested:
https://github.com/Upcycle-Electronics/ChipLabels/blob/master/ListOfLogicDatabooksOnArchive.md

Thanks again for the files.


Top
 Profile  
Reply with quote  
 Post subject: Re: 65816 Documentation
PostPosted: Sun Feb 09, 2020 8:42 pm 
Offline
Site Admin
User avatar

Joined: Fri Aug 30, 2002 1:08 am
Posts: 281
Location: Northern California
JakeLittle wrote:
Firstly, I should have mentioned, for those not familiar with Archive.org, PDF files are listed for download just below the streaming viewer. I'm not a big fan of their viewer but the Archive is probably the most secure place to publicly upload such information.

6502.org and bitsavers.org have both been around for 15-20 years, are actively updated, and don't show any signs of going away. When re-uploading documents from these sites to other places, you might consider adding a link back to the original source. I doubt anyone has any issues with re-uploading them since the point of doing the scanning is to help distribute them, but letting people know the original source can help in case there are problems. For example, if someone finds a missing page, they will know what site to contact to see if it can be rescanned.

_________________
- Mike Naberezny (mike@naberezny.com) http://6502.org


Top
 Profile  
Reply with quote  
 Post subject: Re: 65816 Documentation
PostPosted: Mon Feb 10, 2020 4:17 am 
Offline

Joined: Tue Feb 04, 2020 11:38 pm
Posts: 6
Thanks for the good advice Mike. I have added a link from the archive version of the GTE databook to the one you posted here.
Generally, I remove blank pages that the end user will not be able to see. If the page is in a sequential numbering scheme I leave them. If they are at the beginning or end of the book and totally blank, or the book is not sequentially numbered (blank pages at the end of chapter based numbering system) I remove them.
The files are automatically numbered sequentially by the command line utility when they are converted to images. I haven't seen an error at this step before. I only remove a page while editing in ScanTailor where I'm manually setting up and editing each page. Have you seen anything missing?

The GTE book was tricky because of the gray scale images. I had to split it up and recombine it to keep the resolution settings dialed. There is no reason to make the whole thing gray scale, and/or color. I didn't have any files leftover in the end so it should be complete, and I didn't see any issues while editing. I'm not reading every line, but I look at all pages at least 3 times while editing.
The VLSI databook has 1364 pages embedded but only 633 that are in the original visible datastream. I have no idea what is on all the other pages. They are not blank. They all had between 8 and 20kb of data on them but the data is encrypted gibberish in Vim. I deleted all of them. If there was something malicious it shouldn't have a way of surviving the conversion to images and creation of a new PDF. It's the first time I've seen this happen. I deleted the whole thing and started over twice just to be sure it wasn't something I was doing different. I'm confident I got that one back together correctly and would have caught any errors. Editing 633 pages takes a very long time, and no one is perfect. I want to know if I've made a mistake though.

I meant nothing personal by the comment about securely posting info. Of all the server databases to preserve long term archive.org seems like it would be in the top 5 for hundreds of years, long after we're all forgotten. I'm sure you're aware it has your site archived from all the way back in 1999. Heck I was a little snot in the 8th grade back then. We probably had some old computers that still had 6502's in them too. I remember green screens and 5.25in floppies in Elementary.
Anyways, thanks for keeping this website going.

Are there any other databook archives hiding in plain sight on the internet? -guy under rock asking

Here's the WDC datasheet from 1991 after a lossless rework, OCR text, and bookmarks (1.3MB versus the 4.2MB original too):
https://archive.org/details/wdcw65c816datasheetfeb199151pwdcis00025losslesswithocrnbm/page/n0/mode/2up

*fixed link


Top
 Profile  
Reply with quote  
 Post subject: Re: 65816 Documentation
PostPosted: Tue Feb 11, 2020 3:20 am 
Offline

Joined: Tue Feb 04, 2020 11:38 pm
Posts: 6
Who wants to play fake 65816? Attached is the patent architecture drawings converted into a single page. What do you see that didn't make it into the final production cut?
Right off the bat I see the DBE circuit (data bus enable) was not included. Funny, it isn't on the preliminary datasheet pinout, but is described in the pin function description in past tense. Phase 4 clock output is probably another. What others do the more experienced here see? I really like the patent's description for Vector Pull and the how the valid data/program address pins are intended to be used.


Attachments:
architecture-logic_pat816.pdf [261.84 KiB]
Downloaded 108 times
Top
 Profile  
Reply with quote  
 Post subject: Re: 65816 Documentation
PostPosted: Tue Feb 11, 2020 3:29 am 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8544
Location: Southern California
JakeLittle wrote:
Right off the bat I see the DBE circuit (data bus enable) was not included.

Are you talking about something different from the bus-enable input, which is on pin 36 of the DIP?

_________________
http://WilsonMinesCo.com/ lots of 6502 resources
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?


Top
 Profile  
Reply with quote  
 Post subject: Re: 65816 Documentation
PostPosted: Tue Feb 11, 2020 5:15 am 
Offline
User avatar

Joined: Fri Dec 11, 2009 3:50 pm
Posts: 3367
Location: Ontario, Canada
I'd only been looking at that diagram for a few minutes before an error became evident.

Which makes me suspect the diagram was done by the same people who produce WDC's data sheets! :wink: :P

-- Jeff


Attachments:
Patent booboo.png
Patent booboo.png [ 176.86 KiB | Viewed 1407 times ]

_________________
In 1988 my 65C02 got six new registers and 44 new full-speed instructions!
https://laughtonelectronics.com/Arcana/ ... mmary.html
Top
 Profile  
Reply with quote  
 Post subject: Re: 65816 Documentation
PostPosted: Tue Feb 11, 2020 8:13 am 
Offline

Joined: Tue Feb 04, 2020 11:38 pm
Posts: 6
GARTHWILSON wrote:
JakeLittle wrote:
Right off the bat I see the DBE circuit (data bus enable) was not included.

Are you talking about something different from the bus-enable input, which is on pin 36 of the DIP?


Yup, there was a plan to have a tristate data bus pin in addition to the BE pin, but it was nixed at some point.
Column 7 line 7 of page 13
https://archive.org/details/us4739475/page/n12/mode/1up
It's listed as a parameter on page 2 of the preliminary datasheet here:
https://archive.org/details/us4739475/page/n24/mode/1up

It's described about half way down column 39 as well, 5 entries below the Bus Enable pin description.
https://archive.org/details/us4739475/page/n28/mode/1up

Hey Jefyll, did you edit that not dot in, is that from another doc or what?


Top
 Profile  
Reply with quote  
 Post subject: Re: 65816 Documentation
PostPosted: Tue Feb 11, 2020 8:25 am 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8507
Location: Midwestern USA
Dr Jefyll wrote:
I'd only been looking at that diagram for a few minutes before an error became evident.

Which makes me suspect the diagram was done by the same people who produce WDC's data sheets! :wink: :P

-- Jeff

Yep! I saw that and had a WTF moment. :D Fortunately, that error didn't get into the actual parts, otherwise RDY and the WAI instruction wouldn't work, eh?

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


Top
 Profile  
Reply with quote  
 Post subject: Re: 65816 Documentation
PostPosted: Tue Feb 11, 2020 3:45 pm 
Offline
User avatar

Joined: Fri Dec 11, 2009 3:50 pm
Posts: 3367
Location: Ontario, Canada
I edited the image. Have had lots of practice -- I'm a bit of a photo-shopaholic! :P

As for this portion of the RDY circuit, I haven't managed to piece together the overall function. But within the circuit I recognize a common idiom, specifically the static, "follow-hold" flipflop (aka transparent latch).

As many of you know, the "circle with a cross" symbol is used here to signify an N-type FET and P-type FET connected back to back as a Transmission Gate. When the gate of one FET is high and the other is low, the Transmission Gate conducts freely in both directions, almost like the contacts of a SPST switch. (Among other things, this makes TG's handy for routing analog signals.)

In this case the two SPST switches behave as one SPDT, and its job is to route a selected signal to the input of the little inverter chain. According to the clock input Φ2I, the chain will receive either new data (ie, "follow") or the chain's output, recycled (ie, "hold").
Attachment:
CMOS transission gate.png
CMOS transission gate.png [ 6.99 KiB | Viewed 1362 times ]
Attachment:
CMOS transparent latch.png
CMOS transparent latch.png [ 8.58 KiB | Viewed 1362 times ]

_________________
In 1988 my 65C02 got six new registers and 44 new full-speed instructions!
https://laughtonelectronics.com/Arcana/ ... mmary.html


Top
 Profile  
Reply with quote  
 Post subject: Re: 65816 Documentation
PostPosted: Tue Feb 11, 2020 5:49 pm 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8507
Location: Midwestern USA
Dr Jefyll wrote:
I edited the image. Have had lots of practice -- I'm a bit of a photo-shopaholic! :P

As for this portion of the RDY circuit, I haven't managed to piece together the overall function. But within the circuit I recognize a common idiom, specifically the static, "follow-hold" flipflop (aka transparent latch).

As many of you know, the "circle with a cross" symbol is used here to signify an N-type FET and P-type FET connected back to back as a Transmission Gate. When the gate of one FET is high and the other is low, the Transmission Gate conducts freely in both directions, almost like the contacts of a SPST switch. (Among other things, this makes TG's handy for routing analog signals.)

In this case the two SPST switches behave as one SPDT, and its job is to route a selected signal to the input of the little inverter chain. According to the clock input Φ2I, the chain will receive either new data (ie, "follow") or the chain's output, recycled (ie, "hold").
Attachment:
CMOS transission gate.png
Attachment:
CMOS transparent latch.png

Good explanation.

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


Top
 Profile  
Reply with quote  
 Post subject: Re: 65816 Documentation
PostPosted: Wed Feb 12, 2020 3:07 am 
Offline

Joined: Tue Feb 04, 2020 11:38 pm
Posts: 6
Dr Jefyll wrote:
I edited the image. Have had lots of practice -- I'm a bit of a photo-shopaholic! :P

what? like this?
Attachment:
pat816archiwide.jpg
pat816archiwide.jpg [ 1.05 MiB | Viewed 1314 times ]

I waste far too much time at such nonsense.
Thanks for the explanation :)


Top
 Profile  
Reply with quote  
 Post subject: Re: 65816 Documentation
PostPosted: Wed Feb 12, 2020 6:06 am 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8507
Location: Midwestern USA
JakeLittle wrote:
Dr Jefyll wrote:
I edited the image. Have had lots of practice -- I'm a bit of a photo-shopaholic! :P

what? like this?
Attachment:
pat816archiwide.jpg

I waste far too much time at such nonsense.
Thanks for the explanation :)

Uh...that made it harder to read.

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


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

All times are UTC


Who is online

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