Sunday, September 29, 2019

It's Still Awesome - And Now It's Complete!

Brand New A500+ Part 2


It's nice to have new things. A new phone, a new shirt, even a new pair of budgie smugglers (urgh!). It's even nicer when the new thing you have is high quality and better than what you had before. And the A500++ board is very high quality and better than the original in several ways.

First, and most obviously, it's brand new with no Varta acid death and is very good quality - gold plated contacts and a shiny purple finish. Almost too nice to solder anything to.

A Thing of Beauty

Next, any A500+ owner will know that there is an annoying fudge near the 'Audio Filter' section of the board where a diode is soldered at an odd angle. It's a factory mod that corrects a cock-up in the board that was obviously too costly to correct. It stayed that way for the (short) life of the A500+. But the purple beauty solves that issue too.

Other useful things to know are that it has a space for header pins to allow the selection of internal or external drives being connected as DF0, handy for all you Gotek'ers out there. And, best of all, the silkscreen includes many more details not included on the original, of both the component values and also including a subtle nod to the plight of the most vulnerable custom chip when Varta spews forth its poison. 'Poor Gary' indeed.

Improved Silk Screen. :)

Back to my board. One thing I mentioned in the first part was that I was intending to complete this project with as little expense as possible by a) using anything that I had 'in stock' already and b) de-soldering anything else from the donor board. Large items like the power socket, video socket etc are a given. But then there are lots and lots of passive components (resistors, capacitors etc) as well as logic chips and other ICs that I could buy brand new, but the cost of this could quickly add up.

As luck would have it, I had a little bonus from work, and I'd treated myself to a Duratool de-soldering workstation from CPC Farnell just a few weeks ago. And I am glad I did. If you plan to do anything like this, you really should consider getting one of these or something similar. De-soldering a few hundred component legs using a manual pump or de-solder braid would  have taken months. The tool itself is a soldering iron with a hollow core that links to an air pump so, when solder is heated, pressing the trigger activates the pump which sucks the solder into the glass container on the de-soldering gun. I have to tell you now, it took a beating during this project.

That'll need a clean...
Removing components with the tool still took some time. My initial runs with the de-solder gun resulted in many blockages and frustrating delays as I had to keep clearing the glass chamber and the small metal pipe that runs from the tip of the gun into the body. After a while I got quite adept at removing the glass, spring and filter almost one handed, and the delays became fewer and shorter. Some components still required the assistance of a soldering iron to allow their removal. This took a toll on the tips of my iron and I ended up replacing it twice during the removal phase..

That'll need a replacement...
At the back of the main board there is a long row of what looks like ceramic capacitors. They look like that because, in actual fact, they ARE ceramic capacitors but each one has three legs. They are a specific type of cap that (I have to be honest) I had not seen before, known as Feedthrough Capacitors, designed to have an almost ideal insertion loss apparently. Ahem. In any case, removing these took a significant amount of time as they got very, very hot, even with a very small dwell time on the legs. Heat does not do these components any good and I did actually end up with the centre leg of one cap just falling off, and another one nearly splitting in two. The one with the gammy leg was replaced by a willing volunteer from an old Rev6 board I have. Despite this, I managed to get pretty much everything de-soldered without too many problems other than my lack of patience. :)

Some items that I fitted to the new board I did eventually cheat on, and some, as mentioned, I already had. New items I either bought or already had were:


  • New IC sockets* - essential when the custom chips have been removed from a battery damaged board
  • New resistors - I'd intended to use the old ones but then realised how cheap they were and relented
  • New ceramic caps - I already had a box of various values (expect 330nf) so used these
  • New electrolytic caps - already had them all in stock from previous repairs :)

*I didn't have a socket big enough for the CPU so I de-soldered the old one and removed the manky pins. Then I removed shiny new pins from some of the new sockets I had and inserted them into the old socket. I've done this before and it's lots of fun (no it isn't).


Shiny new pins for the CPU

Everything else came from the original A500+ board.

Box 'o bits (one of several)
In all I spent about £10 on new sockets and resistors. Note that to aid future maintenance, every chip got a socket, including the Video Hybrid. This socket was made from slicing a bigger socket in half. :)


Almost done stripping the donor..
The following sequence of pictures shows the steady progression over a couple of weeks....









So, after about three weeks of component swapping, finger burning, de-soldering station unblocking fun, I ended up with this:

Finished! Yay!

Would it work first time?

No.

First test. Board appeared completely dead. I'd forgotten to plug the power supply into the wall.

Second test. Keyboard light stays dim. No display output at all. Then I realised I'd left the Video Hybrid chip unplugged (doh!).

Video Hybrid (the tall thin dude near the back)
Third test. Green screen followed by reset. Bugger.

At least with a green screen, something was happening and it indicated that the system was trying to start up. So, back to diagnosing green screens and an Amiga.... My immediate suspicion was on chips U10, U11, U12 and U13. These are the ones that normally take a big hit from Varta and frequently need to be replaced. I started by swapping them out one by one. Sure enough, the last one I swapped at U13 solved the issue. The SN74LS373 at that location had died, and with a new one the board booted but with an odd colour tinge.

Hmmm. Not quite right...

It was obvious there was a colour problem. In fact, all blue was missing from the image. After a bit of jiggling of the Video Hybrid and other chips I tried again. This time I was missing blue AND green. Everything was red. Dammit.

I removed the modulator and tried the built in composite output which is just black and white but it was crystal clear. So I plugged the modulator back in and tried again. This time I had all the right colours and ended up at the familiar purple boot screen. Yes!

What had happened was that the video socket that was harvested from the old board had acquired a healthy dollop of flux on its pins. Wiggling the modulator in and out a couple of times removed it allowing a full connection and the correct colours to be displayed. Nice.

Ahh! That's better!

So, next test. I plugged in my trusty AlfaPower external hard drive.

Old Faithful!

Would it work?

Success!
Yes. Yes it does work.

Now all I need to do is pop it in the case and everything will be fine.

     Or will it? (hint - it wasn't)

To be continued.....



Saturday, September 28, 2019

Guru Meditation

Way back in 1982 or 1983, a small company named Amiga designed and built a peripheral for computers known as the 'joy board'. Imagine a very early Wii Balance Board and you wouldn't be too far wrong.

Amiga Joyboard
The developers of the Amiga took to sitting on one of these boards and playing a simple game that required the user to sit as still as possible to achieve maximum zen and attain a state of nirvana. This normally occurred after a programming session had resulted in another inevitable crash. And thus the Amiga's famous 'Guru Meditation' error was born.

A flashing red box with unhelpfully cryptic text would appear when the software on the Amiga crashed. More useful than the PCs dead black screen (this is prior to Windows and its blue screen of death) and it was inspired by the Apple Mac which, when it crashed, would display a picture of a bomb i.e. the software bombed...

A Classic Guru

But the code in the box can be more helpful than you'd think. It gives some clue as to what the heck happened. Below is a compilation of information that I gathered from the internet after I had problems with my A500++. I realised that there is no easy description of the codes I was encountering. So here it is. No warranty implied yadda, yadda, yadda etc.

For information the Guru I kept getting was one of the following:

     80000003.0000xxxx
     80000004.00003E78

Guru numbers are made up of two 8 digit numbers where the numbers are hex values. The first part is most useful as it contains information on the actual error. The second part is usually the address in memory of the task where the problem occurred.


      Specific error code -----+         +--- Task Address
                               |         |
                       02 01 0008 . 00007250      
                        |  |
      Subsystem number -+  +--- General error code

Guru - General Format


The first part of the number can be grouped by splitting up the first eight hexadecimal digits. Each digit is made of four bits allowing up to 16 values (0 to 9 and A to F). The first two digits show the part of the operating system that caused the error (or subsystem ID), the next two digits the general error codes and the final four digits the specific error code.

If the first digit, reading left to right, has it's most significant bit set i.e. binary '1xxx', this is the value 8. This means that this is a 'Dead End' error and that there is no way back for the task to recover. Those 'dead end' errors detected by the CPU have '80' as their first two digits. See more details of this later on in the post.

Note that the most significant bit being set can apply to any of the subsystem IDs so, for example, an error in the Graphics Library which is subsystem ID '02' would be indicated as 'dead end' by being set to '82'. (But, let's be honest. If the system has reached the point that it is displaying the red alert box then you're not really going back from that!)

If it so happens that the first digit of the Guru is greater than 7 (in hex) then simply subtract 8 from it. For example, if the first two digits are A1 then take 8 away from the first digit i.e. A - 8 = 2 so the error would be on subsystem ID 21 or Disk Resource.

Just a note that at the bottom of this list of codes I talk about CPU traps. It's important so don't think you've reached the end just because of the lists!

Subsystem ID Codes

Exec Library        01     Console Device      11
Graphics Library    02     GamePort Device     12
Layers Library      03     Keyboard Device     13
Intuition Library   04     TrackDisk Device    14
Maths Library       05     Timer Device        15
CList Library       06     CIA Resource        20
DOS Library         07     Disk Resource       21
RAM Library         08     Misc Resource       22
Icon Library        09     BootStrap           30
Audio Device        10     Workbench           31

Following on from the subsystem ID is the 'general' error code. For many cases this is a simple '00' as the final four digits will give more 'specialised' information. General error codes are:

Insufficient memory   01    OpenDevice error    04
MakeLibrary error     02    OpenResource error  05
OpenLibrary error     03    I/O error           06

The final four digits describe the specific error code relating to the subsystem which encountered the error. Shown below are some of the specific error codes for the different subsystems:

Exec Library
ExcptVect      0001    CPU trap vector checksum
BaseChkSum     0002    ExecBase checksum error
LibChkSum      0003    library checksum failure
LibMem         0004    no memory to make library
MemCorrupt     0005    corrupted free memory list
IntrMem        0006    no memory for interrupt servers
               0009    attempt to free already free memory
               000C    total memory mismatch free space plus used

Graphics Library
CopDisplay     0001    copper display list, no memory
CopInstr       0002    copper instruction list, no mem.
CopListOver    0003    copper list too long
CopIListOver   0004    copper intermediate list too long
CopListHead    0005    copper list head, no memory
LongFrame      0006    long frame, no memory
ShortFrame     0007    short frame, no memory
FloodFill      0008    flood fill, no memory
TextTmpRas     0009    text, no memory for TmpRas
BltBitMap      000A    BltBitMap, no memory

Intuition Library
GadgetType     0001    unknown gadet type
CreatePort     0002    create port, no memory
ItemAlloc      0003    item plane alloc, no memory
SubAlloc       0004    sub alloc, no memory
PlaneAlloc     0005    plane alloc, no memory
ItemBoxTop     0006    item box top < RelZero
OpenScreen     0007    open screen, no memory
OpenScrnRast   0008    OpenScreen's AllocRast, no mem.
SysScrnType    0009    open sys screen, unknown type
AddSWGadget    000A    add SW gadgets, no memory
OpenWindow     000B    open window, no memory
BadState       000C    Bad State Return entering Int.
BadMessage     000D    Bad Message received by IDCMP
WeirdEcho      000E    Weird echo causing problem
NoConsole      000F    couldn't open the Console Device

DOS Library
StartMem       0001    no memory at startup
EndTask        0002    EndTask didn't
QPktFail       0003    Qpkt failure
AsyncPkt       0004    Unexpected message received
FreeVec        0005    Freevec failed
DiskBlkSeq     0006    Disk block sequence error
BitMap         0007    Bitmap corrupt
KeyFree        0008    Key already free
BadChkSum      0009    Invalid checksum
DiskError      000A    Disk Error
KeyRange       000B    Key out of range
BadOverlay     000C    Bad overlay

TrackDisk Device
TDCalibSeek    0001    calibrate: seek error
TDDelay        0002    delay: error on timer wait

Timer Device
TMBadReq       0001    bad request
Disk Resource
DRHasDisk      0001    get unit: already has disk
DRIntNoAct     0002    interrupt: no active unit

BootStrap
BootError      0001    boot code returned an error


There is a 'special' type of Guru that is not caused by the operating system (or more accurately the ROM Kernel) but is as a result of the CPU trapping an error. When these happen, the subsystem ID and general error code will both be set to zero (but bear in mind the '8' indicating a 'dead end' error!). The 'specific' error describes the error that has been trapped by the CPU. It's worth remembering that the error numbers here are part of the 68000 CPU and are not assigned by the ROM Kernel.

The possible CPU traps are:

80000002 - Bus error - accessing non-existent RAM or hardware
80000003 - Address error - word stored on odd memory boundary
80000004 - Illegal Instruction 
80000005 - Division by zero - a bad idea
80000006 - CHK instruction
80000007 - TRAPV (overflow)
80000008 - Privilege violation
80000009 - Instruction trace
8000000A - Line A Exception (4096 opcodes not used in Amiga)
8000000B - Line F Exception - inappropriate FPU or MMU opcode


So, going right back to my initial problem, the two Guru codes I keep getting are telling me that in the case of 80000003 there is an address error, in that data is being written across an inappropriate memory boundary and that in the case of 80000004 an illegal instruction has been detected which is possibly the CPU attempting to execute data. This points to a potential memory problem, either in the memory chips themselves or in the configuration of the memory at startup.


My Guru.

My Guru Generator...

I need to go and meditate on what exactly my problem is. Anyone got a Joy Board spare?

Friday, September 06, 2019

New and Improved! New and Improved! New AND Improved!

Whatever happened to old and inferior?


Brand New A500+ - Part 1


My regular readers (hi Dad!) will know that I have had many A500+ motherboards pass through my hands. All of them were faulty in some way, caused by the liquid acid death, spilled over the board and components by the installed rechargeable battery. Many of these were Varta but my original A500+ (long since sold) had a GP battery. In any case, A500+'s die due to battery acid. 

In some cases, it's a simple repair. In some cases there is nothing else to do but harvest the parts and dispose of the board (sob!) at the appropriate recycling centre - check local listings.

But now, there is an alternative. How about a brand new motherboard? OK. Thanks to a most excellent chap called Rob, it is now possible to get a brand new motherboard for an A500+. And I have one. Specifically, I have a Rev2.1 board which is an usual, but surprisingly fabulous looking, purple. Previous versions were red (V1.7) and "baby shit yellow" (V2.0).

Phooar!!!

WARNING - INCOMING GUSH

This is a real thing of beauty. Removing it from the simple jiffy bag, it almost felt like I shouldn't solder anything to it. It's too smooth and shiny. The lines of the traces, the pin sharp markings on the solder mask. The colour. The COLOUR! It. Is. Awesome.

END OF GUSH

I was fortunate to get one of these from the first batch of V2.1 boards following a recommendation from the most excellent @game_whisperer. 

Although I have a new motherboard, it's not a simple case of poddling along to PC World to pick up a new set of ECS chips. Some things are still available new; resistors and capacitors are the same as they've always been so no problems there. Some of the smaller chips are also still available like the MC1488 and MC1489 for the serial port stuff and the 555 timer will be around forever, as well as the 74xxx logic chips. At a push, you could probably even find someone with DIP package 68000 processors too. But you'll need a donor board for Gary, Agnus, Paula and Denise. Also, the CIAs must come from a donor board, along with the power and video connectors. 

Strictly speaking, the power connector does not need to be harvested since the new board can take a standard round DIN socket rather than the irritatingly no-longer-available square type. This would require changing the cable on your Amiga power supply brick.

But the 23 pin D-sub video connector is a must harvest. The 23 pin version was unusual even in the 80's and 90's with the far more popular 25 pin connector being in much wider use, to the point that 25 pin connectors are still easily available. The 23 pin version is almost impossible to get now, unless you stumble across someone with some new old stock. Some suppliers will even sell a 25 pin connector which has literally had the end two pins sawn off to make it 23 pins...

Obtaining a donor board was simple. I reached into my cupboard and pulled out the board I repaired HERE. Sadly, although I got it to boot and it works, it's not very reliable. With the number of jumper wires it's not really suitable for selling on either. With that in mind, I have my donor board. 

It works - but not very well

More jumpers than a branch of M&S
In any case, the ultimate aim of this exercise, for me, is to have a fully functional, reliable Amiga A500+ that I can have as a daily driver and that I know will keep going for many, many years to come. To get there I intend to spend as little as possible. In other words, pretty much everything from my donor board will be transferred straight over to the new board.

Let's get on with it!

As luck would have it, I managed to get hold of a Duratool desoldering station. Something like this is vital if you're planning on doing any large scale desoldering project. It removed the power connector, video connector and other bits in sort order. 

And then I soldered them to the new board.

Video, Power and Floppy connectors in place..

With hundreds of components on these boards, I may be some time.

Stay tuned...