23XX Adapter

I’ve been trying to repair a VIC-20 with missing ROM’s. Unfortunately the original ROMS are getting more and more difficult to find and if you do find them they are way overpriced.

Luckily with a few mods you can use newer EEPROMs or EPROMs like the 27C256 which are still available and cheap enough from places like eBay.

All that is needed is to build an adapter board. I came across this site which is a generic adapter board and by setting various jumpers you can configure the adapter for the 2316, 2332 or 2364, and also set the pins to active low/high.

As the shipping from America to the UK is a killer I decided to roll up my own boards.

Adapter board:

Replaced the ROM in a Commodore VIC20

To configure the board for the difference types of EPROMS:

Repairing the ZX Spectrum Coil

For the past few days I’ve been trying to get the DC-DC circuit working on a ZX Spectrum Issue 3. The problem was TR4 kept drawing too much current which damaged the transistor.

The DC-DC circuit is really a horrible design. Even after applying the DC-DC mod which makes the circuit more stable I still had issues with the transistor blowing.

I then isolated the -5V and 12V circuits, still the same issue.

Turns out the issue was a faulty coil. The coil seemed to test fine. No shorts between the primary and secondary and the resistances measured ok on both windings, but from looking at the wire coating, some of the enamel has melted which caused oscillation issues.

On the picture below you can see lots of dark purple spots on the wire where the coating has melted.

After looking online for spare coils and seeing the insane prices (£14) I decided to rewire it myself. 1m of 28AWG wire from eBay is £1

I haven’t been able to find any details on the winding so took the coil apart and took the following measurements:

  • The wire used on the coil is 28 AWG (0.32mm).
  • Outer winding is the secondary. 39 turns. 74cm of wire.
  • Inner winding is the primary. 15 turns. 21cm of wire.

With the coil rewound I put it back into the circuit and the problem was fixed. A stable -5V/12V with no large current draws.

ZX Spectrum Diagnostic Board

After buying a few faulty ZX Spectrums on eBay which were having memory issues I decided to build a diagnostic cartridge to help troubleshoot the RAM issues.

After looking through various internet sites I eventually found a schematic and diagnostic ROM by Dylan Smith.

The original site however is no longer online but I did manage to find the schematic in waybackmachine. After creating this in KiCAD I created then created a PCB:

There are 2 ROM’s available which work with the Diagnostic board, Dylan Smith’s ROM and Brendan Alford’s ROM

Brendan Alford’s Diagnostic ROM
Dylan Smith’s Diagnostic ROM

The Diagnostic board has been configured as follows:

  • Page 0 – Dylan’s diagnostic 48k ROM v0.1
  • Page 4 – Flash utility
  • Page 5 – Brendon’s diagnostic ROM v0.38
  • Page 6 – Dylan’s diagnostic 48k ROM v0.1

When page jumper 1-2 is selected the board will boot from page 0

To change to boot ROM:

  • Set page jumper to 2-3
  • Plug in cartridge
  • Power on Spectrum
  • Enter command: CLEAR 32767
  • Enter command: OUT 31,36
  • The flash utility will now load
  • Press enter for other options
  • Press x for erase
  • Select 0 (Erase page 0)
  • When Done, press any key to exit
  • Press enter for other options
  • Press c for copy
  • Select 5 for Brendan ‘s ROM, or 6 for Dylan’s 48k ROM 
  • When Done, press any key to exit
  • Press enter for other options
  • Press p for program
  • Press 0 (ROM is written to page 0)
  • When Done, press any key to exit
  • Power off Spectrum. 
  • Change page jumper to 1-2
  • Power on Spectrum and ROM tests will begin.

For further information on using the diagnostic board with Dylan Smith’s ROM:

Repairing PS4 Controller

Bought a faulty PS4 DualShock controller off eBay which has a issue with some buttons not working.

Opened up the controller and after inspecting everything found a problem with the flex ribbon. Looks like some liquid damage to the controller and something has eaten away one of the pcb ribbon connectors.

The pin in the middle of the picture is completely missing!! Some of the other pins also look pretty suspect. This explains why only some of the keys are not working.

Looking around on the internet it seems to be a common problem with faulty ribbon flex. Luckily its cheap enough to replace.

Goes for $1-$2 on eBay. Ordered a replacement which should hopefully fix the problem.

Commodore 1541 Troubleshooting

Trying to fix my first 1541 which I got off eBay. 

Turning the 1541 on while not connected to the C64, the green LED comes on then the red LED and after 2 seconds it turns off. The spindle however keeps on spinning. Also no moment on the head. 

Checked the 12V and 5V. Both stable, no ripple. 11.9V and 4.9V on both lines. 
Reset line is fine, swapped out 6502 and 6522 with working chips on my Vic-20. No luck. 
Checked 1MHZ clock from the oscillator. All good. 
Re-seated all chips (6502, 6522, roms) 

If I connect the 1541 to the C64, turn the 1541 and then turn on the C64 the red LED pulses again so the reset seems good. 

Running the load “$”,8 on the C64 just hangs. With the 1541 turned off the load command at least fails with device not found so it looks like it’s picking it up. 

Thought it might be a faulty ROM so built a 28 to 24 pin converter using the guide from http://ist.uwaterloo.ca/~schepers/sockets.html

28 to 24 pin adapter

Tried replacing both the UB3 and UB4 DOS/Kernel, no luck.

Then got out the logic analyser and found gates blown on both the 7417 and 7406. After replacing those the spindle stopped with its constant spinning and disks then loaded up perfectly.

A useful troubleshooting guide from Ray Carlsen:

http://personalpages.tds.net/~rcarlsen/cbm/1541/1541chip.txt

To aid in my troubleshooting I’ve taken the pdf schematic which is not very clear and converted to KiCAD and uploaded to https://www.baldengineer.com/bit-preserve-vintage-schematics-with-kicad.html

https://github.com/baldengineer/bit-preserve

Commodore Plus 4 PCB 310162 Rev D

Commodore Plus 4 component layout

Inchworm ICD2 Programmer

Busy with a project where I needed to program a 16F629. I dug out my Inchworm programmer which I built many years ago. Unfortunately the original website is closed down so I struggled to find the documentation on how to connect this thing up.

Eventually found the hello world example and assembly instructions. Downloaded and installed a old version of MPLab (v8.53) and was able to successfully program the chip. Later versions might work but I still have my old XP computer with some old tools on.

Wiring up Atari 2600 to SCART

I recently replaced the RIOT chip on the Atari to fix a joystick issue. Fired up the Atari today for a game and the audio has now stopped working.

After reading through various forums it looks like a common problem with either the inductor L201 going open circuit or the polystrene caps C206/C207 going faulty.

Tested the inductor and didn’t see any issues. Didn’t have a proper capacitance meter but they both looked open circuit. Since these are polystene caps they are not easy to find.

Now is a good time to move away from the old RF modulator and convert to SCART. I still have a CRT TV with SCART.

Read through tons and tons of threads on doing this and there seem to be multiple diagrams to do this with varying circuits from easy to complicate, required another CD4050 chip.

Eventually came across this schematic from AtariAge forums which looked promising. I had all of these components lying around and put it together on a piece of veroboard.

Also found a layout for my exact board which made connecting up it a lot easier.

Model C012283. Rev B. Schematic here.

Connected up the 5V and GND to the closet points that I found on the schematic.

OLYMPUS DIGITAL CAMERA

To wire the the output to the SCART connector I used this diagram I found on here.

Connected pins on SCART:

  • Pin 2 & 6 to audio
  • Pin 20 to Luma
  • Pin 15 to Chroma

Wired up and connected to the TV, powered on…..success!

Great picture and audio is back!

Commodore VIC-20 35K Expansion

After getting my Commodore VIC-20 working with SD2IEC  (Was a blown 7406 hex inverter) it’s now time to build a 35k expansion.

Found a great write up on Ruud’s Commodore site.   A schematic is provided which gives the  VIC-20 35k of expansion memory using 62256  (32k x 8 RAM) and a 6264 (8k x 8 RAM)  chips.

(Update: The original schematic had a error in it, which has now been corrected)

Note: There is another error on the schematic. On IC2, pin 20 should be connected to pin 22, not pin 27

Setup the schematic in Eagle and created a PCB. If you are looking to do this you might want to import the Commodore  library for Eagle which contains all the common parts including the edge connector.

Sent the gerber files to PCBWay

Datasheets for the semiconductors:

Completed assembly:

Insert the expansion PCB into the VIC-20. Component side up (I don’t think its physically possibly to insert it the other way).

Make sure the computer is powered off before you do this otherwise you risk damaging the computer and the expansion card

Blue PCB (v1.1)

DIP Switch Settings:

Switch 1 – RAM 1
Switch 2 – RAM 2
Switch 3 – RAM 3
Switch 4 – BLK1
Switch 5 – BLK2
Switch 6 – BLK3
Switch 7 – BLK5
Switch 8 – 6264 WE

  • All off       – Expansion disabled
  • 6 ON        – 4607 free
  • 6,7,8 ON  – 6655 free
  • 5 ON        – 11775 free
  • 4,5 ON     – 19967 free
  • 3,4,5 ON – 28159 free
  • All ON – 35k

Green PCB (v1.2)

DIP Switch Settings:

Switch 8 – RAM 1
Switch 7 – RAM 2
Switch 6 – RAM 3
Switch 5 – BLK1
Switch 4 – BLK2
Switch 3 – BLK3
Switch 2 – BLK5
Switch 1 – 6264 WE

  • All off       – Expansion disabled
  • 3 ON        – 4607 free
  • 1,2,3 ON  – 6655 free
  • 4 ON        – 11775 free
  • 4,5 ON     – 19967 free
  • 4,5,6 ON  – 28159 free
  • All on        – 35k

For a more detailed write up, see the original designers website.

To run a full memory test have a look at this great program from Mike on SleepingElephant.

PCB’s, assembled cartridges and other accessories can be purchased from myretrostore

SD2IEC for Commodore 64

After winning a cheap bid on a Commodore 64 off eBay  the other day I’ve looked into  building a SD2IEC.

The SD2IEC is a storage device using an SD card and interfacing with the IEC bus using a ATMega644 microcontroller.

I used most of the information from 16 Bit Dust .  Looking at the schematic I already had most of components.

I already had a SD Card with a built in 3.3 voltage regulator so did’t need to add this into the build. Also used the ATMega1284

First step is to program the microcontroller with a bootloader.   Having already built a USB Tiny ISP it was a simple step to program it. Schematic for this I got from AdaFruit

Bootloader files are available from sd2iec.de  

Download /bootloader/newboot-0.4.1-binaries.zip, extract the files and write

newboot-0.4.1-larsp-m644p.hex  to the microcontroller. I used avrdude:

avrdude -c usbtiny -p m1284 -e -V -U flash:w:newboot-0.4.1-larsp-m1284p.hex

avrdude -c usbtiny -p m1284 -U lfuse:w:0xd7:m -U hfuse:w:0xd2:m -U efuse:w:0xfc:m

Next comes building the circuit. I used a veroboard and there were not that many components to add.  Didn’t have to use R1-R6 as they were already on the SD Card.

Data cable pinouts

Power cable pinout

Not as pretty as the bought ones but it didn’t cost me anything to build and was a fun project.

After assembling copy the S2IEC firmware to the root of the SD Card. Power on and the red LED will flash for two seconds while it looks for a valid firmware. The green LED should then flash while it accesses the card. When it starts to flash the firmware the green LED will flash rapidly.

To test if the computer is successfully connecting to the SD2IEC device you can use the following simple program:

10 OPEN15,8,15:INPUT#15,A$,B$,C$,D$

20 CLOSE15

30 PRINT A$,B$,C$,D$

This will print the current SD2IEC firmware to the screen.