Dragon <-> PC serial cable
Dragon <-> PC serial cable
I'm interested in constructing a "NULL modem" serial cable for my Dragon to talk to my PC. The primary use would be for console-style access to a custom monitor program for remote software development on a PC.
The Dragon serial pinouts list DTR (but no DSR) and CTS (but no RTS). How does existing Dragon software (including BASIC) use these signals?
Has anyone else built such a cable? Did you simply ignore the flow control signals? Or fake them somehow? Or...?
The Dragon serial pinouts list DTR (but no DSR) and CTS (but no RTS). How does existing Dragon software (including BASIC) use these signals?
Has anyone else built such a cable? Did you simply ignore the flow control signals? Or fake them somehow? Or...?
- rolfmichelsen
- Posts: 299
- Joined: Wed Apr 08, 2009 8:43 pm
- Location: Oslo, Norway
- Contact:
Re: Dragon <-> PC serial cable
I have made a cable to connect a Dragon to a PC. I connected the Dragon DTR signal to both the DSR and CTS signal on the PC end. Dragon CTS was connected to PC RTS. With this setup it is straight forward to use CTS/RTS flow control on the PC and it usually works "as expected" on the Dragon.
-- Rolf
-- Rolf
Re: Dragon <-> PC serial cable
As far as I'm aware, the only information ever published about the Dragon 64's Serial port is on pages 335 to 339 of Inside The Dragon, and pages 4 to 6 of the Dragon 64 supplement.
Re: Dragon <-> PC serial cable
There is a routine at $BF20 which seems to have something to do with serial I/0. It is activated in 32K mode only when you use the pokes to enable keyboard-auto-repeat. The same routine can be activated/deactivated by entering the RKEYS command if you are using Steve Woolham's enhanced Dragon ROMs v3.1.
Code: Select all
BF20 F6FF05 LDB $FF05
BF23 2A0D BPL $BF32
BF25 C408 ANDB #$08
BF27 2708 BEQ $BF31
BF29 B6FF06 LDA $FF06
BF2C 84FE ANDA #$FE
BF2E B7FF06 STA $FF06
BF31 3B RTI
Last edited by zephyr on Sun Feb 17, 2013 2:47 am, edited 1 time in total.
- rolfmichelsen
- Posts: 299
- Joined: Wed Apr 08, 2009 8:43 pm
- Location: Oslo, Norway
- Contact:
Re: Dragon <-> PC serial cable
It is also tremendously useful to have a copy of the datasheet for the ACIA chip handy when doing any serial port programming. As far as I can tell, all Dragon 64s are fitted with a Synertec SY6551 ACIA chip. I can scan and post the datasheet if there is any interest. I believe that there used to be a bunch of datasheets somewhere in the wiki, but I wasn't able to find them right now...zephyr wrote:As far as I'm aware, the only information ever published about the Dragon 64's Serial port is on pages 335 to 339 of Inside The Dragon, and pages 4 to 6 of the Dragon 64 supplement.
-- Rolf
Re: Dragon <-> PC serial cable
Thanks for the quick response! That cable hook-up sounds reasonable to me. I just wondered if anyone else had done that -- now I know!
- heavyfranz
- Posts: 6
- Joined: Sun Sep 01, 2013 10:37 am
- Location: Italy
Re: Dragon <-> PC serial cable
Hello!
I'm using ROM routine to receive data, @802A, and @802D for sending. Do you know how these routine works? Maybe they don't program ACIA to set or sense flow control pins....?
Does DLOAD/DLOADM use flow control surely, instead?
Any advice using Dragon64's serial port?
PS: I've the rockwell 6551 datasheet, I think it's pin compatible with synertech, I could post it if needed
I'm using ROM routine to receive data, @802A, and @802D for sending. Do you know how these routine works? Maybe they don't program ACIA to set or sense flow control pins....?
Does DLOAD/DLOADM use flow control surely, instead?
Any advice using Dragon64's serial port?
PS: I've the rockwell 6551 datasheet, I think it's pin compatible with synertech, I could post it if needed
- rolfmichelsen
- Posts: 299
- Joined: Wed Apr 08, 2009 8:43 pm
- Location: Oslo, Norway
- Contact:
Re: Dragon <-> PC serial cable
Have you used SERSET ($8030) to initialise the serial port? See Appendix 5.2 in Inside the Dragon for details. SERSET sets a specified baud rate (based on the value in the B register), default tranmission format and enables flow control based on the Dragon DTR and CTS signals. With the null-modem cable described earlier in this thread, this works well with RTS/CTS flow control on the connected PC. I have some working assembly code that I can share if you're interested.
-- Rolf
-- Rolf
- heavyfranz
- Posts: 6
- Joined: Sun Sep 01, 2013 10:37 am
- Location: Italy
Re: Dragon <-> PC serial cable
I've re-checked my cable (wrong connection...I've in mind the other null modem connections and I made a mess connecting DCD...sssshhhh!) now it works, so Rom routine use hardware flow control, interesting. Anyway I've not used SERSET, I'm using default speed at 1200baud.
I've re-read your reply, I thought that calling that sub was optional (only if you want to change baudrate)!
I'm very curious so if you could post it I will gladly study your code. I've to fix mine, with a certain amount < 255 of char a new execution of the program is impossible, but maybe I'm going off topic.
I've re-read your reply, I thought that calling that sub was optional (only if you want to change baudrate)!
I'm very curious so if you could post it I will gladly study your code. I've to fix mine, with a certain amount < 255 of char a new execution of the program is impossible, but maybe I'm going off topic.
- rolfmichelsen
- Posts: 299
- Joined: Wed Apr 08, 2009 8:43 pm
- Location: Oslo, Norway
- Contact:
Re: Dragon <-> PC serial cable
Somewhat inspired by the resurrection of this thread, I already created a GitHub repository for it. Currently, this repository only contains VDKDUMP, a program that reads a DragonDos diskette and dumps it to the serial port in the VDK virtual diskette format. The program is really small and the code for writing to the serial port is easy to pick out. This program does not read from the serial port. You can find a binary distribution of VDKDUMP in this post.
If you're not satisfied with how the SERSET subroutine configures the serial port, you can also just write to the ACIA registers. This will also permit you to get a higher baud-rate than what SERSET supports. The 6551 data sheet contains the necessary information. And yes, the Rockwell and Synertec 6551 chips are compatible.
-- Rolf
If you're not satisfied with how the SERSET subroutine configures the serial port, you can also just write to the ACIA registers. This will also permit you to get a higher baud-rate than what SERSET supports. The 6551 data sheet contains the necessary information. And yes, the Rockwell and Synertec 6551 chips are compatible.
-- Rolf