Friday, 30 September 2016

Commodore PET ROM RAM boards

This is a new version of my 6502 ROM RAM boards, this one specifically for upgrading or replacing ROM and/or RAM inside a Commodore PET.
To use, remove the 6502 CPU from it's socket and plug in the PET ROM RAM board. The original CPU then plugs into the socket on the PET ROM RAM BOARD. It can now replace all the system memory (32K) and ROMs.
I have been making various versions of this for a while now, this new PET ROM RAM is a smaller version of the 6502 ROM/RAM boards. It allows you to replace the ROM and RAM in a Commodore PET to either bypass faulty parts, or upgrade an existing system. So if you have a PET with faulty RAM you can use this to replace that. You can also use it to upgrade any PET from a 2001 with 8K and BASIC 1 onwards to the full 32K RAM and BASIC 4. (BASIC 2 or 4 is required to use an IEEE-488 disk drive, such as the PET microSD).
Although this is smaller than the full size board, it has all the same chips, the RAM chips is now hidden under the ROM.  It does have fewer DIP switches, so cannot be used to select individual ROMs or banks of RAM to replace, but for most users, it will only be used to enable all the upgrades and run at full capacity. The original versions are still available if you do need to diagnose faults.
The DIP switch options on this board are as follows:

  1. RAM enable, switch on to bypass the original RAM and use the full new 32K RAM
  2. ROM enable, switch on to bypass the original ROM and use one of the new ROM sets
  3. ROM select
  4. ROM select
  5. ROM select
These are supplied with ROMs for both the original range of Commodore PET machines without a CRTC chip (6545), starting with the original 2001, and the 2001N range, 30xx, and the 9" 40xx machines, includes the PET tester ROM, BASIC v1, BASIC v2 and the final BASIC v4.0. The other 4 ROM selections are for later CRTC based PETs, the 12" 4032 and 8032 machines. This includes 40 and 80 column ROM sets for Business and Normal keyboards (note you need 40 column hardware to use 40 column ROM sets and 80 column hardware needs 80 column ROMs).
The board is supplied with a double sided pin header socket which plugs into the bottom of the board and fits into the original CPU socket. The pins are thin like IC legs, so shouldn't cause any damage to the sockets, they are not the big square pins used for jumpers etc.

These boards are available to buy from my Tindie Store.

2022 Update: The PET ROM/RAM boards are still available from my SellMyRetro store

2024 Update: PET ROM/RAM Boards are back at my Tindie store
You can order one of these boards below, select the appropriate options and within the UK or international postage.



Price including postage:

Sunday, 11 September 2016

Nintendo SNES Mini power supply repair and upgrade

This is an old post, preserved for reference.
The products and services mentioned within are no longer available.

Bit of a change, here we have a Nintendo SNES Mini. Marked SNN-CPU-01, it is an imported NTSC version, and has had some power supply problems. I am told it came with a 'US' power supply, and the owner had cut the cable off a that and attached it to a 'UK' power supply.
When used like this, it blew the fuse, inside there should be a white ceramic 1.5A fuse, but that has gone leaving just one end cap in place.
On investigation, it seems for 'US' supply, read 'DC', and for the 'UK' replacement read 'AC'. The case is marked (slightly confusingly) AC Adapter DC 10V. This is however a DC input.
The adapter that had been modified is Nintendo, and says it is for use with a (super) NES control deck, but is 9V AC.
It looks like these is space on the board for some additional components to support AC input. A large capacitor footprint and a single diode, both to the left of the regulator. There is also space on the other side for an RF modulator which isn't fitted on this version.
First step is to replace the fuse. Rather than a ceramic one shot fuse as originally fitted, I have used a polyfuse which will reset after the fault condition has cleared. This one is a 1210 style case and fitted in the original footprint. I've gone for the same 1.5A rating as the original, and a 16V voltage limit.
The large heatsink has been removed to give clearer access. Attached to it was a standard 7805 regulator. Given that probably took the brunt of the reverse currents that blew the fuse, that should be replaced. Again I've gone for a modern replacement. This is a RECOM R-78E5.0-1.0, which is a drop in replacement for a 7805.
These are switch mode regulators, which means they are a lot more efficient than the original linear 7805 and no longer require the heatsink. It also just about halves the current consumption of the unit (260mA with the 7805, 160mA with the 78E5.0).
Initial testing just showed a black screen, so I did worry that something might have been fried. Then I remembered it was Nintendo. I cleaned the contacts on the cartridge and socket and tried again and then it started up without a problem
I didn't have a replacement DC power supply with the appropriate connector, so I went for the same cut and rejoin approach. I was going to fit a line socket, but I thought that could lead to future problems if the supplies were separated and the wrong one plugged in.
I used one of TheFutureWas8Bit's ZX Spectrum power supplies, as these are 9V, 1.5A which is more than enough for this unit. The original was nominally 10V DC, but that would have been unregulated and that sort of supply can vary from 8V to 12V depending on load. 9V regulated is a good option as it would give sufficient overhead for a linear 7805, and is within the 7-28V input range of the new regulator.
It is also marked with the centre negative polarity used by the Spectrum, which matches the way the original connector is wired. I've added a label to the case so there is no confusion in future.

Thursday, 25 August 2016

VIC20 PAL to NTSC conversion

This is an old post, preserved for reference.
The products and services mentioned within are no longer available.

Many home computers of the 1980s were produced in various versions with television outputs to suit the region. Most had NTSC versions for North America, and PAL for the UK, and some also had SECAM for France. The differences were sometimes just down to a jumper, or needed various modifications, even different circuit boards.
The original version of the VIC20 (2 pin power connector) had different boards for PAL and NTSC versions, these had different clock crystals (14.31818 MHz for NTSC, 8.867238 MHz for PAL), different VIC chips (6560 for NTSC, 6561 for PAL), and also a different Kernal ROM (901486-06 for NTSC, 901486-07 for PAL). There were also differences in the supporting circuitry, the PAL version had an additional 74S74 chip to divide the clock down by 2 to give 4.43618MHz. That's it on the far right, outside of the outline of the screened cage, entirely failing to disguise the fact it's a bit of an afterthought.
When they cost reduced the board for the later version (7 pin round power connector, as used in the C64), they went for a single board. On the VIC20-CR, the PAL crystal was swapped for a 4.43618MHz crystal, so the additional divide by two stage was not required.
Here in the UK, I have loads of PAL VIC20s, but no NTSC versions, and I was looking for one to use for testing the Penultimate Cartridge, it turned out that Paul Rickards was in the USA with a selection of NTSC VIC20s, and was interested in a PAL one, so we concocted a plan to swap one. Rather than sending a whole VIC20, we just exchanged crystal, VIC chip and kernal ROM. That should be easy enough, just swap those bits over and away you go. Here's is Paul's proof that his NTSC VIC20 is working:
Here is the matching proof from my TV that my VIC20-CR is indeed PAL.
The photo Paul sent of the NTSC version looks very similar to my PAL version, doesn't it?
Well, looking closer at the photo of the NTSC and PAL versions of the VIC20-CR, there are quire a few differences.
The NTSC version has a PCB trace linking pins 2 and 4 of the 7402. The PAL version has the trace cut and a 1nF capacitor fitted
Capacitor C13 is a 220pF ceramic disc capacitor on the NTSC version, which should be horizontal in the outline in the centre of the picture below. On the PAL version, it is not fitted, but a 220pF axial capacitor is connected at 45 degrees between one pad of C13 and the top of R10.
The NTSC version has two ferrite beads, FB4 and FB5 (bottom right). On the PAL version, there is 1 ferrite bead and one yellow wire and they are crossed over.
Finally, on the back of the board, on the PAL version only, a 56pF ceramic disc capacitor is soldered across R5.
I have not been able to locate a decent schematic for the PAL version of the VIC20-CR, and only some ropey scans of the NTSC version, this is stitched together from two of those scans to show the video output section.
I have marked on the differences that have been made to the PAL version. All the PAL VIC20-CR boards I have checked have these same modifications. It's surprising that they must have made hundreds of thousands with these mods, rather than designing a PAL specific board, or even a dual purpose one could easily be made for either standard.
In order to convert my PAL VIC20 to NTSC, I need to get from that modified schematic back to the original. I removed the modified parts and assembled a pack of bits to send over to Paul so that he could do the reverse, and convert an NTSC VIC20-CR to PAL.
There were a few less parts for the reverse conversion, these are the NTSC bits I got back, for my PAL to NTSC conversion. The markings have rubbed off the 14.31818 MHz crystal. It has an unusual central ground pin, but the PCB is designed for a 2 or 3 pin crystal.
I had already removed the PAL specific parts, so all I had to do was fit a new 220pF capacitor as C13, replace the cut track next to the 7402 with a wire link, and install the two ferrite beads, FB4 and FB5 (borrowed from a scrap board). Finally, the NTSC crystal, VIC and ROM.
Once all that was done, it looked fairly close to the original version, and worked first time. It still needs a bit of tweaking, but it's a reasonable NTSC picture.
The TV confirms the signal is now NTSC. Time to install a Penultimate Cartridge and do some testing. Many people are already using it on NTSC VIC20s, but it's nice to be able to test it myself. The yellow comes out better than the PAL version, as does the red below.
More testing is required, but all is working well so far with the converted VIC20. One of the first things you notice is that some cartridge games which used to start offset to the left now start properly centred. Oh dear, I guess I'm just going to have to play some more Donkey Kong.

UPDATE:
The PAL bits have now arrived in the states, and Paul's NTSC machine has now been converted. FB4 removed and one end of FB5 swapped over to the end of FB4 end a wire link fitted from the spare end of FB4 to the spare end of FB5, C13 removed and the new 220nF axial capacitor fitted linking to the top of R10, the track between pins 2 and 4 of the 7402 broken and a 1nF capacitor fitted between the two vias, and finally a 56pF capacitor added on the back across R5.
With the PAL crystal, VIC and ROM now installed, the ex-NTSC machine is running as a PAL machine.
Everyone's a winner!

Sunday, 14 August 2016

PET LCD

This is an old post, preserved for reference.
The products and services mentioned within are no longer available.

This is something I've been working on for a while, and have finally put it all together.
The top half is a 6502 socket (with pass through), a GAL chip, some DIP switches, 32K RAM and a ROM chip with various ROM images on. The RAM and data bus buffer/switch are hidden under the chips. So far it is basically a squashed up version of my 6502 ROM/RAM boards.
The large chip is a 1K dual port RAM chip. That is 1K of RAM which can be independently read and written from two different address and data busses. One side is attached to the PET bus, where it sits at 0x8000-0x8400, the screen RAM. It is configured as write only, so whenever anything is written to the PET screen RAM, it is written to the board, and to this copy of the RAM.  This is the result of writing 0,1,2,3,4 etc. to the video RAM.
The PET video system is a fairly simple character based 40x25 display, you write characters to the 1K screen RAM buffer and they appear on the screen. No pixel based graphics or custom characters can be shown, it is limited to the 256 characters in the PETSCII character set. Well, sort of, there are two character sets, normal and graphics, which can be selected by an IO line which drives an address line on the ROM. It's actually 128 characters, plus those 128 again but inverted.
There is almost an isolation gap between to top and bottom halves of the board, with only power, and reset joining them, Yes, there are a couple of bodge wires, and an annoying bodge resistor. I had one pin pulled low on the schematic that should have been pulled high, so it was attached to the ground plane. I ended up drilling out the pad and wiring the bodge resistor directly to the pin.
The other side of the RAM chip is attached to an ATmega1284P microcontroller running at 20MHz. This is connected via a 3.3V level shift to a 2.2" 240x320 LCD module.
What does all this do then? Well, if you plug this into the CPU socket of a PET, whenever the PET writes to it's video RAM, it will also be written to the dual port RAM chip. The microcontroller is continually polling this RAM via the other port and converts that to a display on the LCD.
You effectively get a copy of what is on the PET screen on the LCD, updating in real time. To generate this, I have converted the PET character ROM into a data array and draw each character pixel by pixel on the display. The 240x320 layout fits well with the 40 character, 25 row display, each character is 8x8, so 40x8 = 320, 25x8=200, with 20 pixels space top and bottom. This gives a very clear, pixel perfect version of the screen.
 In business graphics mode, the PET introduced two pixels gap between the lines, so this can be fitted in to 225 pixels. I've fixed it in the graphics character set for the moment, as it needs to tap off a one of the pins on the VIA line to change font, I'll be adding that to a later revision, probably by duplicating the port with a single 8 bit register or even just a single flip flop.
This opens up a lot of interesting potential. This is really proof of concept stage. The initial idea was this would be a diagnostics tool. You can plug this into any PET and see if it is running, even if the video output on the PET itself isn't working, as long as it is writing to screen RAM, this will show the state of the system.
It can also be used in conjunction with my 6502 diagnostics board, and will show the results of ROM and RAM testing on it's LCD. So even if the ROM, RAM and video display are all faulty, it should be possible to diagnose this and fix it bit by bit.
Since this is a 40 column display, it's also a potential way to add a 40 column display (albeit a small one) onto an 80 column PET. The board has various ROM sets on there, so the 40 column editor ROM can be selected and the PET will run in 40 column mode. The actual monitor will show the wrong thing, but the LCD will show the correct output.
The update rate is reasonable, fast enough to play space invaders anyway. I tried a few demos, and they all ran OK. This is just the first testing, I imagine I can streamline the code to make updating a bit faster.
Another thing to consider is now that I have a way of collecting the screen data, it could be used to drive something larger than this LCD. It could instead be sent to an HDMI monitor or even generate a video signal for the PET monitor or a composite output, although I think I would need an external shift register to handle the pixel clock rate. Driving the PET monitor add the option of letting you switch between 40 and 80 columns on an 8032, which would be very useful to expand the range of available software. Lots of potential though.
One final thought, this is a 6502 CPU, ROM, RAM and a display. Stick in clock, reset and some IO, and you've got yourself an SBC. Add the appropriate ROMs and IO and you've got yourself a mini PET........

2022 Update: A Mini PET? That's an interesting idea. An idea that later became a kit and now a preessembled replacement board. Both available from The Future Was 8 bit.