Re: A89: Re: Grayscale Text


[Prev][Next][Index][Thread]

Re: A89: Re: Grayscale Text




> > Check out the PortSet/PortRestore ROM routines - they allow you to set the
> >  address and dimensions of the area you want _all_ the ROM graphics
> routines
> > to
> >  operate on.
>
> Yeah, I just figured that much out, but what's the syntax?

As cut from the TI-GCC library docs:

---------------------------------------

void PortSet (void *vm_addr, int x_max, int y_max);

Sets up the virtual screen

PortSet allows drawing in a virtual screen. All graphic commands which are
built-in into TIOS does not expect that the video memory must be at 0x4C00, and
that the video
memory is always 240 x 128 pixels. Using PortSet you can set up a virtual screen
anywhere in a memory, and of any size. After using PortSet, all graphic commands
will assume
that the video memory starts at vm_addr, and that the dimensions of the video
memory are (x_max+1) x (y_max+1) pixels. This allows to you to use graphic
functions even when
the actual LCD memory is relocated at any other address using a I/O hardware
ports, or to draw pictures into virtual screens (not visible on the real
screen), then move them (using
memcpy or some other function) to the real screen. This will enable possibility
to hide actual drawing process, and to display the drawn picture immidiately.

---------------------------------------

void PortRestore (void);

Cancels the virtual screen

PortRestore restores factory defaults for address and dimensions of the video
memory. PortRestore acts exactly like

PortSet((void *) 0x4C00, 239, 127);

---------------------------------------

--
 / Niklas Brunlid
Check out Prosit for the TI-89 / TI-92+ at http://prosit.ticalc.org
Random PQF Quote follows:

I think I would like to go into modelling. Of course, I don't know how to
do it, and wouldn't be any good at it if I did, so I'm going to employ
someone to walk the catwalks on my behalf. It would still be *me*, of
course...
        -- Terry learns Naomi Campbell has written a book.
           (Terry Pratchett, alt.fan.pratchett)





References: