From a856a794d028ef0e2a437796aa253f8eaecc44e8 Mon Sep 17 00:00:00 2001 From: Federico Santandrea <67011878+sntfrc@users.noreply.github.com> Date: Tue, 16 Jun 2020 23:53:56 +0200 Subject: [PATCH] Starting to look usable --- sendalo.html.tpl | 347 ++++++++++++++++++++++++++--------------------- sendalo.php.tpl | 7 +- 2 files changed, 201 insertions(+), 153 deletions(-) diff --git a/sendalo.html.tpl b/sendalo.html.tpl index 0f5f5bc..96f828f 100644 --- a/sendalo.html.tpl +++ b/sendalo.html.tpl @@ -1,180 +1,223 @@ - - - + + + - Sendalo + Sendalo - + input#url { + width: 300px; + max-width: 90%; + } + + input#upload { + width: 300px; + max-width: 90%; + text-align: left; + } + + footer { + margin-top: 2em; + font-size: 0.8em; + } + + #audiopad { + display: block; + width: 100%; + max-width: 300px; + margin: 0 auto; + padding-top: 2em; + text-align: center; + } + + #playbutton { + width: 10em; + height: 2em; + font-size: inherit; + } + + - - + function downloadComplete(what) { + var dt = new Uint8Array(what); + if (!dt || dt.length !== 143360) { + displayError(); + return; + } + + FS.writeFile('/tmp/c2t.dsk', dt); + var opts = document.getElementById('format').checked ? '-8' : '-n8'; + Module.callMain([opts, '/tmp/c2t.dsk', '/tmp/c2t.wav']); + fd = FS.readFile('/tmp/c2t.wav', {encoding: 'binary'}); + b = new Blob([fd], { type: 'audio/wav' }); + u = URL.createObjectURL(b); + audio = document.getElementById('audio'); + source = document.getElementById('source'); + source.src = u; + audio.load(); + audio.play(); + } + + function displayError() { + alert('Error: only 140K DOS-order images are supported for now. That doesn\'t look like one.'); + } + + - -
-

Sendalo!

-

Insert image URL or upload file

-
+ +
+

Sendalo!

+

Insert image URL or upload file

+
-
-
- - - - +
+ +
+
+

+
+ + + +
+ +
- +

+ What's this? +

+
+

+ Sendalo is a web/mobile interface to an emscripten build of the excellent + c2t tool by + datajerk. +

+

+ c2t is a really clever program that allows transferring disk images to + a running Apple II (among other things). +

- +

Why do I think this is useful?

+

    +
  • The ASCII Express site is fun and a great idea, but it has + limited selection.
  • -

    - What's this? -

    -
    -

    - Sendalo is a web/mobile interface to an emscripten build of the excellent - c2t tool by - datajerk. -

    -

    - c2t is a really clever program that allows transferring disk images to - a running Apple II (among other things). -

    +
  • ADTPro is fantastic! But you need a running modern PC, and + some means of bidirectional communication to make it work. + Ethernet cards are expensive, serial not readily available + and audio mic input jacks are becoming difficult to find on + modern laptops. And there is no mobile version.
  • -

    Why do I think this is useful?

    -

      -
    • The ASCII Express site is fun and a great idea, but it has - limited selection.
    • +
    • c2t will work with just a simplex link, so all you need is an + audio cable and there you go! But you still need another + computer and typing commands in the terminal.
    • -
    • ADTPro is fantastic! But you need a running modern PC, and - some means of bidirectional communication to make it work. - Ethernet cards are expensive, serial not readily available - and audio mic input jacks are becoming difficult to find on - modern laptops. And there is no mobile version.
    • +
    • Finally, with this frontend you can unleash the power of c2t + directly on your mobile device, with just an audio cable + and no PC. Just paste the .dsk image URL from your favorite + web archive, or upload your own, and the disk will be streamed + over. Also nice on computers if you don’t want to download + executables or type commands.
    • +

    -
  • c2t will work with just a simplex link, so all you need is an - audio cable and there you go! But you still need another - computer and typing commands in the terminal.
  • +

    + c2t can do a lot more than this, don’t forget to check the official + project page on GitHub to learn more. +

    +
    +
-
  • Finally, with this frontend you can unleash the power of c2t - directly on your mobile device, with just an audio cable - and no PC. Just paste the .dsk image URL from your favorite - web archive, or upload your own, and the disk will be streamed - over. Also nice on computers if you don’t want to download - executables or type commands.
  • -

    + -

    - c2t can do a lot more than this, don’t forget to check the official - project page on GitHub to learn more. -

    - -
    + - - - - - {{{ SCRIPT }}} - + {{{ SCRIPT }}} + diff --git a/sendalo.php.tpl b/sendalo.php.tpl index a2270a1..327f9e5 100644 --- a/sendalo.php.tpl +++ b/sendalo.php.tpl @@ -1,6 +1,11 @@