Omnimaga

Omnimaga => Completed => Our Projects => BatLib => Topic started by: Xeda112358 on November 19, 2010, 01:06:33 pm

Title: BatLib
Post by: Xeda112358 on November 19, 2010, 01:06:33 pm

Latest Update: 29 September 2012 http://ourl.ca/7980/318164

I have made mention of this project before, but it was kind of dead at the time. On top of that, I was working on my other project, BASIC ReCode. For the past day or two, I have been working on SpriteLib and yesterday, I had a small breakthrough. I am still working on both projects, but they are going to take turns in my attention. So here is a bit of the background of why I decided to finally make a topic...

I went to bed this morning a little after 2:00 AM. I woke up at 7:30 ish, wondering if I should get up. For about 20 minutes, my sleepy brain made the logical connection that since all I did yesterday was program, it must have been Saturday and so today was Sunday. I fell back asleep deciding I would sleep in and program a little later. An hour later, I jumped out of bed very suddenly, surprising my brain and body. While I tried figuring out what my body was doing, my brain was screaming "CRAAAAAP! IT'S FRIDAY! I HAVE CLASS!" So naturally, I got in the shower, thinking about SpriteLib. Half asleep, my brain started screaming "YOU FORGOT THE 23! THAT WAS THE PROBLEM! READ YOUR OWN NOTES!" So I ran back to my room, got on my computer to see what I was talking about. Sure enough, in the APP that I have been trying to find the error in for four months was missing one byte: a 23 (also known as "inc hl"). After I added the byte (and fixed another call effected by this change), I sent it to my calculator and sure enough, it worked.

So now I get to go through my code, fix any other things modified by this change, and then SpriteLib will be in APP form, using a parser hook with "int(" and no longer relying on Str1 and Str2 for some commands :D YAYYYYYYY Once I get a few commands finished, I will upload the APP.

EDIT: I am skipping my last class to work on this right now :D
Title: Re: SpriteLib
Post by: ASHBAD_ALVIN on November 19, 2010, 01:18:32 pm
don't skip yur clazzes to ulpoad tis soo caled sprritlibbb!  Though this does sound pretty cool.  Is this a sprite thing like xLib for BASIC? :)
Title: Re: SpriteLib
Post by: Xeda112358 on November 19, 2010, 01:29:01 pm
Ah, well I have only missed one day this semester and nothing is happening in class, so I figured I was safe. SpriteLib currently is just a program I started many months ago and it was originally designed around its font editing features. Eventually it evolved to handle sprites, tilemaps, font editing (of the hex chars), editing variables and a few other random things. This was all done as an assembly program, but now I am translating it into an app. The program made use of a list, sometimes Str1, and occasionally Str2 for input, but now it can just use int( for all of that :D. I am going to test how well I converted the first 6 commands right now...
Title: Re: SpriteLib
Post by: ASHBAD_ALVIN on November 19, 2010, 01:30:15 pm
wow, a app written in hex!  I am impressed!  Great job!  And yes this sounds cool, can't wait to see it!
Title: Re: SpriteLib
Post by: Xeda112358 on November 19, 2010, 01:34:19 pm
yeah, I have to transfer the hex to my computer, use a spreadsheet I made to convert it all to .db statements and then I run that through TASM32. Then I open up .obj file, copy all of the data, open up a .hex file that has a header that I made a few months ago, replace some of the data, then use Wappsign. It am going to find a better way...
Title: Re: SpriteLib
Post by: ASHBAD_ALVIN on November 19, 2010, 01:35:41 pm
I see, nice to see it's hex even on the comp ;)

I was wondering what you did to sign, now I get what you did.  the only thing I hate about hex coding is that you have to carry around a packet of commands.  Though it does make you feel more in control sometimes :)
Title: Re: SpriteLib
Post by: Xeda112358 on November 19, 2010, 01:37:00 pm
Who carries around a packet of commands? :D I memorize them. If I do not know a B_Call and I really need it, I just make it. Of course, if I am on my computer, I can just look it up, but that is boring...
Title: Re: SpriteLib
Post by: ASHBAD_ALVIN on November 19, 2010, 01:38:03 pm
you memorize?  I memorized like 5 commands.  Do you remember then by full command or by a few bits with a varying bit field?
Title: Re: SpriteLib
Post by: Xeda112358 on November 19, 2010, 01:39:04 pm
Full command, but I have been using them for about a year now, so it is pretty easy at this point.
Title: Re: SpriteLib
Post by: ASHBAD_ALVIN on November 19, 2010, 01:41:01 pm
I see.  The only way I memorized any was by trying to do the latter.  Nice job though.
Title: Re: SpriteLib
Post by: Xeda112358 on November 19, 2010, 01:42:49 pm
By the way, something didn't work with the app... it doesn't crash, but it just outputs the last value passed through it. I have a program on my calculator that opens the app and uses the calls so I can do some debugging. In the program, the functions work, so I must have messed up a byte somewhere in the code for the app.
Title: Re: SpriteLib
Post by: ASHBAD_ALVIN on November 19, 2010, 01:47:37 pm
can you disassemble it and give me the mnenomics? I can look at it if you want.
Title: Re: SpriteLib
Post by: Xeda112358 on November 19, 2010, 01:51:25 pm
Ahh, it is 1204 bytes of code and I do not have a disassembler... Here is the hex:

Code: [Select]
DB06218B40EF2650EF274083B7C8E521B1B1ED42E12802AFC97D3D28FA22A484E5DFE1EF9F43ED73A8842A24982322A684CDB8433C47100532E29906001005EF70450600101421154301350011E299D5EDB0E1DB06EFE44F0600101ACDB843E60F8783878316005F21729919E5CD7143E1EBEDB006001027CDB843E60F8783878316005F21729919E5CDB843E60F8783878306004FC5CD4A43C1E1EDB006001012CD7143CB38CB1921EC86E5CD9D4336C906001026CDB843F5CDB843D5CD7143217884EBEDB0AF12EFF142DA81421313E119F1467778EF8C47060010083A3F84EF8C470600100AAFD301DB013C28F90600FE01C9E5297E292929E11B7AB320F40B78B120F6C909F52BF1CB16F50B78B120F6F1C909EB09AFF5F12B1B1A8E77F50B78B120F4F1EBC909EB09AFF5F12B1B1A9E77F50B78B120F4F1EBC9E5C51A13EDA1200B78B120F6EBC1D1ED4237C9C1E17AB320E7C91A13EDA1200578B120F6BFC9117884D511AA84D5CD1042EBED67EBCD1042EBED67EB1B7CB520EDE1ED52444DE1772379873DC6807723EBEDB0C9AF06102917FE0A3803D60A2C10F5C91A007713230B78B120F6C9C522AA843E3FBECC744223060004237EFE3F2804FE2B20F5E52BEB21000022B284231AE60F1BE5D5C5CDAA43C1ED5BB2841922B284D1E13E0AD5C5CDAA43C1D110E0ED5BB2847BE1C1C92A5D963E3F23BB20FC23225D96ED7BA884C983472142847EFE3238033E3277FE0A20033E0A7778C922AA8421409322B284060CC50608C51AD56F2600292929ED4BAA8409EB2AB284CDD24222B284D113C110E32525252C22B284C110D6C9010C081A007713780600094710F5C90E007EFE2920023E20FEBB200A23057ED64FFE6D38013D2312130C10E5C9773E0C904F7EC5F51A0077132310F909F1C13D20F1C983FE012803AF3DC978FE3A3802D607D630FE1030F04F3A5396B728E979C58781878116005F216B991978010700115A84EDB0C1AFC9C5EF524BD7EFC94FE1EF27431313C93E30ED67FE3A3802C607121BC91AFE3A3802D60713ED6FC92AA6842BEF7A412322A6842AA4842B22A484EFF142DA8142EB4E234623EBC9CD5943CD59432B0B78B120F4C9CD6643CD6643230B78B120F4C90608110000EB290730011910F9C9ED4BA48478B128110BED43A4842AA684CDE44322A684C9D5E5CDAA43ED5BAA841922AA84E13E0ACDAA43D1C97EE5E60FCB3FF53C4F060009EB21000022AA8423F130061AE60FCDCF431AE6F007070707CDCF431B0D79B720EAE111090019ED5BAA847BC96F2600EF9247EF5641F601C932B28478B7200A79B728103D200322AA843AB28423BE20FC0B18E8EB2AAA84EBED52444DC97EFE61380CEB36BB23EBC64FFEBB38013CFE2E20023E3AFE2020023E29FE3F20013D1213230B78B120D6E1EBED52E5C1C9CD7143EB41117984CDE142AF12CDB843327884EFF142DC8142EB4E234623C9CDB843E603878787C6A632D642320843C9CDB843D5CDB843EB2929545D2919D119C9E5C5D5217984010000AF0C23BE20FBC5EFF142DC814278C1210C0009EBB720021E0219D119C1D1EF5480C9E5292929E13E2084D310E5292929E13E8085D310C5E5E5292929E11A13D31110F5E1C10D2479B720D7C9C5E521EC86E5EB79F5E5C57E1213780600094710F6C1E1F1233D20ECD1E1C1C9

However, the calls are where you might run into difficulty. If you have any questions, I kep a document with all the info on the calls. Just give me the address and I can tell you the call and the info about it. Unless you have openoffice...? (so i can give you the spreadsheet)
Title: Re: SpriteLib
Post by: AngelFish on November 19, 2010, 02:14:12 pm
There is a way to disassemble the binary with SPASM, but I'm not sure how to do it.
Title: Re: SpriteLib
Post by: Xeda112358 on November 19, 2010, 02:32:38 pm
Okay, I found the problem when I was comparing the version that does work (but has only 3 functions I made up real quick) with the new version. I just copied the wrong hex data into the App :-[ But all is good,  now, I think.

Does anybody have a non-manual way of either converting my hex to a .obj file or for splitting up a large body of text so that each line has 32 characters? I would prefer the former method, if possible, but either method would be very much appreciated.
Title: Re: SpriteLib
Post by: Runer112 on November 19, 2010, 04:38:00 pm
I know you can do the latter pretty easy with regular expressions. Not sure about the former, because I'm not entirely sure how that file would be formatted.


EDIT: After spending about 30 seconds to open up Notepad++ and whip up a regular expression:
Spoiler For Spoiler:
DB06218B40EF2650EF274083B7C8E521
B1B1ED42E12802AFC97D3D28FA22A484
E5DFE1EF9F43ED73A8842A24982322A6
84CDB8433C47100532E29906001005EF
70450600101421154301350011E299D5
EDB0E1DB06EFE44F0600101ACDB843E6
0F8783878316005F21729919E5CD7143
E1EBEDB006001027CDB843E60F878387
8316005F21729919E5CDB843E60F8783
878306004FC5CD4A43C1E1EDB0060010
12CD7143CB38CB1921EC86E5CD9D4336
C906001026CDB843F5CDB843D5CD7143
217884EBEDB0AF12EFF142DA81421313
E119F1467778EF8C47060010083A3F84
EF8C470600100AAFD301DB013C28F906
00FE01C9E5297E292929E11B7AB320F4
0B78B120F6C909F52BF1CB16F50B78B1
20F6F1C909EB09AFF5F12B1B1A8E77F5
0B78B120F4F1EBC909EB09AFF5F12B1B
1A9E77F50B78B120F4F1EBC9E5C51A13
EDA1200B78B120F6EBC1D1ED4237C9C1
E17AB320E7C91A13EDA1200578B120F6
BFC9117884D511AA84D5CD1042EBED67
EBCD1042EBED67EB1B7CB520EDE1ED52
444DE1772379873DC6807723EBEDB0C9
AF06102917FE0A3803D60A2C10F5C91A
007713230B78B120F6C9C522AA843E3F
BECC744223060004237EFE3F2804FE2B
20F5E52BEB21000022B284231AE60F1B
E5D5C5CDAA43C1ED5BB2841922B284D1
E13E0AD5C5CDAA43C1D110E0ED5BB284
7BE1C1C92A5D963E3F23BB20FC23225D
96ED7BA884C983472142847EFE323803
3E3277FE0A20033E0A7778C922AA8421
409322B284060CC50608C51AD56F2600
292929ED4BAA8409EB2AB284CDD24222
B284D113C110E32525252C22B284C110
D6C9010C081A007713780600094710F5
C90E007EFE2920023E20FEBB200A2305
7ED64FFE6D38013D2312130C10E5C977
3E0C904F7EC5F51A0077132310F909F1
C13D20F1C983FE012803AF3DC978FE3A
3802D607D630FE1030F04F3A5396B728
E979C58781878116005F216B99197801
0700115A84EDB0C1AFC9C5EF524BD7EF
C94FE1EF27431313C93E30ED67FE3A38
02C607121BC91AFE3A3802D60713ED6F
C92AA6842BEF7A412322A6842AA4842B
22A484EFF142DA8142EB4E234623EBC9
CD5943CD59432B0B78B120F4C9CD6643
CD6643230B78B120F4C90608110000EB
290730011910F9C9ED4BA48478B12811
0BED43A4842AA684CDE44322A684C9D5
E5CDAA43ED5BAA841922AA84E13E0ACD
AA43D1C97EE5E60FCB3FF53C4F060009
EB21000022AA8423F130061AE60FCDCF
431AE6F007070707CDCF431B0D79B720
EAE111090019ED5BAA847BC96F2600EF
9247EF5641F601C932B28478B7200A79
B728103D200322AA843AB28423BE20FC
0B18E8EB2AAA84EBED52444DC97EFE61
380CEB36BB23EBC64FFEBB38013CFE2E
20023E3AFE2020023E29FE3F20013D12
13230B78B120D6E1EBED52E5C1C9CD71
43EB41117984CDE142AF12CDB8433278
84EFF142DC8142EB4E234623C9CDB843
E603878787C6A632D642320843C9CDB8
43D5CDB843EB2929545D2919D119C9E5
C5D5217984010000AF0C23BE20FBC5EF
F142DC814278C1210C0009EBB720021E
0219D119C1D1EF5480C9E5292929E13E
2084D310E5292929E13E8085D310C5E5
E5292929E11A13D31110F5E1C10D2479
B720D7C9C5E521EC86E5EB79F5E5C57E
1213780600094710F6C1E1F1233D20EC
D1E1C1C9
Title: Re: SpriteLib
Post by: Xeda112358 on November 19, 2010, 04:40:03 pm
So how do I do this? I am not computer literate yet...
Title: Re: SpriteLib
Post by: Runer112 on November 19, 2010, 04:44:07 pm
I'm searching for a better regex-enabled editor now, because I never liked the fact that Notepad++'s regex was lacking.
Title: Re: SpriteLib
Post by: Xeda112358 on November 19, 2010, 04:45:40 pm
Okay. This isn't something I know how to google. I get the idea the results would not be what I am looking for.
Title: Re: SpriteLib
Post by: JustCause on November 19, 2010, 04:46:19 pm
I. Am. Impressed.

Nice work Xeda! *insert obligatory omgwtf how youre r program in hex comment here* Hope you can get app signing figured out!
Title: Re: SpriteLib
Post by: Xeda112358 on November 19, 2010, 04:47:58 pm
I have a way to sign the app, but it is very tedious. It makes testing the app take longer.
Title: Re: SpriteLib
Post by: DJ Omnimaga on November 19, 2010, 04:48:32 pm
Sounds interesting. I wonder what kind of sprite stuff you plan to add. I think you should go with some features that other APPs like xLIB doesn't have, because xLIB, Celtic III and Doors CS 7 already do a lot of stuff and if your library only does a small portion of what those apps do, those apps kinda obsoletes your lib, while if you add even more stuff, people might see your lib as an alternative. I think that it would be cool if you added sprite masking, grayscale (using two sprites like in Axe and everytime you use a certain command, the checkered pattern is inverted).

It would also be nice if you had a tilemap feature that displayed maps which has their map data stored inside pics and allow pixel-testing from pic data. In Illusiat 6, 7 and 9 through 12, all map data is stored inside pics, but I am forced to recall the pic on the graph screen to pxl-test it.
Title: Re: SpriteLib
Post by: Munchor on November 19, 2010, 04:53:45 pm
SpriteLib? Nice, and better if it's an Application.

I wish I knew how to make Apps, however, only Asm( can do it, right? So bad..

Hopefullly, Axe >0.4.5 will be able to do it :)
Title: Re: SpriteLib
Post by: Xeda112358 on November 19, 2010, 04:58:10 pm
With the program version, I have a way to edit the font for hex characters to make sprites. Then, there is a command to take a screen shot that works with the next command as a tilemap. Then there is a command that lets you test a coordinate on the homescreen to tell what tile is there. In the example I provided (example 2), there is a map editor as well as a simple program to move through the map. When I work out all the kinks to start developing it as an app, I will definitely try to add a whole lot more to the program. I didn't do things before just because it was a program and it took the OS a while to startup the program making commands slow.

I am still looking for a fast way to convert my hex into an app on the computer, though :C

http://www.ticalc.org/pub/83plus/asm/libs/spritelib.zip (http://www.ticalc.org/pub/83plus/asm/libs/spritelib.zip)
Title: Re: SpriteLib
Post by: DJ Omnimaga on November 19, 2010, 04:59:14 pm
SpriteLib? Nice, and better if it's an Application.

I wish I knew how to make Apps, however, only Asm( can do it, right? So bad..

Hopefullly, Axe >0.4.5 will be able to do it :)
Actually Axe can do APPS already, but they're limited to 1 page (16 KB)
Title: Re: SpriteLib
Post by: Xeda112358 on November 19, 2010, 10:06:32 pm
It is looking like I am not going to be able to convert all of my commands from the program to the APP, so I am just doing random ones. At the moment I have a version of VarEditByte which is used to edit a byte in a variable and ASMHex which executes opcodes. Along with those, I randomly have a command that returns a keypress value (not the same as getKey) and a command that waits for a key is press. I am going to work on a bunch more for about 45 minutes and then go watch Inception!

Oh and I appreciate the Axe thing!
Title: Re: SpriteLib
Post by: DJ Omnimaga on November 19, 2010, 10:09:38 pm
You mean like parts of a floating point number?

Also glad you like Axe. It's a really revolutionary language that I wish it was done 10 years ago. Lots of people wanted one for so long.
Title: Re: SpriteLib
Post by: Xeda112358 on November 19, 2010, 10:13:08 pm
Wow, I just read back through what I wrote and what I meant was that I am not going to be able to convert all of the code at once. The thing is, now that it is using a parser hook, the inputs to the program have changed as well as the outputs. This means I have to got through each code to make sure it works, one at a time. If I just put them all in like I did, I will just keep guessing at where the bugs are.
Title: Re: SpriteLib
Post by: AngelFish on November 19, 2010, 10:16:37 pm
I have a way to sign the app, but it is very tedious. It makes testing the app take longer.

You only have to sign an app to transfer it to your calculator. If you can write the app oncalc (or in wabbit), thenyou can use it without signing.
Title: Re: SpriteLib
Post by: Xeda112358 on November 19, 2010, 10:18:55 pm
Yeah, about some of that... I keep forgetting that have an emulator to test it on, now :D
Title: Re: SpriteLib
Post by: ztrumpet on November 19, 2010, 10:35:27 pm
Sounds neat!
Do you parse the int( command and make sure that it handles regular input correctly?  I'd hate to lose compatibility with most of my programs. :)

I still am amazed at how you program in hex like this, but judging from the instant almost "sleepy-subconscious" '23', it appears to work well for you. ;D
Title: Re: SpriteLib
Post by: Xeda112358 on November 19, 2010, 10:43:36 pm
Thankee and yes, I realised that many programs out there use int(, so I made it work on int( if there were two inputs passed. If there is only one, it executes as normal. int(3.3 returns 3 whereas, int(3,"EF4045 will clear the screen (at the moment, command 3 executes hex code so that I can use it to test new codes)
Title: Re: SpriteLib
Post by: ztrumpet on November 19, 2010, 10:48:58 pm
Awesome!  This will be great! ;D
Title: Re: SpriteLib
Post by: Xeda112358 on November 20, 2010, 07:23:35 am
I have six commands working, but they are pretty random and don't do much yet. This is from my notes:
Code: [Select]
Getkey 0,0
PauseKey 1,0
VarEditByte 2,Type,value,offset,"name"
ASMHex 3,"opcode"
HexToken 4,"hexstring"
LoadData 5,CharStart,#Chars
I plan to change the order of the commands, so I am not going to upload it yet. Plus, I have not made the APP with the new updates yet. I made a fun little program that makes a hook identical to the one made by the app until it gets to the functions. At that point, it loads the app at 4000h and uses the calls in the app. This will let me test the code without having to make an app every time. It is better to debug in RAM rather than Flash.
Title: Re: SpriteLib
Post by: DJ Omnimaga on November 20, 2010, 09:56:08 am
Nice. I like them so far. Will Getkey be direct input? And if it's the case, will any key combination be possible?
Title: Re: SpriteLib
Post by: Xeda112358 on November 20, 2010, 12:40:32 pm
Actually DJ, I am glad you mentioned that. I have a few getKey routines floating around on my computer and on TICalc that I plan to use for this program. One of them will let you press up to two keys and return a real result (0 to 3191) that is unique for any two key presses, one that lets you test certain key groups for up to 8 keys at a time, and one that will just tell which keys are being pressed using a 7 element list as the output. I don't know when the last one will be added because the format will have to change a little for the parser hook, but the others are ready right now.
Title: Re: SpriteLib
Post by: DJ Omnimaga on November 20, 2010, 10:10:35 pm
Ah that sounds cool. One thing I didn't like too much with xLIB is that the only multiple keypresses that were supported were <^, ^>, v> and <v arrows. I don't remember about Celtic III/DCS. I think it simply added 2nd, ALPHA, v^ and <>.
Title: Re: SpriteLib
Post by: Xeda112358 on November 21, 2010, 07:40:15 pm
There is still a bug for some reason in the APP. I have tested all of the current commands using a program, but using the calls in the app. They all work fine, but for some reason in the App, they are messing up. I will need to go through and find the problem, but in the meantime, I added more to the program version. I will need to adjust the readme, but I after this next command (GetSprite), I will upload it. The new commands are ideas from other programs I have made:
26-BatteryLevel
27-IncContrast
28-DecContrast
29-GraphToScrn
30-ScrnToGraph
31-DispChar
32-SetContrast
33-FlagWrite
34-FlagRead
35-GetSprite
36-PicHandle
37-OutputASCII
These will be included in the App when I get to that point, too. If you have any questions about the commands, please ask. It will help me when adding them to the command list :D
Title: Re: SpriteLib
Post by: DJ Omnimaga on November 21, 2010, 08:23:43 pm
Nice, could you explain 33, 34 and 36? Also good luck with the bugs.
Title: Re: SpriteLib
Post by: Xeda112358 on November 21, 2010, 08:39:26 pm
Ooh, the fun ones! Okay, the calc has a bunch of things called system flags that control almost every user setting and a few internal settings. So say you are making a program that edits the users graphical settings. By using FlagEdit, you can do a few things. By sending the value 32 to flag 4, you can do AxesOff, GridOff, CoordOff, RectGC, LabelOff, Connected, and Sequential all at once for mode settings. But here is the best part: This command returns the old value in Ans. This means that you can restore your user's settings just by sending the result back through. FlagRead just gets the value of a flag.

For the flags, I will include information on how to create values and I will put together a list of my own. FlagEdit is actually a program I made when I was just starting out as a an assembly programmer :D.

PicHandle is a really nice command, too. The input is {36,Func,Pic#}.
Pic# is a number from 0 to 255 that represents the picture number. The functions are as follows:
0-RecallPic
1-StorePic
2-DeletePic
3-Unarchive
4-Archive
5-ArchUnarch (archives an unarchived pic, unarchives an archived pic)

Any number greater than 5 executes command 5.
Title: Re: SpriteLib
Post by: DJ Omnimaga on November 21, 2010, 08:49:50 pm
Cool :O
Title: Re: SpriteLib
Post by: ztrumpet on November 22, 2010, 12:05:57 am
Sounds awesome! ;D

5-ArchUnarch (archives an unarchived pic, unarchives an archived pic)
You may want this to be called "Toggle Archived" to avoid confusion. :)
Title: Re: SpriteLib
Post by: Xeda112358 on November 22, 2010, 12:08:20 am
Okay, will do. I am working on finishing up the readme at the moment. It is really tough to explain the FlagEdit functions. :( They were a program by themselves before and they required a thorough readme. I am afraid some of the functions aren't BASIC user friendly.
Title: Re: SpriteLib
Post by: Xeda112358 on November 22, 2010, 07:11:25 pm
Okay, it has been an hour... Here is the updated program version... sorry if the readme is a little sparse on notes for the new commands, but if you have any questions, I will try to answer them :D

What if I included BASIC ReCode in the App version....? That might be neat... :D
I don't think I will, though :(
Actually, it wouldn't be too hard...
I dunno.

next idea for SpriteLib:
MultiKeys
SpeedKeys
ShiftData
RotateData

Maybe another FontHook to choose from...?
One that uses Omnicalc Fonts, but the font can be archived...?

(by the way, SpriteLib was originally going to be an Assembly version of FontEditor until I figured out a tilemap routine. That was when I added other sprite capabilities and called it Spritelib).
Title: Re: SpriteLib
Post by: DJ Omnimaga on November 23, 2010, 12:55:51 am
Cool! Maybe you should upload it in the downloads section so it gets more hits. Omnicalc font support would be cool, if they're useable from archive. I assume that might be a bit slower, though.
Title: Re: SpriteLib
Post by: Munchor on November 23, 2010, 07:49:05 am
Okay, it has been an hour... Here is the updated program version... sorry if the readme is a little sparse on notes for the new commands, but if you have any questions, I will try to answer them :D

What if I included BASIC ReCode in the App version....? That might be neat... :D
I don't think I will, though :(
Actually, it wouldn't be too hard...
I dunno.

next idea for SpriteLib:
MultiKeys
SpeedKeys
ShiftData
RotateData

Maybe another FontHook to choose from...?
One that uses Omnicalc Fonts, but the font can be archived...?

(by the way, SpriteLib was originally going to be an Assembly version of FontEditor until I figured out a tilemap routine. That was when I added other sprite capabilities and called it Spritelib).

First version! Downloaded already!
Title: Re: SpriteLib
Post by: Xeda112358 on November 23, 2010, 09:31:55 am
Thanks! I am not going to be on for the next five days or so because I go home for break and I pretty much never have access to the internet. Sorry in advance to anybody with questions... I will probably end up working on that app some more and hopefully find that bug. Yesterday, I remembered a bug that I knew was going to be in the app version, so I need to fix that... And I will probably work on BASIC ReCode as well to get it back up to speed (and possibly get put into the APP if I get the app to work).
Title: Re: SpriteLib
Post by: DJ Omnimaga on November 23, 2010, 01:11:09 pm
Ah ok, have fun there! I can't wait for your return. ;D
Title: Re: SpriteLib
Post by: Xeda112358 on November 23, 2010, 02:08:55 pm
Yes! I get to see my friend/neighbor and my girlfriend! And my little brother just entered high school this year meaning he is borrowing a TI-84+... And my other brother needs to be straightened out a little (seniors in high school these days :D)And on top of all that, I will have more time to program! (after going to two Thanksgivings, getting all my schoolwork done, and chores, of course :D) Ah, SpriteLib, no worries. You wont take a back seat just yet...
Title: Re: SpriteLib
Post by: AngelFish on November 23, 2010, 02:29:29 pm
And my little brother just entered high school this year meaning he is borrowing a TI-84+...=

So you're going to set him up with a full CAS you hand coded in Hex? ;)
Title: Re: SpriteLib
Post by: Xeda112358 on November 23, 2010, 02:40:20 pm
Exactly! I mean, he is going to need something to use in Algebra 100... Actually, I think I will give him Axe 4.5 and Celtic 3. He is in the same boat I was with no internet :D
Title: Re: SpriteLib
Post by: AngelFish on November 23, 2010, 02:44:04 pm
Try Symbolic with Omnicalc. It'll get him used to the RAM clears while giving him A's in Algebra  ;)
Title: Re: SpriteLib
Post by: Xeda112358 on November 23, 2010, 03:05:36 pm
Actually, that isn't a bad idea. And maybe GroupTool, too. Group Tool is reliable, unlike the OS. Even groups that the OS screwed up can be ungrouped.
Title: Re: SpriteLib
Post by: ztrumpet on November 23, 2010, 04:03:50 pm
Sounds neat!  * ZTrumpet downloads
Title: Re: SpriteLib
Post by: DJ Omnimaga on November 23, 2010, 04:05:32 pm
Yes! I get to see my friend/neighbor and my girlfriend! And my little brother just entered high school this year meaning he is borrowing a TI-84+... And my other brother needs to be straightened out a little (seniors in high school these days :D)And on top of all that, I will have more time to program! (after going to two Thanksgivings, getting all my schoolwork done, and chores, of course :D) Ah, SpriteLib, no worries. You wont take a back seat just yet...
I hope they aren't gonna force you to give him your own calc and prevent you from coding anymore, like Eeems parents did once. X.x
Title: Re: SpriteLib
Post by: ztrumpet on November 23, 2010, 04:13:41 pm
Wow, this is awesome!

I just printed the whole readme.  * ZTrumpet runs off to read it :D
Title: Re: SpriteLib
Post by: Xeda112358 on November 23, 2010, 04:24:56 pm
Holy crap, how long is it? And is the spacing correct? like does it fit on one line?

I don't think they will make me give mine to him :D I bought them both with my own money :D I'm one of those kids... I thought I was going to be short by $20 to pay for tuition, but I just deposited a check and I checked my bank accounts and I will have enough... At least I don't need to rely on my parents... :D
Title: Re: SpriteLib
Post by: ztrumpet on November 23, 2010, 04:25:57 pm
Holy crap, how long is it? And is the spacing correct? like does it fit on one line?
15 pages.  This spacing is great! ;D
Title: Re: SpriteLib
Post by: Xeda112358 on November 23, 2010, 04:28:18 pm
Wow... I should use that for NaNoWriMo next year. I will title my novel Read Me.
Title: Re: SpriteLib
Post by: calcdude84se on November 23, 2010, 08:19:46 pm
I've had problems with GroupTool involving large (e.g. 999-element) lists. It will freeze when I try to view a group with one in it.
If he has an interest in ASM and he doesn't feel like following you in using hex, you can give him Mimas :)
Wow... I should use that for NaNoWriMo next year. I will title my novel Read Me.
Or Don't Read Me. More people might read it that way ;D
Title: SpriteLib (program)
Post by: Xeda112358 on November 24, 2010, 12:58:56 am
SpriteLib (program)



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

SpriteLib is a program designed to add some functionality to BASIC programs. It can handle sprites, tilemaps, font editing, memory editing, and other functions to aid in developing. As of v3.3.30, there are 39 different functions.
Title: Re: SpriteLib
Post by: DJ Omnimaga on November 24, 2010, 01:01:02 am
This is the longest readme I ever seen. O.O
Title: Re: SpriteLib
Post by: Xeda112358 on November 28, 2010, 05:36:05 pm
Well, hello there! I actually did not get much programming done over my mini break, but I did manage to add one more useful command. It is called SubList and it is pretty simple to understand, I think. If L1 is {0,1,2,3,4,5,6} and you wanted to get the {2,3,4,5} part of that list. With the command, you use 0 as the list#, 2 as the offset, and 4 for the number of elements to copy:
:{38,0,2,4
:Asm(prgmFONT

What I did not add was support for named lists and archived lists :( When I get the time, I will add that support, though.

L1=0
L2=1
L3=2
...
Title: Re: SpriteLib
Post by: Munchor on November 28, 2010, 06:00:52 pm
Well, hello there! I actually did not get much programming done over my mini break, but I did manage to add one more useful command. It is called SubList and it is pretty simple to understand, I think. If L1 is {0,1,2,3,4,5,6} and you wanted to get the {2,3,4,5} part of that list. With the command, you use 0 as the list#, 2 as the offset, and 4 for the number of elements to copy:
:{38,0,2,4
:Asm(prgmFONT

What I did not add was support for named lists and archived lists :( When I get the time, I will add that support, though.

L1=0
L2=1
L3=2
...

Nice, updates. Now, my question is... I heard you saying this would be an Application in the future. Any plans?
Title: Re: SpriteLib
Post by: Xeda112358 on November 28, 2010, 06:03:19 pm
Yes, I am working on the app, but there are still bugs I need to tease out. I have a program that use the App for the calls, but the App isn't working independently, yet. :( I am still working on that, though... I am trying to pretty much convert the program almost directly into the APP version, but some syntaxes need to be changed to let it work as a parser hook.
Title: Re: SpriteLib
Post by: Munchor on November 28, 2010, 06:05:38 pm
Yes, I am working on the app, but there are still bugs I need to tease out. I have a program that use the App for the calls, but the App isn't working independently, yet. :( I am still working on that, though... I am trying to pretty much convert the program almost directly into the APP version, but some syntaxes need to be changed to let it work as a parser hook.

Yes, today I was wondering... How hard is it to make an application?

I'd like to make an application, with no goal, maybe HotDog's program that adds two numbers. I'd like to make that an Application. Is it very hard?
Title: Re: SpriteLib
Post by: Xeda112358 on November 28, 2010, 06:11:18 pm
Well, I am programming in Hexadecimal, so the process is a bit different :D. But, I believe it is not much different at all from regular assembly program. The main difference is that you run the program starting at 4080h (with 4000h to 407Fh being the header). Also, instead of exiting with an ret, you have to use a special B_Call (which  forget the name of...). The hex for it is EF2740, so it is B_Call 4027h.
Title: Re: SpriteLib
Post by: Munchor on November 28, 2010, 06:12:23 pm
Well, I am programming in Hexadecimal, so the process is a bit different :D. But, I believe it is not much different at all from regular assembly program. The main difference is that you run the program starting at 4080h (with 4000h to 407Fh being the header). Also, instead of exiting with an ret, you have to use a special B_Call (which  forget the name of...). The hex for it is EF2740, so it is B_Call 4027h.

Yes, I forgot that you have an incredibly poweful memory :P

I'll ask for help somewhere else concerning making an Application, then.
Title: Re: SpriteLib
Post by: calcdude84se on November 28, 2010, 06:17:18 pm
I believe it is _JForceCmdNoChar. That's not terribly important, though, unless you should forget what its address is. ;D
Title: Re: SpriteLib
Post by: Xeda112358 on November 28, 2010, 06:18:40 pm
Thankee :D I always forget the name. They should just call it _ExitApp :D
Title: Re: SpriteLib
Post by: Munchor on November 28, 2010, 07:18:52 pm
Thankee :D I always forget the name. They should just call it _ExitApp :D

Well, but assembly can't be changed now, can it? Unless a third-party Asm is made :S
Title: Re: SpriteLib
Post by: calcdude84se on November 28, 2010, 07:23:46 pm
That would only affect recompiled programs or new ones. Old ones would run just fine. It's the name that's changing, not the address ;)
Title: Re: SpriteLib
Post by: DJ Omnimaga on November 29, 2010, 05:07:29 pm
Welcome back Xeda! :D

Suggestion for a feature: Extend the Delvar command so it can also delete archived variables, pictures, lists, matrices and strings. Also do you have a command that checks if a list already exists?
Title: Re: SpriteLib
Post by: Munchor on November 29, 2010, 05:45:23 pm
That would only affect recompiled programs or new ones. Old ones would run just fine. It's the name that's changing, not the address ;)

Oh!! That is okay. I think one day I'll set off and make my own Assembly, setting from the actual one. Do something like Axe, a new programming language, but isntead of having BASIC's syntax, have Assembly's.
Title: Re: SpriteLib
Post by: Xeda112358 on November 29, 2010, 06:51:56 pm
Welcome back Xeda! :D

Suggestion for a feature: Extend the Delvar command so it can also delete archived variables, pictures, lists, matrices and strings. Also do you have a command that checks if a list already exists?

Oooh, there is an idea... The Delvar thing is quite possible And to check if a list exists... Well, I will detail the next command I have been working on. It is called GetStats. What it does is it returns the size of a variable, the type (to distinguish between program/protected program, real/complex, real list/complex list), and the archive status (0 is unarchived, anything else is archived).

On another note, throughout the whole process of my assembly programming, I keep making calls that do useful-ish things that are meant to ween my programs off B_Calls. I gave myself room for 100 calls/routines/commands for this program and I am currently at 88. There are a bunch of calls not included in the actual program, but when it comes time to use them, they are there. I might run out of room soon :D
Title: Re: SpriteLib
Post by: DJ Omnimaga on November 29, 2010, 11:24:42 pm
Ah I see, well I hope you can fit a lot of stuff before running out of room. X.x

Also try to not make new commands too complicated (either in the readme explanation or syntax-wise), else people tend to not use them. It's also a good idea to not force people to read a wall of text to understand a command.
Title: Re: SpriteLib
Post by: Xeda112358 on November 29, 2010, 11:27:27 pm
That is a good point... Maybe I can make a basic readme and then another section or document for more in-depth info?
Title: Re: SpriteLib
Post by: DJ Omnimaga on November 30, 2010, 04:29:52 am
A lite version of the current readme would be good.
Title: Re: SpriteLib
Post by: ztrumpet on December 03, 2010, 06:05:57 pm
Here's a program I made to show some of Sprite Lib's capabilities.  Run around some!  It's a little slow, but I don't really know what I'm going in SpriteLib yet. ;D
Title: Re: SpriteLib
Post by: DJ Omnimaga on December 03, 2010, 10:49:45 pm
Nice, it's supposed to look like below, right?

I wonder if an app is still planned, since Asm() is very slow when the VAT is saturated with 50+ programs
Title: Re: SpriteLib
Post by: Xeda112358 on December 03, 2010, 11:10:59 pm
Yeah, I will have 5 weeks of free time to work on it the app version... Should I upload an example?
Title: Re: SpriteLib
Post by: ztrumpet on December 03, 2010, 11:12:44 pm
You plan to use hooks with the App, right?

Nice, it's supposed to look like below, right?
Yup. :)
Title: Re: SpriteLib
Post by: DJ Omnimaga on December 03, 2010, 11:16:32 pm
That would be nice Xeda! :D

Title: Re: SpriteLib
Post by: Xeda112358 on December 03, 2010, 11:19:01 pm
Yes, the hooks will make it quick. I have made an APP that works for the first 4 commands or so, but that isn't too useful.
Title: Re: SpriteLib
Post by: DJ Omnimaga on December 03, 2010, 11:24:39 pm
Yeah hooks speed things up considerably. It doesn't need to search the VAT anymore like Asm() does.
Title: Re: SpriteLib
Post by: Xeda112358 on December 03, 2010, 11:54:14 pm
Well, here is the example... The video is a little slow, though. Does anybody know of a better way to do a screen capture thing?


EDIT: The video isn't too slow, I guess, but a better method might be nice.
EDIT: I don't know why I showed the map making part first, it took a while... Sorry :D
Title: Re: SpriteLib
Post by: DJ Omnimaga on December 04, 2010, 12:26:09 am
It seems kinda fast for me. Are you using IE or Chrome? It might be why. Looks nice by the way :)
Title: Re: SpriteLib
Post by: Xeda112358 on December 04, 2010, 12:28:11 am
Yeah, I was using IE to view it and then when I went to FF to view it, it was much better.
Title: Re: SpriteLib
Post by: DJ Omnimaga on December 04, 2010, 12:33:32 am
Ah, good then. IE and Chrome has a 10 FPS cap on animated GIFs.

Does IE shows them slower and slower as they progress, too? I remember it did that in IE6 and near the end of a 200 KB screenshot it ran about 3 times slower. <_<
Title: Re: SpriteLib
Post by: Xeda112358 on December 04, 2010, 12:35:13 am
I don't think it does... But I could be wrong.

DJ! you have 21^2 likes!
Title: Re: SpriteLib
Post by: DJ Omnimaga on December 04, 2010, 01:45:00 am
Lol :P, I really need to change this to Total post ratings, though. Liked posts would have worked too if we had no downrating, but total post ratings seems more accurate than respect IMHO. Plus, negative respect can sound offensive to a member because he might think he's not welcome.
Title: Re: SpriteLib
Post by: Munchor on December 04, 2010, 07:56:24 am
Ok, only today I found out what SpriteLib was...!!!!

It's like Celtic III and xLib, a library for TI Basic games.

Now I can post some doubts:
-Is it made in HEX?
-It's called SpriteLib, does it add any spriting functionality to TI Basic?
-A program made in Hybrid Basic with SpriteLib does not require SpriteLib to run in a shell, right?

:)
Title: Re: SpriteLib
Post by: JosJuice on December 04, 2010, 07:59:26 am
-A program made in Hybrid Basic with SpriteLib does not require SpriteLib to run in a shell, right?
A program that uses xLib always requires xLib, even in a shell. A program that uses Celtic III always requires Celtic III, even in a shell. In the same way, a program that uses SpriteLib always requires SpriteLib, even in a shell.

The difference is that xLib and Celtic III are included in DCS, even though it's hard to notice.
Title: Re: SpriteLib
Post by: Munchor on December 04, 2010, 08:36:06 am
-A program made in Hybrid Basic with SpriteLib does not require SpriteLib to run in a shell, right?
A program that uses xLib always requires xLib, even in a shell. A program that uses Celtic III always requires Celtic III, even in a shell. In the same way, a program that uses SpriteLib always requires SpriteLib, even in a shell.

The difference is that xLib and Celtic III are included in DCS, even though it's hard to notice.

ooh that last sentence was very useful, since I have played celtic III games in my calc and I never even saw the Celtic III application.

Maybe when SpriteLib gets very good, Kermm can include it in Doors :)
Title: Re: SpriteLib
Post by: DJ Omnimaga on December 04, 2010, 04:31:01 pm
Yeah that would rule, or maybe Xeda can add the option to chain it, later, so both Doors and SpriteLib can be used together. Alternatively, he could do like Hot Dog did with Coorelation and allow the user to switch between both apps in the middle of a BASIC program by running an Asm() program. Chaining can be slow so that could be an alternative.

@Xeda, by the way the program was uploaded in the wrong directory so I moved it. It was in 83+ instead of 83+ tools.
Title: Re: SpriteLib
Post by: Munchor on December 04, 2010, 04:54:52 pm
Yeah that would rule, or maybe Xeda can add the option to chain it, later, so both Doors and SpriteLib can be used together. Alternatively, he could do like Hot Dog did with Coorelation and allow the user to switch between both apps in the middle of a BASIC program by running an Asm() program. Chaining can be slow so that could be an alternative.

@Xeda, by the way the program was uploaded in the wrong directory so I moved it. It was in 83+ instead of 83+ tools.

Only a later version of SpriteLib (complete stable one) could have DoorsCS compatibility, if I was kerm I would only do that under those conditions :S
Title: Re: SpriteLib
Post by: ztrumpet on December 04, 2010, 06:21:30 pm
Only a later version of SpriteLib (complete stable one)
You seem to think that SpriteLib isn't stable because it's programed in hex.  From what I've seen, Xeda is very good at programming in hex and I have not encountered any crashes due to SpriteLib. :)
Title: Re: SpriteLib
Post by: Xeda112358 on December 04, 2010, 07:02:28 pm
Only a later version of SpriteLib (complete stable one)
You seem to think that SpriteLib isn't stable because it's programed in hex.  From what I've seen, Xeda is very good at programming in hex and I have not encountered any crashes due to SpriteLib. :)

*Zeda feels all warm and fuzzy inside (^_^)

I will try to keep it that way, too ♥
I try to only release stable programs. There are ways to crash your calc with SpriteLib, but that is because SpriteLib gives you abilities to directly edit the 32768 bytes of RAM. Plus, you can use the ASMHex command to crash it :D

@Thanks for fixing that for me, sorry. Also, I think that is an excellent alternative to changing hooks. It will have to be at a later time, so that I can look more into DoorsCS (which won't take too much). I think I will make it an actual SpriteLib command to unhook SpriteLib or replace the hook with another library. Then I will make an actual program to install it (that way you only have to use an asm program to install the hook, as opposed to having programs to uninstall and programs to install other hooks).
Title: Re: SpriteLib
Post by: Munchor on December 04, 2010, 07:03:34 pm
Only a later version of SpriteLib (complete stable one)
You seem to think that SpriteLib isn't stable because it's programed in hex.  From what I've seen, Xeda is very good at programming in hex and I have not encountered any crashes due to SpriteLib. :)

No, it's not that. But Xeda, I think wants to add LOTS OF STUFF to SpriteLib (i hope he does) and if kerm made it work now, it would be outdated in a week. Get it?

I love HEX and understand the importance of HEX :P
Title: Re: SpriteLib
Post by: ztrumpet on December 04, 2010, 07:32:02 pm
Only a later version of SpriteLib (complete stable one)
You seem to think that SpriteLib isn't stable because it's programed in hex.  From what I've seen, Xeda is very good at programming in hex and I have not encountered any crashes due to SpriteLib. :)

No, it's not that. But Xeda, I think wants to add LOTS OF STUFF to SpriteLib (i hope he does) and if kerm made it work now, it would be outdated in a week. Get it?

I love HEX and understand the importance of HEX :P
Ah, sorry, I misunderstood your post.  * ZTrumpet feeds himself to the lobster...  (We really need that as a emoticon. :P )

Regardless if it was directed at no one or not, I still stand by what I said. ;D
Title: Re: SpriteLib
Post by: Xeda112358 on December 04, 2010, 07:43:08 pm
No, it's not that. But Xeda, I think wants to add LOTS OF STUFF to SpriteLib (i hope he does) and if kerm made it work now, it would be outdated in a week. Get it?

I love HEX and understand the importance of HEX :P
Oh, yeah. I plan to fill the whole 16384 bytes and I am at only about 2000 bytes. That is why I am still thinking about including BASIC Recode in there because for one I have so many wonderful calls in SpriteLib that I can make use of and two, I need to fill up more space :D
An idea that would be really neat that I do not think will ever be implemented in SpriteLib would be a 3D sprite and tilemap routine :D If I can do it, I promise I will, but I really don't believe I can. Can you imagine all the inputs required :
Z-axis rotation,Y-axis rotation,X axis rotation,Width of the map,layers/levels of the map,Tile map data,sprite data,display method layer 1,[display method layer 2...

Also, over on TIBD, BlakPilar gave the great idea of using IS>( or DS<( rather than int(. I would prefer to use these and not let them work like normal as opposed to using int( and making an exception that does make it usable.
Title: Re: SpriteLib
Post by: DJ Omnimaga on December 04, 2010, 09:51:44 pm
Oh, IS and DS would be good options. Those commands aren't very useful anymore nowadays, unless they have some optimizations. The only use was on the TI-81 as replacement to For( loops, because the 81 had no For( instruction.
Title: Re: SpriteLib
Post by: AngelFish on December 04, 2010, 10:15:03 pm
Oh, yeah. I plan to fill the whole 16384 bytes and I am at only about 2000 bytes. That is why I am still thinking about including BASIC Recode in there because for one I have so many wonderful calls in SpriteLib that I can make use of and two, I need to fill up more space :D

 :o

Quote
An idea that would be really neat that I do not think will ever be implemented in SpriteLib would be a 3D sprite and tilemap routine :D If I can do it, I promise I will, but I really don't believe I can. Can you imagine all the inputs required :
Z-axis rotation,Y-axis rotation,X axis rotation,Width of the map,layers/levels of the map,Tile map data,sprite data,display method layer 1,[display method layer 2...

*Faints*
Title: Re: SpriteLib
Post by: nemo on December 04, 2010, 10:26:44 pm
a 3-d tilemap and 3-d sprite routine would be incredible... but is it worth it? how many calculator games do you know that use 3-d tilemaps? you'd probably get lucky to find a game engine that can even handle the z-axis. plus.. this is a lib, for TI-Basic. if there's going to be a fast, full-fledged 3-d game with 3 dimensional tilemaps, it's going to be in asm, or heavily optimized axe.
Title: Re: SpriteLib
Post by: Xeda112358 on December 04, 2010, 10:27:07 pm
Oh, yeah. I plan to fill the whole 16384 bytes and I am at only about 2000 bytes. That is why I am still thinking about including BASIC Recode in there because for one I have so many wonderful calls in SpriteLib that I can make use of and two, I need to fill up more space :D

 :o

Quote
An idea that would be really neat that I do not think will ever be implemented in SpriteLib would be a 3D sprite and tilemap routine :D If I can do it, I promise I will, but I really don't believe I can. Can you imagine all the inputs required :
Z-axis rotation,Y-axis rotation,X axis rotation,Width of the map,layers/levels of the map,Tile map data,sprite data,display method layer 1,[display method layer 2...

*Faints*
Hehe, I literally had to dream about that. I really don't think it will go that far because Display+Zeda doesn't work well. Garr, fine. I will add that to my list of things to do for my 5 weeks off :D. I don't plan to make a super awesome amazing thing, but it would be nice for my one year anniversary of assembly programming to make a multi-level tilemap routine that uses some 3Dish effects.
Title: Re: SpriteLib
Post by: DJ Omnimaga on December 05, 2010, 01:00:41 am
3D would be cool, but in a basic game I doubt it would be practical.

If you ever come up with a Mode 7 engine or even a raycaster in assembly, you should consider maybe created an Axiom for Axe coders or something, or even just post the source so ASM coders can use it too.
Title: Re: SpriteLib
Post by: Xeda112358 on December 05, 2010, 01:05:57 am
Well, what I am thinking for now is to do something kind of like Pokémon tilemap-wise. I doubt I will have the axis but, I might be able to come up with a way to display a few different levels (is that the word used?) in a 3D ish way. So, like, you have the ground or background, the level the character is on, and the level above the character (like a roof or ceiling). Then it would be pretty cool to be able to display the tilemap and sprite at different angles (like at player level, aerial, or ground view). Again, I doubt I can accomplish this, but it is a feature request I have for myself :D
Title: Re: SpriteLib
Post by: DJ Omnimaga on December 05, 2010, 03:00:32 am
Right, kinda like Final Fantasy VI map too? (when not riding the airship)

Good luck in any case!
Title: Re: SpriteLib
Post by: Ashbad on December 05, 2010, 07:30:43 am
yeah, kinda like that DJ, and in latest pokemon games where it looks 3Dish because building get slanted at an angle based on your position.  Cool, Xeda! :D
Title: Re: SpriteLib
Post by: matthias1992 on December 05, 2010, 07:40:21 am
Sounds cool! great work so far Xeda! Anyways as far as 3D is concerned you could try a mode-7 type of thing, you could try it the polygon way, you could do raycasting, you could do rasterization, you could do voxel octree's OR you could do unlimited detail [http://www.youtube.com/watch?v=JWujsO2V2IA]

THAT would be awesome, it only requires a 5K to 6K buffer :( + google/military tech searching algorithms...
Title: Re: SpriteLib
Post by: ztrumpet on December 05, 2010, 01:58:33 pm
This sounds neat!  I'd like more access to the LCD drivers internal RAM in basic programs and Z Addressing if you're looking for stuff to add. :)
Title: Re: SpriteLib
Post by: Xeda112358 on December 05, 2010, 02:53:58 pm
Z addressing?

LCD memory is really slow to use and there is only an extra 196 bytes of memory. But I guess... for long term storage? Hmm, now I want to try something...
Title: Re: SpriteLib
Post by: Munchor on December 05, 2010, 02:57:38 pm
Z addressing?

LCD memory is really slow to use and there is only an extra 196 bytes of memory. But I guess... for long term storage? Hmm, now I want to try something...

So, he recommended making TI BASIC have som Asm controls, that would be sweet!
Then, TI Basic+SpriteLib would gradually become a lower-level language YAY!
Title: Re: SpriteLib
Post by: Xeda112358 on December 05, 2010, 02:59:02 pm
Err, what is z addressing?
Title: Re: SpriteLib
Post by: Munchor on December 05, 2010, 02:59:43 pm
Err, what is z addressing?

Isn't it the addresses like .org 40039 or sth like that?
Title: Re: SpriteLib
Post by: Xeda112358 on December 05, 2010, 03:01:10 pm
Well I know I already have commands that let the user have access to the 65536 bytes of memory... of which 32768 is RAM and so can be written to...
Title: Re: SpriteLib
Post by: Munchor on December 05, 2010, 03:04:11 pm
Well I know I already have commands that let the user have access to the 65536 bytes of memory... of which 32768 is RAM and so can be written to...

By the way, I love HEX.

I don't understand what he means either
Title: Re: SpriteLib
Post by: DJ Omnimaga on December 05, 2010, 08:44:41 pm
Z-Addressing is shifting the screen vertical position by certain pixels. It's used in Reuben Quest to create earthquake effects.

EDIT: Screenshot! (Note: I had to use PindurTI instead of WabbitEmu because PTI is the only emu that emulates Z-Adress properly)
Title: Re: SpriteLib
Post by: Xeda112358 on December 05, 2010, 09:14:02 pm
Oh, that? I can add that right now. I never knew that was the name! I actually took that out because I didn't think anybody used it!
Title: Re: SpriteLib
Post by: DJ Omnimaga on December 05, 2010, 11:14:50 pm
It has different names I think. I saw it called Z-Address pretty often, some people call it Z-shifting or screen shifting. I'm not sure about the very exact name. But this screenshot shows it in action.
Title: Re: SpriteLib
Post by: FloppusMaximus on December 05, 2010, 11:20:52 pm
Z-address is what it's called in the official documentation from Toshiba.  They also call the vertical direction "X" and the horizontal direction "Y", so take that with a grain of salt.

EDIT: Screenshot! (Note: I had to use PindurTI instead of WabbitEmu because PTI is the only emu that emulates Z-Adress properly)
TilEm II does that as well, but I guess I'm not allowed to brag about that until I get my act together and finish it. ;)
Title: Re: SpriteLib
Post by: DJ Omnimaga on December 06, 2010, 01:31:03 am
They also call the vertical direction "X" and the horizontal direction "Y", so take that with a grain of salt.
O.O

EDIT: Screenshot! (Note: I had to use PindurTI instead of WabbitEmu because PTI is the only emu that emulates Z-Adress properly)
TilEm II does that as well, but I guess I'm not allowed to brag about that until I get my act together and finish it. ;)
Oh nice, I didn't realize you were the one working on it, I hope you finish it eventually. Maybe you might be the first person to release an emulator compatible with the 15 MHz calc models on ticalc.org since 2005, since PindurTI and WabbitEmu both never made it there for some reasons. :P
Title: Re: SpriteLib
Post by: Munchor on December 07, 2010, 04:00:27 pm

Code: [Select]
DB06218B40EF2650EF274083B7C8E521B1B1ED42E12802AFC97D3D28FA22A484E5DFE1EF9F43ED73A8842A24982322A684CDB
8433C47100532E29906001005EF70450600101421154301350011E299D5EDB0E1DB06EFE44F0600101ACDB843E60F8783878316005F2
1729919E5CD7143E1EBEDB006001027CDB843E60F8783878316005F21729919E5CDB843E60F8783878306004FC5CD4A43C1E1EDB006
001012CD7143CB38CB1921EC86E5CD9D4336C906001026CDB843F5CDB843D5CD7143217884EBEDB0AF12EFF142DA81421313E119F1
467778EF8C47060010083A3F84EF8C470600100AAFD301DB013C28F90600FE01C9E5297E292929E11B7AB320F40B78B120F6C909F52
BF1CB16F50B78B120F6F1C909EB09AFF5F12B1B1A8E77F50B78B120F4F1EBC909EB09AFF5F12B1B1A9E77F50B78B120F4F1EBC9E5C5
1A13EDA1200B78B120F6EBC1D1ED4237C9C1E17AB320E7C91A13EDA1200578B120F6BFC9117884D511AA84D5CD1042EBED67EBCD1
042EBED67EB1B7CB520EDE1ED52444DE1772379873DC6807723EBEDB0C9AF06102917FE0A3803D60A2C10F5C91A007713230B78B12
0F6C9C522AA843E3FBECC744223060004237EFE3F2804FE2B20F5E52BEB21000022B284231AE60F1BE5D5C5CDAA43C1ED5BB284192
2B284D1E13E0AD5C5CDAA43C1D110E0ED5BB2847BE1C1C92A5D963E3F23BB20FC23225D96ED7BA884C983472142847EFE3238033E
3277FE0A20033E0A7778C922AA8421409322B284060CC50608C51AD56F2600292929ED4BAA8409EB2AB284CDD24222B284D113C11
0E32525252C22B284C110D6C9010C081A007713780600094710F5C90E007EFE2920023E20FEBB200A23057ED64FFE6D38013D23121
30C10E5C9773E0C904F7EC5F51A0077132310F909F1C13D20F1C983FE012803AF3DC978FE3A3802D607D630FE1030F04F3A5396B7
28E979C58781878116005F216B991978010700115A84EDB0C1AFC9C5EF524BD7EFC94FE1EF27431313C93E30ED67FE3A3802C60712
1BC91AFE3A3802D60713ED6FC92AA6842BEF7A412322A6842AA4842B22A484EFF142DA8142EB4E234623EBC9CD5943CD59432B0B7
8B120F4C9CD6643CD6643230B78B120F4C90608110000EB290730011910F9C9ED4BA48478B128110BED43A4842AA684CDE44322A6
84C9D5E5CDAA43ED5BAA841922AA84E13E0ACDAA43D1C97EE5E60FCB3FF53C4F060009EB21000022AA8423F130061AE60FCDCF43
1AE6F007070707CDCF431B0D79B720EAE111090019ED5BAA847BC96F2600EF9247EF5641F601C932B28478B7200A79B728103D2003
22AA843AB28423BE20FC0B18E8EB2AAA84EBED52444DC97EFE61380CEB36BB23EBC64FFEBB38013CFE2E20023E3AFE2020023E29FE
3F20013D1213230B78B120D6E1EBED52E5C1C9CD7143EB41117984CDE142AF12CDB843327884EFF142DC8142EB4E234623C9CDB84
3E603878787C6A632D642320843C9CDB843D5CDB843EB2929545D2919D119C9E5C5D5217984010000AF0C23BE20FBC5EFF142DC81
4278C1210C0009EBB720021E0219D119C1D1EF5480C9E5292929E13E2084D310E5292929E13E8085D310C5E5E5292929E11A13D311
10F5E1C10D2479B720D7C9C5E521EC86E5EB79F5E5C57E1213780600094710F6C1E1F1233D20ECD1E1C1C9

Xeda, I have an idea of how to convert this :)

Can you give me the last version code, like you posted this one?

EDIT: To App

Title: Re: SpriteLib
Post by: ztrumpet on December 07, 2010, 04:29:21 pm
Now that I've thought about it, I know what Scout's thinking.  *facepalm*

Here's how to compile hex into an App on-calc (the easy way)
1. Download Axe Parser
2. Make the Axe program like this:
Code: [Select]
.NAMEOFAPP (Must be 8 letters maximum, but can be lowercase if desired)
Asm(Hex Code Here)
(I suggest using [2nd] [Rcl] to put the program in the Axe program the first time.  Remember that Asm() is just pure hex in Axe. :) )
Spoiler For the Axe program using the code Scout quoted above:
Code: [Select]
.Font
Asm(DB06218B40EF2650EF274083B7C8E521B1B1ED42E12802AFC97D3D28FA22A484E5DFE1EF9F43ED73A8842A24982322A684CDB8433C47100532E29906001005EF70450600101421154301350011E299D5EDB0E1DB06EFE44F0600101ACDB843E60F8783878316005F21729919E5CD7143E1EBEDB006001027CDB843E60F8783878316005F21729919E5CDB843E60F8783878306004FC5CD4A43C1E1EDB006001012CD7143CB38CB1921EC86E5CD9D4336C906001026CDB843F5CDB843D5CD7143217884EBEDB0AF12EFF142DA81421313E119F1467778EF8C47060010083A3F84EF8C470600100AAFD301DB013C28F90600FE01C9E5297E292929E11B7AB320F40B78B120F6C909F52BF1CB16F50B78B120F6F1C909EB09AFF5F12B1B1A8E77F50B78B120F4F1EBC909EB09AFF5F12B1B1A9E77F50B78B120F4F1EBC9E5C51A13EDA1200B78B120F6EBC1D1ED4237C9C1E17AB320E7C91A13EDA1200578B120F6BFC9117884D511AA84D5CD1042EBED67EBCD1042EBED67EB1B7CB520EDE1ED52444DE1772379873DC6807723EBEDB0C9AF06102917FE0A3803D60A2C10F5C91A007713230B78B120F6C9C522AA843E3FBECC744223060004237EFE3F2804FE2B20F5E52BEB21000022B284231AE60F1BE5D5C5CDAA43C1ED5BB2841922B284D1E13E0AD5C5CDAA43C1D110E0ED5BB2847BE1C1C92A5D963E3F23BB20FC23225D96ED7BA884C983472142847EFE3238033E3277FE0A20033E0A7778C922AA8421409322B284060CC50608C51AD56F2600292929ED4BAA8409EB2AB284CDD24222B284D113C110E32525252C22B284C110D6C9010C081A007713780600094710F5C90E007EFE2920023E20FEBB200A23057ED64FFE6D38013D2312130C10E5C9773E0C904F7EC5F51A0077132310F909F1C13D20F1C983FE012803AF3DC978FE3A3802D607D630FE1030F04F3A5396B728E979C58781878116005F216B991978010700115A84EDB0C1AFC9C5EF524BD7EFC94FE1EF27431313C93E30ED67FE3A3802C607121BC91AFE3A3802D60713ED6FC92AA6842BEF7A412322A6842AA4842B22A484EFF142DA8142EB4E234623EBC9CD5943CD59432B0B78B120F4C9CD6643CD6643230B78B120F4C90608110000EB290730011910F9C9ED4BA48478B128110BED43A4842AA684CDE44322A684C9D5E5CDAA43ED5BAA841922AA84E13E0ACDAA43D1C97EE5E60FCB3FF53C4F060009EB21000022AA8423F130061AE60FCDCF431AE6F007070707CDCF431B0D79B720EAE111090019ED5BAA847BC96F2600EF9247EF5641F601C932B28478B7200A79B728103D200322AA843AB28423BE20FC0B18E8EB2AAA84EBED52444DC97EFE61380CEB36BB23EBC64FFEBB38013CFE2E20023E3AFE2020023E29FE3F20013D1213230B78B120D6E1EBED52E5C1C9CD7143EB41117984CDE142AF12CDB843327884EFF142DC8142EB4E234623C9CDB843E603878787C6A632D642320843C9CDB843D5CDB843EB2929545D2919D119C9E5C5D5217984010000AF0C23BE20FBC5EFF142DC814278C1210C0009EBB720021E0219D119C1D1EF5480C9E5292929E13E2084D310E5292929E13E8085D310C5E5E5292929E11A13D31110F5E1C10D2479B720D7C9C5E521EC86E5EB79F5E5C57E1213780600094710F6C1E1F1233D20ECD1E1C1C9)
3. Run Axe, make sure that compile to Applications is selected, and enjoy.
4. To sign the App, transfer it to your computer, drag it over the signing tool that comes with the Axe download, and re-transfer to your calc.

I hope this helps Xeda! ;D
Title: Re: SpriteLib
Post by: AngelFish on December 07, 2010, 04:34:54 pm
Z-address is what it's called in the official documentation from Toshiba.  They also call the vertical direction "X" and the horizontal direction "Y", so take that with a grain of salt.

So that's how Axe does the vertical/horizontal shift...
Title: Re: SpriteLib
Post by: ztrumpet on December 07, 2010, 04:38:07 pm
Z-address is what it's called in the official documentation from Toshiba.  They also call the vertical direction "X" and the horizontal direction "Y", so take that with a grain of salt.

So that's how Axe does the vertical/horizontal shift...
No, the Axe horizontal / vertical commands are different.
Horizontal is basically this code in pure Axe: Copy(L6+12,L6,756) or Copy(L6,L6+12,756)
Vertical is very different.  It has to do with bit shifts.  More info on bit shifts can be found here: http://future_history.freehostia.com/Files/Resources/ASM/ASMin28Days/lesson/day09.html

A great example of Z Addressing is this game: http://www.ticalc.org/archives/files/fileinfo/429/42903.html
Title: Re: SpriteLib
Post by: Xeda112358 on December 07, 2010, 05:41:25 pm
Now that I've thought about it, I know what Scout's thinking.  *facepalm*

Here's how to compile hex into an App on-calc (the easy way)
1. Download Axe Parser
2. Make the Axe program like this:
Code: [Select]
.NAMEOFAPP (Must be 8 letters maximum, but can be lowercase if desired)
Asm(Hex Code Here)
(I suggest using [2nd] [Rcl] to put the program in the Axe program the first time.  Remember that Asm() is just pure hex in Axe. :) )
Spoiler For the Axe program using the code Scout quoted above:
Code: [Select]
.Font
Asm(DB06218B40EF2650EF274083B7C8E521B1B1ED42E12802AFC97D3D28FA22A484E5DFE1EF9F43ED73A8842A24982322A684CDB8433C47100532E29906001005EF70450600101421154301350011E299D5EDB0E1DB06EFE44F0600101ACDB843E60F8783878316005F21729919E5CD7143E1EBEDB006001027CDB843E60F8783878316005F21729919E5CDB843E60F8783878306004FC5CD4A43C1E1EDB006001012CD7143CB38CB1921EC86E5CD9D4336C906001026CDB843F5CDB843D5CD7143217884EBEDB0AF12EFF142DA81421313E119F1467778EF8C47060010083A3F84EF8C470600100AAFD301DB013C28F90600FE01C9E5297E292929E11B7AB320F40B78B120F6C909F52BF1CB16F50B78B120F6F1C909EB09AFF5F12B1B1A8E77F50B78B120F4F1EBC909EB09AFF5F12B1B1A9E77F50B78B120F4F1EBC9E5C51A13EDA1200B78B120F6EBC1D1ED4237C9C1E17AB320E7C91A13EDA1200578B120F6BFC9117884D511AA84D5CD1042EBED67EBCD1042EBED67EB1B7CB520EDE1ED52444DE1772379873DC6807723EBEDB0C9AF06102917FE0A3803D60A2C10F5C91A007713230B78B120F6C9C522AA843E3FBECC744223060004237EFE3F2804FE2B20F5E52BEB21000022B284231AE60F1BE5D5C5CDAA43C1ED5BB2841922B284D1E13E0AD5C5CDAA43C1D110E0ED5BB2847BE1C1C92A5D963E3F23BB20FC23225D96ED7BA884C983472142847EFE3238033E3277FE0A20033E0A7778C922AA8421409322B284060CC50608C51AD56F2600292929ED4BAA8409EB2AB284CDD24222B284D113C110E32525252C22B284C110D6C9010C081A007713780600094710F5C90E007EFE2920023E20FEBB200A23057ED64FFE6D38013D2312130C10E5C9773E0C904F7EC5F51A0077132310F909F1C13D20F1C983FE012803AF3DC978FE3A3802D607D630FE1030F04F3A5396B728E979C58781878116005F216B991978010700115A84EDB0C1AFC9C5EF524BD7EFC94FE1EF27431313C93E30ED67FE3A3802C607121BC91AFE3A3802D60713ED6FC92AA6842BEF7A412322A6842AA4842B22A484EFF142DA8142EB4E234623EBC9CD5943CD59432B0B78B120F4C9CD6643CD6643230B78B120F4C90608110000EB290730011910F9C9ED4BA48478B128110BED43A4842AA684CDE44322A684C9D5E5CDAA43ED5BAA841922AA84E13E0ACDAA43D1C97EE5E60FCB3FF53C4F060009EB21000022AA8423F130061AE60FCDCF431AE6F007070707CDCF431B0D79B720EAE111090019ED5BAA847BC96F2600EF9247EF5641F601C932B28478B7200A79B728103D200322AA843AB28423BE20FC0B18E8EB2AAA84EBED52444DC97EFE61380CEB36BB23EBC64FFEBB38013CFE2E20023E3AFE2020023E29FE3F20013D1213230B78B120D6E1EBED52E5C1C9CD7143EB41117984CDE142AF12CDB843327884EFF142DC8142EB4E234623C9CDB843E603878787C6A632D642320843C9CDB843D5CDB843EB2929545D2919D119C9E5C5D5217984010000AF0C23BE20FBC5EFF142DC814278C1210C0009EBB720021E0219D119C1D1EF5480C9E5292929E13E2084D310E5292929E13E8085D310C5E5E5292929E11A13D31110F5E1C10D2479B720D7C9C5E521EC86E5EB79F5E5C57E1213780600094710F6C1E1F1233D20ECD1E1C1C9)
3. Run Axe, make sure that compile to Applications is selected, and enjoy.
4. To sign the App, transfer it to your computer, drag it over the signing tool that comes with the Axe download, and re-transfer to your calc.

I hope this helps Xeda! ;D

Thankee, you two. I actually did end up doing that and it was very helpful. The only problem I had with Axe is that it makes an App that has its own axe "header" I think. I had to go through and adjust all the addresses for it to work. Thanks!
Title: Re: SpriteLib
Post by: Munchor on December 07, 2010, 06:15:58 pm
Now that I've thought about it, I know what Scout's thinking.  *facepalm*

Here's how to compile hex into an App on-calc (the easy way)
1. Download Axe Parser
2. Make the Axe program like this:
Code: [Select]
.NAMEOFAPP (Must be 8 letters maximum, but can be lowercase if desired)
Asm(Hex Code Here)
(I suggest using [2nd] [Rcl] to put the program in the Axe program the first time.  Remember that Asm() is just pure hex in Axe. :) )
Spoiler For the Axe program using the code Scout quoted above:
Code: [Select]
.Font
Asm(DB06218B40EF2650EF274083B7C8E521B1B1ED42E12802AFC97D3D28FA22A484E5DFE1EF9F43ED73A8842A24982322A684CDB8433C47100532E29906001005EF70450600101421154301350011E299D5EDB0E1DB06EFE44F0600101ACDB843E60F8783878316005F21729919E5CD7143E1EBEDB006001027CDB843E60F8783878316005F21729919E5CDB843E60F8783878306004FC5CD4A43C1E1EDB006001012CD7143CB38CB1921EC86E5CD9D4336C906001026CDB843F5CDB843D5CD7143217884EBEDB0AF12EFF142DA81421313E119F1467778EF8C47060010083A3F84EF8C470600100AAFD301DB013C28F90600FE01C9E5297E292929E11B7AB320F40B78B120F6C909F52BF1CB16F50B78B120F6F1C909EB09AFF5F12B1B1A8E77F50B78B120F4F1EBC909EB09AFF5F12B1B1A9E77F50B78B120F4F1EBC9E5C51A13EDA1200B78B120F6EBC1D1ED4237C9C1E17AB320E7C91A13EDA1200578B120F6BFC9117884D511AA84D5CD1042EBED67EBCD1042EBED67EB1B7CB520EDE1ED52444DE1772379873DC6807723EBEDB0C9AF06102917FE0A3803D60A2C10F5C91A007713230B78B120F6C9C522AA843E3FBECC744223060004237EFE3F2804FE2B20F5E52BEB21000022B284231AE60F1BE5D5C5CDAA43C1ED5BB2841922B284D1E13E0AD5C5CDAA43C1D110E0ED5BB2847BE1C1C92A5D963E3F23BB20FC23225D96ED7BA884C983472142847EFE3238033E3277FE0A20033E0A7778C922AA8421409322B284060CC50608C51AD56F2600292929ED4BAA8409EB2AB284CDD24222B284D113C110E32525252C22B284C110D6C9010C081A007713780600094710F5C90E007EFE2920023E20FEBB200A23057ED64FFE6D38013D2312130C10E5C9773E0C904F7EC5F51A0077132310F909F1C13D20F1C983FE012803AF3DC978FE3A3802D607D630FE1030F04F3A5396B728E979C58781878116005F216B991978010700115A84EDB0C1AFC9C5EF524BD7EFC94FE1EF27431313C93E30ED67FE3A3802C607121BC91AFE3A3802D60713ED6FC92AA6842BEF7A412322A6842AA4842B22A484EFF142DA8142EB4E234623EBC9CD5943CD59432B0B78B120F4C9CD6643CD6643230B78B120F4C90608110000EB290730011910F9C9ED4BA48478B128110BED43A4842AA684CDE44322A684C9D5E5CDAA43ED5BAA841922AA84E13E0ACDAA43D1C97EE5E60FCB3FF53C4F060009EB21000022AA8423F130061AE60FCDCF431AE6F007070707CDCF431B0D79B720EAE111090019ED5BAA847BC96F2600EF9247EF5641F601C932B28478B7200A79B728103D200322AA843AB28423BE20FC0B18E8EB2AAA84EBED52444DC97EFE61380CEB36BB23EBC64FFEBB38013CFE2E20023E3AFE2020023E29FE3F20013D1213230B78B120D6E1EBED52E5C1C9CD7143EB41117984CDE142AF12CDB843327884EFF142DC8142EB4E234623C9CDB843E603878787C6A632D642320843C9CDB843D5CDB843EB2929545D2919D119C9E5C5D5217984010000AF0C23BE20FBC5EFF142DC814278C1210C0009EBB720021E0219D119C1D1EF5480C9E5292929E13E2084D310E5292929E13E8085D310C5E5E5292929E11A13D31110F5E1C10D2479B720D7C9C5E521EC86E5EB79F5E5C57E1213780600094710F6C1E1F1233D20ECD1E1C1C9)
3. Run Axe, make sure that compile to Applications is selected, and enjoy.
4. To sign the App, transfer it to your computer, drag it over the signing tool that comes with the Axe download, and re-transfer to your calc.

I hope this helps Xeda! ;D

Thankee, you two. I actually did end up doing that and it was very helpful. The only problem I had with Axe is that it makes an App that has its own axe "header" I think. I had to go through and adjust all the addresses for it to work. Thanks!

Any intentions of releasing it?

My idea was to, using a Z80 HEX/Asm table convert it to Assembly and then compile as .8xk. But his is better.
Title: Re: SpriteLib
Post by: DJ Omnimaga on December 08, 2010, 02:32:46 am
So basically to create an ASM APP on-calc you just make an Axe program, put the hex code in the Asm() command then compile as APP, right?
Title: Re: SpriteLib
Post by: Xeda112358 on December 08, 2010, 02:36:35 am
Yes, or any axe program. However, since I program in hex, I need to take into account the header part that Axe inserts automatically (it's only a few bytes, but that throws all calls off).
Title: Re: SpriteLib
Post by: DJ Omnimaga on December 08, 2010, 03:36:59 am
I see, is it really hard to get around it?
Title: Re: SpriteLib
Post by: Xeda112358 on December 08, 2010, 04:12:30 am
No, I just have to change addresses a little. It isn't really all that difficult. I still prefer not to use Axe, though. I think it is actually easier to convert on the computer, in this case.
Title: Re: SpriteLib
Post by: DJ Omnimaga on December 08, 2010, 04:16:06 am
Ah, cool. And yeah it's best to do it on the comp I think, unless you're actually coding in Axe.
Title: Re: SpriteLib
Post by: Munchor on December 08, 2010, 10:25:42 am
A TI Basic library as an Application is way better than as a .8xp file for me.

But, if I may ask again: will you release it?
Title: Re: SpriteLib
Post by: DJ Omnimaga on December 08, 2010, 03:08:30 pm
I'm sure Xeda plans to release it.

Also I agree an app is better than a 8xp ran with Asm(), as long as the APP uses hooks, because parser hooks are much faster than the Asm() command.
Title: Re: SpriteLib
Post by: Munchor on December 08, 2010, 03:20:16 pm
I'm sure Xeda plans to release it.

Also I agree an app is better than a 8xp ran with Asm(), as long as the APP uses hooks, because parser hooks are much faster than the Asm() command.

Maybe he releases including Z Addressing already ;D
Title: Re: SpriteLib
Post by: DJ Omnimaga on December 08, 2010, 03:28:30 pm
I have to wonder how fast will be Z-addressing with hooks, though. With Asm() it was already pretty fast. :O
Title: Re: SpriteLib
Post by: Munchor on December 10, 2010, 11:16:17 am
Well, he's leaving for 5 weeks now... Only when he comes back.

/me sighs
Title: Re: SpriteLib
Post by: Xeda112358 on December 10, 2010, 12:14:10 pm
I, jeez wow, sorry to not respond. Yeah, I will try to have the app version at least somewhat presentable by the end of my 5 weeks of solitude. And I will try to release the SpriteLib update with Z Addressing before I leave. I have a two hour exam soon, so it will in a few hours, but it really is pretty easy to add...

Thanks all! And I hope my present makes its way into your lives soon, I am rather proud of my work... Heheh, I hope the secret programmer has kept it secret enough... And I hope said programmer can figure out how to finish it as I do not believe said programmer has worked with assembly before :D
Title: Re: SpriteLib
Post by: Munchor on December 10, 2010, 12:19:11 pm
I, jeez wow, sorry to not respond. Yeah, I will try to have the app version at least somewhat presentable by the end of my 5 weeks of solitude. And I will try to release the SpriteLib update with Z Addressing before I leave. I have a two hour exam soon, so it will in a few hours, but it really is pretty easy to add...

Thanks all! And I hope my present makes its way into your lives soon, I am rather proud of my work... Heheh, I hope the secret programmer has kept it secret enough... And I hope said programmer can figure out how to finish it as I do not believe said programmer has worked with assembly before :D

I really wonder who he/she is :P
Title: Re: SpriteLib
Post by: DJ Omnimaga on December 11, 2010, 12:55:25 am
/me wonders if the secret programmer is registered on any forum and if he could be invited if he isn't...

Anyway we will await for your return! Good luck working on this! :)
Title: Re: SpriteLib
Post by: Munchor on December 23, 2010, 07:00:16 pm
*BUMP* What happened to the secret programmer??
Title: Re: SpriteLib
Post by: DJ Omnimaga on December 25, 2010, 09:34:41 pm
Yeah I wonder if he planned to join the forums too. I also can't wait until Xeda returns
Title: Re: SpriteLib
Post by: jnesselr on December 25, 2010, 09:35:38 pm
Yeah I wonder if he planned to join the forums too. I also can't wait until Xeda returns
Seriously. I have some more math stuff that I want to talk about! Do we have a math sub-forum? We need to.
Title: Re: SpriteLib
Post by: DJ Omnimaga on December 26, 2010, 02:59:19 am
I thought about adding one eventually, or maybe an admin could. I don't want it to grab too much focus, though, so it would most likely be a sub-forum located in the random discussion section.
Title: Re: SpriteLib
Post by: Munchor on December 26, 2010, 06:19:10 am
Yeah I wonder if he planned to join the forums too. I also can't wait until Xeda returns
Seriously. I have some more math stuff that I want to talk about! Do we have a math sub-forum? We need to.

i wanna debate some maths with him too! a math sub-forum would be great!
Title: Re: SpriteLib
Post by: jnesselr on December 26, 2010, 04:46:41 pm
Yeah I wonder if he planned to join the forums too. I also can't wait until Xeda returns
Seriously. I have some more math stuff that I want to talk about! Do we have a math sub-forum? We need to.

i wanna debate some maths with him too! a math sub-forum would be great!
I don't want to debate stuff. SHE is just really smart with math. (Plus, SHE comes up with some interesting ideas)
Title: Re: SpriteLib
Post by: Xeda112358 on January 05, 2011, 08:03:15 am
Yes there is a math forum, but I only have a few minutes, so I will not be able to answer questions :(

I have the APP up and running and the "secret programmer" has been part of the forum :P

The APP uses the sum( function which still works the normal way (so you can still do the sum of a list)

It chains with any other parser hook at the moment. (so if Celtic 3 is active when you run this app, you can use Celtic 3 functions, too)

It is not finished.

There is no user interface, yet.

There is one bug that I am aware of (so one command does not work properly)

Not all the documentation is finished.

I added 11 more functions, I think (maybe more).

The name is now BatLib... <^('.')^>

Erm, see ya guys in about 11 days?
Title: Re: SpriteLib
Post by: JosJuice on January 05, 2011, 08:05:39 am
That looks awesome! I'm not really understanding what it's doing in the screenshots, though...
Title: Re: SpriteLib
Post by: shmibs on January 05, 2011, 08:53:49 am
well, in this screenie it is reading whatever portion of a list the user desires(even from the archive), and showing off some fun drawing functions.

see you later, xeda!
Title: Re: SpriteLib
Post by: DJ Omnimaga on January 05, 2011, 12:51:59 pm
Nice. Also I can't wait for your return :D
Title: Re: SpriteLib
Post by: Xeda112358 on January 14, 2011, 01:09:20 pm
Found another minute to be on...

I added some experimental font hook routines and an omnicalc font compatible hook
The fonts are 5x7 (normal) 6x8 (experimental) and 8x8 (experimental)

I added more drawing commands :P

I am working on some multi precision math... I can now divide 256 bit numbers... that means a little bigger than 1e77 and I can easily tweak it to allow much larger numbers.

Erm, I am working on some new sprite routines

The main screen now lets you do stuff.

For some reason, the parser hook crashes randomly, even on regular commands. I have to wait 'till I get back to figure out why.

I'm using the huge number math routines to make a base converter of large numbers (like base 3 to base 32 :P )
Title: Re: SpriteLib
Post by: Munchor on January 14, 2011, 01:12:20 pm
"The main screen now lets you do stuff."

Main screen lets you do stuff? What do you mean? Also great you are on ;)
Title: Re: SpriteLib
Post by: Xeda112358 on January 14, 2011, 01:20:04 pm
You can see which apps have hooks previously installed. My plan is to allow you to reinstall other APPS or to chain parser hooks (So that you can use multiple apps at the same time). Currently it automatically chains BatLib with a previous parser hook.
Title: Re: SpriteLib
Post by: AngelFish on January 14, 2011, 01:44:46 pm
Batlib?
Title: Re: SpriteLib
Post by: Xeda112358 on January 14, 2011, 02:11:40 pm
Hehe, yes, it is the name I am using (APPs have to be 8 chars so it SpriteLib does not work... and I like bats ^-^). <^('.')^>
Title: Re: SpriteLib
Post by: AngelFish on January 14, 2011, 02:12:29 pm
<(")

Issa penguin  ;D
Title: Re: SpriteLib
Post by: Munchor on January 14, 2011, 02:13:03 pm
SPRITLIB would be better xD
Title: Re: SpriteLib
Post by: Xeda112358 on January 16, 2011, 02:08:47 pm
I dunno, maybe PengLib... Anywho, I have added some new commands (still in there beta phases), but I really like the base converter. It can convert 248-bit hex values.... To other bases... Gotta see the screenshot...

Title: Re: SpriteLib
Post by: AngelFish on January 16, 2011, 02:18:19 pm
Wow, that looks awesome.
Title: Re: SpriteLib
Post by: Xeda112358 on January 16, 2011, 04:21:02 pm
Hrm, seems I haven't posted stuff about the font hooks... :D
Title: Re: SpriteLib
Post by: DJ Omnimaga on January 16, 2011, 04:27:04 pm
Wow great! And it will be nice if they can be archived ;D

Also how did you manage to have fonts larger than 6x8 on the home screen? O.O Can it cause issues outside of the screen?
Title: Re: SpriteLib
Post by: Xeda112358 on January 16, 2011, 04:47:31 pm
I had to use a debugger to figure out what exactly goes on in a fonthook, then I just used my own drawing routine for fonts. For the 8x8 font, the last 4 chars in each line are not drawn. I am not sure why my fonthooks seem to fail in menu's, though. Here are some more random screen shots if ya be interested... Arrrrr
Title: Re: SpriteLib
Post by: DJ Omnimaga on January 16, 2011, 07:01:04 pm
Good luck getting menu issues sorted out x.x
Title: Re: SpriteLib
Post by: Munchor on January 21, 2011, 07:18:24 pm
What is the sum( command actually doing?
Title: Re: SpriteLib
Post by: Xeda112358 on January 21, 2011, 07:28:11 pm
If you have ever used xLIB or Celtic3 or something they all use something called a parser hook. This means that some BASIC commands get intercepted by the APP and the APP uses the arguments. BatLib happens to modify sum(. on that note, sum( is usually used to find the sum of a list. For example:
Code: [Select]
sum({0,1,4,9,16,,25,36...9801
Would return 328350 (I think :P). BatLib lets this normal execution occur, so any BASIC programs that use sum( the normal way will still work.
Title: Re: SpriteLib
Post by: ztrumpet on January 21, 2011, 11:22:32 pm
How about sum({1,2,3},2=5 or sum({1,2,3,4},2,3=5?
Title: Re: SpriteLib
Post by: Xeda112358 on January 21, 2011, 11:23:35 pm
Erm, that is not available, but if I can, I won't mind trying that. No promises though :D
Title: Re: SpriteLib
Post by: ztrumpet on January 21, 2011, 11:26:19 pm
Kerm found a way round it, so you can always ask him.  Remember the arguments are stored with the most recent in OP1 (I think). Will this conflict with DCS's sum() hook?
Title: Re: SpriteLib
Post by: Xeda112358 on January 22, 2011, 12:35:14 am
DCs has a sum( hook? It shouldn't conflict... Also, I know how to do it, it is just that I have been a little tied up... :P It is the last argument that is stored to OP1, too. BatLib pushes OP1 into the FPS stack, resets the FPS stack, and then uses the pointer to point to the first command. It also checks first if there is one argument and then it checks if that argument is a list. If it is a list it jumps to some exit code.
Title: BatLib (App)
Post by: Xeda112358 on January 23, 2011, 01:42:10 pm
BatLib (App)



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

This APP is designed to aid BASIC programs by providing advanced control of the calculator as well as new functions that the OS does not provide. It handles sprites, memory editing, fontsets, reading from the archive, data manipulations, drawing, and other random or useful functions.
Title: Re: SpriteLib
Post by: DJ Omnimaga on January 23, 2011, 01:43:58 pm
That definitively needs a sub-forum. I just have like 10-20 to add I think O.O
Title: Re: SpriteLib
Post by: Xeda112358 on January 23, 2011, 02:26:56 pm
Cool! Yeah, I'm sure you have a lot on your hands... I've no clue how you do it.
Title: Re: SpriteLib
Post by: Munchor on January 23, 2011, 02:42:11 pm
Congratulations Xeda! I bet you're a happy girl, your own subforum :D
Title: Re: SpriteLib
Post by: Ashbad on January 23, 2011, 02:43:07 pm
cheers to your project's own subforum! :D
Title: Re: SpriteLib
Post by: DJ Omnimaga on January 23, 2011, 02:44:00 pm
Finally there were less to add, but I still need to check other pages to see if there are more. Some projects might wait since there were no updates in a while.
Title: Re: SpriteLib
Post by: Xeda112358 on January 23, 2011, 02:50:00 pm
...
And I want to thank all the folks who...
<<two hours later>>
And that one kid... yes the goat...

Now to get back on topic, I am working on a multiprecision multiplying routine and I am trying to get BASIC ReCode back up and functioning. Since there is still >9000 bytes of memory till fill the APP, I am going to focus more on command 40.

(Seriously, the code is 7215 bytes so far... I have 9041 bytes to go before it is full.)
Title: Re: SpriteLib v4.00.61.Beta
Post by: Xeda112358 on January 26, 2011, 02:02:57 pm
Time for the new update... Apparently, I was half asleep every time I went to check for bugs. As a tip, before installing a new version of BatLib, uninstall the version you have! (sum(0,50,51). There were bugs, but only because I kept forgetting to uninstall the previous version...

There is a bug that I found with command 41 when you try to get the stats of an archived variable. This is a glitch that seems to randomly come and go in the version updates without my interference.

The new commands are:
60-DelVarArc-Deletes a variable from RAM or Archive
61-DrawRectvar- Draws a rectangle directly to a var (like Pic1, for example)
62-DrawToVar- Uses the drawing routines directly on a variable (like pictures)

These are all ideas from DJ Omnimaga or inspired by DJ Omnimaga. I still have yet to allow for pixel testing of archived pictures, but that is something I plan to add soon.
Title: Re: SpriteLib
Post by: DJ Omnimaga on January 29, 2011, 02:03:00 am
...
And I want to thank all the folks who...
<<two hours later>>
And that one kid... yes the goat...
What about the goat? ???
Now to get back on topic, I am working on a multiprecision multiplying routine and I am trying to get BASIC ReCode back up and functioning. Since there is still >9000 bytes of memory till fill the APP, I am going to focus more on command 40.

(Seriously, the code is 7215 bytes so far... I have 9041 bytes to go before it is full.)

Nice, you got a lot of space left. What would be the multiprecision routine? I'M curious what's the difference between regular TI-BASIC ones and that.

I'll probably try this later, although I'M not sure how much time I'll have...
Title: Re: SpriteLib
Post by: Xeda112358 on January 29, 2011, 02:05:21 am
I plan to add math functions that  let us use huge numbers. The converter was a demo of it handling a 75 digit number. I plan to add functionality for much larger numbers as well as math functions on these numbers.
Title: Re: SpriteLib
Post by: DJ Omnimaga on January 29, 2011, 02:10:27 am
Ah ok I see now. :D
Title: Re: SpriteLib
Post by: Xeda112358 on January 29, 2011, 02:12:25 am
I almost never use my 89t except for when I am calculating large values, so this was my own personal request :D I wanted to be able to do huge math on my 84+SE
Title: Re: SpriteLib
Post by: DJ Omnimaga on January 29, 2011, 02:14:20 am
Oh I didn't knew the 89t had such values. On the 84+ I think it's 14 digits + exponents, right?
Title: Re: SpriteLib
Post by: Xeda112358 on January 29, 2011, 02:16:52 am
Yep. My 89 can handle numbers a few hundred digits long which is nice.
Title: Re: SpriteLib
Post by: Ashbad on January 29, 2011, 09:26:59 am
I doubt it'll show up for a few days (it has to be reviewed), but I just wrote a nice review for BatLib on ticalc ;)

it's awesome :D
Title: Re: SpriteLib
Post by: Xeda112358 on January 29, 2011, 09:43:10 am
Oh, thank you! I plan to add a few features soon if not today, too!

Dang, it's been 58 minutes, not an hour yet :D

The bug is fixed so it should no longer crash on random code! ♥
Command 63 exists, but it doesn't work yet, so do not use it... It won't cause a crash yet, though!
Title: Re: SpriteLib
Post by: Xeda112358 on January 30, 2011, 06:18:39 pm
BatLib is almost out of the Beta stage. Since the last version, there have been major changes. Any programs made with the last version of BatLib will not work with the new version. The changes:
1) sum( is no longer used. Apparently DCS7 uses the sum( command. BatLib now uses dim(.
2) All instances where the arguments use "VarName",Type is now in the form Type,"VarName". This way, if the variable is a token (like Str1 or Pic3), the type can be omitted.
3) Removed some stuff that wasn't needed, saving some memory

I also finally made a sprite editor so that making tilemap or font data will be easier. I will upload that program in a "Demo" topic.

Here is the new version of BatLib as well as the updated readme.

Also, one of the features that has been with BatLib from the beginning is one that I don't believe I have talked about. I call it stringing command. As an example, say you have some code that looks like this:
Code: [Select]
dim(29,0,8,0,8,2
dim(99
dim(10,67
dim(43→A
dim(29,0,8,0,8,2
You can actually string them all together with one dim( command:
Code: [Select]
dim(29,0,8,0,8,2,99,10,67,43,29,0,8,0,8,2→A
This will save speed and memory, so if you can string commands, you should.
Title: Re: SpriteLib
Post by: DJ Omnimaga on January 31, 2011, 12:55:21 am
Nice to hear it's soon gonna be finished. Nice job so far :)
Title: Re: SpriteLib
Post by: Xeda112358 on January 31, 2011, 12:59:12 am
Oh, I still plan to add a whole lot more, but I had to get all the syntaxes finalised and I had to make a final decision about which token to use. Now that that is done, I can go fix everything up and I can start adding new functions.
Title: Re: SpriteLib
Post by: DJ Omnimaga on January 31, 2011, 11:01:34 pm
Oh ok :D, good luck whatever you decide. :)
Title: Re: SpriteLib
Post by: Xeda112358 on February 02, 2011, 04:33:10 pm
Before I release the actual BatLib app, I have a question. Should I use the syntax to read variables as Type,"VarName" or should I just use "VarName", but require a prefix byte? If I do the prefix method, to read prgmBATTLENG, instead of 5,"BATTLENG", you would use "[BATTLENG". This would save memory and speed, so I like this method better. It will be the same syntax as the CopyProg program.
Title: Re: SpriteLib
Post by: DJ Omnimaga on February 03, 2011, 12:42:29 am
I guess the prefix might be a good idea because if someone uses commands a lot, this could reduce their programs size a lot. In Reuben Quest, if I decided to convert the code to xLIB format I am sure I would save several hundreds of bytes because the Omnicalc commands are much larger than xLIB ones (but again it's because with Omnicalc there's no recallpic command so to recall a pic I draw a 96x62 pixels large sprite.
Title: Re: SpriteLib
Post by: Xeda112358 on February 03, 2011, 12:47:35 am
Okay. I have been working with the modified version and it actually cut down the size of BatLib, also. The only place this uses more memory is when you could have omitted the type to begin with. It is still faster though and it will help make other commands faster and smaller.
Title: Re: SpriteLib
Post by: DJ Omnimaga on February 04, 2011, 01:32:00 am
That's cool to hear. How much bytes do you have left, now?
Title: Re: SpriteLib
Post by: Xeda112358 on February 04, 2011, 01:44:16 am
8897 bytes :D
I still have stuff to remove or optimise, too, so I will have plenty of room to work with for the next few functions.
Title: Re: SpriteLib
Post by: AngelFish on February 04, 2011, 01:45:31 am
How many pages are you currently on?
Title: Re: SpriteLib
Post by: DJ Omnimaga on February 04, 2011, 01:45:58 am
Awesome. How many functions in total do you plan to include? O.O
Title: Re: SpriteLib
Post by: Xeda112358 on February 04, 2011, 01:47:21 am
I am on one page and I've used 7359 bytes of code plus the 128 byte header. I am at 64 commands, so I will just keep going as far as I can. Maybe a hundred or so?
Title: Re: SpriteLib
Post by: AngelFish on February 04, 2011, 01:47:46 am
 O.O

Title: Re: SpriteLib
Post by: Xeda112358 on February 04, 2011, 01:49:14 am
Well I plan to add a lot to command 40 (BASIC ReCode), too and I need to add te math and menu functions. I am restructuring the code so that I can really optimise BASIC ReCode :D
Title: Re: SpriteLib
Post by: Hot_Dog on February 04, 2011, 01:52:51 am
So, can you make a list of what one can do with BatLib besides graphics? Pleasssssssssse?
Title: Re: SpriteLib
Post by: Xeda112358 on February 04, 2011, 01:54:23 am
Do you mean a list of commands...? That is going to be pretty long... ish...
Title: Re: SpriteLib
Post by: Hot_Dog on February 04, 2011, 01:56:11 am
No, not commands :).  Kind of like, can it work with appvars?  Can it read and write to ports?  Can it create programs?  A list kind of like that
Title: Re: SpriteLib
Post by: Xeda112358 on February 04, 2011, 02:05:05 am
Ah, okay.
-Stringing of commands in one dim( command
-It works with all var types except Apps
-It works with RAM/Archive
-The version I haven't released yet can make variables (of any type except Apps)
-It works with graphics like sprites and drawing routines
-It can edit RAM
-It can perform a basic LineRead command
-It has sound
-Custom Font Hooks
-Can work directly with the LCD
-Reading from ports works, writing is weird. The code works... if I copy it to RAM first
-reading/writing to flags
-Handling of hacked picks
-Handling of lists
-Several key hooks, including SpeedyKeys
-Deleting vars (any type except Apps. can be archived)
-Converting large numbers in hex to another base
-Drawing directly to pic vars

Is that the kind of list you wanted?
Title: Re: SpriteLib
Post by: Hot_Dog on February 04, 2011, 02:11:48 am
Perfect! ;D
Title: Re: SpriteLib
Post by: DJ Omnimaga on February 04, 2011, 02:15:55 am
Darn this is epic. :D Too bad I do not code as much as I used to. I would have loved this in my games back then. Maybe I'll try again eventually. :P
Title: Re: SpriteLib
Post by: Xeda112358 on February 04, 2011, 02:17:48 am
I know, I'm even getting excited! I... Erm... I'm working on an RPG using BatLib... It has been so long since I did an RPG...
Title: Re: SpriteLib
Post by: Hot_Dog on February 04, 2011, 02:19:01 am
I know, I'm even getting excited! I... Erm... I'm working on an RPG using BatLib... It has been so long since I did an RPG...

Wow, two RPGs using the two newest libraries!  What a coincidence
Title: Re: SpriteLib
Post by: Xeda112358 on February 04, 2011, 02:19:38 am
Cool, what's the other RPG?!
Title: Re: SpriteLib
Post by: DJ Omnimaga on February 04, 2011, 02:21:27 am
I think he means Starcraft Zeratul ;D

Also glad to hear Xeda, are you planning to post about it soon or is it in early stages? :D

Also I love RPGs. If you haven't noticed almost all games I made for calcs between 2001 and 2005 were RPGs. ;D
Title: Re: SpriteLib
Post by: Xeda112358 on February 04, 2011, 02:22:39 am
It is in its very early stages... I posted over on UTI yesterday, but I'll post here, too.
Title: Re: SpriteLib
Post by: Hot_Dog on February 04, 2011, 02:26:16 am
Yeah, Starcraft: Zeratul.  http://www.omnimaga.org/index.php?board=147.0

Please, do post your work!
Title: Re: SpriteLib
Post by: program4 on February 04, 2011, 07:44:05 pm
For the command list, it is possible to add one that creates a "multi-dimensional menu" like the built-in MATH menu (one similar to the one below)? Sometimes, you need a easy-to-program menu that can handle a lot of options.  :D

http://www.ticalc.org/archives/files/fileinfo/402/40204.html
Title: Re: SpriteLib
Post by: Xeda112358 on February 04, 2011, 08:10:25 pm
I do not plan to do it that way, I plan to make it more like the TI-89 command PopUp. It will have menus that you can scroll through using small font. I can probably make nested menus, too.
Title: Re: SpriteLib
Post by: DJ Omnimaga on February 05, 2011, 03:52:06 am
that would be nice. One thing I always hated of 83+ BASIC menus was the 7 options/1 label limitation. I never understood why we couldn't use more, when the rest of the menus could...
Title: Re: SpriteLib
Post by: Xeda112358 on February 13, 2011, 08:37:17 pm
Hopefully by the end of the week I will be able to release v4.00.00
-The syntaxes are almost all changed
-I need to replace command 16
-I need to increase compatibility by making a command that stores the data in AppBackUpScreen to an appvar and can be recalled as it is needed
-I need to change the sprite routines (I made routines that don't need to be in RAM)
-I need to finish a second Tilemap routine for archived data and picture data

I have a few other things, but I kind of promised over on MaxCoderz that I would have it finished in one or two weeks... a week ago  :-[
Title: Re: SpriteLib
Post by: Hot_Dog on February 13, 2011, 09:51:33 pm
Way to go, Xeda!  I look forward to this new release!
Title: Re: SpriteLib
Post by: DJ Omnimaga on February 15, 2011, 02:24:52 am
Nice to hear. Also question: will this be TI-Nspire-compatible? (read: Do you use any undocumented z80 opcodes?)
Title: Re: SpriteLib
Post by: Xeda112358 on February 15, 2011, 08:25:42 am
I'm not sure, but I do not believe I use any undocumented opcodes. I am pretty sure the list I have is of documented codes.
Title: Re: SpriteLib
Post by: Xeda112358 on February 19, 2011, 06:11:17 pm
Okay, this is going to be the first release... I disabled hook chaining temporarily (hopefully) and the menu isn't in the best of shape, but hopefully the only way BatLib will cause a crash will be through erroneous inputs. I had some more commands (like pixel testing archived pics and CopyProg), but I took those out because I haven't really tested them much, yet. I may have errors in the readme, so if anybody finds any, please let me know...
Title: Re: SpriteLib
Post by: Hot_Dog on February 19, 2011, 06:59:15 pm
Xeda, would you like the topic name changed to Batlib?
Title: Re: SpriteLib
Post by: Xeda112358 on February 19, 2011, 07:06:34 pm
Oh, that would be nice! It isn't really SpriteLib anymore, is it? :D I didn't even notice it...
Title: Re: BatLib
Post by: DJ Omnimaga on February 23, 2011, 12:55:16 am
Nice to see this progressing. Are you gonna update the version in the downloads section too? ALso by first release, does it means it's out of demo/beta soon?
Title: Re: BatLib
Post by: Xeda112358 on February 23, 2011, 01:53:42 am
Yeah, it is now out of demo mode :D I will add as I get time and I will update the downloads section :)
Title: Re: BatLib
Post by: DJ Omnimaga on February 23, 2011, 01:55:52 am
Aaah ok, I guess this means someone could post a news soon. Do you have any example program by the way or screenshots demonstrating the most graphical functions of Batlib?
Title: Re: BatLib
Post by: Xeda112358 on February 23, 2011, 02:00:42 am
No, I do not, but I have been working on random stuff to test the functions. I'll try to come up with some more example programs.
Title: Re: BatLib
Post by: DJ Omnimaga on February 23, 2011, 02:02:06 am
Ah ok cool :D

If you make the screenshots make sure in WabbitEmu->Right-click->calculator->options that the capture settings are set to lowest FPS possible, though. :P
Title: Re: BatLib
Post by: Xeda112358 on February 23, 2011, 02:03:29 am
Okay, thanks! I've never messed with the settings much, so I will try to remember.
Title: Re: BatLib
Post by: DJ Omnimaga on February 23, 2011, 02:05:17 am
ok ^^. It's just to make sure screenshots aren't like 800 KB large each. X.x
Title: BatLib (App)
Post by: Xeda112358 on February 24, 2011, 11:40:09 pm
BatLib (App)



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

This APP is designed to aid BASIC programs by providing advanced control of the calculator as well as new functions that the OS does not provide. It handles sprites, memory editing, fontsets, reading from the archive, data manipulations, drawing,sound, and other random or useful functions.
Title: Re: BatLib
Post by: DJ Omnimaga on February 24, 2011, 11:43:07 pm
File approved. I happened to check the downloads section and saw 1 file pending approval. I wonder if you'll have some screenshots? :P

And there's sound? O.O
Title: Re: BatLib
Post by: Xeda112358 on February 24, 2011, 11:49:25 pm
Yes, there is some code for sound that happens to be command 44 (PlayData) :D It isn't much, but it could be interesting for a Guitar Hero-esque game :P In fact, I was working on a game like that using BatLib and it is forcing me to add more commands and routines. On the plus side, the program is currently much too fast to play, so I have some room to add features. Also, I noticed a bug in command 38 (SubList) that I forgot to keep fixed. I fixed it in a beta version, but for some reason I never saved the fix.
Title: Re: BatLib
Post by: DJ Omnimaga on February 25, 2011, 03:08:02 am
Cool to hear. I can't wait to see the game in action. :)
Title: Re: BatLib
Post by: Xeda112358 on February 26, 2011, 03:06:06 am
Okay, as a quick update, I haven't done much work on an example program, but that is mostly because I kept running into the problem of wanting features to use. It took me a second to realise that I was pretty much feature requesting myself to help make a program... Anyway, the updates are:
-Changed prgmZINSTALL to work with the new BatLib name
-The menu bug is fixed (before it wasn't highlighting correctly after a mod to the rectangle routine)
-Pixel testing of archived pictures work
-ShiftScreen now works in 8 directions (instead of 1)
-Includes new commands:

63-PxlTestPic
64-CopyProg (still needs work)
65-RealToStr
66-StrToReal
67-DataString
68-MakeAnsString

The last one simply makes Ans a string of some size and 67 was made to allow for easier manipulations of sound routines and other hacky things (it can be used to convert upper case to lowercase, for example).
Anywho, here is the update with a few of the older example programs updated :D
Title: Re: BatLib
Post by: Hot_Dog on February 26, 2011, 03:07:53 am
Interesting, because feature-requesting from myself is how Correlific came to be ;)
Title: Re: BatLib
Post by: TIfanx1999 on February 26, 2011, 08:36:12 am
This is really looking cool Xeda. With all the Libs and addons in the works, TI-BASIC users are going to have a lot of quality programs to choose from! :)
Title: Re: BatLib
Post by: Xeda112358 on February 26, 2011, 12:26:23 pm
It is almost halfway done at 70 commands... By halfway I mean it is using 7916 bytes of the available coding space of 16256 bytes. I think today I will work a little more on the ReCode command to fix the Line( command and add a few things.
Title: Re: BatLib
Post by: Hot_Dog on February 26, 2011, 12:47:42 pm
Halfway done? WOW, I can't wait to see what more you add ;D
Title: Re: BatLib
Post by: Xeda112358 on February 26, 2011, 09:10:14 pm
Okay, so I am not going to make a release just yet (I am going to wait until I add a few more commands), but here is the next command that could be fairly useful to BASIC programmers, especially for games that work based on a matrix (like Connect 4).
69-SubMatrix
dim(69,MatrixNumber,ColumnOffset,RowOffset,Width,Height
MatrixNumber-This is a value from 0 to 255 telling which matrix to read from
ColumnOffset-This is a value from 0 to 98 telling which column to start reading at
RowOffset-This is the row to start reading at
Width-This is how many columns to read
Height-This is how many rows to read

And a screeny:
Title: Re: BatLib
Post by: ztrumpet on February 27, 2011, 09:50:24 am
Ooooh.  Now that, Zeda, is a very cool command.  Do you have the ability to do that to lists as well (to avoid slow seq() statements)? :D
Looks great! ;D
Title: Re: BatLib
Post by: Xeda112358 on February 27, 2011, 10:34:22 am
Yep :D That was a command I made a few months ago called SubList and it, too, works with archived lists >_>

If anybody does want the latest version with SubMatrix, here is a link: http://maxcoderz.org/forum/download/file.php?id=67
Title: Re: BatLib
Post by: TIfanx1999 on February 27, 2011, 05:47:33 pm
Very cool! =)
Title: Re: BatLib
Post by: DJ Omnimaga on February 28, 2011, 08:48:06 pm
Wow nice Xeda, is it basically to grab parts of a matrix like we can do with Sub( with strings?

Also I'm glad to hear it will be released soon. :D
Title: Re: BatLib
Post by: Xeda112358 on March 04, 2011, 12:07:19 pm
Right now, BatLib is "released", but I am adding more features as I go. Spring Break starts in 3 hours for me, so I will be away until March 14, likely without internet. Hopefully I will be able to add a few features and commands by the time I get back.
Title: Re: BatLib
Post by: DJ Omnimaga on March 09, 2011, 02:57:19 am
/me can't wait for your return. ^^
Title: Re: BatLib
Post by: TIfanx1999 on March 09, 2011, 03:30:56 am
/me wonders if Xeda's gonna be partying... ;D
Anyhow, I hope you enjoy the break!
Title: Re: BatLib
Post by: Xeda112358 on March 11, 2011, 04:20:57 pm
Okay, so good news and bad news... The good news is, I have about 50 minutes of computer time and I have added more to BatLib. The bad news is, I forgot my flashdrive...
I believe when I left, there were 71 commands in BatLib... now there are 92. I've also been meaning to get to BASIC ReCode... and I have :D

Unfortunately, I cannot remember all of the 21 added commands, but I do remember adding a bunch of matrix stuff (such as reading diagonals) and string manipulations as well as a fixed-width 4x6 BatLib font. I made the BatLib font for future use if I make a menu command, but for now it draws to the graph screen and wraps text to the next line if it would go off the screen. Since each character uses only 3 bytes (1 nibble per row), I have already added in the potential to set customized font sets (though it hasn't been implemented).
Out of randomness, I decided to add the ability to get the ASCII length of a string, so you can check how many letters are in "sin(ln(1))" if you need to know (it would return 10).

As for ReCode, I have added about 15 or 20 commands for logic, boolean logic, loops (kind of), storing and recalling from 2 byte ReCode variables, and displaying text. When I get back home later tonight, I plan to finish up the "If " command and maybe I will add a "Goto " command. If I am feeling really ambitious, I will add some more drawing and sprite routines... For now, I did manage to create a simple demo that made use of mostly text, variables, math, conditional relative jumps, rectangles, and screen shifting to create some animations :D

If I had my flash drive I could be much more specific, sorry... I've been on a bit of a programming kick for the past few days, so I have litterally been adding 8 or 9 new things every day (9 so far, today). It is now at over 10 000 bytes of code, too!
Title: Re: BatLib
Post by: DJ Omnimaga on March 12, 2011, 02:14:04 am
Glad to see you again. :D I'm glad to see new updates too. :D
Title: Re: BatLib
Post by: Xeda112358 on March 13, 2011, 11:35:37 am
Okey dokey then, I feel a little happy! I have actually fixed an old problem where some variables didn't seem to register properly after they were newly created (so the GetStats command seemed to crash on new variables). I fixed that up and as promised, here are the new additions ^-^
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

Also, the BASIC ReCode programming language is functioning enough that I actually made a remake of a game I made years ago in BASIC. It now has over 40 operations including variable storage, math, logic, loops, drawing, and conditional stuff. I will upload Block Eater to the demo programs topic shortly ^-^
Title: Re: BatLib
Post by: DJ Omnimaga on March 13, 2011, 03:23:04 pm
Darn so many commands. I'm afraid I'll not be able to keep up, lol. Btw is Recode included with BatLib now or is is still downloadable separately?

Also a suggestion for future versions: add a delay in the main menu because it's incredibly hard to select options. Keys are too sensitive. :/
Title: Re: BatLib
Post by: Xeda112358 on March 13, 2011, 03:26:24 pm
ReCode is included in BatLib, but I am thinking of making it into its own APP, too. If I do, it will still use dim(40 to start to maintain compatibility. About the main menu, you can use the numbers 1, 2, or 3 to highlight an object. For now, it doesn't do anything, though.
Title: Re: BatLib
Post by: Munchor on March 13, 2011, 03:28:35 pm
Darn so many commands. I'm afraid I'll not be able to keep up, lol. Btw is Recode included with BatLib now or is is still downloadable separately?

Also a suggestion for future versions: add a delay in the main menu because it's incredibly hard to select options. Keys are too sensitive. :/

I tried it and I have to agree with you:

(http://img.removedfromgame.com/imgs/BatLibTooFast.gif)

EDIT: The title looks like BarLib in the main menu, could you make the T taller too?
Title: Re: BatLib
Post by: Xeda112358 on March 13, 2011, 03:30:52 pm
I only kept that to kind of show off the speed of my rectangle routines. Again, the numbers can be used to actually hilight an object. I will put numbers next to them, next time, sorry

EDIT: Yeah, I can fix the T, I believe :D Thanks for the feed back!
Title: Re: BatLib
Post by: DJ Omnimaga on March 13, 2011, 03:35:14 pm
ReCode is included in BatLib, but I am thinking of making it into its own APP, too. If I do, it will still use dim(40 to start to maintain compatibility. About the main menu, you can use the numbers 1, 2, or 3 to highlight an object. For now, it doesn't do anything, though.
Ah ok, I guess another app could be an idea. People who don't need it could save some space and stuff.
Title: Re: BatLib
Post by: Xeda112358 on March 13, 2011, 03:40:48 pm
BatLib uses only one page, so it wouldn't really save space, However, if ReCode gets really big, it will need to be an app of its own. At the moment, the whole BatLib app (including ReCode) is using only 65% of an app page. I have used 10606 bytes of code space and I still have 5778 bytes to go until I fill it up :D
Title: Re: BatLib
Post by: DJ Omnimaga on March 13, 2011, 03:41:50 pm
Yeah I mean if both wouldn't fit in one page anymore. Otherwise it's best to keep everything in one page. Btw I posted a news (from your auto-upload-approval topic) finally :D
Title: Re: BatLib
Post by: Xeda112358 on March 13, 2011, 10:19:21 pm
Okay, for anybody that wants to use ReCode, I have fixed the issue with with having nested End statements. You can now do something like this:
Code: [Select]
While xx
<<stuff>>
While yy
<<stuff>>
End
<<stuff>>
End
Here is the download to the fixed version...

Oh also, there are now numbers by the menu items and the "t" in BatLib is shaped slightly differently to make things a little more clear :D Again, thanks for the feedback DJ_O and Scout!

EDIT: Ah, crud, I uploaded the wrong one... Here is the proper upload... One person downloaded that...
Title: Re: BatLib
Post by: DJ Omnimaga on March 14, 2011, 11:48:13 pm
Good to hear, good job :D
Title: Re: BatLib
Post by: Xeda112358 on March 17, 2011, 05:16:09 pm
Okay then here is the next update. I added an error catching thing to dim(29 in case the user tries drawing a rectangle that goes off the screen. Before it would only return an error if you started off the screen :D

Also, I added a new demo program for ReCode called MOVE and it is also a remake of an old game. I've added these commands to ReCode:
log( takes the log of a number in some base
2 will square a number
sin( takes the sine of a number (period=256) and returns a number (-127 to 127)
cos( is similar to sin(
log(Text( will display a number in some base on the graph screen

I just finished up log( and log(Text( and I like 'em :D You can display, say, 1337 in base 14 if you want or whatever base :D
Title: Re: BatLib
Post by: Munchor on March 17, 2011, 06:40:35 pm
Nice Xeda, looking cooler and cooler!
Title: Re: BatLib
Post by: DJ Omnimaga on March 26, 2011, 10:57:00 pm
This is nice Xeda. Also part of that game kinda reminds me of JustCause's Cubes puzzles.
Title: Re: BatLib
Post by: Xeda112358 on April 02, 2011, 06:00:16 pm
Hm, so I was over on TIBD when I got an idea to make a command to delete or insert list elements. I'm not sure why there isn't an OS command (or is there?) for this since there are bcalls... For the deleting, you need to specify the offset into the list, the number of elements to delete and which list you want to perform the function on. I have not actually added the insert command yet, but deleting works like this...

Let the list to play with be {0,1,2,3,4,5,6,7,8,9}

To delete 4 elements starting at the 2, you can do:
Code: [Select]
dim(91,2,4,{0,1,2,3,4,5,6,7,8,9The result will be {0,1,6,7,8,9} in Ans
Alternatively, if that list was stored to L1, you can do:
Code: [Select]
dim(91,2,4,0or
Code: [Select]
dim(91,2,4,L1As a note, they directly modify the list, so there is no need to do something like this:
Code: [Select]
dim(91,2,4,0→L1
Blegh, now I wonder if I should make similar commands for strings...?
Title: Re: BatLib
Post by: mrmprog on April 03, 2011, 06:19:30 pm
I was wondering, how likely is this to crash/clear ram/destroy my calc? Is there anything I should know before putting it on a real calc?
Title: Re: BatLib
Post by: Xeda112358 on April 03, 2011, 11:15:39 pm
There are two things that I know of that can cause a crash:
1) Improper syntax (usually problems are caught before they can cause an error)
2) Certain Apps or assembly programs might overwrite the RAM areas used by BatLib

To fix the first one, just make sure you use proper syntaxes. To fix the second one, after running an app or assembly program, you can reinstall BatLib either by running BatLib or using the included prgmZINSTALL. Not all asm programs will cause problems and not all apps will.

Also, I realised as I was posting this that I never updated prgmZINSTALL from the beta version of BatLib, so here is the version that should work on all future versions of BatLib.
Title: Re: BatLib
Post by: mrmprog on April 04, 2011, 09:36:27 pm
Ok, I will try this out as soon as I have time to send the app/learn commands. This occurred to me also: What if you released a "safe" version that did not contain the scary mem editing commands? I would be less scared of crashing then  :)
Title: Re: BatLib
Post by: Xeda112358 on April 04, 2011, 10:07:13 pm
Hmm, well I guess I could do that... (sometime later...) Okay, so I removed the commands below, so if you use them, it returns ".SAFE"
12-StoBytes
14-VarEditByte
17-MemEdit
41-GetStats (It might be buggy)
64-CopyProg (This doesn't work for some times... the program version works, though :P)

There shouldn't be any other commands that edit vars or memory that could be unsafe XD

EDIT: Also, I forgot to not include commands 91 and 92, so this has command 91 and 92 XD
91 is DelElements: deletes elements from a list
92 is InsElements: inserts elements into a list (with a value of 0)

Both use the syntax dim(91,Offset,#Elements,List#

Offset starts at 0
#Elements should be greater than 0
List# can either be a direct list or a number representing a list. 0=L1, 1=L2, 2=L3, et cetera

I didn't mean to include them because I haven't added an error handler for if #Elements is 0. Don't let it be 0!! :D
Title: Re: BatLib
Post by: mrmprog on April 05, 2011, 07:06:11 pm
Cool! Kind of off topic, but I noticed that CopyProg will cut off the last token in a program when converting to a string.
Title: Re: BatLib
Post by: Xeda112358 on April 05, 2011, 09:34:02 pm
Hmm, that is odd. I will have to see what is up with that... Also, for that, you can use command 21 which automatically copies to a string :)
Title: Re: BatLib
Post by: Munchor on April 06, 2011, 09:00:06 am
I just installed BatLib :D

I have a complaint already though :( Using the batlib app menu is very hard using keys (I know there are numbers) but it's still tricky.
Title: Re: BatLib
Post by: Xeda112358 on April 06, 2011, 09:12:24 am
I know, I was using that to show off the speed of the rectangle operations. I could just take out key presses, but I don't want to :P
Title: Re: BatLib
Post by: Munchor on April 06, 2011, 12:26:46 pm
I just started learning BatLib Basic and loved it (when I read the pdf) and now found an error, I guess:

Code: [Select]
dim(22,"EF0745
Prompt A

It prompts for var A, but the screen is not cleared :S

And I run this:

I just started learning BatLib Basic and loved it (when I read the pdf) and now found an error, I guess:

Code: [Select]
dim(22,"EF0745

It'll print EF075.

Any idea of what I'm doing wrong? Thanks.
Title: Re: BatLib
Post by: Xeda112358 on April 06, 2011, 04:40:29 pm
The hex code to clear the LCD is EF4045 :P
All that does is clear the LCD, but when displaying the homescreen, it will reload the contents from the buffer
EF0745 displays the current contents of HL, but if you run it from the homescreen, the string is displayed, overwriting the value. So, in a program you can do:
Code: [Select]
dim(22,"EF0745
Pause
That being said, I have been bugged about this, too, but since I wasn't sure if anybody else would be, I decided to leave it this way. It will only take 4 more bytes of code, but I can prevent dim(22 and dim(23 from modifying Ans. Are there any other commands that should not modify Ans?
Title: Re: BatLib
Post by: Munchor on April 06, 2011, 04:42:03 pm
Code: [Select]
dim(22,"EF4045
Pause A

I got ARG Error (TI-Basic error) :S
Title: Re: BatLib
Post by: Xeda112358 on April 06, 2011, 04:43:50 pm
That worked fine for me... I just tested it. Is that the only code?
Title: Re: BatLib
Post by: Munchor on April 06, 2011, 04:48:40 pm
I had to reparse hooks, it worked, but it displays a 5 in the right part of the screen :S

OH WAIT, that's the variable A
Title: Re: BatLib
Post by: Xeda112358 on April 06, 2011, 04:49:20 pm
Might I ask what the value for A is XD
EDIT: Never mind :P
Title: Re: BatLib
Post by: Munchor on April 06, 2011, 04:56:23 pm
Might I ask what the value for A is XD
EDIT: Never mind :P

Now I want to know if when I create a rectangle, I need to dim(99) to see it. Thanks.

I tried this:

Code: [Select]
ClrDraw
ClrHome
dim(29,0,30,0,30
dim(99

And got no success.

Wait, I didn't put a type, 1 for black worked :D

EDIT:
My first cool thing:
Code: [Select]
dim(2
dim(22,"FDCB00AE
dim(22,"EF4045
dim(29,0,96,0,64,1
dim(99
Pause
:D
Title: Re: BatLib
Post by: Xeda112358 on April 06, 2011, 05:05:12 pm
Cool! I love the rectangles ♥ Um, my most common error is that I forget to add a type. But anywho, I want to give you an optimisation trick that might be tough to grasp:
Code: [Select]
dim(29,0,8,0,8,2      ;makes an inverted 8x8 rectangle at (0,0)
dim(99                ;Displays the graph screen
dim(10,67             ;This waits for a key press in the arrows, Enter through Clear, and Graph through Y=, and 2nd to Del
dim(43→A              ;This returns a key press that detects up to 2 keys
dim(29,0,8,0,8,2      ;makes an inverted 8x8 rectangle at (0,0)
However, if you want to speed up the code a little as well save memory, you can combine all of the syntaxes:
Code: [Select]
dim(29,0,8,0,8,2,99,10,67,43,29,0,8,0,8,2→A
Both of those will invert a rectangle, display the graph, wait for a keypress, reinvert the rectangle, and then store the keypress to A
The optimised method might be more difficult to read later, though :D

EDIT: Hehe, that is the same mistake I make most often :D By leaving off the 1, it was read as 0, so it cleared the rectangle XD
Title: Re: BatLib
Post by: Munchor on April 06, 2011, 05:10:16 pm
Niiice Xeda, thanks :D

Code: [Select]
dim(2
dim(22,"FDCB00AE
dim(22,"EF4045
dim(29,0,96,0,64,1
dim(99
Pause

As I said, this code is OK, but closing it is hard and the screen isn't cleared in the end. Any idea?
Title: Re: BatLib
Post by: Xeda112358 on April 06, 2011, 05:15:40 pm
The hex code to clear the LCD is EF4045 :P
All that does is clear the LCD, but when displaying the homescreen, it will reload the contents from the buffer
You need to clear the textShadow buffer, too, so you can use EF4645. So, dim(22,"FDCB00AEEF4645
Title: Re: BatLib
Post by: Munchor on April 06, 2011, 05:25:24 pm
Ah thanks much :D

HELLO WORLD:

Code: [Select]
AxesOff
ClrDraw
dim(87,5,5,"HELLO WORLD
dim(99

It's a very ugly Hello World though.

Actually, what I get is:

HELLO)WORLD
                   99

In the screen, the ')' and the 99 are weird :S
Title: Re: BatLib
Post by: Xeda112358 on April 06, 2011, 05:27:32 pm
Hehe, that is because that displays ASCII data :P Check command 90 :D
Title: Re: BatLib
Post by: Munchor on April 06, 2011, 05:28:41 pm
No ')' but I still get a 99 :S
Title: Re: BatLib
Post by: Xeda112358 on April 06, 2011, 05:30:50 pm
That is because it doesn't actually tell the calc you are looking at the graph screen, it just displays it, even if you are on the homescreen. Try putting a pause there :)
Title: Re: BatLib
Post by: Munchor on April 06, 2011, 05:32:09 pm
Perfect, I put the coordenates as (5,5) but it appears quite far from (5,5). It looks like 5,20. (I'm always talking in (Y,X)).
Title: Re: BatLib
Post by: Xeda112358 on April 06, 2011, 05:33:47 pm
Quote from: Readme
X is the X coordinate (0~23) to draw the character or string at
:P
That is because it is displaying at (0,20)
Title: Re: BatLib
Post by: Munchor on April 06, 2011, 05:38:02 pm
Quote from: Readme
X is the X coordinate (0~23) to draw the character or string at
:P
That is because it is displaying at (0,20)

Meaning I can't display strings in X<20?

I can just use normal BASIC, like Text( then.
Title: Re: BatLib
Post by: Xeda112358 on April 06, 2011, 05:40:43 pm
No, these aren't pixel coordinates XD They are like Output(, except you can draw to any row, but there are 24 columns instead of 16. Also, if you omit the coordinates, the string is drawn to the end of where the last string was drawn to XD

EDIT: Also, this doesn't use an OS font, so I only have the first 128 chars made :/
Title: Re: BatLib
Post by: Munchor on April 07, 2011, 09:59:09 am
I tried this:

dim(22,"FDCB00AEC9

But the 'Done' is still there!, any idea?
Title: Re: BatLib
Post by: Xeda112358 on April 07, 2011, 12:26:17 pm
It worked fine for me... Also, should I add that as a command?
Title: Re: BatLib
Post by: Munchor on April 07, 2011, 12:37:44 pm
It worked fine for me... Also, should I add that as a command?

It actually worked now, maybe it was a problem of the whole program.

Here's the little animation you made, no problems with 'Done' here, working perfectly (uses Recode)
Title: Re: BatLib
Post by: Xeda112358 on April 07, 2011, 12:44:50 pm
Hehe, nice :D As a few tips for optimisation, instead of AxesOff, ClrDraw, and DispGraph, inside the ReCode loop you can just do Fill(0. Also, if you want to, you can do dim(22,"FDCB00AE",40 instead of using two dim( commands :) Thanks, Scout!
Title: Re: BatLib
Post by: Munchor on April 07, 2011, 01:22:14 pm
I just managed to create BatLib programs using the same engine as in Axe.

Most Axe games are based on loops:

Code: [Select]
Repeat getKey(15)
Pt-On(X,Y,Pic1
DispGraph
ClrDraw
End

Getkeys, everything is inside that.

BatLib code for it:

Code: [Select]
dim(40
Fill(0
While getKey!=15
dim(29,0,96,0,64,6
DispGraph
End
Stop

However, trying to add getKeys, I got an error:

Code: [Select]
dim(40
Fill(0
While getKey!=15
If getKey=1
Then
Stop
End                        ; I get syntax error here
dim(29,0,96,0,64,6
DispGraph
End
Stop

Any ideas?
Title: Re: BatLib
Post by: Xeda112358 on April 07, 2011, 02:49:09 pm
Um, after the Stop, the BASIC parser picks up again :P The BASIC parser reads the next line which is End and it say "What is this?! This doesn't belong here!"

Also, you can use Line( instead of dim(29 in ReCode. It is faster that way ;)
Title: Re: BatLib
Post by: Munchor on April 07, 2011, 02:50:49 pm
Um, after the Stop, the BASIC parser picks up again :P The BASIC parser reads the next line which is End and it say "What is this?! This doesn't belong here!"

Also, you can use Line( instead of dim(29 in ReCode. It is faster that way ;)

Thanks much for the advice, I'll try not to let the BASIC Parser go crazy.
Title: Re: BatLib
Post by: Xeda112358 on April 07, 2011, 02:52:13 pm
Yeah, if you need to, you can use IS>( to jump forward a specific number of lines, but that is a little advanced and complicated.
Title: Re: BatLib
Post by: ZippyDee on April 07, 2011, 02:54:44 pm
does that take into account newline tokens? or individual commands?
Title: Re: BatLib
Post by: Xeda112358 on April 07, 2011, 02:56:30 pm
IS>( only jumps forward a number of lines, not based on the commands. So if you aren't careful, you can jump ahead to BASIC code XD DS>( is a command I like to use to make For( loops or whatnot :D  (DS>( jumps back)
Title: Re: BatLib
Post by: Munchor on April 08, 2011, 01:06:19 pm
IS<( works with lines indeed.

Can you make a command that jumps X tokens?
Title: Re: BatLib v4.00.95.51
Post by: Xeda112358 on April 08, 2011, 01:21:58 pm
I could, but I opted not to XD I figured lines were easier to count than tokens.

On another note, I am going to be late for an appointment so I need to go, but here is the newest update of BatLib. I will go into more detail later about the fixes and added stuff :)
Title: Re: BatLib
Post by: Munchor on April 08, 2011, 01:32:48 pm
I could, but I opted not to XD I figured lines were easier to count than tokens.

On another note, I am going to be late for an appointment so I need to go, but here is the newest update of BatLib. I will go into more detail later about the fixes and added stuff :)

It's on my calculator already.

I see the source code is included =D
Title: Re: BatLib
Post by: Xeda112358 on April 08, 2011, 03:59:23 pm
Hehe, yep :) Okay, so here are all of the additions and fixes:
-fixed up the > command in ReCode
-added commenting to ReCode using //
-In the last version, I added the ability for the newer commands to use either the number of a list or direct lists. Now all list options can be either the list number (0=L1, 1=L2), a name (like "LHELLO") or a direct list (like {0,1,2,5}).
-Added DelElements command. This lets you delete elements from a list at a given offset. I didn't know of an easy BASIC method.
-Added InsElements command. This lets you insert zeros into a list at a given offset.
-Added InsList command. This inserts a list into another list at a given offset

As a note, there is no error checking for deleting or inserting elements outside of the list, so take care not to do that. Other than that, I cannot think of any other additions or fixes :)

EDIT: Also, I added some stuff that I use to develop BatLib as well as the "source" that I use to compile XD
Title: Re: BatLib
Post by: ztrumpet on April 08, 2011, 04:09:07 pm
Oooh, cool.  I really like the added three commands, though I take pride in knowing how to do it as easy as possible in basic. :P  Nice work, Xeda! ;D
Title: Re: BatLib
Post by: Xeda112358 on April 08, 2011, 04:13:35 pm
Is there an easy way to do it in BASIC? I know how, but the code was a bit time consuming compared to this. Also, in the next update I plan to have it so that if you try to insert or delete zero elements, it gets read as 1. That way any extreme optimisers out there can omit that argument if they simply want to do one element :D Also, I have to add in the /Then...comments...End command to ReCode (which is only 5 bytes of code to add XD).
Title: Re: BatLib
Post by: Munchor on April 08, 2011, 04:27:00 pm
An example of BatLib // comments.

Title: Re: BatLib
Post by: ztrumpet on April 08, 2011, 04:42:11 pm
Is there an easy way to do it in BASIC? I know how, but the code was a bit time consuming compared to this.
No, it's quite difficult.  For instance, the "easy" way to do command 91 (deleting) would be like this, assuming A holds the element to start deleting at, B holds the number of elements to delete, and Ans holds the list:
augment(seq(Ans(I),I,1,A-1),seq(Ans(I),I,A+B,dim(Ans
Easy, huh?  ::)
Title: Re: BatLib
Post by: Xeda112358 on April 08, 2011, 04:46:19 pm
Yep, easy enough XD Now to do command 92 and 93 you would need 2 augments, right? And that is without Ans as an input and you would need to use If statements for when adding or deleting at the beginning or end XD So I guess I'm glad I made those commands...

:D
Title: Re: BatLib
Post by: ztrumpet on April 08, 2011, 04:58:46 pm
That's true...
For command 91 to work at the beginning or end, this is how it would have to look:
:augment({0},augment(Ans,{0
:augment(seq(Ans(I),I,1,A),seq(Ans(I),I,A+B+1,dim(Ans
:seq(Ans(I),I,2,dim(Ans)-2
Title: Re: BatLib
Post by: Munchor on April 10, 2011, 02:04:15 pm
BatLib Doubt:

Inside a block:

Code: [Select]
Repeat A=15

End

How to check if the user presses a key (that is not [CLEAR]).

This is Basic, not Recode, but it's for BatLib purposes, so I posted it here.
Title: Re: BatLib
Post by: Xeda112358 on April 11, 2011, 08:24:41 am
In just wanted to make a note that your question was resolved on IRC XD I do not know how long it will be until the next update, but here are some things I am thinking of adding:
-String routines similar to the last three list commands
-an Input routine for ReCode
-Lbl/Goto for ReCode?
-Maaaaaaybe a routine, finally, for jumping to labels or spots in other programs
Title: Re: BatLib
Post by: Munchor on April 11, 2011, 08:39:33 am
I really really want strings, sprites and Goto/Lbl in Recode, that would make it super awesome and almost finished.
Title: Re: BatLib
Post by: Xeda112358 on April 11, 2011, 08:41:42 am
Yeah, if I can correct the strings and finalise the sprite commands, that would be awesome :) I also need to add in tilemapping and data editing while I am at it :)
Title: Re: BatLib
Post by: Munchor on April 11, 2011, 09:56:12 am
Yeah, if I can correct the strings and finalise the sprite commands, that would be awesome :) I also need to add in tilemapping and data editing while I am at it :)

If you could make sprite display like in Axe would be awesome:

Code: [Select]
Pt-On(X,Y,Pic     ;Type
;Example:
[[FFFFFFFFFFFFFFFF]->Pic1
Pt-On(0,40,Pic1
Title: Re: BatLib
Post by: calc84maniac on April 11, 2011, 11:34:30 am
That's true...
For command 91 to work at the beginning or end, this is how it would have to look:
:augment({0},augment(Ans,{0
:augment(seq(Ans(I),I,1,A),seq(Ans(I),I,A+B+1,dim(Ans
:seq(Ans(I),I,2,dim(Ans)-2
How about seq(Ans(I+B(I≥A)),I,1,dim(Ans)-B :D
Title: Re: BatLib
Post by: ztrumpet on April 11, 2011, 04:03:05 pm
That's true...
For command 91 to work at the beginning or end, this is how it would have to look:
:augment({0},augment(Ans,{0
:augment(seq(Ans(I),I,1,A),seq(Ans(I),I,A+B+1,dim(Ans
:seq(Ans(I),I,2,dim(Ans)-2
How about seq(Ans(I+B(I≥A)),I,1,dim(Ans)-B :D
Nah, too simple...
*facepalm*
Nice one.  Time for me to hide in a corner of shame... :-\
Title: Re: BatLib
Post by: Xeda112358 on April 11, 2011, 09:10:42 pm
All I can say is... Nice :D Also, to answer you, Scout, I plan to make it a little different... You will be able to use a pointer to the sprite data, then you have the size, coordinates, and method arguments, so:
Code: [Select]
"Str1→A                ;This returns a pointer to Str1 in A
Pt-On(A,X,Y,W,H,T
Title: Re: BatLib
Post by: Munchor on April 12, 2011, 03:55:04 am
With strings, good as well!
Title: Re: BatLib
Post by: Xeda112358 on April 13, 2011, 10:37:49 pm
I just noticed in the readme that the name for command 68 is wrong XD It should be MakeString. I must have copied and pasted there or something, but it is used to create a string returned in Ans that is a specified length :)
Title: Re: BatLib
Post by: Munchor on April 14, 2011, 04:16:05 am
I just noticed in the readme that the name for command 68 is wrong XD It should be MakeString. I must have copied and pasted there or something, but it is used to create a string returned in Ans that is a specified length :)

dim(68

Never tried it, gotta do, thanks.
Title: Re: BatLib
Post by: Xeda112358 on April 14, 2011, 10:32:58 am
Yeah, I only really made that command to give users a way to start tilemap data or fontsets/sprite sets :)
Title: Re: BatLib
Post by: Munchor on April 14, 2011, 10:51:48 am
I know there's dim(22 but I'd like a command that lets us type hex for several lines:

Code: [Select]
dim(X
210100
EF0745
EF7942

Can that be done in BatLib or ReCode?
Title: Re: BatLib
Post by: Xeda112358 on April 14, 2011, 11:36:50 am
hehe, I am glad you asked Scout :) I made a program a while back that lets you do something similar:
(http://www.unitedti.org/forum/uploads/post-28158-0-73572800-1297200784.gif)
That will compress a program, but I could definitely modify the code a little for BatLib :) That program never really was popular and it was originally supposed to be part of LSDOS, but... I guess it didn't work out :/
Title: Re: BatLib
Post by: Munchor on April 14, 2011, 11:52:49 am
I like it much Zeda :D
Title: Re: BatLib
Post by: Xeda112358 on April 14, 2011, 05:01:11 pm
Okay, so Scout asked earlier for an update, so I threw this together with these updates:
-ReCode starts in 6MHz mode
-dim(10 is executed at 6MHz
-Pause (in ReCode) is executed at 6MHz
-dim(44 (a sound routine) is executed at 6MHz
-Changed 'Pause While' to 'Pause If ' to prevent problems with nesting inside of a While/If...Then block
-dim(1 now also disables 'Done'

I also added command 94 which is used to insert data. It doesn't catch if the user is inserting data outside of the variable, though:
dim(94,Offset,"VarName","String"|Str#
-If the Offset is 0, the string of data will be inserted at the beginning of the var.
-"VarName" is the name of the var to insert data into. If this is not in RAM, a string ".ARCH" will be returned.
-The last argument can either be a string or the number of a string (Str1=0, Str2=1, et cetera). If you use the number, the string can be in archive

Also, I think I might know how to fix up the CopyProg command which will be very useful :) I also might add my ASMComp program for use with ReCode and as a command to compress asm programs. Here is a screenie for the program:
(http://www.unitedti.org/forum/uploads/post-28158-0-73572800-1297200784.gif)

Sorry, I haven't updated the readme, yet, so it is just the App:
Title: Re: BatLib
Post by: Munchor on April 14, 2011, 05:03:55 pm
Did you update dim(57? Just wondering, it's already in my calculator :D
Title: Re: BatLib
Post by: Xeda112358 on April 14, 2011, 05:05:11 pm
No, I didn't update that XD I actually cannot remember the last time I updated that XD

(for those who don't know, dim(57 is what returns the version of BatLib as a string)
Title: Re: BatLib
Post by: Munchor on April 15, 2011, 07:22:48 am
No, I didn't update that XD I actually cannot remember the last time I updated that XD

(for those who don't know, dim(57 is what returns the version of BatLib as a string)

In the version before this you did ;P
Title: Re: BatLib
Post by: Xeda112358 on April 15, 2011, 08:44:35 am
Hehe, okay :D Maybe if I remember for the next update, I will, but I'm not guaranteeing it! ;P
Title: Re: BatLib
Post by: Munchor on April 15, 2011, 08:50:37 am
Could you make it an integer instead of a string? Let's say you add new commands and we want to check if the version is higher than X:

Code: [Select]
If dim(57>X

Even if it doesn't use the dots, it's just a straightforward number.
Title: Re: BatLib
Post by: Xeda112358 on April 15, 2011, 08:55:06 am
Hmm, I could add in a new command just to return the number, yes. I actually have it set up to do that nicely... So for v4.00.95.51, it would display 95.51 in Ans. Does that sound good?
Title: Re: BatLib
Post by: Munchor on April 15, 2011, 08:58:15 am
Hmm, I could add in a new command just to return the number, yes. I actually have it set up to do that nicely... So for v4.00.95.51, it would display 95.51 in Ans. Does that sound good?

It's great! However, what if you go past version 4? or 4.00?
Title: Re: BatLib
Post by: Xeda112358 on April 15, 2011, 09:00:05 am
Oh, v4.00 just says it is an App. Originally it was a BASIC program using Celtic 3 and Omnicalc, then It was an an assembly program using Omnicalc, then a standalone assembly program, then it became BatLib, the App :)


v5.00 will be an OS :D (j/k?)
Title: Re: BatLib
Post by: mrmprog on April 15, 2011, 07:03:23 pm
At first I got excited, then I saw the "(j/k?)"  :'(
Title: Re: BatLib
Post by: Xeda112358 on April 15, 2011, 07:57:38 pm
Well, I put the question mark there... I might work on something akin to an OS sometime...
Title: Re: BatLib
Post by: mrmprog on April 16, 2011, 08:41:37 pm
I just downloaded Batlib, and I am trying to enable the font hook but nothing is happening.
Title: Re: BatLib
Post by: Munchor on April 16, 2011, 08:43:09 pm
I just downloaded Batlib, and I am trying to enable the font hook but nothing is happening.


The Application functions are not working yet. Also, Zeda is about to upload a new BatLib version.
Title: Re: BatLib
Post by: Xeda112358 on April 16, 2011, 08:43:35 pm
I haven't made any new screenshots and I haven't added anything to ReCode, but this is a monumental update. Today BatLib has over 100 commands along with a programming language that has over 50 commands. BatLib still is using less than 3/4 of an app page (1 app page is the smallest size an app can be). In this official update, along with the all the updates from the previous unofficial update, these changes and additions were made:

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 :)

95-SplitUpNibbles-Used to Decompress nibble data to bytes
96-NibbleComp-Compresses LSNs of data
97-GetNibble
98-WriteNibble
100-BatLibRAM
101-Sub2DData

Since I promised that if BatLib ever reached command 99 that I would make sure command 99 displayed the graph screen (for compatibility), that is the case in this update.


In the list of ideas that I didn't add today (but will hopefully get added) are:
102-AsmComp
103-SearchStr
104-ReplaceStr
105-PopUp

And for ReCode:
Input -to get user inputs
Asm( -for multi-line, commented opcodes and possibly with label support.

And just some general coding that needs to get done:
Optimize command table for more speed (will cost a few bytes, but probably worth it)
Hook chaining

So enjoy while I try to whip up an example of a scrolling tilemap :)

EDIT: mrmprog: you need to use the commands to install a font hook. THe actual menu only shows if hooks are installed :) Gimme a second and I will upload a fontset as well as an example for how to install it

EDIT2: Here is a link to the bug fix for RecallPic: http://ourl.ca/8958/203936
Title: Re: BatLib
Post by: mrmprog on April 16, 2011, 08:51:44 pm
Ok, I used dim(2 and it worked
Title: Re: BatLib
Post by: Munchor on April 16, 2011, 08:51:44 pm
I just downloaded it and am installing it on my calculator right now, I'll report stuff soon.
Title: Re: BatLib
Post by: mrmprog on April 16, 2011, 08:53:01 pm
I will re-download it. I just installed it for the first time, and an update came out!
Title: Re: BatLib
Post by: Xeda112358 on April 16, 2011, 08:53:14 pm
Hehe, thanks :) And that saves me from editing...

mrmprog:
Actually, there is a fontset as well as a font editor included in this version, so you can play with that :) Send Str9 to your calc and then do dim(55,5,".Str9 on the homescreen. That will install the experimental 8x8 font, but you can use the font editor to change it to 6x8 or something. Also, you can download Omnicalc fonts and use dim(55 for that :)
Title: Re: BatLib
Post by: Munchor on April 17, 2011, 12:24:49 am
A bug?

Code: [Select]
dim(57
4.00.95.51

Isn't it supposed to be 4.00.102.51?
Title: Re: BatLib
Post by: Xeda112358 on April 17, 2011, 02:41:31 am
Oh jeez, I am way too tired to make updates I guess x.x I managed to upload everything except the correct app, sorry. I modified my post to have the correct download : http://www.omnimaga.org/index.php?action=dlattach;topic=5383.0;attach=7381

Also, for those that already downloaded everything else, here is just the app.

Sorry about that :/

EDIT: Also, this version number is in hex, so it should be 4.00.66.33 when you use dim(57
Thanks, Scout :)
Title: Re: BatLib
Post by: Munchor on April 17, 2011, 05:31:56 am
Oh jeez, I am way too tired to make updates I guess x.x I managed to upload everything except the correct app, sorry. I modified my post to have the correct download : http://www.omnimaga.org/index.php?action=dlattach;topic=5383.0;attach=7381

Also, for those that already downloaded everything else, here is just the app.

Sorry about that :/

EDIT: Also, this version number is in hex, so it should be 4.00.66.33 when you use dim(57
Thanks, Scout :)

What is this .8xk though? I don't get it.

I get the hex thing now :D However, I'd prefer it in decimal.
Title: Re: BatLib
Post by: Xeda112358 on April 17, 2011, 10:48:31 am
This .8xk is the actual app. I accidentally uploaded the wrong app with all the correct documentation the first time :/
Title: Re: BatLib
Post by: Munchor on April 17, 2011, 10:49:06 am
This .8xk is the actual app. I accidentally uploaded the wrong app with all the correct documentation the first time :/

Ah! Thanks then, putting it in my calculator.
Title: Re: BatLib
Post by: Xeda112358 on April 17, 2011, 10:49:48 am
Awesome! I am now going to see if I can make the scrolling tilemap >:D
Title: Re: BatLib
Post by: Munchor on April 17, 2011, 11:26:07 am
I have this code:

Code: [Select]
dim(1,56,4
0->X
0->A
0->Y
dim(52,"7E8181818181817E",8,X,Y,0,99
getKey->A
If A=26
Then
X+1->X
End
If A=34
Then
Y+1->Y
End
If A=25
Then
Y-1->Y
End
If A=24
Then
X-1->X
End
dim(56,4
End
ClrHome

And here's how it works:

(http://img.removedfromgame.com/imgs/BatLibError.gif)

It's very weird! Y changing is soft, but X position changing isn't. Then when you hit the margins, weird things happen, please try the file it's attached.
Title: Re: BatLib
Post by: Xeda112358 on April 17, 2011, 11:29:16 am
Scout: Sprites are drawn to 12 columns. That is why the readme says it must be a value of 0 to 11.

Also, I never added error checking there to save on speed
Title: Re: BatLib
Post by: Munchor on April 17, 2011, 01:27:39 pm
Scout: Sprites are drawn to 12 columns. That is why the readme says it must be a value of 0 to 11.

Also, I never added error checking there to save on speed

yeah too bad we have 64 for Y but only 11 for X, I'll try to turn it around someway.
Title: Re: BatLib
Post by: Xeda112358 on April 17, 2011, 01:30:03 pm
Also, unlike Axe, you can make sprites that are, say, 24 pixels wide or some other multiple of 8 (up to 96). And it is pretty fast, too, so it does have advantages :)
Title: Re: BatLib
Post by: Xeda112358 on April 21, 2011, 02:33:24 pm
Eh, well it isn't exactly the best time for an official update, but I will anyway... What I have updated is a small fix to command 95 and a major revision to command 54 (DBRead). Command 95 was fixed because I went to use it for Samocal and I noticed finally that it wasn't splitting the nibbles like I thought it would (I should really keep better notes on my routines instead of guessing what it does). Anyway, I literally had to remove 6 bytes of code and that was fixed. I have no clue why that code was even there XD

As for DBRead, this will prove to be very useful with the fixes and has proven very valuable for Samocal. DBRead stands for Data Base Read because its purpose is to read variables as though they are lists with variable size elements. For example, a program can be seen as a list where every element is each line of code. Obviously, each line is not always the same size and they aren't usually just numbers. That is where this command can be useful! In Samocal, for example, the monsters names are in prgmMONSTERs as follows:
Code: [Select]
:Florita
:Troll
:Dwarf
:Magfly
:Manita
:Water Demon
:Healer
:Trolm
:Bufli
And it continues. I can store this program in archive and read the lines as I need them!

Also, I would like to note that it is not necessary to read just new lines. You have to specify that you are reading between new lines by using a value of 63. If you wanted, you could read between spaces by using a value of 41 :) So anywho, here is the update.

EDIT: Also, I added the StringWidth command to tell you how many pixels wide a string is in small font and I just noticed that I left command 103 in x.x Here is the syntax for Command 103:
Code: [Select]
dim(103,SearchByte,NewByte,"VarName"
SearchByte is a value from 0 to 255 that is the byte to search for
NewByte is a value from o to 255 that is the value to replace the byte with
"VarName" is the name of the var to search and modify
I added that because I was having issues with Source Coder. It doesn't like spaces, so I had to replace all the space with another token, then when it was on my calc, I had to go back and replace everything. Anyway, it will still be very useful for a Hangman game :)
Title: Re: BatLib
Post by: Munchor on April 21, 2011, 04:47:37 pm
Zeda! An update! I won't install it today this time, since TI-Connect is crashing, but it's always great.
Title: Re: BatLib
Post by: Xeda112358 on April 21, 2011, 04:58:22 pm
That's okay XD I already have added and documented two commands (103 and 104).
Title: Re: BatLib
Post by: mrmprog on April 21, 2011, 08:46:09 pm
The lessons I have learned...

Don't set all the font chars to be blank  :evillaugh:
Don't start a Recode block on the home screen   <_<
Don't forget that key codes are not the same as Basic :banghead:

The times I've cleared my ram: ∞
Title: Re: BatLib
Post by: Xeda112358 on April 21, 2011, 09:20:53 pm
The lessons I have learned...

Don't set all the font chars to be blank  :evillaugh:
Don't start a Recode block on the home screen   <_<
Don't forget that key codes are not the same as Basic :banghead:

The times I've cleared my ram: ∞

:D Is it bad that I gave respect for that? That actually made me laugh out loud because I learned the first one pretty fast, too XD
I should definitely make a note about the ReCode thing and while I said in the regular BatLib readme that the codes were different for dim(43, I never mentioned in the ReCode readme anything about that, so sorry x.x

Xeda112358 revises readme...

EDIT: I also noticed that I forgot to fix the Pause While command to Pause If in the readme.... Also fixing :D Thanks!
Title: Re: BatLib
Post by: Munchor on April 22, 2011, 11:07:44 am
I also have infinite ram clears with recode :S
Title: Re: BatLib
Post by: Xeda112358 on April 22, 2011, 04:15:56 pm
I have them only from simple mistakes, but then again, I made it so I know all the tricks and limits :/
Title: Re: BatLib
Post by: DJ Omnimaga on April 29, 2011, 08:01:14 pm
About the sprite display, are sprites only displayed at multiple of 8 horizontally? This might be an issue for some games where the programmer wants smooth character movement or similar things. Do you think this could be changed?

I'm glad this is still progressing regularly. :D
Title: Re: BatLib
Post by: Xeda112358 on April 29, 2011, 11:22:58 pm
Yes, currently I only have it with multiples of 8 (I was a big fan of using Celtic 3 before I learned assembly). That method is simply a lot faster to render and it can display sprites a multiple of 8 wide (so 64 pixel wide sprites, for example). If I make a routine that lets you display at any X coordinate, it will probably be only 8x8 sprites to begin with, and maybe eventually multiples of 8 wide.
Title: Re: BatLib
Post by: Munchor on April 30, 2011, 05:01:02 am
About the sprite display, are sprites only displayed at multiple of 8 horizontally? This might be an issue for some games where the programmer wants smooth character movement or similar things. Do you think this could be changed?

I have bugged and bugged Zeda to change that too, but he wants to save size...

Also, Zeda, this is the reason why I haven't finished POP for BatLib, I made an alpha version but moving 8 by 8 just makes the game terrible.

I could bug you more to finish this, but will it work?
Title: Re: BatLib
Post by: Xeda112358 on April 30, 2011, 10:05:53 am
It isn't the size, it is the trade off in limitations... right now, you have only 12 columns, but the sprites can be up to 96 pixels wide, they can still be drawn every pixel down, the sprite drawing is much faster (enough to create grayscale). The other method will be slower and be only for 8 pixels wide and the sprite masks will be limited. You haven't bugged me to finish making this, you have only complained to me that you don't like the current version. There is a reason for the "BatLib Ideas" topic.

Sorry.

EDIT: Also, on another note, I will be without internet for from May 9th to August 29th, so if I don't respond, that is why :/ Also, if for some reason I cannot come back to college, I might not have internet for a long while after that.
Title: Re: BatLib
Post by: mrmprog on April 30, 2011, 11:32:33 am
Does that mean no more updates over that time?!  :'(
Title: Re: BatLib
Post by: Xeda112358 on April 30, 2011, 02:54:37 pm
Probably not :/ I have had occasional access to internet while on break, but usually only enough to check in and not enough to actually post updates. Plus, that gives people enough time to master techniques in BatLib! I add so much to it that people have a tough time keeping up :/
Title: Re: BatLib
Post by: Munchor on May 01, 2011, 05:42:13 am
EDIT: Also, on another note, I will be without internet for from May 9th to August 29th, so if I don't respond, that is why :/ Also, if for some reason I cannot come back to college, I might not have internet for a long while after that.

I didn't know about the part when you may not be able to come after August 29th O.O

It's still a lot though (if you return to college).
Title: Re: BatLib
Post by: Xeda112358 on May 04, 2011, 07:45:34 am
Any future updates will be found here: http://www.unitedti.org/forum/index.php?showtopic=9602
Title: Re: BatLib
Post by: Xeda112358 on June 18, 2011, 09:55:07 am
Okay, so I guess the previous post can be pretty much ignored now... I am in the process of converting BatLib to mnemonics so that I can incorporate some of my latest project ideas (line reading/writing/deleting, a safer programming language than ReCode, et cetera), but I do not know how to get Brass to compile my code as an app. It says that the first page must be 16KB and I think the issure is that I change .org to 9872h for code that is executed at appbackupscreen. Sorry for the runon sentence, but help would be appreciated...
Title: Re: BatLib
Post by: Munchor on June 18, 2011, 09:56:39 am
Okay, so I guess the previous post can be pretty much ignored now... I am in the process of converting BatLib to mnemonics so that I can incorporate some of my latest project ideas (line reading/writing/deleting, a safer programming language than ReCode, et cetera), but I do not know how to get Brass to compile my code as an app. It says that the first page must be 16KB and I think the issure is that I change .org to 9872h for code that is executed at appbackupscreen. Sorry for the runon sentence, but help would be appreciated...

Are you using the DCS SDK? You need binpak8x to get 8XP or 8XK files.
Title: Re: BatLib
Post by: Xeda112358 on June 18, 2011, 10:06:47 am
I am using the DCS SDK, but I opened up the Brass App in notepad and saw that I could define my source as being "TI8XK" or "Intel", but it does not make the correct format for the TI8XK and the Intal hex format that I should be able to use with wappsign does not work :/
Title: Re: BatLib
Post by: Munchor on June 18, 2011, 01:47:38 pm
I am using the DCS SDK, but I opened up the Brass App in notepad and saw that I could define my source as being "TI8XK" or "Intel", but it does not make the correct format for the TI8XK and the Intal hex format that I should be able to use with wappsign does not work :/

Try this (http://www.cemetech.net/forum/viewtopic.php?t=4768&start=40) because I don't think I can help you any further :(
Title: Re: BatLib
Post by: Xeda112358 on July 28, 2011, 08:44:16 pm
Thanks, I now have a little more time to check in on this... Now that I have converted most of the code to mnemonics and have tons of code waiting to be implemented, if I can figure this out... BatLib will have even more features packed into it. I have several programs that are several thousand bytes in size that could really help fill BatLib up XD
Title: Re: BatLib
Post by: TIfanx1999 on July 29, 2011, 02:34:39 am
O.O Wow! Sounds great Xeda! =)
Title: Re: BatLib
Post by: Munchor on July 29, 2011, 04:34:40 am
Now that I have converted most of the code to mnemonics

wow, I didn't expect you to do that, still nice job and can't wait for the updates ;)
Title: Re: BatLib
Post by: mrmprog on July 29, 2011, 05:11:45 am
Yay, Batlib is growing!
Title: Re: BatLib
Post by: Xeda112358 on August 11, 2011, 11:54:54 am
Hehe, I finally figured out how to get Brass to compile an app, so now I am debugging, I should be able to start adding new things in a few days :)
Title: Re: BatLib
Post by: ralphdspam on August 11, 2011, 12:02:32 pm
Hehe, I finally figured out how to get Brass to compile an app, so now I am debugging, I should be able to start adding new things in a few days :)
Sounds nice.  :)
Are you going to add USB commands and the like?
Title: Re: BatLib
Post by: Xeda112358 on August 11, 2011, 12:21:31 pm
If I can, I will, but that will have to come in the future-- I still need to learn how to use the USB ports on an assembly level. If I can manage that, I will try to add some really cool functions that will make multiplayer game designing easier :)
Title: Re: BatLib
Post by: Sorunome on June 02, 2012, 02:30:08 pm
*bump*
Title: Re: BatLib
Post by: TIfanx1999 on June 03, 2012, 11:23:42 am
That's one hell of a bump (10 months :o)! I think development on this is done. Grammer has pretty much take over this and Recode, and is a lot more functional.
Title: Re: BatLib
Post by: Xeda112358 on June 06, 2012, 08:03:58 pm
Hehe, I still plan to get back to work on this some day. I want to rewrite it to add more commands and add in some more optimisations. I still plan to add in arbitrary precision math commands, too. I have written a multiplication routine that is only limited by the amount of RAM you have. I made it multiply two 100-digit numbers :D
Title: Re: BatLib
Post by: Sorunome on June 07, 2012, 06:07:41 am
Cool, I want to see moar of this! :D
Title: Re: BatLib
Post by: TIfanx1999 on June 08, 2012, 11:24:04 am
@Xeda: Ohai! I thought it was deadish, but I guess it be more like "in stasis" according to your post. :)
Title: Re: BatLib
Post by: Xeda112358 on June 22, 2012, 11:52:21 am
I finally got the motivation to rewrite BatLib, so I was working on it all this past week. I have good news and bad news. The good news will hopefully be awesome enough to outweigh the bad >:D

Bad news: I cannot figure out how to make weird names with Brass, so this update uses BatLib with regular letters. Also, I have change the syntax of some ReCode commands and I have yet to document the changes (also, I think I still need to code in 8 more commands).

Awesome news:
I have added in all the other 104 commands as well as 19 more commands. I have updated almost everything, so a bunch of the commands are now more powerful (and still backwards compatible). All the bugs or issues that I could find are now fixed and I have yet to find bugs, now. Here are some changes:



Now for the new commands!


Also, in this release is a beta/test version of BatLib that will be able to use a revolutionary new "GroupHook" that I came up with. Since no other apps have it, I had to perform some modifications to existing apps for demonstration. Basically, I managed to make it so that when I installed BatLibG, I could use the parser hooks in Celtic 3, Omnicalc, and Grammer, too without installing them. Celtic 3 and Omnicalc did conflict with the real( commands, though. I managed to modify DoorsCS7, too, and I could use Celtic 3 and DSC commands, too, but I will not release the modified DCS7 because I haven't talked to Kerm about it.

Finally, I could not send the as to my actual calc (I need to get new batteries), so I could not check if there were any issues on calc that didn't occur in WabbitEmu.
Title: Re: BatLib
Post by: Sorunome on June 22, 2012, 03:31:32 pm
Nice job xeda!/me downloads

and i have to add more commands to the libbot.... xD

EDIT: wait a sec
Would that mean you can use omnicalc with DCS? And insert the hook into zstart? :w00t:  :w00t:  :w00t:  :w00t:  :w00t:  :w00t:  :w00t:  :w00t:  :w00t:  :w00t:  :w00t:  :w00t:  :w00t:  :w00t:  :w00t:  :w00t:  :w00t:  :w00t:  :w00t:  :w00t:  :w00t:  :w00t:  :w00t:  :w00t:  :w00t:  :w00t:  :w00t:  :w00t:  :w00t:  :w00t:  :w00t:  :w00t:  :w00t:  :w00t:  :w00t:  :w00t:  :w00t:  :w00t:  :w00t:  :w00t:  :w00t:  :w00t:  :w00t:  :w00t:
Title: Re: BatLib
Post by: Xeda112358 on June 23, 2012, 02:46:39 pm
It won't work with zStart because it requires a modification to the app header and zStart already uses that area. But yes, I have already asked Kerm about officially supporting GroupHook with DoorsCS7 and if it gets added, it will be able to work with Omnicalc, Grammer, and BatLib.
Title: Re: BatLib
Post by: Sorunome on June 23, 2012, 04:33:27 pm
It won't work with zStart because it requires a modification to the app header and zStart already uses that area.
I mean because zstart has a new function that allows hook chaining....
Title: Re: BatLib
Post by: Xeda112358 on July 03, 2012, 11:43:12 am
Hmm, I am going to have to look into that, then :D Also, I have some more updates and bug fixes. Appparently when I went on an optmising spree, I broke a few things :[

dim(14) and dim(15) now have options for using 2-byte words
dim(124) was added for creating variables
dim(125) was added for executing inline Grammer code
dim(60) now allows you to archive or unarchive a var
dim(29) is fixed (before, it added 1 to the x-coordinate)
dim(29) now has two options for pixel testing rectangle regions

dim(56) and dim(62) have been fixed (pixel test results were broken)
dim(63) was fixed (similar issue)


I found a discrepancy in the compression routine that is now fixed. It sometimes lost data instead of being lossless.


EDIT: Oh! I almost forgot to mention that I made an example program for compressing/decompressing data. It can get great compression ratios depending on the data (I had a tilemap compress down to almost 11%). It is very easy to use, so I hope it can get used in some big projects !
Title: Re: BatLib
Post by: Sorunome on July 03, 2012, 11:49:34 am
Cool!/me downloads! :D
updates are always cool! :D
Title: Re: BatLib
Post by: Xeda112358 on July 03, 2012, 11:53:57 am
Thanks, hopefully I didn't miss anything :) Also, this app is actually in its final stages. I am almost finished with the project, but I am going to wait to release the final version until all bugs are fixed. I now only have about 20 bytes of room left for data and code.
Title: Re: BatLib
Post by: Sorunome on July 03, 2012, 12:25:22 pm
BTW, are you planning to add any more new commands if you can squeeze them in?
Title: Re: BatLib
Post by: Xeda112358 on July 03, 2012, 03:56:28 pm
I probably will not, but if I can, I will try :)
Title: Re: BatLib
Post by: TIfanx1999 on July 04, 2012, 02:40:53 am
Looks nice as usual. =)
Title: Re: BatLib
Post by: Xeda112358 on July 09, 2012, 08:21:25 am
For GroupHook, I tried a technique suggested by Runer that has worked excellently. I am still working on adding better features, but currently, you can:


Using command 126:
dim(126,#) will return the name of the nth app in the grouphook. (Returns ".DNE" if the number is out of range)
dim(126.1) will disable all grouphooks
dim(126.2) will enable all grouphooks
dim(126.3,#) will enable the nth app in the grouphook
dim(126.4,#) will disable the nth app in the grouphook


Nevermind, I forgot to put the updated one on my flash drive, so 126.3 and 126.4 aren't available. Anyways, GroupHook is now slightly faster and it now uses a GDB var (a hacked one) to store data.

This is not an official update because it is still not finished. However, feel free to take a look :)
Title: Re: BatLib
Post by: shmibs on July 09, 2012, 10:56:41 am
ooh, that sounds fantastically useful in helping to maintain consistent speeds =D
Title: Re: BatLib
Post by: Sorunome on July 09, 2012, 12:26:28 pm
Sounds nice!
And i have to add more comments to LibBot.... XD
Title: Re: BatLib
Post by: shmibs on July 09, 2012, 02:03:31 pm
xeda, as a somewhat late response to your name question, i don't know how to do it, but you can just use rabbitsign to convert your 8xk to a .app, find the name and replace the chars you want, and resign it to an 8xk with -r. it's annoying, but can be scripted into your build process if you can't figure anything else out.
Title: Re: BatLib
Post by: Xeda112358 on July 20, 2012, 10:17:49 am
Awesome, thanks :) I might decide to keep this normal name as a way to differentiate it from the old version. I'm still thinking about it...
Title: Re: BatLib
Post by: Sorunome on September 11, 2012, 08:59:32 pm
i found a bug with graphing!
i don't know if it is only in batlibg, it is the only one where i tested.
It addes some kind of shade to the graphs. screenshot:
(http://img.removedfromgame.com/imgs/batlibgbug.gif)
Title: Re: BatLib
Post by: Xeda112358 on September 12, 2012, 08:00:46 am
Wow, that is weird. I am going to need to figure out how it is doing that. It doesn't seem to be setting flags and I am pretty sure all the RAM that I use is decently documented. Have you tried it with the most recent BatLib? (Not BatLibG) I am at school right now and I cannot test on this computer (no USB ports work so I cannot even use Wabbit on my flash drive)

I stopped BatLibG in the last update since the new code for GroupHook was fast enough for my liking. (I just added in GroupHook to the normal BatLib)
Title: Re: BatLib
Post by: Sorunome on September 12, 2012, 06:25:02 pm
oh, so there is no batlibg/batlib difference anymore? i'll try it out after doing some homework with that version :D
Title: Re: BatLib
Post by: Xeda112358 on September 14, 2012, 09:40:33 am
Hmm, I did test it and the issue is similar (shading is on the other side). Also, I forgot to release a fixed version for a bug I found a few weeks ago :/ If you have no apps with GroupHook enabled, running BatLib will crash your calc. The fix was simple, but I have to remember to put it on my flashdrive before I come to campus D:

I still don't know why the shading occurs, though, but I suspect it has to do with GroupHook

EDIT: I am pretty sure this is the problem because a certain register isn't preserved (A). When I manually preserved it, it worked fine.
Title: Re: BatLib
Post by: Sorunome on September 14, 2012, 08:39:13 pm
Ok, lets hope that you can fix that bug soon! As i was going like WTF?!?!?! when i graphed stuff for ap calculus XD
Title: Re: BatLib
Post by: Xeda112358 on September 29, 2012, 03:13:48 pm
Okay, I think it is bug hunting time :) I have fixed the graphing bug, and I have added more to dim(126) to make it even better.
Taken from the readme:

126-GroupHookMode dim(126.x,arg1,arg2)

This is used to control the GroupHook settings. Since BatLib automatically
installs all GroupHook apps on the calc in the order they appear in memory, this
command is very useful to manage conflicts. For example, Celtic 3 installed
before Omnicalc will render Omnicalc's real() commands useless (because Celtic 3
thinks they belong to it). You can use this command to swap the order in which
apps are checked.

example, to make sure Celtic 3 is checked first, set it in slot 0:
Code: [Select]
:dim(126.5,"Celtic 3Notes:

was too big).
When using dim(126.5), the hooks are swapped. In the example, the App
previously in position zero will now be in whatever position Celtic 3 was in.

grouphook app.

Basically, if you have a program that you want to run Celtic 3, Omnicalc, and BatLib routines in, you should include this at the start of your program:
Code: [Select]
dim(126.5,"Omnicalc      ;put Omnicalc first so that Celtic 3 doesn't conflict with Omnicalc's real() token.
dim(126.5,1,"Celtic 3
Oh, as another note, app names are usually 8 characters long, so they get padded with spaces at the end. However, since this is not always the case, BatLib does not automatically pad names.
Title: Re: BatLib
Post by: Sorunome on September 29, 2012, 03:27:52 pm
Wow, nice, i'll download as soon as i'm on my pc :P
and once again i have to change libbot xD
Title: Re: BatLib
Post by: Xeda112358 on September 29, 2012, 04:26:36 pm
I wish I could use libbot :/ I also cannot wait to start making solid example programs, either. Now that I am basically done with BatLib, I can start focusing on using it :D
Title: Re: BatLib
Post by: Sorunome on September 29, 2012, 04:34:59 pm
You mean with 'using libbot' adding/editing batlib commands?
challenge acccepted XD
(pm me a password which would get you access :D )
Title: Re: BatLib
Post by: Xeda112358 on September 29, 2012, 04:46:22 pm
I meant more that since IRC is down, I cannot use it, but I wouldn't mind getting to help on that. However, if you have most of the commands already finished, I don't plan to add any more functions to BatLib...
Title: Re: BatLib
Post by: Sorunome on September 29, 2012, 04:47:11 pm
i have already every batlib command in it except of the new ones now (i think)
Title: Re: BatLib
Post by: Xeda112358 on September 29, 2012, 04:48:43 pm
Wow, that is great! Is it able to be used on some other site?
Title: Re: BatLib
Post by: Sorunome on September 30, 2012, 05:19:07 pm
by now, yes
http://www.sorunome.de/ti84+/libs.php
OH, and you could always access it via irc, it is on efnet channel #omnimaga
Title: Re: BatLib
Post by: Xeda112358 on January 10, 2013, 03:28:32 pm
I have a list of bugs and whatnot that I've been working on this morning. I have also been optimising some of the routines to add room in the code. So far I have modified 7 routines saving 79 bytes :D (I now have about 87 bytes of coding space available :P)

I figured I would mention that I was still working on the next update. Among the bug fixes, I fixed an issue with the DelVar command for a special case and TokSprite just needed a single bit toggled (the documentation said you needed an optional argument to be 1 to draw to pixel coords (0 to draw to aligned coordinates), like HexSprite, but instead it was the other way around because I typed "z" instead of "nz" >.>)
Title: Re: BatLib
Post by: TIfanx1999 on January 10, 2013, 03:34:17 pm
\o/. Sound great Xeda! :D
Title: Re: BatLib
Post by: Sorunome on January 10, 2013, 05:41:34 pm
That does sound great, BatLib has far to many features >.<
Title: Re: BatLib
Post by: Xeda112358 on January 12, 2013, 01:03:58 am
Hopefully this version isn't as messed up as Grammer has been (I kept reintroducing new bugs for every bug fixed x.x)

So here are the updates:


I thank roguebantha for keeping a running list of bugs for me to fix (if there are anymore, I'm sure he'll find them); It's been very helpful. I have yet to figure out why my fonthooks don't work in the program or app menu. I've looked at other programs that use fonthooks and I cannot figure out what I am overlooking.
Title: Re: BatLib
Post by: Xeda112358 on June 20, 2013, 09:55:15 am
There was a bug with the ZINSTALL program, so I fixed that. The download is attached.