APPLICATIONSDIVERS ★ Screen Dump for Epson v2 ★

Screen Dump for Epson v2 (Business Computing with the Amstrad)Applications Divers
★ Ce texte vous est présenté dans sa version originale ★ 
 ★ This text is presented to you in its original version ★ 
 ★ Este texto se presenta en su versión original ★ 
 ★ Dieser Text wird in seiner Originalfassung präsentiert ★ 

ROLAND WADDILOVE updates his screen dump utility

IN the March 1985 Computing with the Amstrad I showed how the screen could be dumped to the printer enabling a hard copy of both text and graphics to be produced. I must admit it is a bit primitive, so I thought it was about time for an update.

The program presented here will produce a large dump - the width of A4 paper and about half as deep - of a Mode 0 or 1 screen. Each pen is represented by different shades of grey. The Mode 0 dump is in 16 shades and the Mode 1 dump is in four shades.

Unfortunately all printers are different and there's no standard for control codes, so I can guarantee that the dump won't work on some printers. We use Epson FX-80s here in the office and these are about as standard as you can get.

If your printer is Epson compatible there's a good chance of the program working. If it isn't you'll have to substitute different control codes in the assembly listing. Table I shows the codes used.

Program I is a Basic listing with the machine code stored in data statements. If you run this the code is stored above HIM EM which is moved down to &9FFF.

Program II is an assembly listing of the code. If you've got an assembler you can assemble it to a different address if there's a memory clash with any other utilities.

To produce a normal dump of the screen CALL &A000. This is best for graphs and charts, and draws on a white background. Some pictures will lookbetter if drawn on a black background, so CALL &A000,1 for an inverse dump.

How does the dump work? Well it is actually fairly straightforward.

No doubt you are familiar with Basic's SYMBOL command for defining characters to print to the screen - well we can do the samewith printers.

Whereas SYMBOL requires eight bytes of data and the character defined is eight pixels wide the printer can accept many bytes of data and the character can be the width of the paper.

If the codes 27,76 are sent to the printer it tells it that the following bytes aren't Ascii codes to print, but are bytes of data instead.

It needs to know how many bytes to expect, so if we are going to send n bytes of data we send n MOD 256 followed by n\256 to the printer. Then we can send the data which is printed in a similar manner to a user-defined character.

So if a byte of 65 was subsequently sent we wouldn't see a letter A printed, we would see a pattern of dots corresponding to binary 65 instead, 01000001. By the way, it is actually printed vertically.

At the end of the assembly listing you'll see a block of data. There are 1 6 rows of six bytes, numbered from

0 to 1 5. The dump works by scanning each row of pixels across the screen.

If a pixel colour is pen 0 the six bytes of data in row 0 are sent to the printer. If a pixel is pen 1 the data in row 1 is sent. Pen 2 is row 2, pen 3 is row 3 and so on.

So for each pixel on the screen we send six bytes of data which are then interpreted and printed as a binary pattern.

By altering the data you can alter the pattern printed, hence the shade of grey produced for each pen. Figure

1 shows the data and pattern for pen 15, the last 6 bytes of data in the table.

Since there are 160 pixels across the Mode 0 screen there are 160 x 6 or 960 bytes of data sent per scan. Unfortunately we can't tell the printer to expect 960 MOD 256 + 960\256 bytes of data since 960 MOD 256 is 192 and the Amstrad chops off bit 7, sending 64 instead.

Therefore each row of pixels is split in two so that the number of items of data to send in either section MOD 256 is less than 128. This is why you'll see the printer print about 2/3 of the row, pause slightly and then print the rest.

Since only one row of pixels is scanned at a time the paper feed is reduced so that there aren't any gaps left between lines.

A Mode 1 dump is almost identical to a Mode 0 dump, so the routine looks to see what mode it's in and then modifies itself accordingly.

A mode 2 dump is pretty similar, so I'll leave that up to you.

BCWTA

★ PUBLISHER: Business Computing With The Amstrad
★ YEAR: 1988
★ CONFIG: 64K + AMSDOS
★ LANGUAGE:
★ LiCENCE: LISTING
★ AUTHOR: ROLAND WADDILOVE
 

★ AMSTRAD CPC ★ DOWNLOAD ★

Type-in/Listing:
» Screen  Dump  for  Epson  v2    (Computing  with  the  Amstrad)    LISTINGDATE: 2018-03-20
DL: 251
TYPE: PDF
SiZE: 275Ko
NOTE: 2 pages/PDFlib v1.6

Je participe au site:
» Pour ce titre nous ne disposons de fichier executable sur CPC (Dump, Saisie du listing) , alors si vous avez ça dans vos cartons ou vous désirez usé vos petit doigts boudinés sur votre clavier faites le nous savoir.
» Vous avez des infos personnel ?
» Vous avez remarqué une erreur dans ce texte ?
» Aidez-nous à améliorer cette page : en nous contactant via le forum ou par email.

CPCrulez[Content Management System] v8.7-desktop/c
Page créée en 259 millisecondes et consultée 1437 fois

L'Amstrad CPC est une machine 8 bits à base d'un Z80 à 4MHz. Le premier de la gamme fut le CPC 464 en 1984, équipé d'un lecteur de cassettes intégré il se plaçait en concurrent  du Commodore C64 beaucoup plus compliqué à utiliser et plus cher. Ce fut un réel succès et sorti cette même années le CPC 664 équipé d'un lecteur de disquettes trois pouces intégré. Sa vie fut de courte durée puisqu'en 1985 il fut remplacé par le CPC 6128 qui était plus compact, plus soigné et surtout qui avait 128Ko de RAM au lieu de 64Ko.