ZX Printer Output

Emulator and emulator development specific topics
Post Reply
butchi
Posts: 38
Joined: Wed Jun 12, 2019 4:12 am

ZX Printer Output

Post by butchi »

Hi,
The ZX81 emulator's 'ZX Printer' output is a BMP image.
Is there any chance that output can be Standard ASCII, instead of an image?
THX!
User avatar
XavSnap
Posts: 1940
Joined: Sat May 10, 2008 4:23 pm
Location: 'Zx81 France' Fb group.

Re: ZX Printer Output

Post by XavSnap »

Hi,

Use the Centronics feature, or MAj+F11 in the 'files' menu in my second favorite emulator.
Xavier ...on the Facebook groupe : "Zx81 France"(fr)
Fruitcake
Posts: 346
Joined: Wed Sep 01, 2010 10:53 pm

Re: ZX Printer Output

Post by Fruitcake »

butchi wrote: Thu May 18, 2023 3:29 pm Hi,
The ZX81 emulator's 'ZX Printer' output is a BMP image.
Is there any chance that output can be Standard ASCII, instead of an image?
THX!
Although this sounds like it should be simple, there are a number of difficulties.

EightyOne could intercept the bytes in the ZX Printer Buffer as they are about to be used by the printer routines in the ROM. It would extract them and convert to ASCII, before appending them to a file. But this means EightyOne would have to be aware of the location of the printer buffer and hence whether running as a ZX81 or Spectrum as the locations are different. If running as a 128K Spectrum then the ZX Printer buffer is only valid in 48 BASIC mode and so EightyOne would have to take this into account also. It would also need to be sure the original ROMs were being used and not a custom ROM which might not use the printer buffer (or at least not at the standard location for it). Even if using a standard ZX81 and Spectrum configuration is being used, a custom printer routine might use its own printer buffer and EightyOne would have no knowledge of. Finally, there are the various clone models - do these all support the ZX Printer and if so are their printer buffers at the same locations or would EightyOne have to have specific knowledge about the various clones....

Perhaps a simpler (but not so nice from a user perspective) solution would be to create a program that takes the printer BMP and OCRs it to extract the text...
User avatar
1024MAK
Posts: 5103
Joined: Mon Sep 26, 2011 10:56 am
Location: Looking forward to summer in Somerset, UK...

Re: ZX Printer Output

Post by 1024MAK »

Although the Spectrum has a fixed memory area for the printer buffer, various programs use the printer buffer to store code or data that is nothing to do with printing…
The 128K BASIC uses the memory area where the printer buffer is supposed to be for extra system variables.

I don’t know if it was ever done, but machine code programs can bypass the ROM printing routines (and hence the printer buffer) and use the IN and OUT instructions to send data to the printer directly.

The Lambda 8300 and clones that are the same, just with a different name, are compatible with the ZX Printer and have the buffer in the same place in RAM. As these store the pixel information in the ULA for display, I’m not sure how they get the pixel information for the printer…

Mark
ZX81 Variations
ZX81 Chip Pin-outs
ZX81 Video Transistor Buffer Amp

:!: Standby alert :!:
There are four lights!
Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb :!:
Looking forward to summer later in the year.
User avatar
mrtinb
Posts: 1906
Joined: Fri Nov 06, 2015 5:44 pm
Location: Denmark
Contact:

Re: ZX Printer Output

Post by mrtinb »

1024MAK wrote: Sun Jun 11, 2023 12:52 pm The Lambda 8300 and clones that are the same, just with a different name, are compatible with the ZX Printer and have the buffer in the same place in RAM. As these store the pixel information in the ULA for display, I’m not sure how they get the pixel information for the printer…
On the Lambda 8300, there is a special I/O port, where you can request bit patterns from the charset inside the ULA. This is quite different from the ZX81.
Martin
https://zx.rtin.be
ZX81, Lambda 8300, Commodore 64, Mac G4 Cube
User avatar
1024MAK
Posts: 5103
Joined: Mon Sep 26, 2011 10:56 am
Location: Looking forward to summer in Somerset, UK...

Re: ZX Printer Output

Post by 1024MAK »

Ah, interesting to know. Thank you.

Mark
ZX81 Variations
ZX81 Chip Pin-outs
ZX81 Video Transistor Buffer Amp

:!: Standby alert :!:
There are four lights!
Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb :!:
Looking forward to summer later in the year.
Post Reply