@@ -11,43 +11,84 @@ Issues
1111------
12121) Baud rates are not very accurate.
13132) No hardware flow control other than RxF and TxE signals
14-
15- Todo
16- ----
17- > Means to unload DLL when Vcc exits / crashes
18- > Proper detection of serial port "modem" events when reading:
19- Break, ring, CTS, DSR, RX and DX changes, etc.
20- > Implement DCD DSR flow control.
14+ 3) DLL does not exit if Vcc crashes. (Issue with all Vcc Dll's)
15+ 4) No detection of serial port "modem" events when reading:
16+ Break, ring, CTS, DSR, RX and DX changes, etc.
2117
2218Would be nice
2319-------------
24201) Support for second sc6551 device
2521
26- Acia Quick tutorial
27- -------------------
28-
29- To use acia.dll insert it in the cartridge slot or a MPI slot. This
30- will cause "Acia Config" to be added to the Cartridge menu. Clicking
31- on it allows selection of the acia communication modes: Console,
32- File read, File write, TCPIP (client), and COMx (PC serial port). The
33- Name and Port fields are used to set parameters for the modes. A
34- text mode check box when checked causes acia.dll to do CR <-> CRLF
35- translations when in file modes.
36-
37- The sc6551 emulation is controlled by four port addresses, 0xFF68
38- thru 0xFF6B. The CPU controls the sc6551 by writing to these
39- addresses and gets status and data from the sc6551 by reading them.
40- A sc6551 datasheet will explain these in detail - what follows is
22+ Acia Quick Start
23+ ----------------
24+ To use acia.dll insert it in the cartridge slot or a MPI slot.
25+ This will cause "Acia Config" to be added to the Cartridge menu.
26+ Clicking on this menu item allows selection of one of the acia
27+ modes: Console, File read, File write, TCPIP (client), and COMx.
28+ The Name and Port fields are used to set parameters for modes
29+ that require them. The text mode check box when checked causes
30+ acia.dll to do CR <-> CRLF translations when using the file
31+ read and write modes. The default mode is CONSOLE.
32+
33+ For a quick test leave the ACIA config mode set to console
34+ and enter and run the following basic program. (You can cut
35+ and paste using Vcc Edit -> Paste Basic Code)
36+
37+ 10 POKE &HFF6A,1
38+ 20 IF (PEEK(&HFF69) AND 8)=0 THEN 20
39+ 30 PRINT CHR$(PEEK(&HFF68));
40+ 40 GOTO20
41+
42+ The Vcc console should come up. The console is a CMD type window
43+ that is connected to the ACIA. Anything typed in the console
44+ will be read and printed by the basic program. To close the
45+ console POKE &FF6A,0 or press F5 from the Vcc window.
46+
47+ The following program does the opposite, characters typed in the
48+ Vcc window are written to the console and CR writes CRLF:
49+
50+ 10 POKE &HFF6A,1
51+ 20 K$=INKEY$: IF K$="" THEN 20
52+ 30 C=ASC(K$)
53+ 40 IF (PEEK(&HFF69) AND 16)=0 THEN 40
54+ 50 POKE &HFF68,C
55+ 60 IF C<>13 THEN 20
56+ 70 C=10: GOTO 40
57+
58+ Console mode is most useful when using Os9 which is described later.
59+
60+ Radio Shack Deluxe RS232 program Pak
61+ -------------------------------------
62+
63+ If the file "rs232.rom" is in the Vcc execution directory it will
64+ be automatically loaded when acia.dll is selected but not started.
65+ To start it do "EXEC &HE010" from RSDOS command prompt. The rom
66+ is a copy of the 4K rom from the Radio Shack Deluxe RS232 program
67+ Pack. If a different ROM is used it must be 4096 bytes long. Note
68+ that if acia.dll is in a MPI slot but not selected it can still be
69+ used but the pack rom will not be accessible. To exec the rom
70+ type EXEC&HE010 at the basic prompt. Note that the pak currently
71+ has trouble with the "goto basic" function on Vcc which limits its
72+ usefulness. Suggestions for a solution would be appreciated.
73+
74+ SC6551 Operation
75+ ----------------
76+
77+ The sc6551 emulation is controlled one of two blocks of port addresses,
78+ 0xFF68-0xFF6B or 0xFF68-0xFF6F, the block used is selected by a Acia
79+ config dialog Radio button. The CPU controls the sc6551 by writing
80+ to these addresses and gets status and data from the sc6551 by reading
81+ them. A sc6551 datasheet will explain these in detail - what follows is
4182a brief explaination of the most important bits to acia.dll.
4283
43- 0xFF68 is the data register. A write to the address will transmit
84+ 0xFF68 (0xFF6C) is the data register. A write to the address will transmit
4485a byte of data and a read will receive a byte of data.
4586
46- 0xFF69 is the status byte. The CPU reads this port to determine
87+ 0xFF69 (0xFF6D) is the status byte. The CPU reads this port to determine
4788the status of the sc6551. Bits 0, 1, and 2 of the status byte are
48- unused error indicators. Bit 3 indicates that a data byte is ready
49- to read. Bit 4 indicates that the sc6551 is ready to transmit a byte.
50- Bits 5 and 6 are modem and data set ready bits, and Bit 7 indicates the
89+ error indicators. Bit 3 indicates that a data byte is ready to read.
90+ Bit 4 indicates that the sc6551 is ready to transmit a byte. Bits
91+ 5 and 6 are modem and data set ready bits, and Bit 7 indicates the
5192sc6551 has asserted and IRQ. Acia.dll does not set the error bits and
5293bits 5 and 6 are always clear to indicate mode and data ready states.
5394
@@ -57,16 +98,16 @@ writing to the data register, and when it wants to recieve data it must
5798first check that bit 3 (RxF) is set before reading the data register.
5899
59100Acia.dll will assert an IRQ and set status bit 7 when data becomes ready
60- to read if Bit 1 of the command register (0xFF6A) is clear. The coco can
101+ to read if Bit 1 of the command register (0xFF6A (0xFF6E) ) is clear. The coco can
61102use the interrupt to reduce input polling.
62103
63- 0xFF6A is the command register. Bit 0 of the command register is the
104+ 0xFF6A (0xFF6E) is the command register. Bit 0 of the command register is the
64105DTR bit. This bit enables or disables the sc6551. If this bit is set
65106by the coco CPU then communications are active (open) and if it is
66107cleared communications are inactive (closed). Other command register
67108bits set IRQ behavior and parity. Refer to data sheet for details.
68109
69- 0xFF6B is the control register. Bits 0-3 of the control register set
110+ 0xFF6B (0xFF6F) is the control register. Bits 0-3 of the control register set
70111the baud rate according to the following table. Datasheet rates that
71112are not supported by acia.dll have replaced by the next higher value.
72113Acia.dll uses screen sync signal to time the input speeds. These
@@ -83,7 +124,7 @@ the rates are invalid.
83124 6 300 14 9600
84125 7 600 15 19200
85126
86- Bits 5 and 6 of 0xFF6B set the data length and Bit 7 sets the number
127+ Bits 5 and 6 of 0xFF6B (0xFF6F) set the data length and Bit 7 sets the number
87128of stop bits. B5-6: 00=8 01=7 10=6 11=5 len. B7 0=1, 1=2 stops.
88129
89130Basic programs can enable acia by poking 1 to &HFF6A and disable it by
@@ -122,11 +163,13 @@ RS232.ROM
122163
123164If the file "rs232.rom" is in the Vcc execution directory it will
124165be automatically loaded when acia.dll is selected but not started.
166+ (make sure Autostart Cart in Misc Config dialog is unchecked)
125167To start it do "EXEC &HE010" from RSDOS command prompt. The rom
126168is a copy of the 4K rom from the Radio Shack Deluxe RS232 program
127- Pack. If a different ROM is used it must be 4096 bytes long. Note
128- that if acia.dll is in a MPI slot but not selected it can still be
129- used but the pack rom will not be accessible.
169+ Pack. The RS232 rom is only usefull if FF68 (RS-232 Pak) is selected
170+ in the config dialog. If a different ROM is used it must be 4096
171+ bytes long. Note that if acia.dll is in a MPI slot but not selected
172+ it can still be used but the pack rom will not be accessible.
130173
131174Communications Modes
132175--------------------
@@ -154,6 +197,7 @@ Console mode can be useful when using (Nitr)Os9 and the t2 device
154197and associated sc6551 driver. t2 and sc6551 must both be loaded at
155198boot (in the boot track) to work properly. The t2 device can also
156199be used for testing purposes, which is why it was originally created.
200+ Note that the stock t2 driver assumes the Acia Address is FF68.
157201
158202Caution: There can only be one console associated with Vcc. Conflicts
159203will occur is the console is used for other purposes, such as for
@@ -169,10 +213,10 @@ quit=05 bse=08 bell=07 type=80 baud=06 xon=11 xoff=13
169213Some of these settings are not honored by the sc6551 driver.
170214Xon, Xoff, and baud xmode settings seem to have no effect.
171215
172- The basic idea is to match standard text window settings. Acia.dll
173- will translate OS9 text screen control codes to the proper console
174- functions. Colors default to white on black. Only colors 0-7 are
175- supported.
216+ The console uses standard OS9 text window settings. Acia.dll
217+ will translate many OS9 text screen control codes to do the
218+ proper console functions. Colors default to white on black.
219+ Only colors 0-7 are supported.
176220
177221To launch a shell simply do: shell i=/t2 and the console
178222will come up. Typing "ex" in the console window causes the
@@ -210,6 +254,7 @@ I did a brief check of uemacs. It seems to work okay except I find
210254the lack of support of arrow keys annoying and I am too used to
211255vi's use of hjkl for cursor position to adapt to emacs.
212256
257+
213258File Read and File Write Modes
214259------------------------------
215260
@@ -245,7 +290,7 @@ output in a os9 file and copy that to /t2, for example:
245290When using other programs to read or write files it is important
246291to note that setting DTR opens the file and clearing DTR closes
247292it. The NitrOS9 driver takes care of this but many terminal
248- programs do not. DTR is controlled by bit 0 in 0xFF6A.
293+ programs do not. DTR is controlled by bit 0 in 0xFF6A (0xFF6E) .
249294
250295TCPIP Mode
251296----------
@@ -254,7 +299,7 @@ TCPIP mode causes acia to do a client connection to a tcpip server.
254299After selecting TCPIP radio button on the Acia config dialog the
255300server hostname or IP address should be entered in the Name field
256301(default is localhost) and the server port in the Port field. Setting
257- bit 0 in 0xFF6A opens the connection and clearing it closes it.
302+ bit 0 in 0xFF6A (0xFF6E) opens the connection and clearing it closes it.
258303
259304Testing tcpip mode was done using netcat on Linux as a server.
260305On Linux ' nc -l -p 48000' 48000 is the port number I am using.
@@ -279,6 +324,5 @@ in windows along with putty. com0com is used to 'wire' two psuedo
279324port COM20 and COM21 together. I used acia.dll to connect to COM20
280325and PuTTy to connect to COM21. This allowed me to simulate connecting
281326with a terminal. Also tested with a USRobotics faxmodem via a Radio
282- Shack USB to serial adapter and the legacy USBSER driver, which was a
283- PIA to setup in Windows 10.
327+ Shack USB to serial adapter and the legacy USBSER driver.
284328
0 commit comments