Login [Register]
Don't have an account? Register now to chat, post, use our tools, and much more.
This is an archived, read-only copy of the United-TI subforum , including posts and topic from May 2003 to April 2012. If you would like to discuss any of the topics in this forum, you can visit Cemetech's Your Projects subforum. Some of these topics may also be directly-linked to active Cemetech topics. If you are a Cemetech member with a linked United-TI account, you can link United-TI topics here with your current Cemetech topics.

This forum is locked: you cannot post, reply to, or edit topics. Project Ideas/Start New Projects => Your Projects
Author Message
Sven.Thomas0


Active Member


Joined: 19 May 2009
Posts: 520

Posted: 16 Jan 2011 09:29:37 pm    Post subject:

Batlib is an APP that is still in its Beta stage, but is a project that is a few months old. If you are familiar with Celtic 3 or xLIB or Omnicalc or other Apps that modify BASIC commands, that is what this program does. Since this is still in the beta phase, I am open to suggestions about the order of syntax and new commands.

-To install, run the app. It automatically chains its parser hook with an existing parser hook (meaning if you are using Omnicalc, Omnicalc functions still work)
-The hook uses the sum( command
-The sum( command still works the way it is normally supposed to
-There are 61 functions
-Feel free to ask questions :D

38-SubList
[attachment=3371:38-SubList.gif]
38-SubList (continued)
[attachment=3373:38-SubList (cont.).gif]
55-SetFont(5)
[attachment=3374:55-SetFont(5).gif]
59-BaseX (beta)
[attachment=3377:59-BaseX (Beta version).gif]


Last edited by Guest on 26 Jan 2011 07:41:42 pm; edited 1 time in total
Back to top
DigiTan
Unregistered HyperCam 2


Super Elite (Last Title)


Joined: 10 Nov 2003
Posts: 4468

Posted: 16 Jan 2011 10:24:54 pm    Post subject:

Whoa! That's nuts man! It's even in cursive! (Nice)
Back to top
Sven.Thomas0


Active Member


Joined: 19 May 2009
Posts: 520

Posted: 16 Jan 2011 10:48:03 pm    Post subject:

I had five weeks without internet... I had plenty of time to go crazy... Very Happy
The cursive font was just so that I could make a demo 8x8 fontset Razz


Last edited by Guest on 16 Jan 2011 10:48:49 pm; edited 1 time in total
Back to top
Sven.Thomas0


Active Member


Joined: 19 May 2009
Posts: 520

Posted: 26 Jan 2011 07:38:08 pm    Post subject:

Okay, so it is time for an update. There is a bug in command 41 that only occurs when you try to get the stats of archived variables. I have to figure out why this is happening, but I cannot figure out why it would fai... hmm, actually, I just had an idea... I started rattling off calls that it used... I'm going to check command 38 real quick...Nope, never mind Sad. Anywho, the new commands are:
60-DelVarArc-Deletes a variable from RAM or archive.
61-DrawRectVar-Draws a rectangle directly to a variable instead of the screen. (useful for drawing to pictures)
62-DrawToVar-Draws using the drawing functions of command 56 (Draw) directly to a var instead of the screen.

These were inspired by requests from DJ Omnimaga and I think they were awesome ideas. 61 and 62 only work if the var is in RAM (otherwise it passes the error ".ARCH"). DJ Omnimaga suggested being able to test pixels in a picture and it just so happens that command 62 can do that as one of its 13 functions. I am going to work on adding the ability to pxl-Test( archived pictures (which really shouldn't be too hard).

Keep in mind that this is still in its Beta form, so I am open to suggestions and I plan to change some syntaxes with new additions. For example, almost every command dealing with a variable uses 'Name' followed by Type. With the last two, I found that it would be easier to do Type first, then 'Name' so that you can omit the type variable if it is a Pic (for a BASIC optimization).

Also, I just noticed how broken those screen shots are, so hopefully reuploading them will work Very Happy.
21-GetVar:
[attachment=3372:21-GetVar.gif]
49-SpeedyKeys:
[attachment=3370:49-Speedy Keys.gif]
56-Draw:
[attachment=3375:56-Draw.gif]
29-Rectangles
[attachment=3376:29-Rectangles (1).gif]
Back to top
Galandros


Active Member


Joined: 29 Aug 2008
Posts: 565

Posted: 27 Jan 2011 07:17:23 pm    Post subject:

I don't believed I missed this so much time.
The cursive font is simply nuts but amazing to see.

Now your libraries got in a new level by using the parser hook. I will try to test this. *gets dust out of calculator usb cable*


Last edited by Guest on 27 Jan 2011 07:17:38 pm; edited 1 time in total
Back to top
Sven.Thomas0


Active Member


Joined: 19 May 2009
Posts: 520

Posted: 27 Jan 2011 07:21:15 pm    Post subject:

Erm, before you test... back up your RAM! It is still in beta form...
Back to top
Sven.Thomas0


Active Member


Joined: 19 May 2009
Posts: 520

Posted: 29 Jan 2011 10:33:58 am    Post subject:

THE BUG IS FIXED!!! ♥
So, I feel like a fool, but for future reference and as a note to self: DISABLE INTERRUPTS BEFORE MANIPULATING SP.

Anywho, I made this mistake a long time ago in another program and I even noted it... I just never read my own notes...

So it works! YAY! \(^-^)/

Happiness is my experience!

So here is the new update... command 63 exists but it doesn't work, so I'm not going to upload everything, just the fixed APP.

BatLib fix:[attachment=3386:BatLib 4.00.65.beta.8xk]
[attachment=3387:Readme 4.00.64.beta.pdf]
Now it won't crash randomly except on commands I have already made mention of. It will NOT cause random crashes for no reason.

EDIT: BatLib now uses dim( instead of sum( and some command syntaxes are changed.


Last edited by Guest on 31 Jan 2011 01:07:04 am; edited 1 time in total
Back to top
Sven.Thomas0


Active Member


Joined: 19 May 2009
Posts: 520

Posted: 19 Feb 2011 06:59:08 pm    Post subject:

Okay, here is the very first non-beta release. I have currently disabled hook chaining (so you cannot run things like Celtic 3 and BatLib at the same time) and the menu still needs work. Otherwise, unless the readme says otherwise, all of the commands should be stable and should remain compatible with future versions.
Back to top
Sven.Thomas0


Active Member


Joined: 19 May 2009
Posts: 520

Posted: 26 Feb 2011 02:09:56 pm    Post subject:

Okay, I have made a few fixes and additions:
-The menu is fixed (I changed the rectangle routine and that messed up the menu)
-I fixed the graph screen shifting routine so it can now shift in 8 directions instead of 1
-I added CopyProg as a command, but it still needs work (it will create named vars, but it throws an error. Regular vars are fine, though)
-I added a command to pixel test pictures (even if they are archived)
-I added a command to convert a number to a byte of data (output as a string)
-I added a command to convert a byte of a string as a real number
-I added DataString as a command (full info and hacks can be found on TICalc, here.

I am at the moment working on the command SubMatrix that will let extract a portion of a matrix. This could be useful for games like Connect4, I think, and for some math routines that require matrix manipulations. I am then going to work on making a command called SubData2D that will read data as a two dimensional matrix (like tilemap data) and extract a portion of it. This will be useful for those who want to create scrolling tilemaps :D

I also need to create tilemap routines that can source sprites from archive and out of pictures... At the moment one of the inputs is "SpriteData" which isn't very practical... Plus, I already have a routine to convert picture data to a sprite set.

Also, this App is almost halfway finished at 70 commands... My goal is to fill up one flash page.


Last edited by Guest on 26 Feb 2011 02:12:22 pm; edited 1 time in total
Back to top
Sven.Thomas0


Active Member


Joined: 19 May 2009
Posts: 520

Posted: 13 Mar 2011 12:38:03 pm    Post subject:

Time for another update? I had the last nine days off, away from the internet, so I put in some more effort into programming and the results.... 22 new commands and a programming language! Here are some new commands:

Code:
69-SubMatrix
70-PlayNote
71-Logic
72-MatrixList
73-Left
74-Right
75-Mid
76-Diag
77-DiagI
78-SubCol
79-SubRow
80-ListToDiag
81-ListToDiagI
82-ListToCol
83-ListToRow
84-ExecVarBASIC
85-GetProgName
86-Timer
87-DrawText
88-DrawDispText
89-ASCIILength
90-DrawTokenStr

And about that programming language.... Here is an example of what can be done using command 40:
[attachment=3446:Block Eater 0.gif]
BatLib v4.00.92.43
Back to top
Sven.Thomas0


Active Member


Joined: 19 May 2009
Posts: 520

Posted: 21 Apr 2011 02:05:19 pm    Post subject:

Okay, I will update with the latest version of BatLib... It now is over 100 commands which is awesome and I have made lots of fixes!

dim(12 and dim(14 now return ".ARCH" if the variable is archived
dim(15 is fixed to read archived bytes
dim(16 is now a tilemap command that can use pictures for sprites data Smiley
dim(54 is now functioning and works very well

Code:

91-DelElements        Deletes elements from a list
92-InsElements        Inserts zeros into a list at an offset
93-InsertList         Inserts a list into another list. The inserted list can be in archive
94-InsertBytes        Inserts a string into another variable.
95-SplitNibbles       Reads a string and inserts a 0 nibble between each nibble
96-NibbleComp         Reads a string of data and outputs a string that is comprised of every other nibble
97-GetNibble          Reads a nibble in a var
98-WriteNibble        Writes a value from 0 to 15 to a nibble in a var
99-DispGraphBuffer    Displays the graph screen (even if you are on the homescreen). Drawing commands draw without displaying the graph screen (so that you can do a lot of drawing, fast).
100-BatLibRAM         Used to install BatLib RAM areas for when I get it to chain with other apps
101-SubDat2D          Used to give a byte array 2 dimensions. Great for scrolling tilemaps
102-StringWidth       Returns the width of a string in pixels in small font

dim(54 will be very useful for people making an rpg or *cough* making a trading card game *cough* because it will allow users to store data such as names or descriptions to a program or other var, store it in archive and then read lines Smile It isn't limited to newlines either, so if you want, you can read between spaces or any other token you want Smile
BatLib v4.00.103.51
Back to top
Sven.Thomas0


Active Member


Joined: 19 May 2009
Posts: 520

Posted: 04 May 2011 06:41:56 am    Post subject:

I am thinking that I will have UTI as the main site that I keep BatLib updates from now on. This will probably mean much less feedback, but I guess I am just going to have to work with that :/

Anywho, in the next update that I want to make before I leave for the summer (May 9 is my leaving date), I will have several things done:
Fixed RecallPic in ReCode- I mistyped a byte that should have been 78 (I put 1Cool
Added 103-ReplaceByte
Added 104-StrToASCII

I would like to add other things, too. Among them is to reinstate hook compatibility with at least Celtic 3 if not others. Does anybody have other ideas?
Back to top
ralphdspam


Newbie


Joined: 05 May 2011
Posts: 2

Posted: 05 May 2011 01:21:51 am    Post subject:

Good luck with the updates, Zeda. Smile
Back to top
Sven.Thomas0


Active Member


Joined: 19 May 2009
Posts: 520

Posted: 05 May 2011 06:37:32 am    Post subject:

Thanks Smile I think that after my next exam I will attack Celtic 3 compatibility.
Back to top
tifreak8x


Elite


Joined: 27 Aug 2005
Posts: 956

Posted: 05 May 2011 07:44:25 pm    Post subject:

If I ever get done with pokemon, I'll have to look into making a program or two that uses a great many of these items :)

Keep up the awesome work ^ ^
Back to top
Sven.Thomas0


Active Member


Joined: 19 May 2009
Posts: 520

Posted: 05 May 2011 08:04:47 pm    Post subject:

Thanks ^-^ Also, I realised that I included a program (prgmZINSTALL) that can be used to safely switch between BatLib hooks and Celtic 3 hooks. I still want to see if there is a way that I can avoid making the user use the program to swap back and forth, though.

EDIT: Okay, so I finally put together this version... I added the two commands as well as the fixed RecallPic command in ReCode. I also fixed up the main menu again, now that I have allowed hook chaining again Smile Unfortunately, hook chaining with Celtic 3 will cause a crash after using a command, but it does appear to work smoothly with Omnicalc!
Because of this, I added the ability to disable chaining with at the main menu (highlight "Parser Hook" and press enter. Then press [del].) Hopefully this will help avoid crashes, but I imagine it won't x.x

I might disable hook chaining all together in a future version because it only makes it easier to crash your calc and BatLib is packed with features, anyway :)

Also, I decided to make a simple thing in ReCode because I needed a distraction :/


Last edited by Guest on 06 May 2011 12:51:23 pm; edited 1 time in total
Back to top
ralphdspam


Newbie


Joined: 05 May 2011
Posts: 2

Posted: 07 May 2011 07:27:15 pm    Post subject:

Wow! Looks great!

Keep up the great work! Smile
Back to top
Sven.Thomas0


Active Member


Joined: 19 May 2009
Posts: 520

Posted: 07 May 2011 11:29:31 pm    Post subject:

Thanks Smile This will probably be my last update for a few months because I leave for the summer in about 13 hours and I won't be back until about September. Still, feel free to post ideas and whatnot! I will need random stuff to go through when I get back!
Back to top
mrmprog


Newbie


Joined: 04 Feb 2011
Posts: 44

Posted: 08 May 2011 03:44:25 pm    Post subject:

It seems like hook chaining still has bugs Sad ...
The only reasons I use omnicalc are the entries menu, quick apps, base changing, and a few commands. If Batlib had these, I would be fine with no chaining.
Glad to see that there are more updates Very Happy
Back to top
Sven.Thomas0


Active Member


Joined: 19 May 2009
Posts: 520

Posted: 02 Jun 2011 12:14:12 pm    Post subject:

Okay, I will see if I can add in some of that. Also, as a side note, I am converting the source code to mnemonics, so I haven't added much, but I want to know if anybody opposes me removing the ReCode command and replacing it with a safer programming language (that you can break using ON) and has a few other neat features. I call it "Grammer" and it is a little slower, but I think it is worth it. Otherwise, I can just include Grammer and ReCode. Here are a few examples of it in action...
[attachment=3485:Pt-Off( Demo.gif] [attachment=3486:Sprite Example 0.gif] [attachment=3487:Tile Mapperizer 0.gif]
Also, I added in the ability to call other programs or subroutines yesterday and you might notice that with Grammer, you can be a little more verbose with your labels than BASIC Very Happy Recode doesn't have a label function, yet...
Back to top
Display posts from previous:   
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
    » Goto page 1, 2  Next
» View previous topic :: View next topic  
Page 1 of 2 » All times are GMT - 5 Hours

 

Advertisement