orcus@pro-lep.cts.com (Brian Greenstone) (05/12/89)
Thanx to all of you out there who wrote me back with your interesting game ideas for 2-player modem games, I think Ive got enough input to piece togethor a good game. Now I need to get the specs on as many modems as possible. I need to know the softswitch locations for: IIgs serial port, Prometheus, Datalink, etc. Can anyone help me? -Brian orcus@pro.lep.cts.com
Ralph.Hyre@IUS3.IUS.CS.CMU.EDU (05/25/89)
>a good game. Now I need to get the specs on as many modems as possible. I >need to know the softswitch locations for: IIgs serial port, Prometheus, >Datalink, etc. Can anyone help me? This isn't the most portable way to write communications software. PLEASE PLEASE PLEASE use the standard entry points (on firmware on the serial/modem card) for this purpose. Documentation follows. [if the card doesn't follow the protocol, then collect entry points for those cards, but please don't try to to hard-code locations for every serial/modem card out there. You'll run out of time, patience, and RAM.] - Ralph Article 5143 of comp.sys.apple: Path: PT.CS.CMU.EDU!rochester!bbn!mit-eddie!ll-xn!ames!pasteur!ucbvax!UIAMVS.BITNET!AWCTTYPA From: AWCTTYPA@UIAMVS.BITNET ("David A. Lyons") Newsgroups: comp.sys.apple Subject: Pascal 1.1 protocol info for your enjoyment Message-ID: <8803222056.aa27863@SMOKE.BRL.ARPA> Date: 23 Mar 88 16:52:49 GMT Sender: daemon@ucbvax.BERKELEY.EDU Organization: The Internet Lines: 99 X-Unparsable-Date: Tuesday 22 Mar 88 6:21 PM CT ============================================= Pascal 1.1 protocol for character I/O devices 22-Mar-88 ============================================= David A. Lyons a.k.a. DAL Systems PO Box 287 | North Liberty, IA 52317 BITNET: AWCTTYPA@UIAMVS CompuServe: 72177,3233 GEnie mail: D.LYONS2 ============================================== References: Apple IIgs Firmware Reference, December 23, 1986 DRAFT (chapter 5) Apple II Miscellaneous Technical Note #3 [11/85] "Super Serial Card Firmware Bug" January 1986 Open Apple (vol 1, #12, page 101) & other Open Apple's [Open Apple is $28/yr. P.O. Box 11250, Overland Park, KS 66207.] Most 80-column cards and serial cards support the "Pascal 1.1" protocol for character input and output. (//c and IIgs *ports* behave like cards and follow this protocol.) In the following discussion, "n" is the slot number (1 to 7) of the card or port your program wants to deal with. The ROM for slot n is from $Cn00 to $CnFF. $Cn0B contains $01 if the card or port follows the Pascal 1.1 protocol. $Cn0C identifies the kind of card: $1x: printer $2x: joystick $3x: serial or parallel card $4x: modem $5x: sound or speech device $6x: clock $7x: disk or other storage device $8x: 80-column card $9x: network or bus interface ($Ax..$Fx are not currently defined) The "x" can be used to distinguish between different cards of a particular type. $Cn0D to $Cn10 contain the *offsets* into the card's ROM of the Init, Read, Write, and Status routines. For example, if $Cn0D contains $34, then the Init entry point is $Cn34. ---------------------------------------------------------------------- >>> Before making any of these calls, the X register must be <<< loaded with $Cn, and the Y register must be loaded with $n0! Init (offset at $Cn0D): Initializes the card; do this once before doing any other calls to the card. Read (offset at $Cn0E): Reads one character from the card. Returns: A = character read X = error code Write (offset at $Cn0F): Writes one character to the card (from A). Returns: X = error code Status (offset at $Cn10): Determines if the card is ready to accept output or provide input. A = 0 checks output; A = 1 checks input. Returns: X = error code carry set = ready; carry clear = not ready [Error codes: 0=no error; any others defined?] ---------------------------------------------------------------------- Notes: o (Open Apple Vol 3, #12, page 3.96c) "Revision 1 IIc ROMs (the models that don't support 3.5 drives) will not correctly return status because of a missing CMP #$10 at $C227 in the firmware. The result is that the status may be okay, but the result of the status call says it isn't. This prevents using the Pascal inteface with early IIcs." [Does anybody have a work-around for this? A reasonable approach might be to check for the original //c ROM version and then do the STATUS call with a fixed version of the STATUS routine, contained in your program.] o Because the Super Serial card doesn't do it for you, twiddle location $CFFF before making a Pascal 1.1 call to make sure no other slot's ROMs are using the $C800..$CFFE space. Also, you should store $Cn into $07F8 so that interrupt-handling firmware can restore the correct $C800 space after an interupt occurs. o See Open Apple vol 3, #12, p. 92-94 and #9 p. 66-68 for more info and real live examples. ---------------------------------------------------------------------- -- - Ralph W. Hyre, Jr. Internet: ralphw@{ius{3,2,1}.,}cs.cmu.edu Phone:(412) CMU-BUGS Amateur Packet Radio: N3FGW@W2XO, or c/o W3VC, CMU Radio Club, Pittsburgh, PA "You can do what you want with my computer, but leave me alone!8-)"