torsdag 1 december 2016

The Prodigy #6 - Document the PCB layout

An important step in the preservation work is to document the PCB not only as images but also as part of the emulation source code so that later maintainers easily can see what circuit design is being emulated. It can reveal inexact emulation and also help determine the revision of a future PCBs that is up for preservation.

Using mono spaced text for the layout has its limitation but the important thing is to be able to see the resemblance  with the real thing. We start with the PCB edges, add connectors and the large chips and continue with the smaller ones and try to be at most 120-150 characters wide.

Some examples of ascii layout components
The ascii layout goes directly in to the source code together with whatever chip references there are and of course also links to the original images if they are public such as our Prodigy page

To get the right start I usually start in Gimp or Power Point where I put the original image and a half transparent text layer on top of it choosing a small mono spaced font such as Courier New of size 8-12 depending in the size of the board. Gimp and Power Point are pretty poor editors so once I have some reference points I copy all of the text into good old Emacs and finalize the work there.

Layout outline copied from half transparent text layer in Power Point
So to compare this with the top PCB image


you see that it is pretty easy to find the right chip when referring it from the source code. From here it is just to fill in the missing parts and we have given the future maintainer and computer archaeologist quite a few hints about what this design looked like.

Back in Emacs I will at this point turn on the overwrite mode, by pressing the Ins key, so I freely can add characters at any point in the layout without shifting the ones right of the cursor further to the right. To make it even easier it helps to fill out the width of the layout with spaces so the cursor doesn't flung left when it comes to a shorter row.

When editing the last details it is very useful to have the image visible at the same time as the editor so by enabling the truncate-long-lines option in Emacs it is possible to place the windows side by side

Editing the ascii layout

The final version is adjusted and made complete for reference.
Final ascii layout

This is a good picture to refer to from the code we are about to write, check it out on github.

Next we continue to trace down the VIA ports