Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uflorida!gatech!udel!udccvax1!gdtltr From: gdtltr@vax1.acs.udel.EDU (Gary D Duzan) Newsgroups: comp.sys.atari.8bit Subject: Re: Parallel Printer interface Message-ID: <3265@udccvax1.acs.udel.EDU> Date: 8 Apr 89 00:00:00 GMT References: <8904071504.AA22717@ucbvax.Berkeley.EDU> <682@orchid.waterloo.edu> Reply-To: gdtltr@vax1.acs.udel.EDU (Gary D Duzan) Organization: Galadrim (really a disorganization) Lines: 48 In article <682@orchid.waterloo.edu> rbharding@orchid.waterloo.edu (Ron Harding) writes: > > I was wondering about how Atari printer interfaces, or the P: driver handle >conversion of ATASCII to ASCII. It seems to me that if the ATASCII codes such >as EOL (155, $9b) are universally converted to the ASCII codes, such as CR/LF >(13,10 $0d$0a), then important things like dot-matrix graphics will be munged >up. But if they aren't converted, then normal text won't print properly. > > How is this resolved? My theory is the following: > In general, this is handled by the interface. ALL EOL's (155) are translated into CR (13, or CR/LF (13/10), depending on the interface.) This does, in fact, disallow code 155 in any bit-mapped output to the printer. Generally, programs which send bit-mapped data to the printer are required to check for a 155 and either report an error or send it varied slightly (more likely the former.) >- The P: handler will perform conversion of ATASCII to ASCII if the output >command is PUT_RECORD. This command is line-oriented (a record is always >terminated by an ATASCII EOL (155) ). > >- If the output command is a PUT_BYTES, the P: handler performs no conversion >whatsoever, so graphics dumps will work correctly. > > Am I reasonably close to the truth here? I need to know, since I am faced >with the task of writing a P: driver for the parallel port I built for my old- >style 800. Currently, I use a cludgy SpartaDOS program I whipped up: > PPRINT fname.ext > For a general solution, rewriting (or patching) the built-in P: handler to change all 155's to 13's (or 13/10's) would be best. "Mapping the Atari", Codebuster, your favorite assembler, and a good bit of stamina would be all you would really need (assuming a working knowledge of the Atari OS & the 6502.) I would advise against your above suggestions due to possible problems with compatability. Your best bet would be to write a general PUT_BYTE routine that does the conversion and have PUT_RECORD and PUT_BLOCK call PUT_BYTE directly for each character. > Thanks in advance. > > Ron Harding You are certainly welcome. Gary Duzan Time Lord Third Regeneration Atari Enthusiast Extreme