Commodore 64 Supercharged by Omega2 (Pictures)



  • Way back in August last year I had an idea to "supercharge" my Commodore 64 with the Omega 2(+). This would require a second serial port, so the addition of ttyS1 on the Omega 2 worked out great for this.

    Here's the breadboard circuit, using a 74HC245 for voltage level shifting (3.3V to 5V):

    0_1500949766816_3df27d13-ba54-40ea-b78c-e3a99fbf146d-image.png

    Attached:

    0_1500949731610_54218151-017e-474d-937d-9b33b76fc9c4-image.png

    It works!

    0_1500949827351_fcc3977b-5002-4625-9774-e02842ea93eb-image.png



  • I've done something similar with a Raspberry Pi, but I much prefer the Omega2's form factor, looks like it would fit tidily in a retro cartridge case, for example.

    Some minor issues though:

    • There isn't quite enough oomph from the C64's User Port to power the Omega2 directly (through a voltage converter) - max at 5V is officially 100 mA but it can usually be pushed safely to 200 mA with a good power supply though. Still not enough for the O2+ unfortunately.

    • It's a little awkward to get a login prompt over ttyS1 as well as at 2400 baud, as per this post. A login prompt isn't strictly necessary, you could have a python script running for example to handle whatever, but a real prompt is pretty cool.



  • Figured out a good solution after a bit of digging. Shell script:

    #!/bin/ash
    
    stty -F /dev/ttyS1 2400
    
    while :
    do
      echo "" >/dev/ttyS1
      echo "Onion Omega 2+ on Commodore 64!" >/dev/ttyS1
      ash -l </dev/ttyS1 >/dev/ttyS1 2>&1
    done
    

    Right now I'm launching it manually, but could do it from inittab or some other approach at startup.

    Still two outstanding questions:

    • How could i get it to actually give a login prompt?
    • Related...Is there any documentation anywhere on what command line parameters this version of busybox ash takes?

  • administrators

    @Leif-Bloomquist said in Commodore 64 Supercharged by Omega2 (Pictures):

    • How could i get it to actually give a login prompt?
    • Related...Is there any documentation anywhere on what command line parameters this version of busybox ash takes?

    Try ash -l -c /bin/login
    I think that's the effect you were looking for.

    No documentation that I know of, found the -c option by running ash --help



  • @Lazar-Demin

    Thanks, that does the trick.

    No documentation that I know of,

    How do you not have documentation for the code that ships on your own product? That fascinates/baffles me.

    found the -c option by running ash --help

    Fair enough, but the output is pretty cryptic:

    root:~#ash --help
    BusyBox v1.26.2 () multi-call binary.
    
    Usage: ash [-/+OPTIONS] [-/+o OPT]... [-c 'SCRIPT' [ARG0 [ARGS]] / FILE [ARGS]]
    
    Unix shell interpreter
    

    I don't see how you can glean much from that.


  • administrators

    @Leif-Bloomquist said in Commodore 64 Supercharged by Omega2 (Pictures):

    How do you not have documentation for the code that ships on your own product? That fascinates/baffles me.

    We didn't create, develop, or modify BusyBox, it's a (GPL) utility that's commonly used with Embedded Linux. We don't have any special access to documentation, just what's available online.



  • Is there a unix shell on this planet that does not have the -c option? :-)

    But yes, there's no clear path leading to busybox shell docs, until one starts digging a bit harder, which I did a while ago:

    The busybox shell originates from the almquist shell (ash). ash became dash when is was ported to debian, and later became the default /bin/sh on ubuntu. And ash was also included into busybox.

    So when you want to know something about the busybox shell, the closest match is a dash man page.


Log in to reply
 

Looks like your connection to Onion Community was lost, please wait while we try to reconnect.