wwarthen / RomWBW

System Software for Z80/Z180/Z280 Computers
GNU Affero General Public License v3.0
323 stars 93 forks source link

XM is not working since 3.2.0 #353

Closed kalohimal closed 11 months ago

kalohimal commented 11 months ago

It seems that there is a problem transferring files from Teraterm to ROMWBW's CP/M2.2 using XM.COM (and XModem in Teraterm). I was using the SC130 z180 board. With ROMWBW v3.0/v3.0.1 it is working flawlessly, but when upgraded the ROM to v3.2.1 it no longer worked and hung at packet #1, and eventually it would timeout (or aborted with ctrl-x). Tried v.3.2.0 and same problem. Tried v3.2.1 with S Cousins' SC791 (RCZ80) with an ACIA serial board, same thing.

v3.2.1: Hung at first packet romwbw01

v3.0.1: Ok romwbw02

wwarthen commented 11 months ago

So, I have tried to replicate this, but it is working fine for me. I am using an SC130 that I think is configured the same as yours. I used the ROM from the v3.2.1 distribution. My transfer results are below. I will think about this a bit more, but I don't have an immediate explanation.

RomWBW HBIOS v3.2.1, 2023-04-14

Small Computer SC130 [SCZ180_sc130] Z8S180-K @ 18.432MHz IO=0xC0
0 MEM W/S, 2 I/O W/S, INT MODE 2, Z180 MMU
512KB ROM, 512KB RAM
ROM VERIFY: 00 00 00 00 PASS

AY: MODE=RCZ180 IO=0x68 NOT PRESENT
ASCI0: IO=0xC0 ASCI MODE=115200,8,N,1
ASCI1: IO=0xC1 ASCI MODE=115200,8,N,1
DSRTC: MODE=STD IO=0x0C NOT PRESENT
INTRTC: Wed 2020-01-01 00:00:00
MD: UNITS=2 ROMDISK=384KB RAMDISK=256KB
FD: MODE=RCWDC IO=0x50 NOT PRESENT
IDE: IO=0x10 MODE=RC
IDE0: NO MEDIA
IDE1: NO MEDIA
PPIDE: IO=0x20 PPI NOT PRESENT
SD: MODE=SC OPR=0x0C CNTR=0xCA TRDR=0xCB DEVICES=1
SD0: SDHC NAME=00000 BLOCKS=0x00EB3800 SIZE=7527MB

Unit        Device      Type              Capacity/Mode
----------  ----------  ----------------  --------------------
Char 0      ASCI0:      RS-232            115200,8,N,1
Char 1      ASCI1:      RS-232            115200,8,N,1
Disk 0      MD0:        RAM Disk          256KB,LBA
Disk 1      MD1:        ROM Disk          384KB,LBA
Disk 2      IDE0:       Hard Disk         --
Disk 3      IDE1:       Hard Disk         --
Disk 4      SD0:        SD Card           7527MB,LBA

Small Computer SC130 [SCZ180_sc130] Boot Loader

Boot [H=Help]: c

Loading CP/M 2.2...

CBIOS v3.2.1 [WBW]

Configuring Drives...

        A:=MD0:0
        B:=MD1:0
        C:=SD0:0
        D:=SD0:1
        E:=SD0:2
        F:=SD0:3
        G:=SD0:4
        H:=SD0:5
        I:=SD0:6
        J:=SD0:7

        1513 Disk Buffer Bytes Free

CP/M-80 v2.2, 54.0K TPA

B>a:
A>b:xm r 2048.com

XMODEM v12.5 - 07/13/86
RomWBW, 30-May-2020 [WBW], HBIOS FastPath on COM0

Receiving: A0:2048.COM
248k available for uploads
File open - ready to receive
To cancel: Ctrl-X, pause, Ctrl-X

Thanks for the upload

A>
kalohimal commented 11 months ago

Thanks for the quick response Wayne. Today I tried lowering the baud rate to 9600 and 57600 and it works. Set it back to 115200 and it fails again. Seems it's related to the 115200 baud rate. romwbw03

wwarthen commented 11 months ago

Well, I'm glad it is working to some extent. The need to reduce the baud rate as you have implies that flow control is not working properly. The Z180 can keep up with 57600 baud with no flow control. It cannot at 115200 baud.

What perplexes me is that you are able to achieve 115200 baud using prior versions of RomWBW. That would indicate flow control is working OK.

Flow control is always enabled for the Z180 ASCI ports in RomWBW in the software driver (unless you create a custom ROM and disable interrupts). However, many people have had problems getting full end-to-end hardware flow control working because of vagaries in the USB-Serial adapters and/or settings on the host side. Are you sure that everything else is the same when you run prior versions of RomWBW?

Thanks,

Wayne

kalohimal commented 11 months ago

Ok that nails it. Once flow control is set to RTS/CTS, the transfer completed successfully. I remember reading in the User Guide that the line setting is 115200,8,n,1 with no flow control, so that setting was used all along. I had tried with v3.0/3.0.1 again, and it turns out that XM works with flow control set to none under v3.0/3.0.1, while 3.2.0 and above requires RTS/CTS.

Thank you very much for your help, really appreciate it.

wwarthen commented 11 months ago

OK, glad this is resolved. I admit that I don't understand how 115,200 baud worked for you in v3.0, but I don't think it is worth pursuing.

Thanks,

Wayne