RC2014 with ROMWBW - XModem Send problems

401 views
Skip to first unread message

Richard Deane

unread,
May 20, 2018, 4:43:27 PM5/20/18
to RC2014-Z80
I am having problems using xmodem (XM S Testfile.com) on rc2014 romwbw (2.9.1 pre 2) to send a file backup up to the PC. The PC never completes, freezing at 128 characters received, and the terminal often gives a communication error message.

I can do XM R reliably, and the terminal session is reliable for text transmission in both directions.

Can anyone do XM S successfully? I suppose that it is less common than sending files down to the RC2014.

I have tried with Mac OSX with "Serial" terminal package, and on Win10 32-bit with teraterm.

I have tried none, rts/cts and dtr/dsr handshake types and none help this file transmission.

The file is file.com (9k) but I have failed trying others.

sample session :
C>xm s find.com
XMODEM v12.5 - 07/13/86
RBC, 08-Nov-2017 [WBW], COM0

The rc2014 has sio2 with console on port a

RetroBrew HBIOS v2.9.1-pre.2, 2018-05-01

RC2014 @ 7.372MHz
0 MEM W/S, 1 I/O W/S, INT MODE 1
512KB ROM, 512KB RAM

SIO0: IO=0x80 SIO MODE=115200,8,N,1
SIO1: IO=0x82 SIO MODE=115200,8,N,1
MD: UNITS=2 ROMDISK=384KB RAMDISK=384KB
IDE: IO=0x10 DEVICES=1
IDE0: 8BIT LBA BLOCKS=0x0003DC50 SIZE=123MB


Richard




Richard Deane

unread,
May 20, 2018, 5:25:41 PM5/20/18
to RC2014-Z80
I have retested with xmodem v27 from fox hollow.ca, which is tuned for standard rc2014. This works fine for send and receive under romwbw which implies a bug in the romwbw xm program. At least I can send files now.
Richard

Wayne Warthen

unread,
May 21, 2018, 8:02:52 PM5/21/18
to RC2014-Z80
Well you certainly isolated the issue when you got the alternative XModem to work.

I found the problem in the XM.COM application distributed with RomWBW.  Kind of a subtle issue, but easily corrected.

I have posted RomWBW v2.9.1 Prerelease 4 on GitHub which includes the fix.

Thanks,

Wayne

Richard Deane

unread,
May 22, 2018, 2:07:18 AM5/22/18
to RC2014-Z80
Thank you! Hobbyists provide fantastic customer service!

Виталий Головач

unread,
May 27, 2018, 6:27:34 AM5/27/18
to RC2014-Z80
I assembled RC2014Pro, fiddled for 3 days and now noticed the same problem. I can not send a single file to my computer (Windows 10). Wait for the release of a new romWBW or enough new XM.COM? Where to get it, I could not find it on github.

воскресенье, 20 мая 2018 г., 23:43:27 UTC+3 пользователь Richard Deane написал:

Виталий Головач

unread,
May 27, 2018, 6:57:18 AM5/27/18
to RC2014-Z80
Found new XM.COM! Works well! Thank you! This RomWBW is big and quality work! With all due respect to you, Wayne Warthen!

воскресенье, 20 мая 2018 г., 23:43:27 UTC+3 пользователь Richard Deane написал:
I am having problems using xmodem (XM S Testfile.com) on rc2014 romwbw (2.9.1 pre 2) to send a file backup up to the PC. The PC never completes, freezing at 128 characters received, and the terminal often gives a communication error message.

Виталий Головач

unread,
May 27, 2018, 7:53:40 AM5/27/18
to RC2014-Z80
Found another mistake already in the new XM. When I'm transferring ascii file (text file) on a computer with Windows, XM sends out blocks. That is, the tail of a non-multiple 128 is discarded or filled with debris!
Sorry for my english, please!


воскресенье, 20 мая 2018 г., 23:43:27 UTC+3 пользователь Richard Deane написал:
I am having problems using xmodem (XM S Testfile.com) on rc2014 romwbw (2.9.1 pre 2) to send a file backup up to the PC. The PC never completes, freezing at 128 characters received, and the terminal often gives a communication error message.

Виталий Головач

unread,
May 27, 2018, 7:59:11 AM5/27/18
to RC2014-Z80
For example, I send ascii.bas:
E>type ascii.bas
10 MAXITER=20
20 C$=" .,'~!^:;[/<&?oxOX#  "
30 FOR Y = -39 TO 39
40 FOR X = -39 TO 39
50 CREAL=X/20
60 CIMAG=Y/20
80 ZREAL=CREAL
90 ZIMAG=CIMAG
95 COUNT =1
100 ZM=ZREAL*ZREAL
105 ZN=ZIMAG*ZIMAG
107 ZL=ZM+ZN
110 IF ZL > 4 THEN GOTO 170
120 ZR2=ZM-ZN+CREAL
130 ZIMAG=ZREAL*ZIMAG*2+CIMAG
140 ZREAL=ZR2
150 COUNT=COUNT+1
160 IF COUNT < MAXITER THEN GOTO 100
170 PRINT MID$(C$,1+COUNT,1);
180 NEXT X
190 NEXT Y

Recieved file is:
10 MAXITER=20
20 C$=" .,'~!^:;[/<&?oxOX#  "
30 FOR Y = -39 TO 39
40 FOR X = -39 TO 39
50 CREAL=X/20
60 CIMAG=Y/20
80 ZREAL=CREAL
90 ZIMAG=CIMAG
95 COUNT =1
100 ZM=ZREAL*ZREAL
105 ZN=ZIMAG*ZIMAG
107 ZL=ZM+ZN
110 IF ZL > 4 THEN GOTO 170
120 ZR2=ZM-ZN+CREAL
130 ZIMAG=ZREAL*ZIMAG*2+CIMAG
140 ZREAL=ZR2
150 COUNT=COUNT+1
160 IF COUNT < MAXITER THEN GOTO 100
170 PRINT MID$(C$,1+COUNT,1);
180 NEXT X
190 NEXT Y
140 ZREAL=ZR2
150 COUNT=COUNT+1
160 IF COUNT < MAXITER THEN GOTO 100
170 PRINT MI

Best regards!

воскресенье, 20 мая 2018 г., 23:43:27 UTC+3 пользователь Richard Deane написал:
I am having problems using xmodem (XM S Testfile.com) on rc2014 romwbw (2.9.1 pre 2) to send a file backup up to the PC. The PC never completes, freezing at 128 characters received, and the terminal often gives a communication error message.

Виталий Головач

unread,
May 27, 2018, 8:08:50 AM5/27/18
to RC2014-Z80
And can this be a problem with files from mbasiс?


воскресенье, 20 мая 2018 г., 23:43:27 UTC+3 пользователь Richard Deane написал:
I am having problems using xmodem (XM S Testfile.com) on rc2014 romwbw (2.9.1 pre 2) to send a file backup up to the PC. The PC never completes, freezing at 128 characters received, and the terminal often gives a communication error message.

Wayne Warthen

unread,
May 27, 2018, 10:17:33 AM5/27/18
to RC2014-Z80
On Sunday, May 27, 2018 at 5:08:50 AM UTC-7, Виталий Головач wrote:
And can this be a problem with files from mbasiс?

This is an anomaly between CP/M and other OSes. 

CP/M stores all files as blocks of 128 bytes and has no way to indicate a block is partially used.  By convention, under CP/M, the last character is an ASCII file is supposed to be a ctrl-z to indicate the logical end of the file.  The last block of the ASCII file is frequently full of garbage after the ctrl-z.  Under CP/M, when you use the TYPE command to display the file, the TYPE command stops displaying text when it sees the ctrl-z, so the garage is not displayed and is ignored.

By design, XModem sends and receives files in binary and always sends and receives a full 128 byte block at a time because CP/M cannot indicate a partial block.  So, any garbage at the end of an ASCII file is sent by XModem.  When you subsequently look at the file on your PC, you will typically see this garbage because the PC application is assuming the file size in the directory is correct and is not looking for a ctrl-z.

Some CP/M apps are smart enough to pad the end of the last block with ctrl-z or nulls.  I suspect that MBASIC is not doing that.

-Wayne

Виталий Головач

unread,
May 27, 2018, 11:38:13 AM5/27/18
to RC2014-Z80
Yes, apparently, the problem is somewhere in the interaction between the programs and the OS. I opened the BASIC file in the WS and rewrote it. The problem disappears. Thanks for clarifying. Best wishes!


воскресенье, 20 мая 2018 г., 23:43:27 UTC+3 пользователь Richard Deane написал:
I am having problems using xmodem (XM S Testfile.com) on rc2014 romwbw (2.9.1 pre 2) to send a file backup up to the PC. The PC never completes, freezing at 128 characters received, and the terminal often gives a communication error message.
Reply all
Reply to author
Forward
0 new messages