Pages

Friday, 29 November 2019

Crafting chesspieces


Barleycorn is a common name for a highly ornamented, tall red and white chessmen, elevated on an urn-like pedestal.

One might think the name 'barleycorn' has something to do with the tallness or shape of the pieces, but apparently it refers to the decorative barleycorn leaf motif found on them. So whether a set without the decoration is truly a barleycorn chess set I can't say. But it's a handy keyword for searching a certain type and I'll use the word here loosely to describe mine.

I've longed for something like this, but barleycorns are quite expensive (200 EUR easily for a modest, complete set) so I started thinking whether I somehow could build my own, even if it wouldn't be as decorative.

I don't have a lathe. The main idea was that the pieces could be created by fitting ready-made parts around a central stick, like beads in a string. Visiting a few hobby shops, I looked for ready-made wooden parts that could help in this.


First phase

After I discovered a part that would work as the base for all pieces, I was already more optimistic. I felt a larger set would be more forgiving for inaccuracies, so I chose a 35mm base. As barleycorns tend to be placed much more tightly than any FIDE regulations now say,  a 50mm squared board should be good for these.

I didn't give much consideration to finding larger bases for the King and the Queen although it is clearly a feature of the barleycorns and most chess sets.

Is it a chesspiece or a sci-fi rocket? Here the barrel is cut and filed out of a cube.
I bought a bunch of the ready-made wooden parts I could find from hobby shops, trying to figure out how they might be used together.

After having a pool of parts, it was time to scavenge more definite images of barleycorn-type chessmen from the internet. I did not seek to replicate any one set in particular, instead I picked features from different sets that I liked.

Of course it was important that the details could be recreated with my parts pool. It was a relief to find out not all barleycorns are especially decorative and I could take that as a guideline.

I needed to ensure the 16 pawns would not require much manual work. I'm happy to note this stage was quite successful, as the pawns are the simplest part of a barleycorn set in any case.

Left: a nearly complete queen, Right: demonstrating the stick-system 
Each pawn and piece has a narrow stick as a central axis. This meant drilling parts that didn't yet have holes in them. Especially the pedestal part required some care as it's not easy to drill into a convex end.

All the collars needed drilling too, finding the dead center was a bit tricky. The small brittle pieces break easily when drilling. For the tiniest collars I just had to patiently drill 1-millimeter pilot holes before making the 2,5 mm holes.

Sample of the parts pool. Note the absence of holes in many of the parts.
In the beginning I made many mistakes, often compounding so that some pawns were unacceptable and had to be remade. Poorly supported parts may move as a result of the glue drying process, which I also forgot to check.

I built a drilling jig out of a wooden block which helped in getting the holes more accurate. This became necessary as I noted I really have only so many bases and 32 perfectly drilled bases are needed.

One trouble I had that there really were no parts for inverted curves (e.g. the "scotia" in antique pillars). I emulated these by using a combination of different collar pieces.

With all the easy labor behind me, I begun work on the knight horse-heads. Here wood putty was somewhat useful as the shapes could not be cut very precisely. I was not overtly happy with the knights, but I needed to make progress on this most difficult part before my enthusiasm runs out.

And run out it did. After I finished the four knights and whittled one bishop head, it took a better part of a year before I could find it in me to continue with the set.

Carving the bishop-heads. The white colour is from gesso primer.

Second phase

With renewed zeal, I sat down and whittled the 3 missing bishop heads and started planning the rooks. Here I drew more accurate sketches, because I had lost the sense of the project and the proportions. The rook designs had been previously unsolved, but I had decided they ought to be elevated. (Less common in barleycorn sets but it has been done).

The drawings were useful in finding the proportions for the rook although in the end I improvised some choices.

The tall rooks ought to go without pedestal really.
Instead of forming the rooks out of solid wooden blocks (my first plan) it struck me that with a proper cutting tool I could create the rooks out of 4mm plywood circular plates.

I had seen such a tool a while ago and now I bought it. It's meant for cutting holes into drywalls and the like, so the cut-out is not really the intended product. But it worked well enough with the power drill and the 4mm plywood. The resulting edges were somewhat torn, but filing and sanding them together I got them quite smooth in the end.

I tested each plate size to find out what my options are and then redrew a rook design on a millimeter paper using this knowledge. Only the center part would be cut out of the solid blocks. Cutting dozens of plates was a bit boring, but likeable procedure.

Measuring plates. The leaflet only supplies the hole inside dimensions!
With this tool the central drill was 6mm fixed diameter. This was helpful for gluing the plates together around a 6mm drill bit, but as the 6mm hole was not suitable for the narrow central stick, I also needed "converter" parts. I won't explain this in more detail.

I used the plate-approach for creating the royal pieces too. I was unhappy with my earliest ideas (see the first picture) and chose to do a simple straight barrel that probably looks better.


The outcome

There is something cartoonish about the designs, especially the rooks are very huge, much larger than the base they are standing on. This is not something I've seen in any set, as the rooks usually are not elevated, and when they are they certainly do not exceed the base dimensions.


So I could also make some original choices. Possibly I also felt this cartoon approach gives the set more character than a failed attempt at copying some existing design.

I did not plan the whole set before looking at it all together so it was fortunate the pieces work together as well as they do. But even during the process I could match certain pieces to work together, so it was not all done blindly.

The set is not especially heavy. The king and queen are sufficiently weighty, but the pawns and other pieces are somewhat light and unbalanced. I could help that little with leveling the base bottoms a bit.

Board supplied by Marq, a nice fit.
Small amounts of pieces in plastic bags turned out to be quite expensive in total, so it's very likely I could have instead bought a somewhat battered antique barleycorn set off eBay with the sums! Well, it's more interesting to try to make your own.

There is still some painting to do, and I'll do more close-ups when the finishing has been done.

Sunday, 17 November 2019

C=key adapter 3.0a quick look


About a year ago, I had a go at rigging an Arduino to work as a PS/2 adapter. That adapter is working, but the software needed patching. I got it into semi-decent state but it still leaves a lot to be desired. (Shift+cursor keys etc work a bit randomly.)

In the meantime, I also ordered this ready-made solution from Retro Innovations, the C=key 3.0A.

Apart from modest soldering skill you will need some sense in building electronics, as the (not included) instructions need some deciphering. But if you follow them step-to-step precisely it should come out good. I guess you can also order them soldered. I perhaps wanted to avoid having the PS/2 connector positioned, but as it turns out it was a better idea to use that part anyway.

The board has provisions for both female & male 20-pin connector. I could have avoided soldering the other part in, had I given it a bit more thought.

Because there was a capacitor in the way, I could not fit the board directly on the C64. So I went for a long-ish drive cable. I once found a bunch of these from a flea market.


Bonus points for including proper holes in the board for easy attachment in your own projects. I'm not yet sure where I'll use this.

The adapter worked at the first attempt. My impressions were that this is much smoother and bug-free than that DIY board.

But it turns out this C=key adapter is not without problems either.

Although the key mapping felt great at first, I soon found the cursor keys did not work. Then I learned I need to change the keymapping style. I can enter the "menu" by pressing CTRL+ALT+BACKSPACE.

There,

1. C64 Symbolic
2. C64 Positional
3. C128 Symbolic
4. C128 Positional

(CTRL+ALT+BACKSPACE exits the menu.)

Using selection 1. (C64 Positional) the cursor keys started working and all keys are mapped according to the PC keyboard. ...according to an US keyboard, that is. Sigh! So the keys work but everything is in an alien place.

While testing the keyboard I sometimes came up with gibberish. I also managed to get the adapter locked quite easily, which often followed from pressing Return, but other keys too. Using the CTRL+ALT+BACKSPACE combo a few times the adapter recovered.

The site does say "This is still considered a project, not a complete product. I’ll try to help with issues, but it’s still a work in progress."

I did clean the adapter up and wiggled the cables a bit and got a better response out of it. Who knows, it might be my soldering and construction was a bit botched. I'll have to make sure the board and the cable do not move when pressing the keys.


These were of course the very initial responses to this adapter, and further examination should reveal how well it works in the long run. Possibly, a PS/2 to C64 keyboard adapter is a device that simply cannot be made to work 100% reliably and in a satisfying way, but this is already quite good.

Wednesday, 30 October 2019

MO28UO mouse


This MO28UO is an IBM-branded mouse from early 2000s I suppose. Looking around it may have been sold as Lenovo-branded too. Certainly it would fit the Thinkpad colour theme...

Although I like the slightly old-school weight and speed of the mouse, I noted the wheel is prone to mis-interpret the direction.

I opened the mouse and took some images.


The scroll wheel is not based on an optical coupler, so the wheel doesn't have holes. The axle had accumulated some dirt and hairs, which I removed.

I didn't expect it to matter much in this case.



The wheel part is simply lying on top of the wheel button switch, which might already be a source of some problems.

After cleaning, the wheel might have improved slightly but I suspect the mechanism is simply not that good to begin with, or it has become worn out.

Although a tactile/audible response from the wheel is a good thing, this one's a bit too noisy for my tastes.

So I guess I'll abandon this mouse...



Monday, 28 October 2019

PETSCII processes

Looking at my stash of unfinished and experimental PETSCII character art files, I found some Digiloi work-in-progress materials I had forgotten.

Here's a screen where the main character was fleshed out:


The nice thing about this image is that I've collected the versions in a chronological order, from left to right.

As can be seen, the first attempt is ridiculously stupid and a 1980s BASIC game might have been forgiven for having such a crude shape in it.

I guess the solitary guy is the one where I felt I'd "got it", although as can be seen it's still some way off. Note also the sketching of background graphics.


This is a frame from an animation where I drew the running frames over a scrolling floor. Using Marq's PETSCII editor it's quite easy to do animation.

Not sure if I ever planned to do a scrolling game, it may simply be the animation loop was easier to test this way.


I also can't remember if the one in the middle is an alternative design based on the one on the left, or the other way round.

That laser shape was on for quite a while before I saw it would not work over a background.

I think the huge gun finishes the character, it's part of the character really. Parts of the previous designs went into the bad guy graphics.


Here are the original "sprites" for the main character, which I thought were finished. In the end I never used a "stand-still" frame in the game.

However, testing the player character over a background, it did not quite work. I changed the colour to green which stands out better against a dark-ish background. Then the tiny details and rounding had to go too, because they would generate ugly black outlines.


This snapshot from an early build shows the problem. Even the finished game has some black outlines.

I also found some extra background tiles, most of which did not find their place in the game:


Another background-related image shows the "running in a dark forest" idea that sort of defines the first moments of the game.

As this is an early build, the graphics routines are tested over a static PETSCII drawing. When I moved over to tile-based rooms, I had to compromise with the trees and the style became quite different.


Although this is just a test, I also toyed with the idea of beginning the game with a bunch of these guys running alongside the player, then disappearing "somewhere." I guess it would have been simply confusing.

So there it is, everything I could find!

Monday, 7 October 2019

Zoo 2019

Some recollections from my participation at the Commodore 64-only demoparty, Zoo, held at Akaa during 4th-6th of October. Again, not really a party report, I'm mostly talking about my own works.

Not the general theme of the weekend.
My pre-party mood was a bit pessimistic, after not catching a hotel room. Another thing I worried about a bit was not having any prods for the compos by the time I arrived. But I managed, as usual, do something on the spot.

It turned out the common accommodation at the nearby building was much better than I expected. The airbeds are cozy and the space was not jam-packed. It actually has a few pros compared to the hotel room, mainly it is very silent (the party noise won't reach there) but it's also cheap. If only I hadn't forgotten to pack the roll-up bed...

The unsuspecting Viiala neighbourhood, somewhere in Finland.
SID

SID was a general theme of the event. Grue gave an overall 'mythbusting' session about the SID and played concrete examples of playing the same songs on different SIDs. The differences were quite drastic, in some cases the wrong SID can even hide the lead instrument.

The bottom line is there is no overall 'best SID', some songs sound better on the 6581 and some better on 8580 - not even always the one the author intended! Your ears be the judge.

Flex gave a workshop on Goattracker. It's a complex piece of software, and SID is complex, so I doubt anyone could have started up Goattracker there and then and gotten finished results, but as I had at least some previous experience I could pick up one or two new things.

I mused that to be able to do SID music on C64, you have to have an understanding of many things, not just one thing:

  • About SID features, behaviour and constraints
  • The convention of "a SID" as a tracked format on Commodore 64
  • How Goattracker (or some other editor) works

And maybe some musical knowledge too. Well, anyway, these SID presentations encouraged me to think that it does not matter so much if I don't achieve the perfect iconic SID sound, so I started tinkering on a crappy tune following some of Flex's tips.


VIC-II

Dr. TerrorZ: Light
I had a Multipaint presentation, but I found I couldn't really 'teach' anything at this point so I simply told what the program is for and showed the main features of the new version. This led me to have chit-chats with various sceners which was maybe the best outcome of the presentation.

The software is now already quite known in the scene but not everyone will adopt it. But I don't think I'm bragging if I say it is a good introductory-level software for making C64 graphics!

First time i saw the zoo from this angle.
My graphics entries were even less successful at the compos than last time.

Normally parties tend to go so that I pick a half-decent half-completed image from the archives and finish it, but this time my folder was rather empty. I also spent a lot of time getting a demo production working (see further below), time taken away from drawing.

The bitmap work was a quick experiment with drawing using wacom tablet with Multipaint.

Dr. TerrorZ: Spacesplash
I preferred the initial quick lines and was even afraid to lose them with too much detailing. So I actually like this image quite a lot (perhaps because I did not have time to grow tired of it) but it didn't go down that well in the compo.

Admittedly, a further session would have helped it a bit. (That's a damn long arm!)


CPU

I was greatly impressed with the amount of quality demos at Zoo. I recall the dry year 2013 when even a crappy PETSCII demo written in c by some idiots could win.

The Finnish Gold 'returning' with a full-size demo should/could have been a bit more grandiose. Although it was presented at the show-stealer last position, it was a bit on the short size and petered out in the end. Artline Designs demo Out of Contex delivered better overall and was the clear deserved winner. The Void Mind was still incomplete at the party but is clearly a memorable demo. PWP's Metadimension was an atmospheric generative-algorithmic work.

In the drunken tired atmosphere there was a tangible mood of having passed a turning point and a feeling of living amidst a new rise of the Finnish C64 demoscene. In a more sober hindsight, it's perhaps not all there yet... X'2020 will mark the spot.

I submitted my modest Nine Rings one-filer, based largely on re-writing Digiloi game routines. Digiloi object drawing system is naive in that it draws characters and colours separately to two buffers, and only combines them at the screen. Now I have the graphics stored in a reverse interleaved order for the drawing, and the buffer is also interleaved. So I could have 9 Digiloi-style 'sprites' on screen.

From Dr. TerrorZ: Nine Rings
The PETSCII mode is forgiving in that I can go with 1/3 framerate and it still looks kind of acceptable. The routine was in place before Friday but I did the scripting, music and some additional graphics at the partyplace.

After hitting the ring theme, my goal was to visualize the One Ring to Rule them all... poem, giving an outline to the demo script. But as time ran out I could not add more graphics and it was left more abstract. It was well enough received.


I/O

Apart from the above presentation, Kasettilamerit made an appearance, and the bid for making demoscene a part of UNESCO World Heritage was also presented here.

At the location I bought an external kernal replacement cartridge, a REX 9628 clone. Equipped with JiffyDOS and JaffyDOS and other jibba-jabba, I'm hoping it will make an interesting companion to SD2IEC or that Raspberry floppy emulator. More about these later.

Also I got a K&A paper magazine English edition with a Digiloi review :)

zooparty.org

Zoo 2019 at CSDb
..at Demozoo
..at pou√ęt

(At the time of writing the listings were incomplete)

Saturday, 14 September 2019

Multipaint 2019: ULAplus, QL, pull-down menus and more


Multipaint 2019 has been long in the making, but there are quite a lot of tiny and bit bigger new things.

Get it at http://multipaint.kameli.net/

In this blog post I'll discuss some of the new features and add background detail that wouldn't fit the webpage and the manual.


Application behaviour

The application window is no longer scaled according to the chosen target platform.

The uniform sized application window helped me get rid of the java-based dialogue box when running the application, and you will see an in-application menu for choosing the platforms.


Because of this it's also possible to change the platform (FILE / NEW MODE) on the fly, so you don't have to re-run the application just to try a different platform. Don't expect it to convert your images on the fly as yet.

In the future Multipaint will likely suggest a mode change when loading a file for different platform, it's no longer hard to do but I didn't want to do the testing now.

I have removed the application window zoom size 1 (mini) from the prefs, as supporting it became a bit problematic. Tell me if you really, really need it.

There are now more tricks to access the "prefs.txt", this may help Macintosh users who have had problems with the preferences. If Multipaint is run from terminal, it outputs file-related messages to the console, hopefully helping solve these problems in the future.

Overall the program might not be as fast as before. I changed some convoluted code to something that is easier to handle, but likely a bit slower. I was also reluctant to optimize the all-new window and menu drawing routines.


File safety

Multipaint 2019 imposes some (conventional) rules for increased safety:
  • File overwrites and mode changes will have to be confirmed.
  • Multipaint reminds you of unsaved work when loading a new file.
  • Unsaved pages are pointed out when quitting (However, see note below).
  • Using “clear all” will reset the filename.
  • You cannot UNDO past a point that would require a filename change.
A page is  “unsaved” if a tool has been used on the page, it's currently no more clever than that.


The UNDO limit may sound like an overkill but it's been the only real source of lost work for me personally. Some have reported lost work due to clicking wrong icons or window close button accidentally.

NOTE: As much as I tried, I could not get Processing/Java to reliably bypass the window close button on the exported application. The work on this continues.

In the meantime, Multipaint tries to save pages automatically on exit, the files are called multipaint_auto_page1.bin and multipaint_auto_page2.bin, saved in the Multipaint application folder.


Drawing tools and magnify mode


There are more magnify levels (5 including the full view), making the mouse wheel magnify much more fluid. It should work a bit more like you would expect in this type of program (e.g. Krita) and to me it has quickly become the standard way of zooming in and out. The old magnify tool icon and magnify keys work like they did before.

I'd go so far as to say a two-button mouse with a wheel (doubling as a middle mousebutton) is the optimal tool for using Multipaint. Well, at least that's what I'm using all the time. However, the new style interface means the program should be more useable with a drawing tablet (wacom).

I cautiously added an auto-scroll for the second phase of two-phased tools such as rectangle and line. So, if you drag these tools outside the entire Multipaint window the mag window ought to scroll a bit. I'll probably improve the panning options in the future.

You can now reset your tool options by pressing SPACE. This means if you have a cluster of switches on (mirror, recolor, dither etc), and you are not quite sure why you can't draw properly, just hit SPACE and you will get back your one-point, one-color brush with all the switches off.


Pull-down menus and interface changes

Multipaint 2019 introduces drop-down menus, much like in Amiga Deluxe Paint. (Or nearly every other application for that matter!)

With the new menus I can add options and dialogues for functions that have been a bit too well hidden. In the future, the dialogues also help in adding features that would not fit well within the icon/keypress logic. It's also a way to divide the immediate drawing tools/switches and the other functions.


Currently the menus don't do that much as I am a bit wary of crowding them with options. Also, a bit more planning may be needed for the new dialogues. As a sort of demo what will happen in the future, the Text export now opens a dialogue for export options (that also have been improved a bit).

The main toolbar can be flipped, it can be on the left or right hand side of the screen, using OTHER/SWAP SIDE. DeluxePaint had the menus at the right but most applications these days seem to favor the left side. To me the left-side felt quite natural. You choose.

As file options no longer have icons, I got more room for the remaining icons. I gave some padding around them and their groupings, which could again be helpful for drawing tablet users. I might consider reducing the amount of icons further, or making even more clear division between drawing tools and the switches.

Some functions are now in a more standard location, for example the Load/Save/Export/Import icons can be found from the top left FILE menu. Keyboard shortcuts work as usual.

Although redundant, Undo/Redo and clear-all can also be found from the menus for added comfort.  Also, select border/background etc. are added to the menus as they were not very visible. Clear background comes in two varieties, using 1st or 2nd color.

Quick flip is accessible from menu, so the image can be viewed as mirrored.

Two Commodore 64 alternate palettes (Pepto and Colodore) can be quick-accessed from the menu. Custom .ACT-format palette files can still be loaded using the Load menu option.

I added the Pipette tool as an icon, as people tended to think it does not exist at all. It does help drawing tablet users I think.


New Target Platforms: Sinclair Spectrum ULAplus and Sinclair QL

The biggest addition is the ZX Spectrum ULAplus colour enhanced mode, based on the ULAplus specification by Andrew Owen. The current ULAplus support is limited for the ZX Spectrum 32 x 24 colour resolution, and not every idea in gestation could be included. In the future, I might support the "timex" 8x1 mode.

An original ULAplus image made with Multipaint
I hesitated to add ULAplus as I've previously avoided any 'special' modes. ULAplus was interesting and compatible enough to do and has some actual support. I'll possibly discuss this in more detail in near future. Let's just say it's not an easy mode to work with!

Sinclair QL mode 8 has been promoted from a semi-supported platform into a "fully" supported platform. The mode has an approximated flat aspect ratio that cannot be turned off. I added this mode mainly because I have grown so fond of the QL.

More importantly, the QL mode represents a small step towards supporting some low resolution 16-bit modes (Atari ST 320 x 200). I've resisted this in the past as Multipaint does not really have the type of tools and interface for handling them in the best way, but the day is getting closer.

Multipaint at http://multipaint.kameli.net/



Wednesday, 4 September 2019

Atari Falcon serial transfer pt.2: Shells from hell


A continuation of the Atari Falcon/ST file transfer topic.

I've found Atari terminals to be clunky and none would do exactly what I'd want them to. Ansiterm fared the best so far, the terminal is good enough for using the command line remotely, and a Zmodem transfer will be automatically recognized when using sz from Linux end.

However, on the minus side it's one more program to launch, necessitating video mode adjustment to ST-LOW and setting up the xyz.ttp. This also distances you from the Falcon end of things.

Although this was an ok solution for one longer session, I didn't exactly like to access my Linux command line through a terminal.

As long as I can use a command line shell on the Atari end, I should also be able to call up a file via that command line. Previously, this meant launching xyz.ttp at Atari end and then typing the sz at the Linux end.

Now I tried a fun way to improve this a bit.


Mupfel shell

At Falcon end I have used the Mupfel shell, which is bourne-like enough for doing relatively complex scripts and redirecting of input/output.

I could make a small script that sends commands to the Linux by serial port, activating the sz Zmodem transfer and running the xyz.ttp Zmodem receive program at the Atari end.

But it took a while to get the Mupfel shell up and running properly, as I couldn't find that much information about how to use the shell.

Then it struck me that as the shell is a Bourne clone, people must have assumed it's nearly general knowledge anyway. So, after reading some sh guidance...

If the program file mupfel.ttp is at D:\comms\mupfel then the shell expects to find a file called 'profile' from there.

echo Mupfel
echo xyz,zip,lzh,edit,emacs
echo
PS1='%p> '
alias xyz=c:\xyz202b\xyz.ttp
alias zip=c:\stzip\zipjr.ttp
alias lzh=c:\packers\lharc\lharceng.ttp
alias edit=d:\comms\memacs\me311ata.tos
export TERM='VT52'
PATH='c:\;d:\comms\mupfel\bin\;e:\;f:\;.'
HOME='d:\comms\mupfel\'
SUFFIX='prg;app;acc;tos;ttp;mup;sh;'
LINES=30
ROWS=30

The above is an example of my 'profile' which connects various programs with aliases. The line with PS1='%p> ' makes the prompt a bit friendlier, showing the current path.

I use MicroEMACS for editing text files inside Atari, there are not many options for editors that would work well within the Atari shells. If only I'd find the way to bind those arrow-keys...

MicroEMACS requires that the environment parameter TERM is not empty, so I have 'VT52' there. Suffix should tell which files are executable but frankly it doesn't seem to do much. Not sure if LINES/ROWS are meaningful to any programs.

Well, off to the file-transfer-mobile.


The 'get' script at Atari

D:\comms\mupfel\bin\ is a good place to put a script. Mupfel scripts end with .mup extension.

From the command line, doing

echo Hello>>AUX: 

sends characters to the serial.

Saving the following as get.mup

echo get $1 >>AUX:;xyz

is enough to send over a 'command'. The characters 'get ' are sent, followed with the argument passed from the command line, and after that the shell runs xyz.

Here in my case xyz is an alias for xyz=c:\xyz202b\xyz.ttp as defined in the profile above. I guess the 'get' could be an alias too.

I spent some time making a Processing sketch that reads the serial input, sniffed for that 'get' statement and used a system call to send the required file using sz. Clunky but it worked.

However, after a bit of a think I felt this could just as well be done as a Linux bash shell script.


The 'server' script at Linux

At my Linux end, I can use a script somewhat like this:

#!/bin/bash

DEV=/dev/ttyUSB0
stty -F $DEV 57600

echo "Serial is on"
echo "use get at Atari"

while :
do
 echo -n "WAITING>";
 IFS=' ' read COMM ARG < $DEV
 if [ "$COMM" == "get" ]; then
  echo "GET:" $ARG 
  sz $ARG > $DEV < $DEV
 fi
done

The script sets the serial port to 57600 and waits for a line of characters to arrive via the serial.

After such a thing arrives, the string is split using spaces between words. The first part will be the 'command' and the latter part a 'filename' for that command.

If the command is seen to be equal to 'get' then zmodem send (sz) is launched to send the file, with a filename based on the second part of the line received from the serial port.

In the meantime the tiny get.mup script at Atari end ensures that xyz202b.ttp is launched, waiting for the Zmodem transfer.

After the file has been transfered, the Mupfel shell resumes normal operation while the script at Linux end is looping another cycle, waiting for further instructions.

So, typing get /home/user/Downloads/atarifile.zip on the Atari end the file will be received to the current folder.

I added a 'put' command for uploading files from Atari and a 'say' command for simply sending a bunch of characters to be displayed, for testing purposes.

echo put>>AUX:;xyz -u $1

and

echo say $1>>AUX:

and the respective portions to be added to the Linux bash script:

    if [ "$COMM" == "put" ]; then
        echo "PUT:"
        rz > $DEV < $DEV
    fi
    if [ "$COMM" == "say" ]; then
        echo "SAY:" $ARG
    fi



Vice Versa

Now, it might be handy for the Atari to be waiting for the files whereas the typing stuff is done on Linux? How to do the opposite of the above?

Again, in Mupfel:

while :
do
IFS=' ' read COMM ARG <AUX:
if [ $COMM = 'put' ]
then
echo 'RECEIVING'
xyz
fi
if [ $COMM = 'end' ]
then
echo 'QUIT'
exit
fi
done

I had to take a bit different approach (it's not bash) but in the end I got it working on the Mupfel shell.

(I preserved the command/arguments split although I don't do anything with the arguments really.)

Running this, it becomes possible to use the send commands exclusively from the Linux end and the files will arrive at the folder the script is run from.

I had some trouble breaking out of the loop so I added the 'end' command just to be able to stop the shell from outside.

Also, at least in this form the 'read' tended to take in the Zmodem control characters etc. and got into a mixed state having received bunch of codes but no newline. Sending a bunch of lines after the serial send sort of clears the situation, but also produces glitchy-looking messages.

Although a nice exercise, having the 'server' script at linux end might be the better solution after all. Running that script is no problem for that box, whereas the Atari would be tied with running that one loop.


Afterword

By the way, another Bourne-esque shell I dabbled with for a while is called Okami, which was good enough for launching that xyz.ttp, moving and exctracting files around. A bonus is that it's able to launch GEM programs, something Mupfel won't do.

The earlier version of Okami may be recommended, although it is a bit lacking. The later versions appear more comprehensive but they were buggy at least on my Falcon so it was virtually useless.