Personal Computer News


Screen Dump

 
Published in Personal Computer News #079

Producing stunning graphics on the Commodore 64 is easy enough, but what do you do with them when they're finished? Simon Taylor's program lets you print them out to keep for posterity.

Printer Pattern

Producing stunning graphics on the Commodore 64 is easy enough, but what do you do with them when they're finished? Simon Taylor's program lets you print them out to keep for posterity

Some time ago I bought a Koala graphics pad. This allows you to produce good high-resolution graphic displays, but they (and displays produced by other means) can't easily be printed out. With a little thought, however, it is possible to write a routine that will enable you to print out your creations.

I use an Epson printer, but the routine presented here can be made to work on most other Japanese printers, as most manufacturers now use the Epson control codes as standard.

The main problem involved in producing a high-resolution dump on the Commodore 64 lies in the way graphics are stored in memory. Each byte displays eight pixels of data, but memory is allocated in a similar manner to the way characters are stored on screen. Each character position has eight bytes of equivalent high-resolution memory as shown in Table 1.

The problem with this method of storage is that the printer requires the pixels to be sent in a vertical form as the print-head travels across the paper. The routine 'Rotate' solves this problem. All the software for handling the Centronics port is included in the program.

Using The Program

Enter the program using either an assembler or the Basic loader given here. The routine is located at $C000 (49152 decimal), which means no memory is lost when using Basic.

To operate the program, simply POKE location 251 with the start address of the high-resolution screen divided by 256, so if, for example, the high-resolution screen starts at $6000 (24576) the value to POKE will be 24576/256 = 96.

Then you should POKE 252 with the number of spaces by which you wish the picture to be offset towards the centre of the page (15 is dead centre). This value should be between 1 and 30. Call the routine with a SYS 49152 (the start of the program), and the printer will dump your high-resolution screen to the printer.

Simon Taylor