Viewing Issue Advanced Details
ID Category [?] Severity [?] Reproducibility Date Submitted Last Update
07828 Core Minor Always Dec 24, 2020, 02:51 Jan 10, 2021, 04:41
Tester star2root View Status Public Platform MAME (Self-compiled)
Assigned To Resolution Open OS MacOS X
Status [?] Acknowledged Driver coco12.cpp
Version 0.224 Fixed in Version Build 64-bit
Fixed in Git Commit Github Pull Request #
Summary MESS-specific 07828: coco, coco2, coco2b, coco3: Printing to the 4 pin serial port not working.
Description Any attempt to print to the bit banger port fails. OS9/NitrOS9 gives error 246, device not ready. BASIC simply hangs.
Steps To Reproduce Setup a printout file, type in a short BASIC program and type:
Additional Information It seems that the input line (FF22 bit 0) is getting enabled to indicate that the printer is offline. This functionality was working some where around version 0.199.
Github Commit
Flags Verified with Original
Regression Version 0.199
Affected Sets / Systems coco, coco2, coco2b, coco3
Attached Files
There are no relationship linked to this issue.
User avatar
Dec 24, 2020, 19:49
edited on: Dec 24, 2020, 20:37
I removed the code in the OS9 scbbp bit banger printer device driver that checks for the input signal and was able to print, so the problem is definitely that the serial 4 pin input is being set in MAME. Suffice to say, the original OS9 code woks fine on a real CoCo without removing the input pin check.
User avatar
Dec 24, 2020, 20:41
Notes on the CoCo 4 pin serial port:

Note that pins of connector are not always used the same way! This is possible because most
everything is done in software; pins 1 and 2 are required by the hardware to be inputs, but it is up to
the program to decide how to use those inputs. While any sort of communications program should
use the RS-232 pin-out, the built-in BASIC printer routines use pin 2 (RS232 input) as "printer status" and
completely ignores pin 1. So the cable you wire up for a printer has to be different from the one you
wire up for a modem.
User avatar
Dec 24, 2020, 22:21
On my real CoCo 3, PRINT HEX$(PEEK(&HFF22)) returns a 4, bit 0 is clear, and LLIST does not hang. On MAME, PRINT HEX$(PEEK(&HFF22)) returns a 5, and LLIST hangs if any BASIC program is present to list.
User avatar
Dec 24, 2020, 23:33
Color BASIC requires the RX pin low to print to a printer. OS-9 is the same. All Radio Shack printers did this, so there was never a problem on real hardware.

In MAME, the printer image device doesn't do this. I've been meaning to add a configuration for this mode, but have never gotten around to it..
User avatar
Dec 25, 2020, 06:34
Where and how is the best way to force this line to default to low. I checked my real CoCo 3 (I haven't checked the CoCo 1 yet, but I expect the same behavior) and the input line defaults to low when nothing is connected. If MAME is supposed to emulate the hardware, then the default state of this bit (bit 0, FF22) should be zero.
User avatar
Jan 10, 2021, 04:41
I've submitted a PR to emulate this small aspect of Radio Shack printers.