Previous Thread
Next Thread
Print Thread
Page 59 of 80 1 2 57 58 59 60 61 79 80
Joined: Feb 2004
Posts: 2,598
Likes: 301
Very Senior Member
Offline
Very Senior Member
Joined: Feb 2004
Posts: 2,598
Likes: 301
The current ROM dump we have for the Apple II Parallel Interface Card appears to be a “cooked” dump made by dumping using software running on the Apple II. The locations of the blocks don’t match the addressing in the schematic. Does anyone have a card they can pull the PROM off and dump directly?

Joined: Feb 2004
Posts: 2,598
Likes: 301
Very Senior Member
Offline
Very Senior Member
Joined: Feb 2004
Posts: 2,598
Likes: 301
Never mind, I managed to reconstruct the raw PROM contents from the cooked dump. Now the AP2000 doesn’t drop characters. Rewritten Parallael Interface Card is on master. A couple of things to beware of:
  • The most obvious difference between “Parallel Printer” and “Centronics” firmware modes (can be selected in DIP Switches menu) is that Centronics mode doesn’t automatically add a line feed after a carriage return.
  • By default, the card doesn’t strip the top bit off characters, and the Apple II sets the top bit of characters. This will print as graphics characters on most printers. You can go into the Machine Configuration and change to 7-bit mode to allow PR#1 etc. to work with normal printers. Of course, if you’re using a program that needs to send 8-bit data to the printer you’ll need to select 8-bit mode again.
  • The PROM driver doesn’t use interrupts for anything. There’s probably no point enabling interrupts.
  • The card seems to have a different idea of how strobe works to everyone else. With negative strobe selected (the default), strobe drops at almost the same time the data becomes valid, as both things happen around the rising edge of the phase 1 clock. Printers tend to treat the falling edge on the strobe as active, so this could glitch.
  • Similarly, the card will reject any active (rising) acknowledge edge while strobe is active, so if the printer responds to the negative edge before the card sends it high again, it miss it and wait forever.
  • To work around this, it’s safest to change the DIP switches to use positive strobe.
  • edit: And don’t change PROM addressing to flat unless you’re testing your own custom PROM – it will blow up spectacularly.

Last edited by Vas Crabb; 10/24/20 05:54 PM.
Joined: Feb 2014
Posts: 1,102
Likes: 173
G
Very Senior Member
Offline
Very Senior Member
G
Joined: Feb 2014
Posts: 1,102
Likes: 173
I'm having great fun playing with the grappler plus.

I wrote a simple CODE 128 barcode generator:

[Linked Image from i.imgur.com]

ctrl+reset after boot and paste this in from the applesoft prompt:

Code
        10 REM SIMPLE CODE 128 GENERATOR
        20 REM BY GOLDEN CHILD
        30 REM ALL INFO NEEDED FROM WIKIPEDIA ARTICLE ON CODE 128

        90 DIM BA$(110) : REM BA$ = ARRAY TO HOLD BARCODE BAR PATTERNS
        100 I=0
        110 READ A$ : ? I,A$  : REM READ DATA INTO BA$ ARRAY
        120 IF A$="END" THEN 140
        130 BA$(I)=A$ : I=I+1: GOTO 110
        135 REM FOR J = 1 TO I :? J,BA$(J) : NEXT 

        140 ? : X0 = 20 : X = X0 : Y0 = 5 : Y1=20 : XW = 1 : Y2 = Y1 + 20 : Y = Y0-Y2
        141 REM X0, Y0 IS XORIGIN, YORIGIN : REM Y1 = Y BAR WIDTH : REM Y2 = Y BAR GAP : REM XW = X BAR WIDTH

        150 INPUT "BARCODE: ";A$
        151 IF A$="P" THEN GOSUB 1000 : GOTO 150
        152 IF A$="" THEN A$="1234567890123456" : ? A$" ENTER P TO PRINT SCREEN"
        160 B$=CHR$(104) : REM START CODE B
        170 FOR I=1 TO LEN(A$) : B$=B$+CHR$(ASC(MID$(A$,I,1))-32) : NEXT

        185 S = ASC(MID$(B$,1,1)) : REM INITIALIZE SUM TO START CODE
        186 FOR I = 2 TO LEN(B$) : S = S + (I-1) * ASC(MID$(B$,I,1)) : NEXT : REM ADD TO SUM (POSITION * CODE)
        187 IF S > 103 THEN S = S - 103 : GOTO 187  : REM MODULO 103
        188 B$=B$+CHR$(S)   : REM ADD CHECKSUM
        189 B$=B$+CHR$(108) : REM STOP CODE

        190 IF SF=0 THEN HGR : FOR I = 0 TO 191 : HCOLOR=3:HPLOT 0,I TO 279,I:NEXT : SF=1 : REM CLEAR SCREEN TO WHITE
        200 X = X0 : Y = Y + Y2
        205 REM ? "LENGTH OF BARCODE OUTPUT STRING ="LEN(B$)
        210 FOR I = 1 TO LEN(B$) : C = ASC(MID$(B$,I,1)) 
        220 FOR J = 1 TO LEN(BA$(C))
        225  W = VAL(MID$(BA$(C),J,1)) : REM W IS WIDTH
        226  X1 = X : X2 = X + W * XW   : REM X1 IS START OF BAR, X2 IS START OF NEXT BAR
        228  REM ?"I="I" J="J" W="W  : REM UNCOMMENT FOR DEBUGGING INFO
        230  IF (J/2)=INT(J/2) THEN X = X2 : GOTO 250 : REM EVEN IS SPACE
        240  HCOLOR = 0 : FOR X = X1 TO X2-1 : HPLOT X,Y TO X,Y+Y1 : NEXT : X = X2 : REM ODD IS BAR SO DRAW BAR
        250 NEXT 
        260 NEXT

        350 IF Y > 160-Y2 THEN ? "END OF PAGE":SF=0 : Y=Y0-Y2  : REM CHECK TO SEE IF WE ARE AT BOTTOM
        400 GOTO 150

        1000 PR#1
        1010 PRINT CHR$(9)"GEI"  : REM GRAPHIC DUMP FROM GRAPPLER PLUS
        1020 PR#0
        1030 PRINT "PRINT CHR$(9)"+CHR$(34)+"GDEI"+CHR$(34)        
        1040 RETURN

        2000 DATA 212222, 222122, 222221, 121223, 121322, 131222, 122213, 122312, 132212, 221213
        2001 DATA 221312, 231212, 112232, 122132, 122231, 113222, 123122, 123221, 223211, 221132
        2002 DATA 221231, 213212, 223112, 312131, 311222, 321122, 321221, 312212, 322112, 322211
        2003 DATA 212123, 212321, 232121, 111323, 131123, 131321, 112313, 132113, 132311, 211313
        2004 DATA 231113, 231311, 112133, 112331, 132131, 113123, 113321, 133121, 313121, 211331
        2005 DATA 231131, 213113, 213311, 213131, 311123, 311321, 331121, 312113, 312311, 332111
        2006 DATA 314111, 221411, 431111, 111224, 111422, 121124, 121421, 141122, 141221, 112214
        2007 DATA 112412, 122114, 122411, 142112, 142211, 241211, 221114, 413111, 241112, 134111
        2008 DATA 111242, 121142, 121241, 114212, 124112, 124211, 411212, 421112, 421211, 212141
        2009 DATA 214121, 412121, 111143, 111341, 131141, 114113, 114311, 411113, 411311, 113141
        2010 DATA 114131, 311141, 411131, 211412, 211214, 211232, 233111, 211133, 2331112, END

Joined: Feb 2014
Posts: 1,102
Likes: 173
G
Very Senior Member
Offline
Very Senior Member
G
Joined: Feb 2014
Posts: 1,102
Likes: 173
And I thought, well Coleco Smartbasic is pretty similar to Applesoft (by design) so if I change a couple of lines it will work.

Hplot coordinates go from 0 to 255 instead of 0 to 279

/mame64 adam -cass1 smartbas


Code
       190 IF SF=0 THEN POKE 25471,15:HGR : SF=1 : REM CLEAR SCREEN TO WHITE 255 
        240  HCOLOR = 0 : FOR X = X1 TO X2-1 : HPLOT X,Y TO X,Y+Y1 : NEXT : X = X2 

[Linked Image from i.imgur.com]

Joined: Feb 2004
Posts: 2,598
Likes: 301
Very Senior Member
Offline
Very Senior Member
Joined: Feb 2004
Posts: 2,598
Likes: 301
And now the very Wozniakesque Apple II Parallel Printer Interface card is also supported. This one has its own quirks, only handles a single printer status line, provides no way to directly read the printer status, ignores the R/W line, and was designed with the expectation that the user would do wire mods and add up to two ICs if necessary to make it work with their printer. I couldn’t find a proper PROM dump, so I entered the 1977 code from a listing. I believe the firmware was updated before the card was phased out in favour of the more flexible but also flawed Apple II Parallel Interface Card.

Joined: Mar 2001
Posts: 17,217
Likes: 234
R
Very Senior Member
Offline
Very Senior Member
R
Joined: Mar 2001
Posts: 17,217
Likes: 234
Entering the code from a listing is the most Wozniakesque thing of all smile

Joined: Mar 2001
Posts: 17,217
Likes: 234
R
Very Senior Member
Offline
Very Senior Member
R
Joined: Mar 2001
Posts: 17,217
Likes: 234
This stuff all works fine with the "Epson" and "Parallel.Card" drivers in GS/OS so GUI programs can print too:

[Linked Image from rbelmont.mameworld.info]

The GS/OS Epson driver does two passes over each line to get the best possible quality, so it's pretty slow. But it works.

Joined: Feb 2014
Posts: 1,102
Likes: 173
G
Very Senior Member
Offline
Very Senior Member
G
Joined: Feb 2014
Posts: 1,102
Likes: 173
Hi guys,

I was fiddling with the a2pic and testing it out with this software called "Combined Enhanced Graphics" (030b_Combined_Enhanced_Graphics.dsk) with the ap2000 and it would just hang reading $c1c1.

[Linked Image from i.imgur.com]
[Linked Image from i.imgur.com]

It looks like the a6 line going into the prom depends on a6,a7 and ack.

So if ack is low, reading $c1c1 actually gets $c181 which is a value < 128 and if ack is high, reading $c1c1 gets $c1c1 which is >=128. Or maybe the other way around.

>print b@c1c1
FE
[MAME]>

>print b@c181
27


I think for some reason it doesn't ever clear the ack.

[Linked Image from i.imgur.com]


Interestingly, the Epson APL card has a very similar looking circuit where a6 depends on a6,a7 and ack. Schematic is from "Epson MX Series DMP Option User Manual [for] Apple II".

[Linked Image from i.imgur.com]

Joined: Feb 2004
Posts: 2,598
Likes: 301
Very Senior Member
Offline
Very Senior Member
Joined: Feb 2004
Posts: 2,598
Likes: 301
The card really is poorly designed. As I already said:
Originally Posted by Vas Crabb
Similarly, the card will reject any active (rising) acknowledge edge while strobe is active, so if the printer responds to the negative edge before the card sends it high again, it miss it and wait forever.
They must have never tested it with a printer that could acknowledge a byte in less than one microsecond. Actually, I doubt they tested it much at all given the other issues.

Joined: Feb 2014
Posts: 1,102
Likes: 173
G
Very Senior Member
Offline
Very Senior Member
G
Joined: Feb 2014
Posts: 1,102
Likes: 173
Hmmm. I wonder if it's the ap2000 that's the problem. It toggles the busy and ack with very little delay between them. According to the LX-810/850 service manual the ack/busy should last for approx 12 us. (ack for 12us total, with busy dropping at the 7us mark).

Perhaps there was circuitry inside the gate array that created the delay for this timing.

Page 59 of 80 1 2 57 58 59 60 61 79 80

Link Copied to Clipboard
Who's Online Now
3 members (AJR, Olivier Galibert, 1 invisible), 372 guests, and 6 robots.
Key: Admin, Global Mod, Mod
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Forum Statistics
Forums9
Topics9,320
Posts121,944
Members5,074
Most Online1,283
Dec 21st, 2022
Our Sponsor
These forums are sponsored by Superior Solitaire, an ad-free card game collection for macOS and iOS. Download it today!

Superior Solitaire
Forum hosted by www.retrogamesformac.com