Shop OBEX P1 Docs P2 Docs Learn Events
Something different, (but very retro) — Parallax Forums

Something different, (but very retro)

Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
edited 2009-09-10 18:00 in Propeller 1
Bet you've never done this!
Connect to a Commodore 64 BBS from your Propeller. <SMIRK>

Attached is a simple terminal program (PropCOMM)
[noparse][[/noparse]Here's how:]

It is configured for 9600,N,8,1 (fast enough for this)
Uses standard demo/proto video/keyboard setup.

Load PropCOMM into your EEPROM, then grab a copy of this program
BBS Server: www.jammingsignal.com/files/

Set the BBS server to the same COM port as your propeller connection, at 9600,N,8,1

From the propeller type ATH and hit enter, if you get an OK back it's working..

Now type (on PropTERM) ATDT BBS.JAMMINGSIGNAL.COM

(The free shell on sdf.lonestar.org works, but the 7 line screen makes it a pain [noparse]:)[/noparse]

If you make it work, you've done this..

PROP<-->PC<-->INTERNET<-->PC<-->COMMODORE64

sic,
Oldbitcollector

Edit: cleaned up the code a bit more & fixed backspace (mostly)

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Buttons . . . check. Dials . . . check. Switches . . . check. Little colored lights . . . check.

— Calvin, of 'Cavin and Hobbes.

Post Edited (Oldbitcollector) : 9/16/2007 2:33:27 AM GMT

Comments

  • hinvhinv Posts: 1,255
    edited 2009-09-07 06:36
    Hi Mike,

    I found this old posting.
    I have a commodore128 and was wondering how to get games onto it without a floppy drive. This seems like it might be a solution.
    What I was wondering, however, is how you make the connection from the PC to the commodore.

    Thanks,
    Doug
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2009-09-07 13:32
    I'd recommend one of these. Jim's a good guy, contact him and see if he has some still made up.

    OBC

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

    Visit the: The Propeller Pages @ Warranty Void.
  • hinvhinv Posts: 1,255
    edited 2009-09-07 17:06
    Thanks OBC,
    That is something that make my C128 a lot easier to use,

    what about the connection to the PC?

    Doug
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2009-09-07 18:36
    You mean like this?

    Schematics toward the end of the document.

    OBC

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

    Visit the: The Propeller Pages @ Warranty Void.
  • hinvhinv Posts: 1,255
    edited 2009-09-07 19:04
    Thanks,

    You are quite the Commodore resource.

    What were you able to do with this?
    Were you able to download programs into the commodore from the prop and run them on the commodore?
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2009-09-07 19:17
    Yes.. There's a thread on a Propeller Tape Emulator here somewhere, I'll see if I can dig it up.

    OBC

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

    Visit the: The Propeller Pages @ Warranty Void.
  • hinvhinv Posts: 1,255
    edited 2009-09-07 19:55
    I saw your propeller C= tape emulator, but since I actually started out with floppies, I don't have the patience to wait for tape ;&)
    At 9600 baud though, it could load the c64 memory in about 68 seconds. I am guessing that tape is somewhere like 300 baud.

    It's too bad we don't have a propeller 1571 emulator. Now that would be cool, but since it has been done with AVRs and such, I would guess that the demand is not that high.

    If we could just get goog back here to finish the c64 emulator. With xmm it should be a lot easier than when he was trying it back then.


    Thanks,
    Doug

    BTW: The datasette theread is at http://forums.parallax.com/showthread.php?p=695936
  • Ahle2Ahle2 Posts: 1,179
    edited 2009-09-09 12:01
    A C64 emulator for the prop would be very nice indeed. smile.gif

    I have made some attemps at making a 6502 emulator in pasm.
    Conclusion..... it would be possible to make a 6502 emulator running in one cog.
    All my experience in making my "PC engine"/"Turbo grafx 16" emulator has gained me a lot of knowledge of the 6502 (the HuC6280 used in the PC engine is an extended 6502)
    This helps me very much in the task of making it fit in a 512 longs PASM code.

    Maybe the time has come to unveil my latest prop based C64 project.
    I have made a SID-emulator running in one cog and outputing a stereo signal at 33.250 khz sample rate.

    It currently emulates
    - Square wave with variable PWM
    - Triangle wave
    - Saw wave
    - Noise
    - Ring modulation
    - Sync modulation
    - ADSR envelopes

    It does not emulate
    - Filter
    - Combined waveforms
    - SID bugs

    When we have every chip emulated in one cog each and some extended memory, a C64 emulator would be possible.
    We currently only have the SID chip emulated(somewhat).
  • heaterheater Posts: 3,370
    edited 2009-09-09 12:22
    I feel sure a 6502 in one COG is possible. Having already done the Z80 (ZiCog) and Mororola 6809 (MoCog).
    Potatohead was/is busy working on the 6502 here http://forums.parallax.com/showthread.php?p=767703. Haven't heard any progress reports on that for a while.

    The Z80 case was a lucky hit for us as most of the CP/M software we want to run only uses 8080 opcodes and they all fit in COG. The extra Z80 ops are done by using PASM overlays which is slow but no worries they are not used.
    We get the same or better performance than an original Z80, but I suspect if we were running code that used a lot of Z80 specific ops it would not look so good.

    The Motorola 6809 is a bit more of a beast. Takes a lot of code to emulate all it's addressing modes and such. So there are a lot of ops farmed out to PASM overlays. Unlike the Z80 all ops are important so it's a tad slow. I'm looking again at a 2 COG solution for that.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    For me, the past is not over yet.
  • Ahle2Ahle2 Posts: 1,179
    edited 2009-09-09 13:05
    Because of the way the 6502 works, the instruction set can be broken up into regular patterns.
    In the end all 149 opcodes can be emulated in a relatively little space. (fit in one cog)
    Have a look at www.llx.com/~nparker/a2/opcodes.html

    The thing is that i don't feel like diving into yet another project right now..

    Does anywone own a whip or blowtorch to help "motivate" Potatohead in his quest of finishing the emulator ? wink.gif
    Then we can make a SID-player using my SID emulator + Potatoheads 6502 emulator + Rokickis SD card driver.
  • heaterheater Posts: 3,370
    edited 2009-09-09 13:11
    Awesome idea. Where is Potatohead ?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    For me, the past is not over yet.
  • Agent420Agent420 Posts: 439
    edited 2009-09-09 13:13
    ^ I noticed that back in the day when I wrote my first assembler on the 64...· In some ways the 6502 instructions are similar to how they are created on the Prop, insofar as the instruction code indicates it's type of operation.· So rather than cross referencing instruction codes, you just decipher the bit patterns.· I believe I did have a lookup table that stored the number of bytes used for each type of instruction, which aided updating the program counter.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2009-09-09 13:19
    Ahle2 said...


    Maybe the time has come to unveil my latest prop based C64 project.
    I have made a SID-emulator running in one cog and outputing a stereo signal at 33.250 khz sample rate.

    It currently emulates
    - Square wave with variable PWM
    - Triangle wave
    - Saw wave
    - Noise
    - Ring modulation
    - Sync modulation
    - ADSR envelopes

    Holy Cow.. You've just expanded the Propeller music library by about a factor of 100.
    Looking forward to playing with that. [noparse]:)[/noparse]

    We have most of the pieces for a C64 emulation project if we went multi-propeller on this.

    OBC

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

    Visit the: The Propeller Pages @ Warranty Void.
  • heaterheater Posts: 3,370
    edited 2009-09-09 13:27
    That is the technique I used on my first attempt at a 8080 emulator in PASM. There was no opcode dispatch table, just looked at the bit fields. Just about managed to get the whole thing in one COG. Even enough to run CP/M. The code turned out to be a horrible tortuous mess. Eventually I changed over to use a 256 entry dispatch table in HUB RAM and with Cluso's suggestion of putting multiple PASM routine addresses into each LONG entry of the table ended up with a much simpler and faster emulator. A few rarely used opcodes had to go out to PASM overlays. Like DAA.

    The 6502 may have a simpler more regular layout of its opcode bits so you may have more luck but I thought Potatohead had come to the conclusion that the ZiCog model was going to work better.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    For me, the past is not over yet.
  • Ahle2Ahle2 Posts: 1,179
    edited 2009-09-09 14:03
    Oldbitcollector said...


    Holy Cow.. You've just expanded the Propeller music library by about a factor of 100.
    Looking forward to playing with that. [noparse]:)[/noparse]

    We have most of the pieces for a C64 emulation project if we went multi-propeller on this.

    Are you thinking about the HVSC ?
    I'm sorry but we need to have an emulated 6502 to be able to play those.

    As of now, you can only poke values in the 25 SID-registers from your Spin/Pasm program the same way a C64 6502/Basic program would.

    I have made a SID-dump player to test my SID-emulator.
    It works by dumping the 25 SID-registers from a real C64 at a rate of 1 VBL(50hz/60hz) into a byte array.
    Then my SID-dump player just feeds my emulated SID with these bytes at the same rate.
    The problem is that these dumps can be VEEERRYYYY big.

    I have attached an example of my player with an 8 second SID-dump loop. (Can't fit more in 32kb)
    It works on the default demo board audio configuration.
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2009-09-09 16:45
    Awesome..

    So what we need is a PC utility to dump .SID then load it from the SD.. [noparse]:)[/noparse]

    I'll try it tonight and report back! Glad to see any progress on that front.
    I still know many C64 guys who would bow and worship at the feet of someone
    who pulls of decent .SID playback on the Propeller. (Heck, I'd set the rugs out for them. [noparse]:)[/noparse]

    OBC

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

    Visit the: The Propeller Pages @ Warranty Void.
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2009-09-09 22:55
    WOW! That sounds like a SID chip!!!

    Looking forward to more of this!

    OBC

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

    Visit the: The Propeller Pages @ Warranty Void.
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2009-09-09 22:56
    Curious.. Would .MUS support be easier?

    OBC

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

    Visit the: The Propeller Pages @ Warranty Void.
  • Ahle2Ahle2 Posts: 1,179
    edited 2009-09-10 13:10
    Oldbitcollector said...
    So what we need is a PC utility to dump .SID then load it from the SD.. [noparse]:)[/noparse]
    Yes... I will try to make such an utility.
    Oldbitcollector said...
    WOW! That sounds like a SID chip!!!
    Of course it does smilewinkgrin.gif
    It is very accurate, i have done my homework, reading some indepth documentation.
    Oldbitcollector said...
    Would .MUS support be easier?
    Probably easier than coding a 6502 emulator, but is it worth it?
    That format is extremely limited, it doesn't make use of the full potential of the SID (sounds more lika a NES)

    We should start a new thread for this project.
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2009-09-10 18:00
    Ahle2 said...

    Probably easier than coding a 6502 emulator, but is it worth it?
    That format is extremely limited, it doesn't make use of the full potential of the SID (sounds more lika a NES)

    Good point.. .MUS was early on with SID music, although I remember having some rather
    good collections of MUS music that I wish I could lay my hands on now. A lot of good 70's-80's
    SID music. Then there was Craig Chamberlain's SID editor that wasn't bad for that format either.

    Ahle2 said...

    We should start a new thread for this project.

    At your leisure...


    OBC

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

    Visit the: The Propeller Pages @ Warranty Void.
Sign In or Register to comment.