taylorza / zxn-wifiprn

Wifi Printer Driver for the ZX Spectrum Next
MIT License
14 stars 0 forks source link

Extra linefeeds when printing form CP/M #2

Closed m0jek closed 1 month ago

m0jek commented 1 month ago

I have noticed that extra linefeeds are printed when printing from CP/M through zxn-wifiprn.

taylorza commented 1 month ago

I was never able to print using the printer driver from CP/M however, I have not tested that on the latest releases, I will build a new image and test that as soon as possible.

taylorza commented 1 month ago

@m0jek, I think I know what is going on here.

I created a file in CP/M and then dumped the file and I see CP/M is using CR+LF as a line end. Files on the Next end the lines with CR. Since the printer expects CR+LF, I am automatically adding an LF when the driver receives a CR. Net result, on CP/M the printer is receiving CR+LF+LF.

I will add an option to enable/disable CR translation.

m0jek commented 1 month ago

Hi, Yes I was looking at the assembler lastnight and saw that. Was thinking the same 😉

taylorza commented 1 month ago

The latest release has a new driver option that can be used to disable the automatic translation of CR to CRLF. This should now cover the cases for CP/M.

Use the following command to disable the CR translation

DRIVER 80,2,1

To re-enable the translation

DRIVER 80,2,0
m0jek commented 1 month ago

Thank you, I will try it out tomorrow morning, UK time.

m0jek commented 1 month ago

Hi,

I can confirm the changes work for me too. Thank you for adding the CR translation selection. Much appreciated.

taylorza commented 1 month ago

Great, thanks for reporting the issue!