[Prev][Next][Index][Thread]
Re: A92: PROPOSAL: TI-89/92 Screen Library
Do you think it would slow it down too much if we somehow made a zoom function for
it? So if someone ran a 92 program on the 89 it would just have a zoomed out look
to it, and vice versa. If we did it in grayscale it might be semi-readable.
Bryan Christopher Turner wrote:
> // Structure for describing any type of screen
> typedef struct GraphStruct
> {
> char height,width;
> GraphStruct *next; // Next graph struct on stack.
> short numBitPlanes; // The number of structures to follow
> struct
> {
> short planeAddrDiv8;
> char *planeAddr;
> } thePlane []; // This is an array
> } GraphStruct;
>
> GraphStruct *GraphInit()
> It figgures out what calc it's on and returns a set of flags for the
> programmer to use. These include the current LCD buffer address, height,
> width, and wether grayscale is running, and it's depth.
>
> GraphStruct *GraphNew( short numBitplanes )
> // 1 bitplane = B&W
> // 2 bitplanes = 4 grayscale
> // 3 bitplanes = 8 grayscale
> // etc..
> Creates a new LCD buffer of the correct size and returns a pointer to it's
> GraphStruct.
>
> void GraphFree( GraphStruct *theGraph )
> Frees an allocated buffer. Correctly frees all bitplanes, and also calls
> GraphRestore() if the bitplane given is the current bitplane.
>
> void GraphSwitch( GraphStruct *theGraph )
> Switches the LCD to point to a new LCD buffer. This function would place
> the old buffer address on a stack for later retrieval. Also, it would take
> care of installing or uninstalling the grayscale interrupts for the buffer.
> As long as all programs use this function to switch the LCD buffer, there
> will never be a problem!
>
> void GraphRestore()
> Pops off the old GraphStruct and makes it the current one. This removes
> interrupts, etc.. and also switches the LCD base address.
>
> Anyone have other ideas/features? Remember, this has to be able to work on
> calcs with different sized screens, and different methods to switch the LCD
> buffer address. I included the baseAddrDiv8 field for TI-92 type interrupts,
> although this may change after we find out how the '89 works.
>
> --Bryan
> bcturner@eos.ncsu.edu
References: