oliverschmidt/cc65 — pull request #64 by groessler (2013-12-06 20:12:15+00:00)
Title: Serial driver for Atari

Here's a serial driver for the Ataris, using the R: device.

Despite my complaints on the mailing list, this is a loadable driver. Just to get it going. I intend to change it into a static driver sometime in the future.

I touched some non-Atari code:

- add new status code SER_ERR_NOT_OPEN if 'put' or 'get' were called without a prior 'open'
- add new baud rate define for 56.875
- changed the baud rate in the ser-test.c program from 19200 to 9600 since Atari doens't support 19200

I've some questions/remarks about the serial interface:

- why aren't the baud rate defines target specific? If they were, we could get rid of the runtime testing and translation of the baud rate. Same for the other defines (word length, stop bits, etc.)
- how can I support more than one serial device. The 850 serial interface for the Atari has 4 ports (the driver only uses port 1) and probably one could install more than one serial card in an Apple.

Maybe these questions are more appropriate on the mailing list?