Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
 Welcome to our latest new user Rodrigo Yeowtch ! (Registered 2024-11-24) You are not logged in - nap
CSDb User Forums


Forums > C64 Coding > Simple C64->PC transfer
2012-04-01 06:54
Repose

Registered: Oct 2010
Posts: 225
Simple C64->PC transfer

Hello,
I just wanted to let people know of the simplest way to transfer C64 files to PC. As far as I'm concerned, this is the ONLY way left to transfer files.

1 Intro
2 Proceedure
3 Notes
4 Further directions and question to the community

1 Intro

I just dug out my 25 year old C64 (which still works!!), and was stuck - my modern PC has no serial port, printer/parallel port, floppy disk, or modem, so even though I have an RS232 interface, XA1541 cable, 1581, and modem, these are ALL obsolete. I also have no C2N datassette, nor tape deck!

2 Proceedure
I decided to record the tape output directly to a soundfile. The connection is simple.

Supplies
-3 clip leads (wires with metal clips on each end)
-3.5mm (1/8") male to male stereo audio cable

Preparing the C64 datasette connections
Looking at the Vic20/C64/C128 tape port from behind, from left to right, note that pin 1 is GND, pin 5 is WRITE, and pin 6 is SENSE. You need to clip the leads onto each of these pins. Don't worry, the fingers on both top and bottom are the same signal.

Connecting the audio cable
Plug the audio cable into the BLUE/Line IN of your soundcard. On the other end, connect pin 1 (GND) to the inner most part of the 1/8" plug. Connect pin 5 (WRITE) to the end/tip of the plug. You have now connected the LEFT channel of the soundcard to the tape WRITE.

Preparing for data transfer
-load a program to transfer from disc
-On the Commodore, type SAVE"TEST". It will ask you to press PLAY&RECORD. Next, start recording the line-in from your soundcard, with 44,1KHz sample rate and stereo.
-touch the SENSE (pin 6) to the GND (pin 1) (touch the unconnected lead to the GND that is clipped to the audio plug). This is like pressing the button on the tape. It will save the file header, then ask you to press PLAY&RECORD again. Touch the wires again. You can wait a while for it to finish. Note that I tried leaving SENSE connected, but it didn't work. It may for you.

Saving the audio file
-save the WAV as mono, PCM, 16bit. Ideally, also save only the LEFT channel as the mono wave, however in Audacity I had to use Convert to Mono which averaged the two channels, thus adding some noise from the right channel (anyhow it still worked).

Converting the audio to data
-Download
http://www.retroreview.com/iang/UberCassette/
It has quite a good algorithm for parsing the WAV. I also tried WAV-PRG but it didn't work.
I used the command line:
UberCassette test.wav test.tap -machine c64

Testing the result in an emulator
-attach the test.tap file in VICE and type LOAD, then click Datasette control and Start. Then switch to warp mode, to speed up loading. You can then save the program to a d64 image with SAVE"TEST",8.


3 Notes
-You probably need to see the C64 screen to do this, but you can also do it blind if the keyboard is typing reliably (and you know the filenames). Just listen for the stop of the file header to touch the wires again.
-To save other data files you will have to write a short program. There's probably some poke's you can make to let SAVE work on memory.
-You should let a program save first as a test while you adjust recording levels and make your recording good.

4 Further Directions and Questions
I'd like to see a short program which can save multiple files, or a full disk to tape, and then some unarchiver on the PC side which can extract the files.
The idea is that you have to type it in by hand, so it has to be simple.

Now we need a simple way to upload to c64. Maybe the soundcard is loud enough to trigger the datasette READ pin, or else we can use the PADDLE port to digitize a sound. It will have to be a very simple type-in program, then maybe you could load a more sophisticated program.

I also thought of a way to transfer from c64->PC at 500k/s., and it's dead simple - how do you think I do it? :)
Hint: it uses a TV card to capture a video signal.

Question
What is a short way to transfer more files/disk through this audio method? If you could load a bigger transfer program to C64, how would it work?
I noticed that the short pulses were about 7 samples at 44.1KHz, so you could only go about twice faster in transfer speed.
Since this method actually reads ANY data pin, you can use basic RS232 (at about 1200 baud) to send serial output. This is already twice as fast as the tape protocol. The timing decoding will rely on the start bit.
You can use two bits at a time in a stereo recording. One can even form a clock.
 
... 29 posts hidden. Click here to view all posts....
 
2012-04-08 01:48
Style

Registered: Jun 2004
Posts: 498
i like the video capture idea - I wonder if you could use a webcam and some sort of pattern? instead of ~8k per frame, use chars and do ~1k a frame....

2012-04-08 07:02
Repose

Registered: Oct 2010
Posts: 225
If you didn't read the thread, a simple hack has already been done - 32 bits with 2-dimensional Q-codes. Look above.
2012-04-08 09:16
MagerValp

Registered: Dec 2001
Posts: 1074
Repose: did you try decoding the QR code my transfer program generates?
2012-04-08 10:57
Repose

Registered: Oct 2010
Posts: 225
Mager,
I did try it in an emulator, however I am currently unable to transfer files to my real c64. I think it's cool and would love to try it sometime, though!
2012-04-10 12:34
Repose

Registered: Oct 2010
Posts: 225
I have a question about The Star Commander. I'm using FreeDOS 1.1, on computer 2 (old one I built just for this). I set preferences to XE1541 cable; turbo mode with async. sc.exe runs, displays a directory on the right-hand side, then crashes (no keys work) and I have to reboot. I've tried different memory configurations (EMS/XMS combinations). What settings could I try? Could there be some imcompatibility with FreeDOS?
Amazingly, I still have to write my own program because nothing else works.

*vent* - I've been working for *days* to find someway to transfer my files. I used self-made cable and program, but didn't work - I think my BIOS is buggy (on computer 1 - main computer), because I set LPT1=$378 in BIOS but tables at $400 don't show this, and none of the ports actually work.
Does Linux take over from BIOS and directly access the Super I/O chip?

Today's job, try new BIOS on computer 1, try self-made programs on computer 2, find other programs to try, try real DOS and Linux on both...
2012-04-10 16:38
MagerValp

Registered: Dec 2001
Posts: 1074
Or you could just buy one of the transfer solutions that work with modern hardware:

http://store.go4retro.com/zoomfloppy/
http://store.go4retro.com/categories/Commodore/Hardware/uIEC/
2012-04-10 16:48
Repose

Registered: Oct 2010
Posts: 225
No credit card.
2012-04-10 17:34
DemongerX
Account closed

Registered: Jun 2002
Posts: 137
Cash onto a prepaid card. Works for most purchases like that, online that is. I know they don't work well in some systems, as it sees them as a gift/rebate card, but I've had good luck using them.

DemongerX
2012-04-10 19:10
Repose

Registered: Oct 2010
Posts: 225
Thanks, never heard of prepaid cards, but I can buy it. Problem is, I need to know the total, because the amount is not refundable. I'm happy; I want one. However, I am wondering if there exists software support for direct communication to c64 over IEC to PC? And to use PC as a virtual 1541? Will it work with 64hdd? (for Zoomfloppy)
2012-04-10 20:14
Repose

Registered: Oct 2010
Posts: 225
Good news! I finally got Star Commander to work. Now my question is, what to do about disk errors? How can I fix them? Should I nibble my images to preserve as much as possible?
I don't need to buy anything anymore, free is good.
Previous - 1 | 2 | 3 | 4 - Next
RefreshSubscribe to this thread:

You need to be logged in to post in the forum.

Search the forum:
Search   for   in  
All times are CET.
Search CSDb
Advanced
Users Online
anonym/padua
Jetboy/Elysium
Unlock/Padua/Albion
algorithm
CopAss/Leader
katon/Lepsi De
aNdy/AL/Cosine
Brittle/Dentifrice^(?)
hedning/G★P
DnP
DJ Gruby/TRiAD
CreaMD/React
Airwolf/F4CG
megasoftargentina
MWR/Visdom
Guests online: 166
Top Demos
1 Next Level  (9.7)
2 13:37  (9.7)
3 Coma Light 13  (9.7)
4 Edge of Disgrace  (9.6)
5 Mojo  (9.6)
6 The Demo Coder  (9.6)
7 Uncensored  (9.6)
8 Wonderland XIV  (9.6)
9 Comaland 100%  (9.6)
10 What Is The Matrix 2  (9.6)
Top onefile Demos
1 Layers  (9.6)
2 Party Elk 2  (9.6)
3 Cubic Dream  (9.6)
4 Copper Booze  (9.6)
5 Libertongo  (9.5)
6 Rainbow Connection  (9.5)
7 Onscreen 5k  (9.5)
8 Morph  (9.5)
9 Dawnfall V1.1  (9.5)
10 It's More Fun to Com..  (9.5)
Top Groups
1 Performers  (9.3)
2 Booze Design  (9.3)
3 Oxyron  (9.3)
4 Nostalgia  (9.3)
5 Censor Design  (9.3)
Top Organizers
1 Burglar  (9.9)
2 Sixx  (9.8)
3 hedning  (9.7)
4 Irata  (9.7)
5 Tim  (9.7)

Home - Disclaimer
Copyright © No Name 2001-2024
Page generated in: 0.043 sec.