Sunday, 12 June 2016

6502 Diagnostics Update

This is a quick update on the upcoming 6502 diagnostics module, and testing with some new toys.
The board is used to replace the 6502 CPU in an old computer system to help with system diagnostics. It plugs into the 6502 socket and will drive the data, and address busses and control lines to carry out various tests including ROM and RAM and address decoding etc.
The first version of this board arrived with an error from the PCB manufacturers, for some reason, they had modified my design and rotated the ground pad of the microcontroller, shorting out many of the pins.
The second version arrived as per the design, so time to build one up.
I started with a simple test just counting up on the IO ports to turn all the I/O pins on and off in sequence. To monitor this, I used a new logic analyser. I'd previously had a cheap Saleae clone 8 bit device, that did they job, but suffered from crosstalk, and all the clips had fallen off.
I did consider buying a proper Saleae logic 8 or Logic 16, but they were a lot more expensive than I could justify. I then found this DSLogic Pro, a $110 16 channel analyser on Hackaday, and thought that was worth a try. Still reasonably priced when you add on the unreasonable import duty handling fees.
It came with a nice set of leads where each one was thin coax with a separate ground and signal connection.
I wired this up to 16 of the IO pins and started counting.
Before I had ordered the Logic Analyser, I had tried out the software and found it easy to use. Unlike the Salae software, it zoomed and scrolled in the way I expected with the mouse wheel.
All looking good,  so I changed over to the next 16 IO pins and reprogrammed it. When I did that, I used the wrong options and set it by mistake to use the external clock, rather than the default internal RC oscillator it has been using. With no external clock, it wasn't running, and I couldn't program it.
In normal operation, it would get a clock from the host system, and I was using that so that all the IO operations would be synchronous with the system clock.
Time for another new toy, this is a FeelTech FY3200S signal generator on Bang good I'd seen a few reviews on YouTube. There were some concerns about the power supplies, every photo I have seen seems to show a different power supply board, they appears to be building these with recycled supplies.
The one I have seemed to be decent enough, some protection and reasonably creepage distance etc.
I set this for 1MHz and fed it into the CPU socket, and we're back in business.
Whilst I was there I tried out the range a bit, clocking it at 1KHz and 16 MHz.
Testing complete, now I can move on to running this in a real system. The initial testing on this had been done on a PET 2001 with 2114 video RAM.
The new board looks a lot neater. I'm still piggybacking on the ROM/RAM board so I can try different ROM images, and also because this PET has the tall sided sockets so needs the long pins.
The 6502 diagnostics board is replacing the CPU and driving the system, the current code is cycling through various tests, including RAM tests and ROM CRC checks. The results are displayed on the PETs own screen by writing to it's video RAM.
When I have tried this on a 2001 with 6550 video RAM, there are some timing issues I haven't resolved yet. The 6550 RAM timing is slightly different as it is synchronous and only writes on a clock cycle. I've tried this with one of my 6550 video RAM replacements but that is also showing the same problems, so it may be down to the memory interfacing differences on this model?
Running the board like this highlights an issue with using the host system video display as the output. If that is not working, you can't use the tool. Whilst waiting for the replacement PCBs to arrive I had already redesigned the board to get around this. V2.0 now uses a larger microcontroller, one with a USB interface.
This will be able to report status via USB to a serial terminal on a PC. Commands can be sent from the PC to change mode and request different tests. I'm thinking of things like pulsing particular address lines, or selecting addresses to see if chip select lines are activated, pulsing R/W lines to check buffering, etc. I should also be able to take analogue readings to monitor the rise time of the power supply and reset line (useful for things like the Oric-1 which had reset problems). More on that when the next lot of boards arrive.

The new boards are available now.

If you want to support this blog, you can donate via Patreon or Paypal, or buy something from my store.