I have made some improvements to the Diagram Screen Dump Upgrade from EUG #16:
-
The output from this dump on my Panasonic KX-P1081 printer looked slightly distorted, and lower case text was illegible. This was because the line feeds had been halved while the size of the printer head remained the same. This resulted in the lines of print overlapping, producing a distorted effect.
The remedy was to put the line feeds back to normal and instead change the number of pins of the head corresponding to each pixel, from 2 to 1. However, I discovered on EUG #17 that Gus had found an even better solution: change the dot density to make the output fill the whole width of the carriage (8 inches) - then the height of the printout doesn't need to be changed at all! - I have added a routine to allow only part of the screen to be dumped (as required by Diagram). When the source program is run, you should enter the text lines (which run from 0 to 31 down the screen) that correspond to the area needed. Note that the area includes both of the limits you set so if you enter 1 and 2 as the limits, two text lines are printed. For Diagram, you should enter lines 3 and 25 as the start and finish lines respectively.
- I have eliminated the need for a separate file to be saved for each screen mode - the program now reads the screen mode directly each time it is run and returns an error if this is not a graphics mode.
- For most purposes, the output from a screen dump needs to be inverted (so that the blank ink in the printer is used for the foreground, which normally appears white on the screen). The output from this program (as published by the Electron User) was always inverted. However, some pictures such as human faces do require a true output. This is simple enough to add to the program: just EOR all the data with &FF before they are sent to the printer. I added this facility, only to discover that the patterns used by the dump weren't proper inverses at all - for example, yellow was printed more similarly to black than white! Therefore I changed many of the patterns.
- The original program reads the screen using logical colours, not actual colours, hence the requirement for a different version to be saved in each mode. I have added the option of using actual colours instead, so that changing the palette makes a difference to the output. However, this can make an undesirable mess if the background is not black, or you are using a two-colour Mode, so you might prefer to use logical colours.
-
The filename for the code can be chosen.
Some of these changes are of no benefit in Diagram, as it always runs in Mode 0, but they mean that the dump can be used universally, for printing out title screens, etc.
The Diagram v2.0 (as published in EUG #16) will need two minor changes to use the new dump:
-
Change line 800 to:
>800 *UCODE (RETURN)
-
DELETE line 804
>804 (RETURN)
-
Change line 800 to:
Matthew Ford, EUG #18