Author Topic: Create Groups  (Read 28813 times)

0 Members and 1 Guest are viewing this topic.

Offline calcdude84se

  • Needs Motivation
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2272
  • Rating: +78/-13
  • Wondering where their free time went...
    • View Profile
Re: Create Groups
« Reply #15 on: July 06, 2010, 03:16:18 pm »
Making a group in RAM shouldn't be too hard... Just create a program/protprog/appvar and change the type byte. As for format...
* calcdude stares at some group vars in calcsys and plans to report back later
« Last Edit: October 09, 2010, 05:48:58 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 thepenguin77

  • z80 Assembly Master
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1594
  • Rating: +823/-5
  • The game in my avatar is bit.ly/p0zPWu
    • View Profile
Re: Create Groups
« Reply #16 on: July 06, 2010, 03:57:27 pm »
That's ok, I already figured out the format. It just looks like you put the vat entry in front of the program data. Very simple to do.
zStart v1.3.013 9-20-2013 
All of my utilities
TI-Connect Help
You can build a statue out of either 1'x1' blocks or 12'x12' blocks. The 1'x1' blocks will take a lot longer, but the final product is worth it.
       -Runer112

Offline thepenguin77

  • z80 Assembly Master
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1594
  • Rating: +823/-5
  • The game in my avatar is bit.ly/p0zPWu
    • View Profile
Re: Create Groups
« Reply #17 on: July 06, 2010, 05:13:31 pm »
Sorry for the double post, but I finished the program. This one works way better, but is a lot less cool. Since I believe you are putting this within a celtic program, I will make you an unsquisher so that you send the program to calc, unsquish, and then recall it into your program since i doubt you want to type 400 numbers (200 bytes).

Anyways, the official format for groups is:
2 bytes: size
{
7 bytes: prog vat entry
1-8 bytes: prog name
2 bytes: prog size
0-65k: prog data
}
Repeat the bottom part for each entry.

Then when it's all done, archive it with bcall(_archiveVar).
zStart v1.3.013 9-20-2013 
All of my utilities
TI-Connect Help
You can build a statue out of either 1'x1' blocks or 12'x12' blocks. The 1'x1' blocks will take a lot longer, but the final product is worth it.
       -Runer112

Offline ztrumpet

  • The Rarely Active One
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5712
  • Rating: +364/-4
  • If you see this, send me a PM. Just for fun.
    • View Profile
Re: Create Groups
« Reply #18 on: July 06, 2010, 05:30:45 pm »
Nice job!  That's really nice.  :)

Offline thepenguin77

  • z80 Assembly Master
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1594
  • Rating: +823/-5
  • The game in my avatar is bit.ly/p0zPWu
    • View Profile
Re: Create Groups
« Reply #19 on: July 06, 2010, 05:47:30 pm »
Well here it all is. The unsquisher takes the program name in string 1, using the same syntax for programs as the grouper, and converts it into hex code in a program of the same name just with A as its first letter.

"GROUPER2->Str1
Asm(prgmUNSQUISHER

then later
Rcl prgmAROUPER2
« Last Edit: July 06, 2010, 05:48:01 pm by thepenguin77 »
zStart v1.3.013 9-20-2013 
All of my utilities
TI-Connect Help
You can build a statue out of either 1'x1' blocks or 12'x12' blocks. The 1'x1' blocks will take a lot longer, but the final product is worth it.
       -Runer112

Offline BrandonW

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 115
  • Rating: +38/-1
    • View Profile
Re: Create Groups
« Reply #20 on: July 06, 2010, 06:05:28 pm »
Ok, new idea, maybe I can make a group variable in ram and then archive it. That would be much simpler, I just have to figure out how groups work. It is also so anti-TI to have a group in ram.

While it defeats the purpose of having groups (you'd just be duplicating the RAM variables in RAM), you absolutely could have done this using _archiveVar. That's a subroutine of _Arc_Unarc, the latter which has all the checks to make sure you don't try archiving a group or something.

Offline Builderboy

  • Physics Guru
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: Create Groups
« Reply #21 on: July 06, 2010, 06:23:04 pm »
I have to say i like the editing memory directly solution better than the hacky menu one :P Either way however, great job!

Offline thepenguin77

  • z80 Assembly Master
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1594
  • Rating: +823/-5
  • The game in my avatar is bit.ly/p0zPWu
    • View Profile
Re: Create Groups
« Reply #22 on: July 06, 2010, 06:36:32 pm »
Ok, new idea, maybe I can make a group variable in ram and then archive it. That would be much simpler, I just have to figure out how groups work. It is also so anti-TI to have a group in ram.

While it defeats the purpose of having groups (you'd just be duplicating the RAM variables in RAM), you absolutely could have done this using _archiveVar. That's a subroutine of _Arc_Unarc, the latter which has all the checks to make sure you don't try archiving a group or something.


I did use _archiveVar. The only problem was that wiki ti didn't have the inputs right, you have to call _chkFindSym right before you use it.

And ram groups are pretty funny. Since the os expects them to be in archive they get pretty glitchy and tend to clear ram when you ungroup them.
zStart v1.3.013 9-20-2013 
All of my utilities
TI-Connect Help
You can build a statue out of either 1'x1' blocks or 12'x12' blocks. The 1'x1' blocks will take a lot longer, but the final product is worth it.
       -Runer112

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Create Groups
« Reply #23 on: July 06, 2010, 06:44:27 pm »
Interesting stuff ^^

Offline ACagliano

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 919
  • Rating: +32/-2
    • View Profile
    • ClrHome Productions
Re: Create Groups
« Reply #24 on: July 06, 2010, 07:00:13 pm »
Well here it all is. The unsquisher takes the program name in string 1, using the same syntax for programs as the grouper, and converts it into hex code in a program of the same name just with A as its first letter.

"GROUPER2->Str1
Asm(prgmUNSQUISHER

then later
Rcl prgmAROUPER2

Now, can you have multiple programs in Str1. And I am at a loss. Where do you define the name of the group itself and where do you define the programs to be included? And, with the unsquisher, what happens if you unsquish and a program already exists in RAM. Overwrite or skip? and is it auto? cuz it would be best if it is auto.

And can you please provide me with a sort of readme for the stuff- i dont want to make any mistakes.

And thanks. You guys rock.
« Last Edit: July 06, 2010, 07:05:48 pm by ACagliano »

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Create Groups
« Reply #25 on: July 06, 2010, 07:04:18 pm »
Btw just one thing: make sure those routines are safe and that you don't do bad mistakes while using them, since it involves writing to Flash. Accidentally overwriting the OS certificate == bad

Offline thepenguin77

  • z80 Assembly Master
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1594
  • Rating: +823/-5
  • The game in my avatar is bit.ly/p0zPWu
    • View Profile
Re: Create Groups
« Reply #26 on: July 06, 2010, 07:43:39 pm »
Btw just one thing: make sure those routines are safe and that you don't do bad mistakes while using them, since it involves writing to Flash. Accidentally overwriting the OS certificate == bad
No, no, no. I would never write to flash from a basic program lol. That's just scary. I make a group variable in ram and then archive it.

Group2:
Input: Str3 = group name, must be 8 characters, use spaces if it's not 8, Ex: "GROUP___"
         Str4 = programs to group, each name is 8 characters with a + or - prefixing it to show it's type
                + = unprotected/unlocked program
                - = protected/locked program
                Ex: "+A_______+BASIC___-PHOENIX_-GROUP2__"
Then just run group2, or it's hex equivalent, and your group from string 3 will be made with the programs in string 4.

Unsquish:
This program is so you don't have to type in all 500 numbers by hand.
Input: Str1 = program name, must be 8 characters with + or - prefix, Ex: "-GROUP2__"
Output: A program will be made with the same name as the original, except the first letter will be an 'A'.

Then run it and AROUP2 will be made which you can recall the numbers from.


Both of these programs auto overwrite. The group one makes a program and a group but deletes the program, so don't name your group the same as your program. Ex: Your game is call GAME, you go to make a group called GAME, your game just got deleted in the process.

By doing the auto overwrite, I basically eliminated any chance of you accidentally clearing ram, (which would suck.) Also, if either of them error, you won't really know aside from they won't have completed their task.

Edit:
    I am stupid, during my final optimize I made a little error. Fixed now though. Also, I just tested, if you don't have enough memory, thankfully you just get an error memory.
« Last Edit: July 06, 2010, 08:08:25 pm by thepenguin77 »
zStart v1.3.013 9-20-2013 
All of my utilities
TI-Connect Help
You can build a statue out of either 1'x1' blocks or 12'x12' blocks. The 1'x1' blocks will take a lot longer, but the final product is worth it.
       -Runer112

Offline ACagliano

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 919
  • Rating: +32/-2
    • View Profile
    • ClrHome Productions
Re: Create Groups
« Reply #27 on: July 06, 2010, 07:53:21 pm »
can i have a screenshot of the unsquisher running. if you dont mind, i may just use celtic 3 for the ungrouping, but i will use your grouper.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Create Groups
« Reply #28 on: July 06, 2010, 08:46:06 pm »
Btw just one thing: make sure those routines are safe and that you don't do bad mistakes while using them, since it involves writing to Flash. Accidentally overwriting the OS certificate == bad
No, no, no. I would never write to flash from a basic program lol. That's just scary. I make a group variable in ram and then archive it.
Oh ok phew, I thought those programs wrote directly to Flash instead of RAM then archiving.

Offline thepenguin77

  • z80 Assembly Master
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1594
  • Rating: +823/-5
  • The game in my avatar is bit.ly/p0zPWu
    • View Profile
Re: Create Groups
« Reply #29 on: July 06, 2010, 09:02:19 pm »
Well during the making of this screenshot, (which took a long time), I found some more errors because I had never actually tried embedding the program in a basic program. But it finally works.
zStart v1.3.013 9-20-2013 
All of my utilities
TI-Connect Help
You can build a statue out of either 1'x1' blocks or 12'x12' blocks. The 1'x1' blocks will take a lot longer, but the final product is worth it.
       -Runer112