Difference between revisions of "DCSE:BasicLibs:xLIBCSetup"

From Doors CS, Doors CSE, and Doors CE Wiki
Jump to navigationJump to search
m
Line 10: Line 10:
  
 
===SetupGraphics===
 
===SetupGraphics===
'''real(0,1,1)''': Enable half-resolution (160x240-pixel) mode<br>
+
'''real(0,1,1,REDRAW_STATUS)''': Enable half-resolution (160x240-pixel) mode<br>
 
'''real(0,1,0,REDRAW_STATUS)''': Disable half-resolution (160x240-pixel) mode<br>
 
'''real(0,1,0,REDRAW_STATUS)''': Disable half-resolution (160x240-pixel) mode<br>
 
REDRAW_STATUS = 1 to redraw the status area at the top of the screen, 0 otherwise.
 
REDRAW_STATUS = 1 to redraw the status area at the top of the screen, 0 otherwise.
 
This function will set the calculator to half h-resolution/interlaced mode. Please note that ALL xLIB<br>
 
drawing functions expect the calculator to be in this mode.<br>
 
 
THIS MUST BE TURNED OFF BEFORE EXITING YOUR PROGRAM OR THE TIOS WILL BE STUCK IN THIS MODE!<br>
 
 
Also remember to redraw the status bar up the top of the screen or the TIOS will look funny.<br>
 
 
To disable 160 mode and redraw the status bar:<br>
 
real(0,1,0,1<br>
 
 
(If you forget to set this mode you will see how xLIB buffers each side of GRAM. This might be useful<br>
 
for understanding how xLIB works).
 
  
 
===SetSpeed===
 
===SetSpeed===
 
'''real(0,2,0)''': Disable fast (15MHz) mode, switching to 6MHz mode<br>
 
'''real(0,2,0)''': Disable fast (15MHz) mode, switching to 6MHz mode<br>
'''real(0,2,1)''': Enable fast (15MHz) mode<br>
+
'''real(0,2,1)''': Enable fast (15MHz) mode
<br>
 
Note that the default CPU speed is 15MHz
 
  
 
===SetupColorMode===
 
===SetupColorMode===
Line 50: Line 35:
 
real(0,3,2
 
real(0,3,2
  
This is because inverting something twice will restore it back to nomral.
+
This is because inverting something twice will restore it back to normal.
  
To restore the colours back to normal when you dont know the previous state of the screen:
+
To restore the colours back to normal when you don't know the previous state of the screen:
  
 
real(0,3,3
 
real(0,3,3

Revision as of 07:47, 24 October 2013

This routine is only available on Doors CSE 8.0 and later for the color-screen TI-84 Plus C Silver Edition.

Description

Utility functions used when setting up an xLIBC program. real(0,0) gets the current xLIBC version, real(0,1,<bool>) turns half-resolution mode on or off, and real(0,20,<bool>) turns fast (15MHz) mode on or off.

Technical Details

GetXLIBCVersion

real(0,0): Returns version in Ans

SetupGraphics

real(0,1,1,REDRAW_STATUS): Enable half-resolution (160x240-pixel) mode
real(0,1,0,REDRAW_STATUS): Disable half-resolution (160x240-pixel) mode
REDRAW_STATUS = 1 to redraw the status area at the top of the screen, 0 otherwise.

SetSpeed

real(0,2,0): Disable fast (15MHz) mode, switching to 6MHz mode
real(0,2,1): Enable fast (15MHz) mode

SetupColorMode

real(0,3,VALUE):
VALUE defines action to take:
0 = FULL colour
1 = 8COLOUR
2 = COLOURINVERT
3 = COLOURINVERTOFF (restore to normal)
4 = FILLSCREEN

To invert the colours on the screen:

real(0,3,2

To restore the colours back to normal:

real(0,3,2

This is because inverting something twice will restore it back to normal.

To restore the colours back to normal when you don't know the previous state of the screen:

real(0,3,3

To FILL the screen (active GRAM side only) with a colour from the standard xLIB 256 colour palette:

real(0,3,4,COLOUR,UPDATELCD