MaxCoderz

for your 1 bit pleasure!

All times are UTC




Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: General Information
PostPosted: Tue 22 Mar, 2005 10:13 pm 
Offline
Maxcoderz Staff
User avatar

Joined: Thu 16 Dec, 2004 10:06 pm
Posts: 4094
Location: I cant seem to get out of this cryogenic chamber!
Quote:
tr1p1ea - 20/11/2005 (dd/mm/yyyy)
---------------------------------

xLIB v0.6b:
------------

xLIB is now an APP that adds some functionality to TI-83+ BASIC programs. It installs a
parser hook which will intercept any real( requests.

To install xLIB simply copy "xLIB.8xk" to your calc using your favoutrite flavour of linking
software.

To enable xLIB you must run it from the APPS menu and select '1'. A message should appear
informing you that xLIB has been enabled. Pressing '2' will disable xLIB and '3' will quit.


0 - ClearScreen:
----------------
usage: real(0

This function Clears the graph buffer and the LCD.


1 - DrawSprite:
---------------
usage: real(1,Spr_X,Spr_Y,Spr_Width,SprHeight,sPIC_Num,sPIC_X,sPIC_Y,Spr_Method,Spr_Flip,Spr_UpDateLCD

Spr_X = Sprite X location
Spr_Y = Sprite Y location
Spr_Width = Sprite width in BYTES (so a 16 pixel wide sprite would have a width of 2)
Spr_Height = Sprite height in pixels
sPIC_Num = The PIC in which the sprite is located PIC0 - PIC9
sPIC_X = X offset to sprite in PIC, must be ALIGNED. Can be a value from 0-11
sPIC_Y = Y offset to sprite in PIC
Spr_Method = The copy method 0 = Overwrite, 1 = AND, 2 = OR, 3 = XOR
Spr_Flip = Flip Sprite 0 = No Flip, 1 = Horizontal Flip
Spr_UpdateLCD = Toggle LCD update 0 = No, 1 = Yes

This function will draw clipped sprites of ANY size anywhere on the screen.

Dont forget that sprites always have a width which is a multiple of 8. However with this routine we
want the BYTE width of the sprite. It is 8 pixels per byte! So a 8x8 sprite has a BYTE width of 1,
a 16x16 sprite would have a BYTE width of 2. A 12x12 sprite would still occupy 2 BYTES so it also has a
BYTE width of 2.

sPIC_X is only at ALIGNED positions, can be a value from 0-11
sPIC_Y can be from 0-63

Horizontal Sprite Flipping has now been implemented. This should save you some space.

This function will still be able to read PIC data even if it is archived!


2 - DrawTileMap:
----------------
usage: real(2,Matrice_Name,X_Offset,Y_Offset,MapWidth,MapHeight,ScreenStartX,
ScreenEndX,ScreenStartY,ScreenEndY,mPIC_Num,Tile_Method,Map_UpdateLCD

Matrice_Name = Name of matrice containing map data 0 - 9. 0 = [A] - 9 = [J]
X_Offsett = X Map Offsett. Which part of the map you wish to start drawing at
Y_Offsett = Y Map Offsett. Which part of the map you wish to start drawing at
MapWidth = Width of TileMap
MapHeight = Height of TileMap
ScreenStartX = Which COLUMN you wish to START drawing. Can be a value from 0-12
ScreenEndX = Which COLUMN you wish to END drawing at. Can be a value from 0-12
ScreenStartY = Which ROW you wish to START drawing. Can be a value from 0-8
ScreenEndY = Which ROW you wish to END drawing at. Can be a value from 0-8
mPIC_Num = The PIC in which the tile data is located PIC0 - PIC9
Tile_Method = The copy method 0 = Overwrite, 1 = AND, 2 = OR, 3 = XOR
Map_UpdateLCD = Toggle LCD update 0 = No, 1 = Yes

The ScreenStartX, ScreenEndX, ScreenStartY, ScreenEndY enable you to draw a 'windowed' map. This means that you can draw
your map and leave space for a HUD or something similar. Drawing smaller maps will also be a little faster.

To draw a map centered with a 1 tile blank border the inputs would be:

ScreenStartX = 1
ScreenEndX = 11
ScreenStartY = 1
ScreenEndY = 7

The TileMap routine now supports MULTIPLE PICS! Now your maps can have 256 different tiles instead of only 96.
If a tilenumber is > 95 it will be taken from the second PIC, if the tilenumber > 191 then it will be taken from the 3rd PIC.
You cant use all of the 3rd PIC as 256th tile comes about 3/4 down.

PICS must follow each other numerically!!!!

So if your input PIC is PIC0 any tiles > 95 will be taken from PIC1 and any tiles > 191 will be taken from PIC2.

If the PIC doesnt exist then the tile will be drawn as a BLANK.

This function will still be able to read PIC data even if it is archived!


3 - RecallPIC
-------------
usage: real(3,rPIC_Num,rPIC_Method,Recall_UpdateLCD

rPIC_Num = PIC to recall PIC0 - PIC9
rPIC_Method = The copy method 0 = Overwrite, 1 = AND, 2 = OR, 3 = XOR
Recall_UpdateLCD = Toggle LCD update 0 = No, 1 = Yes

This will recall a pic and display it with some options (OR, XOR etc)

This function will still be able to read PIC data even if it is archived!


4 - ScrollScreen
----------------
usage: real(4,Scrl_Direction,Scrl_Number,Scrl_UpdateLCD

Scrl_Direction = direction to scroll
Scrl_Number = number of pixels to scroll
Scrl_UpdateLCD = Toggle LCD update 0 = No, 1 = Yes

Directions:

0 - Up
1 - Down
2 - Left
3 - Right
4 - UpLeft
5 - UpRight
6 - DownLeft
7 - DownRight


5 - ChangeContrast
------------------
usage: real(5,ContrastVal

ContrastVal = New contrast value. Can be a value from 0-39


6 - UpdateLCD
-------------
usage: real(6

This function will copy the graph buffer to the LCD


7 - RunIndicator
----------------
usage: real(7,runIndicVal

runIndicVal = Toggle Run Indicator. 0 = Off, 1 = On


8 - GetKey
----------
usage: real(8

Scans the keypad and returns a key code in the ANS variable.

Has support for multiple Arrow Keypresses

Key Codes:
----------
F1 = 53
F2 = 52
F3 = 51
F4 = 50
F5 = 49

2nd = 54
Mode = 55
Del = 56

Down = 1
Left = 2
Right = 3
Up = 4

DownLeft = 5
DownRight = 6
UpLeft = 7
UpRight = 8

Alpha = 48
XTN = 40
Stat = 32
Math = 47
Apps = 39
Prgm = 31
Vars = 23
Clear = 15
X1 = 46
Sin = 38
Cos = 30
Tan = 22
Power = 14
X2 = 45
Comma = 37
LeftPara = 29
RightPara = 21

Divide = 13
Multiply = 12
Subtract = 11
Add = 10
Enter = 9
Log = 44
Ln = 43
Sto = 42

0 = 33
1 = 34
2 = 26
3 = 18
4 = 35
5 = 27
6 = 19
7 = 36
8 = 28
9 = 20

Period = 141
Negative = 140


9 - CreatePIC
-------------
usage: real(9,cPIC_Num

cPIC_Num = Number of PIC file to store to. Ranges from 1-255

*NOTE* PIC0 is actually PIC10 according to the TIOS. To store to PIC0
use: real(9,10

*IMPORTANT* Because the PIC's use tokens in their name that the TIOS doesnt really
have (for PICS) the names in your memory mgmt will be all strange, ex:

PIC0
inString(
P/Y
Z-Test(

THIS IS PERFECTLY NORMAL, nothing is wrong with your calc. The TIOS just doesnt have
the names for PIC variables above the 10th.

To transfer these PICs to your calc you MUST GROUP THEM. Sending may fail if you
attempt to send them individually.


10 - ExecuteArchivedProg
------------------------
usage: "PRGMNAME:real(10,exAction,Prgm_Dest:prgmXTEMP0XX

"PRGMNAME = Name of ARCHIVED program to be stored in the ANS variable
exAction = Action to perform. 0 = copy, 1 = clean specific, 2 = clean all
Prgm_Dest = Destination XTEMP program. Ranges from 0-15

This function will copy an ARCHIVED program to one of 16 XTEMP programs. The name of the
ARCHIVED program to copy must be stored in the ANS variable prior to running this function.

This function will work with ARCHIVED BASIC and TIOS ASM (nostub) programs.

For example, to copy the ARCHIVED BASIC program ADEMO to XTEMP000 you would do:

"ADEMO
real(10,0,0

To copy the ARCHIVED BASIC program MAP1 to XTEMP011, and then RUN XTEMP011 you would do:

"MAP1
real(10,0,11
prgmXTEMP011

To copy the ARCHIVED **TIOS ASM** program SCROLL to XTEMP009, and then RUN XTEMP009 you would do:

"SCROLL
real(10,0,11
Asm(prgmXTEMP009

To REMOVE program XTEMP006 you would do:

real(10,1,6

To REMOVE ALL XTEMP0XX programs you would do:

real(10,2,0

It must be on seperate lines if you want to do this from the HOMESCREEN. However in you BASIC programs
you can put all of this on 1 line, example:

"MAP1:real(10,0,11:prgmXTEMP011

*NOTE* If the XTEMP0XX program already exists (in RAM or ARCHIVE) then this function will exit
without copying. You must manually remove the target program manually before attempting to
replace it. (This is to stop accidents with nested programs trying to replace themselves).


11 - GetCalcVersion
-------------------
usage: real(11

Returns a code in the ANS variable which will tell you what calc version you are running.

83+ = 0
83+ SE = 1
84+ = 2
84+ SE = 3


12 - DrawShape
--------------
usage: real(12,Shape_Type,x1,y1,x2,y2,DrawShape_UpdateLCD

Shape_Type = Tpye of Shape you want to draw:
0 = DrawSingleLine
1 = DrawEmptyRectangleBlack
2 = DrawEmptyRectangleWhite
3 = DrawFilledRectangleBlack
4 = DrawFilledRectangleWhite
5 = DrawRectOutlineBlackFillWhite
6 = DrawRectOutlineWhiteFillBlack
x1 = First x coord (for rectangles this is TOP LEFT corner)
y1 = First y coord (for rectangles this is TOP LEFT corner)
x2 = Second x coord (for rectangles this is BOTTOM RIGHT corner)
y2 = Second y coord (for rectangles this is BOTTOM RIGHT corner)
Scrl_UpdateLCD = Toggle LCD update 0 = No, 1 = Yes

End of Functions List.


*WARNING*: You MUST provide the correct inputs for each function. If you do not you
risk a crash or worse.

DO NOT TRY TO RUN YOUR BASIC PROGRAM FROM MIRAGEOS!!!! I use a saferam area that MirageOS uses,
it may cause instability.

Disclaimer:
-----------
This program is still in early stages and may contain bugs. Program is use at own risk,
I can not be held responsible for loss of data and or hardware damage.

If you have any questions please email me at: tr1p1ea@yahoo.com.au

I have no problem with anyone using this program as long as you credit me
properly. Please dont try to modify and/or pass this program off as your
own with out first gaining my consent.

_________________
"My world is Black & White. But if I blink fast enough, I see it in Grayscale."
Image
Image


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB ® Forum Software © phpBB Group | DVGFX2 by: Matt