Author Topic: BatLib  (Read 146576 times)

0 Members and 2 Guests are viewing this topic.

Offline Xeda112358

  • they/them
  • Project Author
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4704
  • Rating: +719/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
SpriteLib (program)
« Reply #60 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.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55942
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: SpriteLib
« Reply #61 on: November 24, 2010, 01:01:02 am »
This is the longest readme I ever seen. O.O

Offline Xeda112358

  • they/them
  • Project Author
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4704
  • Rating: +719/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
Re: SpriteLib
« Reply #62 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
...

Offline Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
Re: SpriteLib
« Reply #63 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?

Offline Xeda112358

  • they/them
  • Project Author
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4704
  • Rating: +719/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
Re: SpriteLib
« Reply #64 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.

Offline Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
Re: SpriteLib
« Reply #65 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?

Offline Xeda112358

  • they/them
  • Project Author
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4704
  • Rating: +719/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
Re: SpriteLib
« Reply #66 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.

Offline Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
Re: SpriteLib
« Reply #67 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.

Offline calcdude84se

  • Needs Motivation
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2272
  • Rating: +78/-13
  • Wondering where their free time went...
    • View Profile
Re: SpriteLib
« Reply #68 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
« Last Edit: November 28, 2010, 06:17:29 pm by calcdude84se »
"People think computers will keep them from making mistakes. They're wrong. With computers you make mistakes faster."
-Adam Osborne
Spoiler For "PartesOS links":
I'll put it online when it does something.

Offline Xeda112358

  • they/them
  • Project Author
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4704
  • Rating: +719/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
Re: SpriteLib
« Reply #69 on: November 28, 2010, 06:18:40 pm »
Thankee :D I always forget the name. They should just call it _ExitApp :D

Offline Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
Re: SpriteLib
« Reply #70 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

Offline calcdude84se

  • Needs Motivation
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2272
  • Rating: +78/-13
  • Wondering where their free time went...
    • View Profile
Re: SpriteLib
« Reply #71 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 ;)
"People think computers will keep them from making mistakes. They're wrong. With computers you make mistakes faster."
-Adam Osborne
Spoiler For "PartesOS links":
I'll put it online when it does something.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55942
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: SpriteLib
« Reply #72 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?

Offline Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
Re: SpriteLib
« Reply #73 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.

Offline Xeda112358

  • they/them
  • Project Author
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4704
  • Rating: +719/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
Re: SpriteLib
« Reply #74 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