C64 - DTV with IEC, keyboard and joysticks.
Introductie
This article is about hacking a C64 DTV-1 (NTSC version). The following will be added: IEC (disk drive), keyboard and two joysticks. The C64 DTV-1 will be connected to an 1571 disk drive.This hack is not simple but can be done with some basic tools:
- Mini drilling machine like a Dremel.
- Some drills an cutters.
- A couple of needle files, screwdrivers.
- Small pliers, mini saw, ect.
- Soldering iron for electronics (Weller WECP-20)
- Multi-meter with V, A, Ohm, "beep"
Related links.
The parts.
You will need some components:- 2 x DB9 male connectors (Joystick)
- 1 x DIN 5 pin female connector (Keyboard)
- 1 x 34 pin flat-cable male connector (Floppy)
- 1 x 34 pin flat-cable female connector (Floppy)
- 1 x switch "make"
- 2 x experimental PCBs (40 x 50 mm + 60 x 20 mm)
- 1 x CMOS 4066
- 2 x 10 kohm 1/4 watt resistor
- 1 x 100 nF capacitor
- some nuts and bolts.
- lots of wire (IDE cable)
First get the connectors, I myself destroyed a PC 486 for this. I sawed out the connectors from the PCB and the cut between the solder-pads with my saw, then soldered of the remaining PCB pieces.
But you can buy the connectors at a local electronics shop.
Modding the disk drive.
Before cutting the holes in a disk drive housing make sure the connectors have enough space when the drive is closed. Take out the inside of the floppy (drive mechanism, PCB, power supply), it is much easier with an empty housing. I used a 1571 because it has lots of room, but I think that any IEC floppy will work. (1541, 1541II, 1570, 1581)
Diskdrive schematic.
Connecting the connectors.
After installing the connectors and the switch (drive reset) I connected all the wires to the connectors. I put the 34 pole connector on a piece of experimental PCB for easy soldering and easy mounting. The following connections are made to the PCB of the drive:+5VDC, GND, IEC-ATN, IEC-DATA, IEC-CLK.
The best way is to check a circuit diagram of the disk drive where to connect these wires. But if you don't have that, here is how I did it.
Find the GND and +5VDC with your multi meter. For a 1571 it's 2 wires of the 4 wire cable that comes from the power supply PCB. (the other two are GND and +12VDC so be careful !!!)
Take an original C64 manual and lookup the connectors. Take your multimeter and beep the IEC connector to the PCB, with the 1571 it's the ferrites just behind the IEC connector.
To connect the drive RESET switch take a look at Ray Carlsen webpages for more info.
Keyboard schematic.
After the drive modding I hacked the keyboard. The problem with the DTV is that all the connections for both the joysticks are on the PCB except for JOYB UP. To get around this problem I made a hack to the keyboard. On the DTV (and on the real C64) the UP is mapped to the character "1". I used the spare wire in the keyboard cable to get a signal to the keyboard for JOYB UP. You have to check if this spare wire is not connected to anything inside the keyboard.The keyboard has to be an AT keyboard. And even not all the AT keyboards work, sadly all the Commodore AT keyboards I tried don't work, so I used a Mitsumi.
Hacking the keyboard.
PCB for the keyboard.
In the picture you can see the connections made on the extra PCB and the components. In Blue the wires that go to the keyboard PCB (GND, JOY, +5VDC) and two wires connected to the '1' key. In Black the wires (and components) at the topside of the extra PCB. In Red the connections on the bottom side of the extra PCB (Like if you could look through the PCB).
Explanation of the keyboard hack.
To press the '1' key on the keyboard I needed to work around a few problems. First you cannot connect the UP switch directly to the '1' key because the keyboard switches are in a matrix and 1 side of the UP switch is connected to GND. This will disrupt the working of the matrix. So we need a so-called potential free switch, which means that the switch may not be connected to the 5VDC or the GND. So I used a IC 4066 which has 4 of those switches inside. But there was the second problem with the switches of a 4066. They need a '1' (5VDC) to close and a '0' (GND) to open. That is exactly the opposite of the joystick button (switch pressed = '0'). To get this right a made a inverter with one of the 4066 switches and a resistor. The inverter simply changes a '0' into '1' and a '1' in to '0'.In total I used only a few electronic components. The IC called 4066 that has 4 switches inside (only 2 are used in this application) . A capacitor (100nF) is used to eliminate noise that could influence IC (4066). And two resistors that will be used to control the inputs of the switches of the 4066. Everything is mounted on a small experimental PCB. When I say pulled to "1" this means the voltage is 5VDC, and pulled to '0' means the voltage is GND.
UP switch not pressed:
This is the upper part of the diagram. When the UP switch is not pressed (switch is open) then the input of the first 4066 switch is pulled to '1' via the resistor. This will close the first 4066 switch. When this first switch of the 4066 is closed the input of the second switch of the 4066 is pulled to '0'. This will mean that the second switch of the 4066 is open. Conclusion when you do not press the UP switch the '1' key is also not pressed.UP switch is pressed:
This is the lower part of the diagram. When the UP switch is pressed (switch is closed) then the input of the first 4066 switch is pulled to '0'. This will open the first 4066 switch. When this first switch of the 4066 is opened the input of the second switch of the 4066 is pulled to '1' via the resistor. This will mean that the second switch of the 4066 is closed. Conclusion when you do press the UP switch the '1' key is also pressed.Opening the DTV.
Hacking the DTV battery compartment.
The PCB (bottom).
The PCB (top).
Remark:
The connection for the JOYB UP is not there.The joystick on the DTV is: JOYA
The 2 yellow and 1 white wire are original, not all DTV's have those wires as you can see on the DTV on the picture below this one.
JOYA UP = Joystick Port 2 Up
JOYA DN = Joystick Port 2 Down
JOYA LT = Joystick Port 2 Left
JOYA RT = Joystick Port 2 Right
JOYA FE = Joystick Port 2 Fire
JOYB DN = Joystick Port 1 Down
JOYB LT = Joystick Port 1 Left
JOYB RT = Joystick Port 1 Right
JOYB FE = Joystick Port 1 Fire
IEC ATN = Disk-drive IEC ATN
IEC CLK = Disk-drive IEC CLOCK
IEC DTA = Disk-drive IEC DATA
KEYB DTA = Keyboard DATA
KEYB CLK = Keyboard CLOCK
RESET = RESET the DTV (Pull to GND to reset)
+ 5VDC is connected to the + of the battery holder
GND is connected to the - of the battery holder.
Connecting the wires.Connecting the wires in the DTV.
Testing the DTV.
Then the big moment putting it all together.First turn on the DTV, better not switch off the DTV with it's own switch but with the floppy-drive switch in the future. The DTV goes crazy if you turn it off and on with the drive still on.
Then turn on your floppy-drive. The DTV should boot normally like nothing has changed.
After it has booted press down on the 'k' on your keyboard. Reset the DTV while holding down the 'k' on your keyboard. If you get the C64 blue start screen with under READY a 'K' let go of the 'k' key. Sometimes the keyboard doesn't work at the first time with all the keys. Type some random keys and the keyboard will go alright. To be quicker at boot up do the RESET and K straight after turning on the power.
Update: 2011-06-24 19:41:21
