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

C64 Datasette emulator with the Propeller

245

Comments

  • BamseBamse Posts: 561
    edited 2008-10-12 02:57
    Kewl...

    A fresh download of the binary and a reprogram of the protoboard did it.
    I got the C=64 tunes playing in the background. wink.gif

    It's a real pity the source code was never released.
    It would have been such a nice starting point for a tape library on the prop...

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    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-14 16:11
    I was looking into the .tap format since it's kind of a "signal" dump of the tape...
    However, converting a 3Kb .PRG file into .TAP resulted in 139KB...

    So I don't have a small enough.tap file that could fit the Prop memory.
    Guess I'll have to look into the .PRG format and convert it to a tape format on the fly.
    Anyhow, this has a very low priority, so don't hold your breath... 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
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2008-10-14 16:13
    Ran into the same problem.. Mine was reading it from the SD.
    I'll see if Wizard still has the copy on his laptop I was using.

    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-15 05:42
    I think I have been able to decode the .TAP format down to the signal level...
    More information tomorrow, it is way past my bedtime... wink.gif

    If I can put the pieces together we should be able to generate the signals on the fly from a .PRG file.
    What I did was to use the LibTap from Luigi and encoded a couple of .PRG files,
    www.luigidifraia.com/c64/index.htm
    Once these were converted to .TAP I just went in and looked at the format.
    Together with some other information I found here and there on the web, I think I figured it out.

    Anyhow, I'll put together my sloppy handwriting into a PDF tomorrow... 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-15 21:10
    Here is a rough start of decoding the signals for the C=64 tape...
    Hopefully this can lead to a Propeller cassette tape emulator for the C64... wink.gif

    And since I cannot upload zip files, just rename the extension to .zip...

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    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
  • Ahle2Ahle2 Posts: 1,178
    edited 2009-02-05 20:44
    I´m back from the dead [noparse]:)[/noparse]

    I have been very busy lately with 4 simultaneous projects ( phew )

    My projects:
    - Platform independent PC engine emulator using SDL (ran it on my at91sam9263ek board at work last week)
    - "Sector Omicrom", a Turrican/Metroid clone using OpenGL
    - A engine monitoring system for boats, temperature, pressure, etc ( propeller )
    - AIS decoder + OpenStreetMap implementation using at91sam9263ek ( my actual job )

    I will dig out my asm code and make it readable ( commenting )
    Then i will release it to the public, so anyone can make their own projects with it [noparse]:)[/noparse]
    This will, however, take some time, because i have to refresh my memory [noparse]:([/noparse]
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2009-02-05 23:47
    Welcome back!

    My day is made.. [noparse]:)[/noparse]

    Stick around this time.. [noparse]:)[/noparse]

    OBC

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

    Check out: Protoboard Introduction , Propeller Cookbook 1.4 & Software Index
    Updates to the Cookbook are now posted to: Propeller.warrantyvoid.us
    Got an SD card connected? - PropDOS
  • BamseBamse Posts: 561
    edited 2009-02-06 05:17
    Awesome...

    Looking forward to see the code...

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    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
  • Ahle2Ahle2 Posts: 1,178
    edited 2009-02-11 08:53
    The code will soon be released tongue.gif
    It know supports motor sense as well.
    No Load errors (checksum error) any more.

    Actually it is two different loaders, a ".prg" Kernelloader and a TAP loader.

    Maybe someone (me?) will make a proper SD card implementation or intergrate it in PropDOS so that it will be possible to load larger files than 31Kb.

    I will intergrate TAP v3 (20 times smaller TAP files compared to v1) into the TAP loader when the format is finished (i´m working on it)


    Here is some reading about the Kernel loader (WARNING, contains some serious errors)
    http://www.geocities.com/SiliconValley/Platform/8224/c64tape/rom.txt
  • Ahle2Ahle2 Posts: 1,178
    edited 2009-02-11 09:13
    BTW, i´m also about doing a "Super loader" using the datasette port.

    I think speeds up to 30kb per second is possible with some really optimized 6502 machine code [noparse]:)[/noparse]
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2009-02-11 15:01
    Fantastic!

    I'd been working off/on on a TAP loader and was really getting stuck in the data
    transfer to the C64. It's good to have you back involved in this project.

    I'm looking forward to peering through your code and seeing where I was going wrong. [noparse]:)[/noparse]

    OBC

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

    Check out: Protoboard Introduction , Propeller Cookbook 1.4 & Software Index
    Updates to the Cookbook are now posted to: Propeller.warrantyvoid.us
    Got an SD card connected? - PropDOS
  • Ahle2Ahle2 Posts: 1,178
    edited 2009-02-14 16:39
    Okey guys, here is a small simplified example TAP-loader for you to test while i´m working on the real one.


    Limitations in this version

    - Ignores the header (assumes tap v1)
    - Doesn´t know when the data is finnished loading
    - Doesn´t have support for my new tap format (v2)
    - Can´t load larger files than 31kb (COG ram)


    Instructions

    - Connect the propeller to the c64 the same way as before
    - Connect the c64 motor controll to pin 2 ( P1 ) using a voltage divider (6v to 3.3v)
    - Press F10 or F11 in Propeller tool
    - C64 - LOAD, RUN


    BTW, the kernel loader is A LOT more complicated than this TAP-loader (roughly 10 times more machine code)
    It took me a long time to get the kernel loader working 100%, and only a hour to get the TAP-loader working yeah.gif

    The Kernel-loader and the real TAP-loader will get released when i´m satisfied with them.
  • Ahle2Ahle2 Posts: 1,178
    edited 2009-02-14 16:48
    BTW, connect a LED to the motor control (don´t forgett current limiter) if you want to see when the C64 "starts" the motor.
  • BamseBamse Posts: 561
    edited 2009-02-23 18:39
    Arrrgh...

    I lost my Datasette cable...
    Does anyone have a Datasette cable they are willing to part with for a reasonable price, let's say $10 including shipping ?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    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 2009-02-23 18:57
    PM me.. How about an entire datacassette? [noparse]:)[/noparse]

    Bah, I'll just chop the cable off one of them.

    OBC

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

    Check out: Protoboard Introduction , Propeller Cookbook 1.4 & Software Index
    Updates to the Cookbook are now posted to: Propeller.warrantyvoid.us
    Got an SD card connected? - PropDOS
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2009-02-23 20:42
    You're cable will go out with Cole's Protoboards tomorrow.

    I hoping to finally have a chance to work on this again tonight, so I'll have
    the color code worked out by the time you get it.

    (I love 80's technology! They used actual color codes for the connections in the cables!)

    OBC

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

    Check out: Protoboard Introduction , Propeller Cookbook 1.4 & Software Index
    Updates to the Cookbook are now posted to: Propeller.warrantyvoid.us
    Got an SD card connected? - PropDOS
  • BamseBamse Posts: 561
    edited 2009-02-24 03:50
    Thanks OBC...

    I know what I'm doing this 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
  • Ahle2Ahle2 Posts: 1,178
    edited 2009-02-24 07:37
    Please let me now how things are working out...

    I have finally hooked up a SD card, so now i´m ready to get it loading directly from the SD.

    BTW, i can send the source code to the kernel loader privately if you are interested, i´m not ready to make it public yet.
    Maybe we can work on this together ?
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2009-02-24 14:19
    Ahle2 said...

    - Connect the c64 motor controll to pin 2 ( P1 ) using a voltage divider (6v to 3.3v)

    Ahle2,

    Did I understand right that you are using the motor control line to P1?
    Something like CASS MOTOR CONTROL -->10K--->P1 ?
    or
    CASS MOTOR CONTOL --> 10K --> LED --> P1 ?

    What do you have the Prop doing with this line? Or is this just for LED monitoring?

    OBC

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

    Check out: Protoboard Introduction , Propeller Cookbook 1.4 & Software Index
    Updates to the Cookbook are now posted to: Propeller.warrantyvoid.us
    Got an SD card connected? - PropDOS
  • Ahle2Ahle2 Posts: 1,178
    edited 2009-02-24 17:06
    Motor controll is used to controll when data should be sent (when the c64 requests it)
    No need to press the space bar at the right moment anymore !

    *<
    6V motor controll
    | R1
    *<---- prop P1
    | R2
    = <-- Common ground

    R1 and R2 should be choosed so the output to P1 is as close to 3.3 volt as possible.

    Optionally connect a led between ground and P1, if you want to see when the C64 "requests" new data


    BTW, there is no problem to change wich pin to use for data/motor controll, have a look at the bottom of the source code.

    Post Edited (Ahle2) : 2/24/2009 5:17:06 PM GMT
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2009-02-24 17:29
    I'm thinking that two 10K resistors should work.
    (Will try them tonight)

    Just out of curiosity, what values are you using?

    OBC

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

    Check out: Protoboard Introduction , Propeller Cookbook 1.4 & Software Index
    Updates to the Cookbook are now posted to: Propeller.warrantyvoid.us
    Got an SD card connected? - PropDOS
  • Ahle2Ahle2 Posts: 1,178
    edited 2009-02-24 17:37
    Two 10K resistors :P

    You might want to use lower values if the led isn´t bright enough !
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2009-02-25 01:37
    Nice! {wavy text}

    Looking forward to seeing your update on this!

    OBC

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

    Check out: Protoboard Introduction , Propeller Cookbook 1.4 & Software Index
    Updates to the Cookbook are now posted to: Propeller.warrantyvoid.us
    Got an SD card connected? - PropDOS
  • Ahle2Ahle2 Posts: 1,178
    edited 2009-02-26 00:02
    Surprise !

    1. Download
    2. Unrar
    3. Copy surprise.tap to the SD card
    5. Make sure the pins are set correctly ( at the bottom of the source code )
    4. Compile and run TapLoader.spin
    6. And be SURPRISED

    I forgot to mention that the SD card is located at p0-p3

    Post Edited (Ahle2) : 2/26/2009 12:07:42 AM GMT
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2009-02-26 03:33
    Now that the SD is using P0-P3..

    What are the motor and read pins now?

    I can't tell from your source.


    EDIT:
    Changed to your original pin settings and moved the SD to p3-p6. Nice. [noparse]:)[/noparse]
    Let me know how to translate your pin settings at your convenience.

    That was one of the first screens I used for my graphics viewer too.

    OBC

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

    Check out: Protoboard Introduction , Propeller Cookbook 1.4 & Software Index
    Updates to the Cookbook are now posted to: Propeller.warrantyvoid.us
    Got an SD card connected? - PropDOS

    Post Edited (Oldbitcollector) : 2/26/2009 3:52:58 AM GMT
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2009-02-26 04:03
    Ahle:

    Try this test image. It has an interest effect during the load.
    Maybe something like this could be incorporated in your software for every TAP load.

    OBC

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

    Check out: Protoboard Introduction , Propeller Cookbook 1.4 & Software Index
    Updates to the Cookbook are now posted to: Propeller.warrantyvoid.us
    Got an SD card connected? - PropDOS
  • Ahle2Ahle2 Posts: 1,178
    edited 2009-02-26 08:38
    Did It load correctly without any issues ?
    Wasn´t it a nice surprise and a very suitably choice of tap-file ?

    I will test your tap-file as soon as i get home from work.

    Next step is to make a proper file selector and a nice GUI (i have already begun working on it)!

    The final version will include support for all tap versions, including my own (tap v2).


    BTW, i will add support for loading PRG files using the kernel loader as well.
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2009-02-26 15:20
    Ahle2 said...
    Did It load correctly without any issues ?
    Wasn´t it a nice surprise and a very suitably choice of tap-file ?

    Yes, perfect for this group. [noparse]:)[/noparse] I think you'll find mine interesting as well.

    OBC

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

    Check out: Protoboard Introduction , Propeller Cookbook 1.4 & Software Index
    Updates to the Cookbook are now posted to: Propeller.warrantyvoid.us
    Got an SD card connected? - PropDOS
  • Ahle2Ahle2 Posts: 1,178
    edited 2009-02-26 16:36
    Oldbitcollector said...
    Ahle2 said...
    Did It load correctly without any issues ?
    Wasn´t it a nice surprise and a very suitably choice of tap-file ?

    I think you'll find mine interesting as well.

    OBC

    YEEEES, i used to play that game a lot ( not in 1983 though, i was only two years old back then tongue.gif )

    Nice loader for a very old game.

    It´s nice with a count down while loading yeah.gif
  • Ahle2Ahle2 Posts: 1,178
    edited 2009-02-26 16:46
    Have you tried it yet BAMSE ?
Sign In or Register to comment.