OpenAC1 arrived in good shape in southern New England (CT-MA-RI area).
Thanks, Chris! This is so much fun. I've learned, already, to go
get a cup of coffee while a CATALOG .BIN file uploads. ;)
OpenAC1 board pulls 211 mA on the 2.1 mm barrel jack, at 8.2 volts.
Two cables required for this (present) use (described below):
USB B (not microB - this was a surprise) to USB-A (PC host)
Any 2.1 mm barrel jack cable (a PSU is also included; not tried).
I used a stock current-limiting bench PSU for testing.
CENTER POSITIVE as with all Arduino.cc targets' 2.1 mm barrel jacks.
CATALOG works as expected, first try.
Video and USB keyboard worked. One display (NEC) didn't like
the back (or is it front?) 'porch' and left-shifted the text
partially off-screen (this was already known from Altair-Duino
video terminal board, here in the shack).
The two jumpers (AC3 AC4) set so they are closest to one another,
to power the 6502 off the bench PSU, and to talk to the Nano 328p
via 'picocom' on a host PC running Linux Debian Bookworm, AMD64.
The built-in video terminal (VT-100 or such) is cool but ASCII
upload was wanted.
FIGFORTH.BIN loads super easy (from SD card) and the upstream
source of the SD card image is on Chris Davis' github for
the project.
USING FIGFORTH 1.1
The rest of this concerns mostly FIGFORTH 1.1 but some may also
apply to the Woz Monitor (line endings and ASCII transfer foo,
to 'automate' typing stuph into the system).
ASCII-XFER is part of MINICOM Debian package
ascii-xfer sends both CR and LF at the end of every line; there
is no command line defeat of one (or both) of these.
This breaks FIGFORTH's idea of what line input should look like.
Remedy: give it '\r' but suppress '\n' (0x0d 0x0a --> 0x0d)
aka FIGFORTH wants CR but not LF.
The C Language source 'ascii-xfer.c' is easy to edit and to compile,
straight off the Debian repository.
/*
* ascii-xfr Ascii file transfer.
*
* Usage: ascii-xfr -s|-r [-ednv] [-c character delay] [-l line delay]
*
* 08.03.98 added a patch from Bo Branten <
bo...@ing.umu.se>
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
*/
Here's the .diff of the changes made, to make 'ascii-xfr.c' compatible
with FIGFORTH:
--- ascii-xfr.c--orig.c 2021-01-01 17:45:55.000000000 +0000
+++ ascii-xfr.c 2023-09-12 16:35:16.084769883 +0000
@@ -177,7 +177,7 @@
}
/* end of line */
*s++ = '\r';
- *s++ = '\n';
+ /* *s++ = '\n'; */
/* terminate string */
*s = 0;
len++;
@@ -293,7 +293,7 @@
last = start;
if (what == 's') {
- fprintf(stderr, _("ASCII upload of \"%s\"\n"), file);
+ fprintf(stderr, _("2023 12 Sep 16:35z ~/bin ASCII baron von
upload of \"%s\"\n"), file);
if (cdelay || ldelay)
fprintf(stderr, _("Line delay: %d ms, character delay %d ms\n"),
ldelay, cdelay);
(hopefully this forum inteface didn't mangle the above!)
Where is it? Where is the above source code?
It's here:
http://debian.cc.lehigh.edu/debian/pool/main/m/minicom/
http://debian.cc.lehigh.edu/debian/pool/main/m/minicom/minicom_2.8.orig.tar.bz2
$ sha1sum minicom_2.8.orig.tar.bz2
a95d383c0c452c2d7687d370ff31e67de99d71f7 minicom_2.8.orig.tar.bz2
PICOCOM - tty terminal program for Linux
Launch the picocom binary to talk to the target 6502 system (Arduino
Nano 328p USB port):
$ cat picocom_launch.sh
#!/bin/sh
if [ $# -lt 1 ]; then
echo "Not enough arguments"
echo "Use: ./this_script.sh /dev/ttyUSB0"
exit 1
fi
echo "NON-STANDARD escape char is the backslash, not the usual Control+A"
echo "Control \, Control Q to quit"
echo "Control \, Control S to send a file from the local directory"
echo "Tue 12 Sep 16:55:16 UTC 2023"
echo " for AC1 Apple 1 6502 board - nano 328p"
# change these two lines to alter pacing of ascii uploads:
export LINE_DELAY=1100
export CHAR_DELAY=88
# picocom -e \\ -f n -p n -d 8 -b 38400 --omap lfcr --send-cmd
"${HOME}/bin/ascii-xfr -s -l 1100 -c 88" ${1}
picocom -e \\ -f n -p n -d 8 -b 38400 --omap lfcr \
--send-cmd "${HOME}/bin/ascii-xfr -s \
-l ${LINE_DELAY} -c ${CHAR_DELAY}" ${1}
exit 0
# end
(Change the path to the ascii-xfer binary to suit your use case.)
FIGFORTH SOURCE CODE LISTING - test.fs
Simple (haha) test program:
DECIMAL
( Tue 12 Sep 16:55:16 UTC 2023 )
( closing parens not required
( for any comment
( but short lines almost mandatory
: CRL ( n -- ) ( CR loops )
0 DO CR LOOP ;
: SPCS ( n -- ) ( alias )
SPACES ;
: HELOMSG ." hello. " ;
: GBYEMSG ." goodbye! " ;
: HILINE 12 SPACES HELOMSG 2 SPCS ;
: BYLINE 12 SPACES GBYEMSG 2 SPCS ;
: SAYHI 4 CRL HILINE 4 CRL ;
: SAYBYE 4 CRL BYLINE 4 CRL ;
SAYHI
99 DUP 1 - DUP 1 -
SP@ 0 + @ . 2 SPACES
SP@ 2 + @ . 2 SPACES
SP@ 4 + @ . 2 SPACES
2 SPACES 43 EMIT 4 SPACES
VARIABLE MYCHAR 43 MYCHAR !
MYCHAR @ HEX . 2 SPACES
MYCHAR @ EMIT 2 SPACES
SAYBYE
( END. )