danwerner21 / vic2020

A Vic-20 clone created with [almost] all readily available parts
56 stars 10 forks source link

VIC2020 and Tapuino [How To] #7

Open giobbino opened 1 month ago

giobbino commented 1 month ago

Hi, I've built the first one, adding inside an SD2IEC, and now I'm planning to build the second and last one, but this time I wish to put inside a Tapuino with display and buttons directly integrated into the case.

You said on could use the aux and iec ports for that purpose, but I don't understand how (and also how the IEC would help).

Looking at the schematics, It seems to me that:

Cassette motor = VIA1CA2 (AUX #10) - linked to Tapuino by an optocoupler Cassette SW (Sense) = PA6 (AUX #04) Cassette Read = VIA1CA1 (AUX #8)

However it lacks the Cassette write, that in the original schematics is COL3 of the other 6522 (COL3 is also pin keyboard column 9). So, if I'm right, at the AUX port there isn't the write pin. I would use one of the GND pin, repurposing as COL3.... should I do that?

Am I right on the above part?

BTW there are many versions of the Tapuino; the link to simple the project I'm going to use is: https://github.com/sweetlilmre/tapuino

danwerner21 commented 1 month ago

Sorry, but I do not know much about the tapunio . . . but I expect would think that what you are suggesting will work just fine.

giobbino commented 1 month ago

Thanks for your answer! My only doubt, before to do a test, was about the WRITE line. I will try soon and report here the result!

BTW Tapuino is just a datassette emulator; it uses all the datassette lines, but of course - since it has no motor - it doesn't drain almost any power from the motor line. The motor line is used to switch on/ff the IR transmitter of an optocoupler. I'm not sure if the 6522 supplies enough power for that, but just in case, a transistor should solve. I will take a look to the 6522 datasheet to see if I can any useful info there.

giobbino commented 1 month ago

OK, i got the thing working in my 2nd VIC-2020 :-)

As told before, I used this version of Tapuino: https://github.com/sweetlilmre/tapuino that's cheap, easy to build and can be embedded into the VIC-2020 (I will put the display and the button in the place of the cartridge port, modifying the 3D project, since I don't need it - I have enough VIC-20s for that purpose and however I don't use cartridges a lot... actually I seldom use the VIC-20, and I don't even know why I've built two VIC-2020 LOL)

However, it requires some little modifications.

1) the AUX connector pin #16 must to be repurposed: cut the copper trace, check with a multimeter that it's no longer connected to GND and link it with a piece of wire to U22 pin #13. That's the WRITE line (BTW strange that the aux connector hasn't it natively... maybe in a future revision?)

2) the motor line is HIGH when the motor is off, and LOW when the motor is on; in the real VIC-20 it is connected to a small circuit of 3 transistors that inverts the signal and also add the needed power to move the C2N motor, but for the Tapuino we need to manage it someway. In the attached schematics (see below, please forgive me the rather bad design LOL) you can find the modification at the original Tapuino schematics. It will require just an NPN transistor (I used a BC547 and it worked well). The resistor I used is a 330 ohm 1/4w, but maybe an higher value would drain less current from the Arduino when the motor is on and should work the same. Probably a value of about 500 ohm would be ok.

In Tapuino, don't forget to enter into the Options and set Machine = VIC.

Hope it could help somebody.

new pinout for VIC-2020 - Tapuino