qdosmsq:pe:wspt

This is an old revision of the document!


IOP.WSPT, IOP.WBLB & IOP.SPRY

These Traps write a sprite or a blob to a position in a window.

TrapValue in D0.BAction
IOP.WSPT$76Writes a sprite
IOP.WBLB$73Writes a blob
IOP.SPRY$77Sprays pixels
Call ParametersReturn Parameters
D0.BSee aboveD0.LError code
D1.Lx,y coordinatesD1.LPreserved
D2.L0 or number of pixelsD2.LPreserved
D3.WTimeoutD3.LPreserved
A0.LWindow channel IDA0.LPreserved
A1.LPointer to sprite or blobA1.LPreserved
A2.LPointer to pattern (for blob)A2.LPreserved
ERR_NOChannel not open
ERR_OROut of range
ERR_BPBad parameter
  • The x,y pixel coordinates in D1.L are relative to the window in A0.
  • Internal sprites can be written by setting a small number in A1 instead of an address. See the table below.
  • IOP.SPRY randomly sprays D2.L pixels onto a blob.
  • A2.L is not used for IOP.WSPT.
  • For current versions of SMSQ/E, certainly from v 3.03 onwards, IOP.SPRY is not implemented. If it is used it will return the error "bad parameter".
NameNumberSprite
SP.ARROW$00arrow
SP.LOCK$01padlock
SP.NULL$02empty window
SP.MODE$03wrong mode (4 or 8)
SP.KEY$04keyboard entry
SP.BUSY$05no entry sign
SP.WMOVE$06window move
SP.WSIZE$07window change size

The example shows how to write a move sprite. We assume that A0 contains the window channel ID.

wrt_mve   movea.w   #6,a1      ; "Move sprite" code
          move.l    #$a000a,d1 ; Print at 10,10
          moveq     #-1,d3     ; Timeout
          moveq     #$76,d0    ; IOP.WSPT
          trap      #3         ; Write the sprite
  • qdosmsq/pe/wspt.1273757029.txt.gz
  • Last modified: 2010/05/13 14:23
  • by george.gwilt