Shop OBEX P1 Docs P2 Docs Learn Events
C64 Datasette emulator with the Propeller — Parallax Forums

C64 Datasette emulator with the Propeller

Ahle2Ahle2 Posts: 1,178
edited 2010-05-06 17:27 in Propeller 1
I'm about doing my first project with the Propeller chip.
What i'm trying to do is to build a replacement Datasette unit for the Commodore 64, which read TAP files from a MMC card.
The coding part is not the big issue here, but the hardware part is confused.gif
Therefore i'm hoping for some hardware guru to have a look att my schematic.
I don't know wether or not this could work (i havn't done anything like it before).

Can i use an OP-Amp to adjust the levels from 3.3V to 5V and vice versa?

I have attached a JPG file with the chematic
1680 x 1024 - 141K
«1345

Comments

  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2007-12-20 00:08
    I've got a stack of old C= tape drives I've been saving for the connector for just such a project.
    My stopping point was not finding good documentation on the Commodore tape drive data.

    Nice project! I'm looking forward to trying it myself!

    OBC

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    New to the Propeller?

    Getting started with the Protoboard? - Propeller Cookbook
    Got an SD card? - PropDOS
    A Living Propeller FAQ - The Propeller Wiki
    (Got the Knowledge? Got a Moment? Add something today!)

  • AleAle Posts: 2,363
    edited 2007-12-20 07:01
    Do not forget a pair of decoupling capacitors for the prop and eeprom
  • AribaAriba Posts: 2,685
    edited 2007-12-20 09:14
    @Ahle2

    Your TLC074 Circuit uses the OPAMPs as Comparators, but this will only work if you compare with a level around 1..2V, not with the compare-pins tied to Ground (see the red corrections).

    But I would it make much simpler as in the second attached Picture...

    Andy
    662 x 347 - 10K
    629 x 403 - 5K
  • Ahle2Ahle2 Posts: 1,178
    edited 2007-12-20 09:43
    Okey, but the question is..... Is it safe to connect the propeller directly to a TTL device ? (The OP is just for safety)

    Here is the schematic of the cassete port and the connections inside the C64!
    http://www.zimmers.net/anonftp/pub/cbm/schematics/computers/c64/250469-rev.A-left.gif
  • AribaAriba Posts: 2,685
    edited 2007-12-20 12:03
    I don't see a problem. The Cassette-Read Pin is shared with the Serial Bus Connector, so this can be a little bit dangerous.
    You can insert 2 resistors also in the Read and Sense line. Because of the 3.3k PullUps in the C64 this serial resistors should max. be 470 Ohm.

    If you still want some buffering between the Propeller and the C64, you can use a CMOS buffer: 74HC04, 74HC14, CD4049, CD4050...
    (all, exept the last one, inverting the signals). The 2 10kOhm resistors are still necessary.

    Andy
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2007-12-21 14:48
    Ahle2 said...
    Okey, but the question is..... Is it safe to connect the propeller directly to a TTL device ? (The OP is just for safety)

    IANEE:

    I had no issues connecting the prop directly to the C= userport using 10K resistors to level the voltage to safe levels.

    OBC

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    New to the Propeller?

    Getting started with the Protoboard? - Propeller Cookbook
    Got an SD card? - PropDOS
    A Living Propeller FAQ - The Propeller Wiki
    (Got the Knowledge? Got a Moment? Add something today!)

  • Ahle2Ahle2 Posts: 1,178
    edited 2008-01-02 13:23
    I've successfully transfered a PRG file to the C64 using the Kernel Loader.tongue.gif
    If anyone wants to try it out,·i have included·a binary file!

    Instructions:
    1 Connect Pin 1 to the Read Line (1k resistor)
    2 Connect Ground to Ground
    3 Connect Sense to ground
    4 Connect a headphone if you want to hear the signal (very loud)
    5·Enter LOAD on the C64
    5 Run the code on the propeller
    6·Press space immediate after the loader have found something (No wait for the Motor)
    7 Wait for it to load
    8 Run, and see what·happens [noparse]:)[/noparse]

    The loader says " ?Load Error ", nothing to worry about, because it's just the checksum byte that fails for some reason (I'm working on it)
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2008-01-02 13:30
    Nice! PM'd you about this...

    I'll hook this up tonight and give it a spin..

    OBC

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    New to the Propeller?

    Getting started with the Protoboard? - Propeller Cookbook
    Got an SD card? - PropDOS
    A Living Propeller FAQ - The Propeller Wiki
    (Got the Knowledge? Got a Moment? Add something today!)

  • Sleazy - GSleazy - G Posts: 79
    edited 2008-01-02 15:45
    Ahle2 said...

    Can i use an OP-Amp to adjust the levels from 3.3V to 5V and vice versa?

    ····· try a level shifter? An op amp is overkill maybe.
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2008-01-03 02:51
    Correction, It's Pin 0 not Pin 1
    After thinking about this a bit, I realized that Pin 1 *is* P0 on the chip itself... duh!

    (Does this earn me a peek at the source code?) [noparse]:)[/noparse]

    Nemesis... Good choice of test files...


    Awesome! Can't wait to see this develop.
    BTW: The old SHIFT-RUN/STOP trick takes care of the load error here.

    OBC

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    New to the Propeller?

    Getting started with the Protoboard? - Propeller Cookbook
    Got an SD card? - PropDOS
    A Living Propeller FAQ - The Propeller Wiki
    (Got the Knowledge? Got a Moment? Add something today!)

    Post Edited (Oldbitcollector) : 1/3/2008 5:12:54 AM GMT

  • Ahle2Ahle2 Posts: 1,178
    edited 2008-01-03 23:10
    Okey, here comes the features that i will try to include in the final design.

    Hardware:
    MMC card reader.
    Some kind of display (to chose files).
    Play, Rec, Fast forward, Fast backwards and Stop buttons.
    A port to connect a real datasette (Copy from/to MMC card??).
    Indication leds for Rec/Recieve and Play/Transfer data.
    An USB connector (upgrade EEPROM).

    Software:
    Transfer P00, T64 or PRG files using either Kernel loader or Superloader (someone interested in programming one?).
    Transfer TAP files V1 and V2 (I have plans to make a V3, which uses huffman compression, it will reduce the size up to 20 times).
    Record directly to TAP V1 or V2 (V3?).
    Record directly to PRG, T64 or p00.
    A menu to chose files from.

    So far i have successfully made a Kernel Loader routine (No load error anymore) and a TAP loader routine.
    The Kernel routine can just handle PRG files at the moment, but T64 and P00 shouldn't be any problem to incorparate (just different headers, otherwise identical to PRG files).
    My next step is to connect the MMC card reader.

    PS. Oldbitcollector, i'm sorry but you can't see the sourcecode (yet? We have to discuss this matter privately)
  • hinvhinv Posts: 1,252
    edited 2008-01-04 05:19
    How about doing a 1541, 1571, or 1581 floppy emulator, then you could have a fully blown really small c64 computer.

    Check out: http://galaxy22.dyndns.org/dtv/

    Quite interesting the hacks they did to it, makes me want to get one for my son(and I cool.gif ). I just didn't want to get a floppy drive before.

    It would probably be marketable also.

    Thanks,
    Doug
  • Ahle2Ahle2 Posts: 1,178
    edited 2008-01-04 18:25
    That would be very nice indeed [noparse]:)[/noparse]
    But first i'll have to make an emulator for the MOS6510 CPU, it's the heart of the 1541..
  • hinvhinv Posts: 1,252
    edited 2008-01-04 18:53
    Yeah, I forgot about that. I used to have a program that ran on the 1541 drive that made the drive play a tune. It didn't have a speaker, but it used the motors to make sound.
    Actually, the C64 had a 6510, the 1541 had a 6502. Same processor supposedly, just different pinout.

    Although, I doubt that the 30 games on the DTV C64 have another processor to emulate the one in the floppy.
    There is a program on the pc to emulate the 1541 using a special cable here http://sta.c64.org/xcables.html
    Maybe that is portable.

    Take Care,
    Doug
  • Ahle2Ahle2 Posts: 1,178
    edited 2008-01-04 20:00
    Yes, you are absolutely right... It's a MOS6502 CPU in the 1541.
    The only difference between them is that the 6510 has some built in I/O ports. The Opcodes are identical !
    I have made a 6502 emulator in C++, but i think it would be a hard/impossible task to make it run in less than 500 instructions (1 cog), but maybe with some help of the other cogs [noparse]:)[/noparse]
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2008-01-04 20:57
    Slightly Off Topic: Nice to see a strong C= presence on this forum... [noparse]:)[/noparse]

    Is the Prop strong enough for something like X1541 compatibility? (8 data lines)
    or maybe with a little documentation from Daniel Kahlin, an Over5
    Prop server might also be a possibility.

    The 1541 contained a dozen+ chips, and the Propeller seems to be able to replace them all..
    (Amazing times)

    OBC

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    New to the Propeller?

    Getting started with the Protoboard? - Propeller Cookbook
    Got an SD card? - PropDOS
    A Living Propeller FAQ - The Propeller Wiki
    (Got the Knowledge? Got a Moment? Add something today!)

  • luigidifraialuigidifraia Posts: 2
    edited 2008-01-07 23:30
    Congratulations for this awesome project. Having been through this myself before with DC2N, I know what you feel smile.gif
    Cheers,

    Luigi
  • Ahle2Ahle2 Posts: 1,178
    edited 2008-01-10 15:54
    Hi Lugi!

    I wasn't aware of your project, until i began doing some research for my own project.
    I'm not trying to steal the show or anything, but this is just something that i have had on my mind for some years now.
    Are you interested in the development of TAP V3??

    BTW. I like what you have accomplished, awesome !!!
  • luigidifraialuigidifraia Posts: 2
    edited 2008-01-25 12:52
    Ahle2 said...
    Hi Lugi!

    I wasn't aware of your project, until i began doing some research for my own project.
    I'm not trying to steal the show or anything, but this is just something that i have had on my mind for some years now.
    Are you interested in the development of TAP V3??

    BTW. I like what you have accomplished, awesome !!!
    Hi Ahle,

    no worries, I don't feel like anybody is stealing anything. This is an awesome project, as I said.
    I wish I had some time to check out the Propeller, or to help with the TAP V3. Unfortunately I am pretty busy and my spare time is less than a couple of hours per week now.

    Cheers,

    Luigi.
  • BamseBamse Posts: 561
    edited 2008-09-19 19:59
    Oldbitcollector said...
    I've got a stack of old C= tape drives I've been saving for the connector for just such a project.

    Do you think you could part with one of the connectors ?
    I finally got a hold of a working C=64 and would like to give this a try...

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Living on the planet Earth might be expensive but it includes a free trip around the sun every year...

    Experience level:
    [noparse][[/noparse] ] Let's connect the motor to pin 1, it's a 6V motor so it should be fine.
    [noparse][[/noparse] ] OK, I got my resistors hooked up with the LEDs.
    [noparse][[/noparse]X] I got the Motor hooked up with the H-bridge and the 555 is supplying the PWM.
    [noparse][[/noparse] ] Now, if I can only program the BOE-BOT to interface with he Flux Capacitor.
    [noparse][[/noparse] ] I dream in SX28 assembler...

    /Bamse
  • Bob Lawrence (VE1RLL)Bob Lawrence (VE1RLL) Posts: 1,720
    edited 2008-09-19 20:50
    Many Many Years ago I made a cassette adapter for the 64 . I can't really remember what I used but I believe it was something like a 7404 inverter chip( 1 or two sections of it) used to square up the audio signal from a regular cassette player.

    I do remember getting it to work and loading the Red Barron program.

    [noparse]:)[/noparse]

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Aka: CosmicBob
  • BamseBamse Posts: 561
    edited 2008-09-20 01:39
    Hmm, I cannot see the source code anywhere, did it ever got published ?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Living on the planet Earth might be expensive but it includes a free trip around the sun every year...

    Experience level:
    [noparse][[/noparse] ] Let's connect the motor to pin 1, it's a 6V motor so it should be fine.
    [noparse][[/noparse] ] OK, I got my resistors hooked up with the LEDs.
    [noparse][[/noparse]X] I got the Motor hooked up with the H-bridge and the 555 is supplying the PWM.
    [noparse][[/noparse] ] Now, if I can only program the BOE-BOT to interface with he Flux Capacitor.
    [noparse][[/noparse] ] I dream in SX28 assembler...

    /Bamse
  • RizThomasRizThomas Posts: 24
    edited 2008-09-21 16:27
    I wonder if this scheme can be made to work on the Commodore PET. I have one of the first Commodore Pet 2000-8 (with the Chicklet Kybrd) models and always wanted (wished) that I can bypass the cassette drive by something with newer hardware mods.

    Any comments please?
  • BamseBamse Posts: 561
    edited 2008-09-22 22:48
    Kewl, I found a C=64 cassette recorder over the weekend...

    Just going to wait for my protoboards and give this a try later this week...

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Living on the planet Earth might be expensive but it includes a free trip around the sun every year...

    Experience level:
    [noparse][[/noparse] ] Let's connect the motor to pin 1, it's a 6V motor so it should be fine.
    [noparse][[/noparse] ] OK, I got my resistors hooked up with the LEDs.
    [noparse][[/noparse]X] I got the Motor hooked up with the H-bridge and the 555 is supplying the PWM.
    [noparse][[/noparse] ] Now, if I can only program the BOE-BOT to interface with he Flux Capacitor.
    [noparse][[/noparse] ] I dream in SX28 assembler...

    /Bamse
  • BamseBamse Posts: 561
    edited 2008-09-23 02:25
    Did some research just in case I get hooked enough to try this myself...

    Luigis DC2N,
    www.luigidifraia.com/c64/dc2n/index.html
    M
  • BamseBamse Posts: 561
    edited 2008-10-09 20:54
    Finally my Propeller Protoboards came in...

    I'm going to give this a try over the weekend... wink.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Living on the planet Earth might be expensive but it includes a free trip around the sun every year...

    Experience level:
    [noparse][[/noparse] ] Let's connect the motor to pin 1, it's a 6V motor so it should be fine.
    [noparse][[/noparse] ] OK, I got my resistors hooked up with the LEDs.
    [noparse][[/noparse]X] I got the Motor hooked up with the H-bridge and the 555 is supplying the PWM.
    [noparse][[/noparse] ] Now, if I can only program the BOE-BOT to interface with he Flux Capacitor.
    [noparse][[/noparse] ] I dream in SX28 assembler...

    /Bamse
  • BamseBamse Posts: 561
    edited 2008-10-11 05:57
    Hmm, I'm going to need some help here...

    I got my Datasette cable hooked up,
    1. Black - GND, connected to GND on protoboard.
    2. Green - +5V, not used
    Notch
    3. Red, Motor control, not used.
    4. White, Read from cassette, connected to pin 1 (P0) via 1K (brown, black red) resistor.
    5. Brown, write to cassette, not used.
    6. Blue, cassette switch, connected to GND.

    I uploaded DataSette.binary to the EEPROM of the Protoboard.

    When I type Load on the C=64 the screen goes blue and I turn on the Protoboard...
    Nothing happens but the C= seem to freeze...
    Looks like the C=64 never find anything...

    Any ideas ?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Living on the planet Earth might be expensive but it includes a free trip around the sun every year...

    Experience level:
    [noparse][[/noparse] ] Let's connect the motor to pin 1, it's a 6V motor so it should be fine.
    [noparse][[/noparse] ] OK, I got my resistors hooked up with the LEDs.
    [noparse][[/noparse]X] I got the Motor hooked up with the H-bridge and the 555 is supplying the PWM.
    [noparse][[/noparse] ] Now, if I can only program the BOE-BOT to interface with he Flux Capacitor.
    [noparse][[/noparse] ] I dream in SX28 assembler...

    /Bamse
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2008-10-11 16:10
    It's been a while since I had this hooked up, but are you hitting the [noparse][[/noparse]SPACE] at the
    right moment as specified earlier in this thread? If memory serves, you have it
    hooked up correctly.

    Shame that the source for this was never released.. He appears to have moved onto
    other projects. I've been off-and-on working on a .TAP reader based on this project,
    but have had trouble with figuring out exactly what kind of DATA the 64 is expecting
    when I get to the data portion of the TAP file.

    OBC

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    New to the Propeller?

    Getting started with a Propeller Protoboard?
    Check out: Introduction to the Proboard & Propeller Cookbook 1.4
    Updates to the Cookbook are now posted to: Propeller.warrantyvoid.us
    Got an SD card connected? - PropDOS
  • BamseBamse Posts: 561
    edited 2008-10-12 00:17
    I'm never asked to press space, looks like the C=64 hangs...

    Let me re-program the Protoboard with the binary again and give it a try again.
    Sounds like an interesting project though.
    I'm going to have a look at the .tap format and see how it looks like.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Living on the planet Earth might be expensive but it includes a free trip around the sun every year...

    Experience level:
    [noparse][[/noparse] ] Let's connect the motor to pin 1, it's a 6V motor so it should be fine.
    [noparse][[/noparse] ] OK, I got my resistors hooked up with the LEDs.
    [noparse][[/noparse]X] I got the Motor hooked up with the H-bridge and the 555 is supplying the PWM.
    [noparse][[/noparse] ] Now, if I can only program the BOE-BOT to interface with he Flux Capacitor.
    [noparse][[/noparse] ] I dream in SX28 assembler...

    /Bamse
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2008-10-12 01:07
    Leave pin1/"A" open at first and see if it prompts you to press PLAY (RECORD) and then close your switch (to simulate the datasette key press.)
Sign In or Register to comment.