|Re: [hatari-devel] Problem with printer output?|
[ Thread Index |
| More lists.tuxfamily.org/hatari-devel Archives
On Wednesday 08 February 2012 13:55, Eero Tamminen wrote:
> On lauantai 04 helmikuu 2012, Matthias Arndt wrote:
> > The printer.c file is probably still of Winston heritage. I didn'T touch
> > it back then, only replaced some few lines to make it Unix and libc
> > compatible. Feel free to change anything to make it more compatible and
> > sane.
> Either there shouldn't be buffering at all, like with midi.c,
> or if it should be buffered, I would prefer relying on C-lib
> and removing the manual buffered. See the attached (non-tested)
> I'm not sure what's the point in closing the printer file if
> there hasn't been any printing for 4s. Does anybody know why
> it does that?
Thomas and I did a few things to the printer a few years ago.
I did not care for the buffering, but said nothing because:
1) It really didn't matter then.
2) The printer interface IS a printer emulator (with buffer).
I would prefer instant output like MIDI has. Furthermore,
the port could be improved to transmit data whenever
the port is Addressed (non Centronics) in addition to
> > > In TOS v2, running MINIMAL.PRG didn't result in any
> > > Printer_TransferByteTo() calls, but "Print screen" did.
> > >
> > > On the listed working TOS versions, MINIMAL.PRG running results
> > > in Printer_TransferByteTo() calls though.
> > >
> > > When I printed in psg.c, the PORTA value, during the printing...
> > >
> > >[...]
> > >
> > > I.e. the bits 0x4 and 0x2 are being toggled, although the code checks
> > > for bit 0x20 being toggled:
> > >  TOS Print screen gives same PORTA output as I get for Fwrites
> > > to PRN: in the working TOS versions.
> > >
> > > Any idea what's wrong?
> > Not really. Back then I simply asume as soon as the STROBE is set, a
> > byte needs to be send to the printer. If that is wrong, ofocurse the
> > whole thing was whacky from the first commit. I never claimed it was a
> > perfect 100% solution, just a hack, that worked for the time being.
> Does somebody have a real Atari machine with TOS v1.02 - v2.06
> *and* a printer, and if yes, could you try whether booting with
> the attached floppy disk contents produces any printer output?
>  which just has minimal.prg + small test text in auto/ folder.
I tested with TOS 2.06 UK and Hatari 1.6.1:
1) I had to put TEXT into the AUTO folder with MINIMAL.PRG because
MINIMAL.PRG otherwise does not find TEXT.
2) The disk doesn't create a print file when booting. HOWEVER, the
print file IS created if I manually run MINIMAL.PRG
I think there is a conflict between real tos and patched bios/gemdos.
Maybe some real tos variable is not as expected.
I don't have the appropriate real ST to test with.
> - Eero