codesmythe / zmtx-zmrx

Modernization of 1990's ZMODEM program, with ports CP/M-80 2.2 & 3.x
GNU General Public License v2.0
26 stars 3 forks source link

Diverse minor Atari TOS issues #10

Open czietz opened 2 years ago

czietz commented 2 years ago

I love it when people port software or develop new software for TOS. Thus, I gave this project a try; even though presently I don't have means to test the actual ZModem transmission.

Here are my notes. Sorry in advance for not doing a full PR due to lack of time. I hope that my findings are still clear.

1. Building fails:

[  8%] Building C object CMakeFiles/zmtx.ttp.dir/tosfile.c.obj
In file included from /usr/lib/gcc/m68k-atari-mint/4.6.4/../../../../m68k-atari-mint/include/bits/stat.h:26:0,
                 from /usr/lib/gcc/m68k-atari-mint/4.6.4/../../../../m68k-atari-mint/include/sys/stat.h:18,
                 from /tmp/zmtx-zmrx/tosfile.c:3:
/usr/lib/gcc/m68k-atari-mint/4.6.4/../../../../m68k-atari-mint/include/bits/types.h:63:19: error: conflicting types for '__ssize_t'
/tmp/zmtx-zmrx/libcmini/include/sys/types.h:44:25: note: previous declaration of '__ssize_t' was here
make[2]: *** [CMakeFiles/zmtx.ttp.dir/build.make:115: CMakeFiles/zmtx.ttp.dir/tosfile.c.obj] Error 1
make[1]: *** [CMakeFiles/Makefile2:73: CMakeFiles/zmtx.ttp.dir/all] Error 2
make: *** [Makefile:84: all] Error 2

... because... https://github.com/codesmythe/zmtx-zmrx/blob/5a581205fe6f8c9bd164b923e54270dbd240be9b/tosfile.c#L3 ... includes sys/stat.h from MiNTLib and that clashes with one of libcmini's headers. Fortunately, the code using fstat() is deactivated anyway. Thus, I just removed the include to build the software.

2. Requires TOS 2: I see that your serial driver (https://github.com/codesmythe/zmtx-zmrx/blob/5a581205fe6f8c9bd164b923e54270dbd240be9b/tosterm.c) is based upon the Bconmap() XBIOS function. There is nothing wrong with that! However, you might want to add to the readme that Atari TOS 2 (or higher) or EmuTOS 256k (or bigger) is required.

3. Screen output: The output looks like this, because TOS sadly requires "\r\n" as line terminator. grab0001 There is a STDIO_MAP_NEWLINE define in libcmini that translates "\n" to "\r\n", but I did not test if this has any unwanted side effects.