Thierry GODEFROY 13, bd de Strasbourg 83000 Toulon Telephone/FAX (08:00 to 18:00) & QLCF BBS (18:00 to 08:00): 94-92-26-21 to: Tony TEBBY Toulon, January 22th 1995. Hello Tony ! As you know I would like to write some new drivers for QXL to allow the use of all PC hardware (graphic cards, sound cards, CD-ROM, tapes, etc...) but I am faced with a very hard problem: at the current state SMSQ(/E) is not expandable on the PC side (there is no provision to add new "drivers" for SMSQ on the PC side). As I do not want (and anyway have not time) to invent the wheel again (i.e. to disassemble -and guess usage of- SMSQ.EXE x86 an 68040 code, modify it and assemble it again) I submit you a proposal of specification for an opened QXL to PC interface. If you agree to implement such a simple interface then (almost) everything will be possible with the QXL ! I suggest that this new facility will be implemented in SMSQ/E only (and not in SMSQ) so that you can get some retribution for your work (this could also be a good way to encourage QXL users to upgrade from SMSQ to SMSQ/E !). The existing "messages" interface is quite satisfying as it may be expanded by adding new messages and by implementing a hook into the PC interface code so that "unknown" messages could be processed by an extented message interpreter. To allow new messages to be processed on the QXL side, I propose that a TRAP #1 call is used to transmit and receive them. I think that SMS.HDOP (TRAP #1 with D0=$11) is a good candidate as those messages are aimed to do "Hardware Dependent OPerations". In this case the A3 register (pointer to command) could point on the following structure: dc.b $FF ; Operation code for QXL to PC message exchange. dc.b direction ; flag: 0=send msg to PC, 1=read msg from PC. dc.l length ; message or buffer total length. ds.b length ; message data or buffer space. The SMS.HDOP call will then just send or receive the message without having to know how to process it nor what is its exact meaning (this is to be assumed by the driver or the program using it). If there is no extended message interface (we are running SMSQ and not SMSQ/E or this is not QXL version of SMSQ/E for example) or if the extended interpreter is not installed on the PC side then SMS.HDOP could return a "not implemented" error code (-19) in D0. Otherwise D0 should be set to the error code returned by the extended message interpreter. On the PC side, the extended message interpreter code could be held into a DOS TSR program. When installing itself, the TSR prog will just have to find a free INT and put its code address into the corresponding vector. The INT number cannot be fixed "a priori" as DOS and TSR progs are grabbing INT numbers as they install new drivers. I propose then that the INT number will be limited into the 60h-67h interval (which is documented as "free for DOS applications") and that the extended interpreter code will be preceded with a long word for identification of the correct INT by SMSQ.EXE each time it is started. This indentifying long word could be a string like "QXLn" with "n" from 0 to 9, depending on the extended driver version (so that new facilities could be added and taken into account later by SMSQ/E). So the TSR code should hold: TSR_ID db 'QXL0' ; identifying long word. INT_6x ... ; the TSR code itself. Once SMSQ.EXE is started and recognized the INT number (or the absence of it), the "hook" mecanism will just consist in calling the INT when an unknown message from QXL is encountered (or in returning an error when no extended msg interpreter was found) and whenever possible (the more often, the better) to see if a message is to be sent to QXL. Here are the calls that could be supported by the "extended message interpreter" (INT 6xh means INT 60h to 67h): * INT 6xh with AH=-1: Request extended message interpreter infos. ~~~~~~~~~~~~~~~~~~~ Call parameters: ~~~~~~~~~~~~~~~~ AH = -1. Return parameters: ~~~~~~~~~~~~~~~~~~ AL = First known extended message number. AH = Last known extended message number. DS:SI = address of an identification string (NULL terminated). Modified register: AH,AL,DS,SI (all other registers saved and restored ~~~~~~~~~~~~~~~~~~ by the extended message interpreter). * INT 6xh with AH=0: Request interpretation of an extended message from QXL. ~~~~~~~~~~~~~~~~~~ Call parameters: ~~~~~~~~~~~~~~~~ AH = 0. DS:SI = extended message address. Return parameters: ~~~~~~~~~~~~~~~~~~ AL = completion code (to be returned "as is" in D0 by SMS.HDOP). 0 : operation completed without error, no reply msg to follow. 1 : operation completed without error, reply msg to follow. any negative number : SMSQ error code (with error -19 if msg is not recognized by the interpreter). Modified register: AL (all other registers saved and restored by the ~~~~~~~~~~~~~~~~~~ extended message interpreter). * INT 6xh with AH=1: Request address of an extended message (if any) to be sent ~~~~~~~~~~~~~~~~~~ to QXL. Call parameters: ~~~~~~~~~~~~~~~~ AH = 1. Return parameters: ~~~~~~~~~~~~~~~~~~ AL = completion code (substract 1 before returning it in D0 by SMS.HDOP). 0 : no extended message to be sent to QXL. n : number of messages awaiting to be sent to QXL. DS:SI = address of the first message to be sent (if any). Modified register: AL,DS,SI (all other registers saved and restored by ~~~~~~~~~~~~~~~~~~ the extended message interpreter). * INT 6xh with AH=2: Request a buffer address for "big messages" (up to 64Kb). ~~~~~~~~~~~~~~~~~~ Call parameters: ~~~~~~~~~~~~~~~~ AH = 2. AL = buffer size (in bytes) - 1. Return parameters: ~~~~~~~~~~~~~~~~~~ AL = completion code (for QXL to PC interface only). 0 : buffer available. 1 : no buffer available. ES:DI = buffer address. Modified register: AL,ES,DI (all other registers saved and restored by ~~~~~~~~~~~~~~~~~~ the extended message interpreter). Additionally, SMSQ/E should allow the total disabling of screen updates (DISP_UPDATE -1 ?) so that a new extended screen driver (relying only on PC accelerated graphic SVGA cards) could take over the built-in one. Well, that's all for the moment ! I would be very pleased to hear about your comments/reaction/proposal/anything-you-want and would like to thank you for the time you spend in reading my digressions ;-) SMSQ(/E) forever ! Thierry.