kamath@reed.UUCP (Sean Kamath) (04/29/86)
Ok. Here's how it goes. I had to put the computer in 80 column mode in order for my interface card not to output a space after a control character. Next, I had to use a machine language sub to output the characters concerning addressing. Applesoft only puts out characters with their high bits set. Then I had to tell my interface card to leave the high bit alone (not set it high). I also had to set the interface cards intercept character to a byte unused in the whole download sequence. That could be tough...For now I use the interface for character output. I might have to write directly to the port... Now you know about what I know... I'll have to talk to C. Itoh again and get some more detailed information. This should be enough to get things going. I should say two things. One, C. Itoh said that it would be silly to try to download characters without a TMM2016 (2K RAM chip) installed, because you'd only have enough room to download one or two characters. Second, the printer has a "transparant" mode, which means it prints out the hex bytes it recieves. This is very handy for debugging, and I couldn't have down it with out it. Almost all printers have it, usually not documented. The Imagewriter has it, as well as the Imagewriter II. The Prowriter and Imagewriter (both by C. Itoh) go into transparant mode when they are turned on with the line feed button held down. The IW2 goes into it when it's turned on with the select button held down.. but anyway, here is a hex dump what the printer should get with this applesoft program. (at least, it's what I got, and it worked:-) Before I go, here's a final note. You should get four downloaded characters, then a lot of black. That's because the rest of the charactes are $FF. Here's the standard mapping: 1 1 2 2 3 4 4 8 5 16 6 32 7 64 8 128 So the third downloaded file looks like this (this is what they gave me): X X X X X X X X 1 O O O O O O O X 2 X X X X X X O X 4 X O O O O X O X 8 X O X O O X O X 16 X O X X X X O X 32 X O O O O O O X 64 X X X X X X X X 128 X=1=DOT O=0=NO DOT Value of row simple huh? this is what I got when I put the printer in transparant mode and ran the program: 8D 8A 8D 8A 1B 5E 70 70 70 74 0E 7F FF 00 1B 5E 7F E0 7F F8 41 22 14 08 08 08 08 08 FF 83 85 89 91 A1 C1 FF FD 85 B5 A5 A5 BD 81 FF 1B 5E 70 85 70 89 00 00 E1 7E 8D 8A 9B A4 8D 8A --XX C4 CF D7 CE CC CF C1 C4 A0 C3 C8 C1 D2 C1 C3 D4 C5 D2 A0 D3 C5 D4 8D 8A 9B A7 8D 8A 20 21 22 23 24 25 26 27 28 29 2A 2B 2C 2D 2E 2F 30 31 32 33 34 35 36 37 38 39 3A 3B 3C 3D 3E 3F 40 41 42 43 44 45 46 47 48 49 4A 4B 4C 4D 4E 4F 50 51 52 53 54 55 56 57 58 59 5A 5B 5C 5D 5E 5F 60 61 62 63 64 65 66 67 68 69 6A 6B 6C 6D 6E 6F 70 71 72 73 74 75 76 77 78 79 7A 7B 7C 7D 7E 9B A4 8D 8A CE CF D2 CD C1 CC A0 C3 C8 C1 D2 C1 C3 D4 C5 D2 A0 D3 C5 D4 8D 8A 20 21 22 23 24 25 26 27 28 29 2A 2B 2C 2D 2E 2F 30 31 32 33 34 35 36 37 38 39 3A 3B 3C 3D 3E 3F 40 41 42 43 44 45 46 47 48 49 4A 4B 4C 4D 4E 4F 50 51 52 53 54 55 56 57 58 59 5A 5B 5C 5D 5E 5F 60 61 62 63 64 65 66 67 68 69 6A 6B 6C 6D 6E 6F 70 71 72 73 74 75 76 77 78 79 7A 7C 7D 7E 8D 8A that's it. It really doesn't matter after the --XX as that is simply there to display the total character set. Have fun. It took me two days and half a ream of paper...sigh Sean Kamath ihnp4,decvax,ucbcad,teneron!tektronix!reed!kamath -----Cut----Cut----Cut----Cut----Cut----Cut----Cut----Cut----Cut----Cut---- 0 PRINT : PRINT : PRINT CHR$ (4);"PR#3" 1 REM FIRST A MACHINE LANGUAGE PROGRAM TO OUTPUT CHARACTER 2 REM UNTOUCHED BY APPLESLOTH 4 INPUT A: REM THIS WAS TO MAKE SURE I GOT IN 80 COLUMN MODE 10 DATA 173,255,2,32,237,253,96 20 FOR X = 768 TO 774: READ A: POKE X,A: NEXT 21 D$ = CHR$ (4) 30 REM TURN ON PRINTER 31 PRINT D$;"PR#1" 32 PRINT CHR$ (9);"H":REM ALLOW HIGH BIT TO PASS UNCHANGED 33 PRINT CHR$ (9); CHR$ (30):REM CHANGE INTERFACE COMMAND CHAR 40 REM 41 REM ADDRESS TO STORE BEGINNING ADDRESS OF CG AREA & LENGTH ($7070-$7074) 42 REM END ADDRESS -1 = $7F0E 43 REM LENGTH OF BUFFER = $00FF 44 REM HIGH BYTE FIRST FOR END ADDRESS AND LENGTH 45 DATA 27,94,112,112,112,116,14,127,255,0 46 REM ESC ^ $70 $70 $70 $74 $0E $7F $FF $00 50 REM BEGINNING OF CHARACTER BUFFER AT $7FE0, END $7FF8 51 DATA 27,94,127,224,127,248 52 REM ESC ^ $7F $E0 $7F $F8 60 REM 61 REM DATA FOR THE FIST CHARACTER 62 DATA 65,34,20,8,8,8,8,8 63 REM $41 $22 $14 $08 $08 $08 $08 $08 64 REM 65 REM DATA FOR SECOND CHARACTER 66 DATA 255,131,133,137,145,161,193,255 67 REM $FF $83 $85 $89 $91 $A1 $C1 $FF 68 REM 69 REM DATA FOR THIRD CHARACTER 70 DATA 253,133,181,165,165,189,129,255 71 REM $FD $85 $B5 $A5 $A5 $BD $81 $FF 80 REM $7085-$7087 START ADDRESS OF PROPORTIONAL FONT POINTER 81 REM $7087-$7089 START ADDRESS OF NORMAL FONT POINTER 82 REM PROPORTIONAL TABLE POITNER TO $0000 83 REM NORMAL TABLE POINTER TO $7EE1 84 DATA 27,94,112,133,112,137,0,0,225,126 85 REM ESC ^ $70 $85 $70 $89 $00 $00 $E1 $7E 90 REM $77EC IS THE BEGINNING OF THE PROPORTIONAL FONT TABLE 91 REM $77E4 IS THE BEGINNING OF THE NORMAL FONT TABLE 92 REM WHY THEY TELL YOU THIS IS BEYOND ME! 100 FOR X = 1 TO 50: READ A: POKE 767,A: CALL 768: NEXT 101 REM READ ALL DATA STATEMENTS, SEND 'EM OUT 105 PRINT CHR$ (30); CHR$ (9):REM CHANGE BACK TO ^I 110 PRINT CHR$ (27);"$": REM NORMAL MODE 120 PRINT "DOWNLOAD CHARACTER SET" 130 PRINT CHR$ (27);"'": REM SET TO DOWNLOADED SET 140 FOR I = 32 TO 126: POKE 767,I: CALL 768: NEXT I 150 PRINT CHR$ (27);"$": PRINT "NORMAL CHARACTER SET" 160 FOR I = 32 TO 126: POKE 767,I: CALL 768: NEXT I 165 PRINT 170 PRINT D$;"PR#0" 180 END