Omnimaga

Omnimaga => News => Topic started by: Xeda112358 on March 13, 2011, 03:16:55 pm

Title: BatLib officially released
Post by: Xeda112358 on March 13, 2011, 03:16:55 pm
BatLib has been officially released a few days ago. is an App aimed at programmers of all skill levels. It includes 92 commands that make programming either easier, faster, or just plain possible. There are sprite commands, sound commands, string commands, reading from archive, data manipulations, and even a programming language! v4.00.92.43. Here are screenshots of the included hybrid BASIC demo programs:

(http://www.omnimaga.org/index.php?action=dlattach;topic=7030.0;attach=6562;image) (http://www.omnimaga.org/index.php?action=dlattach;topic=7030.0;attach=6563;image)

http://www.omnimaga.org/index.php?action=downloads;sa=view;down=596

Title: Re: BatLib officially released
Post by: Scipi on March 13, 2011, 06:02:54 pm
This looks amazing! And in the nick of time too. I can definitely use this in the Programming Contest. :D
Title: Re: BatLib officially released
Post by: Madskillz on March 13, 2011, 07:20:38 pm
Yeah looks fantastic Xeda. It has a lot of features and will surely be useful.
Title: Re: BatLib officially released
Post by: Hot_Dog on March 13, 2011, 07:24:55 pm
If those screenshots are full speed on a Ti-83+ Normal, I can't believe my eyes

Well, I can't believe them anyways
Title: Re: BatLib officially released
Post by: Xeda112358 on March 13, 2011, 07:42:16 pm
Sorry, I was away for a while, but if BASIC programs are executed at 6 mhz, then yes, that is the same speed on a real calc :D

Also, if anybody has any requests for additions that could help in the programming competition, I might be able to help out!
Title: Re: BatLib officially released
Post by: AngelFish on March 13, 2011, 07:44:07 pm
That's amazing. +50 Internetz
Title: Re: BatLib officially released
Post by: ralphdspam on March 13, 2011, 07:44:21 pm
Yeah, this looks really fast!  I can't believe this is interpreted code! O.O

EDIT: Double ninja'd all the way!  :w00t:
Title: Re: BatLib officially released
Post by: Xeda112358 on March 13, 2011, 07:45:14 pm
Hehe, I think it helps that there isn't too much in the way of error checking :D
Title: Re: BatLib officially released
Post by: willrandship on March 13, 2011, 07:46:37 pm
So, how crash-prone is it right now? and how bad are said crashes? (assuming you avoid using plain hex)
Title: Re: BatLib officially released
Post by: Hot_Dog on March 13, 2011, 07:49:31 pm
Oh, now I see why that was fast: You use your own intrepreted language!  Another +1!
Title: Re: BatLib officially released
Post by: willrandship on March 13, 2011, 07:50:17 pm
Yep, as I understand it it's essentially another xlib, right?
Title: Re: BatLib officially released
Post by: Xeda112358 on March 13, 2011, 07:50:59 pm
Well as long as you input the correct syntax, it should not crash and sometimes even if you mess up the syntax it isn't that bad. But to give you an idea, the If you use End out of place, the parser jumps to a random spot in memory and might possibly crash (like if that random spot pointed to some outrageous code like AsmPrgmC7). But that being said, the syntax is pretty loose. For example, instead of doing:
Code: [Select]
If A=3
Then
Line(0,96,0,9,2
DispGraph
End
you can do:
Code: [Select]
If A=3
Line(0,96,0,9,2 DispGraph
which is just a space separating the two commands :D
Title: Re: BatLib officially released
Post by: Hot_Dog on March 13, 2011, 07:51:10 pm
Yep, as I understand it it's essentially another xlib, right?

Actually, what I mean is she created her own basic-interpreter, not just another lib
Title: Re: BatLib officially released
Post by: Xeda112358 on March 13, 2011, 07:52:16 pm
Although BatLib itself is like a giant version of xLIB, the ReCode command itself is a whole new interpreter, not a parser hook.
Title: Re: BatLib officially released
Post by: willrandship on March 13, 2011, 07:53:13 pm
ooh, interesting...and no closed parentheses either! What happens if you do close it? :P
Title: Re: BatLib officially released
Post by: Xeda112358 on March 13, 2011, 07:54:16 pm
Nothing, they aren't recognised yet :D If you wanted to, you could use spaces instead of commas :D
Title: Re: BatLib officially released
Post by: DJ Omnimaga on March 13, 2011, 07:54:54 pm
I guess this is why some of the stuff is so much faster than xLIB/TI-BASIC, right?
Title: Re: BatLib officially released
Post by: willrandship on March 13, 2011, 07:55:13 pm
hmm....now I really want a TI-Keyboard.
Title: Re: BatLib officially released
Post by: Xeda112358 on March 13, 2011, 07:55:56 pm
Yeah, DJ :D Also, did you put the emulator at 25% when you did the second one? If not then those are some amazing reflexes :P
Title: Re: BatLib officially released
Post by: Scipi on March 13, 2011, 11:54:48 pm
My reaction to this is like willrandship's avatar. :P

Would it be possible to create sprites larger than 8x8 or 16x16 in this. Or even full screen pics? Like a splash screen?
Title: Re: BatLib officially released
Post by: Xeda112358 on March 13, 2011, 11:58:44 pm
Once I get sprites added, that is exactly what I plan. Since ReCode is part of BatLib and I already have the code for it, yes. Plus, I plan to add in RecallPic and StorePic commands (that can be used with any of the pictures 0~255). I plan to use Pt-On(, Pt-Off(, and Pt-Change( for sprite commands :D Pt-Change( will let you swap the sprite data with the sprite data on the screen, so doing it twice will result in no change. :D
Title: Re: BatLib officially released
Post by: Scipi on March 14, 2011, 12:04:04 am
Also something that might be useful was if you had sprites plotted that wouldn't overwrite any sprites behind it. Say if you had a cursor in a tile based game, any sprites it goes over won't be overwritten by whitespace.
Title: Re: BatLib officially released
Post by: Xeda112358 on March 14, 2011, 12:07:10 am
That is what Pt-Change( is going to be designed for :D
Also, there is a BatLib command that draws directly to the LCD, so updating the graph buffer will restore what was underneath. I could easily implement that code in ReCode.

Lemme make a quick example :D
EDIT: Okay, here is the example I made as well as the most recent version of BatLib... As a cool tip, if you replace the first two lines of ReCode in prgmMOUSE (which should be 3→D:3→E) with this:
Code: [Select]
!Ans→D→E
Then if you start the program with, say 9:prgmCURSOR you will be using a 9x9 cursor.
Title: Re: BatLib officially released
Post by: DJ Omnimaga on March 14, 2011, 03:27:21 am
Darn this is so fast. O.O

And yes I used slow mode to make the screenshots, except at 1% speed rather than 25%. :P
Title: Re: BatLib officially released
Post by: Xeda112358 on March 14, 2011, 06:04:13 pm
Well, guess what? if you think that is fast, well, let me put it this way: I can definitely answer this question:
If those screenshots are full speed on a Ti-83+ Normal, I can't believe my eyes

Well, I can't believe them anyways
The code is executed at 6mhz, so that is the speed on a normal TI-83+... So wanna see full speed on an 84+SE? Well, I'm just warning you, it might be difficult to see! The amazing thing is, on a real calculator, it moves so fast that most of my friends couldn't see it and they thought it was teleporting from corner to corner!
Title: Re: BatLib officially released
Post by: program4 on March 14, 2011, 07:06:57 pm
That's so amazing! It looks like ASM, except it's interpreted. I never knew how fast non-compiled programs could go! I really should start learning Recode now.  ;D
Title: Re: BatLib officially released
Post by: ztrumpet on March 14, 2011, 07:52:48 pm
Wow, that's fast!  I really need to give this a try. :)
Title: Re: BatLib officially released
Post by: Yeong on March 14, 2011, 08:45:39 pm
 O.O
It looks like it's even faster than Axe
Title: Re: BatLib officially released
Post by: DJ Omnimaga on March 14, 2011, 08:48:03 pm
Those who wanted a new interpreted language but that still allowed TI-BASIC usage and the prgm editor will definitively love this. O.O
Title: Re: BatLib officially released
Post by: Xeda112358 on March 14, 2011, 08:53:45 pm
Hehe, the fast mode might actually be faster on an actual calc :D At the moment, I added in the "Full" command to deal with fast mode. (I took the token idea from Axe, by the way) I am also working out a bug with the RecallPic function or at least I believe that is where the problem is. Anywho, the syntaxes are:
Code: [Select]
Full   -Sets mode to 15MHz (if able)
Full0  -Sets mode to 6MHz
Full1  -Sets mode to 15MHz
Any other number after Full besides 0 or 1 will toggle the mode

RecallPic xx Will draw the picture to the graph screen. xx is a number from 0 to 255
StorePic xx Will store the image on the LCD to the picture. The picture will include the last row of pixels, too.
Title: Re: BatLib officially released
Post by: ztrumpet on March 14, 2011, 08:54:53 pm
Oooh!  Yay for more picvars. :D
Pic0 = 10, right?
Title: Re: BatLib officially released
Post by: Xeda112358 on March 14, 2011, 08:56:23 pm
Pic1 = 0
Pic2 = 1
Pic3 = 2
...
Pic0 = 9

Also, it can currently recall pics from the archive :)
Title: Re: BatLib officially released
Post by: ztrumpet on March 14, 2011, 08:57:50 pm
Ah, okay.

Also, it can currently recall pics from the archive :)
:w00t:
Zeda, you're ideas are great.  Everything I've came to accept as impossible in Basic is getting changed.  Next you're going to tell me that I can run archived programs. ;)
Title: Re: BatLib officially released
Post by: Xeda112358 on March 14, 2011, 08:59:56 pm
Hm, well the plan for the future was to parser ReCode directly from archive (which will be fun getting that to work) :D
However BASIC will be a little more difficult to parse from the archive, but I might be able to do it !