Omnimaga

Calculator Community => Other Calc-Related Projects and Ideas => TI Z80 => Topic started by: lookitsan00b on January 15, 2011, 04:25:47 pm

Title: a Basic shell
Post by: lookitsan00b on January 15, 2011, 04:25:47 pm
Well, I've been inactive on these forums for a while, but not on the calculator.  So this is what I've been doing: a BASIC shell.

Of course its not all BASIC, I've needed an ASM program for 4 functions:
 1: Number of programs on user's calculator
 2: Getting the first couple bytes of each program, for use with text sprites
 3: Getting the name of each program
 4: Running the selected program

The startup is a little slow (due to archiving variables such as a copy of the user's graph screen), but other than that it actually works really well so far.  It not only saves all of the settings it changes, but every single real/cplx variable!

The setup should be familiar to anybody who has a computer (except the lack of a mouse), using 7*7 text sprites for icons (an unrolled loop, if you're wondering how it draws them so fast).  It currently does not support running programs (need to figure out how to do that, but I do plan to allow ASM programs as well), archived programs with icons in the source code, or selecting programs that do not have icons.

Grr. Wabbit won't play nice with this.  First, my GetProgName function fails in MathPrint mode (returns Str1="mean(", fixable, but annoying), then my icons all have that row missing, I forget how to fix that.  It initializes slower on my calculator, due to the presence of 32 programs on it.
Title: Re: a Basic shell
Post by: Munchor on January 15, 2011, 04:26:49 pm
rayquaza59 tried this once too, but I don't know if he ever achieved to make it a shell. Good job.
Title: Re: a Basic shell
Post by: jnesselr on January 15, 2011, 04:38:44 pm
Is there supposed to be a missing line in the each sprite?
Title: Re: a Basic shell
Post by: Munchor on January 15, 2011, 04:41:01 pm
Is there supposed to be a missing line in the each sprite?

Oh yeah!
Title: Re: a Basic shell
Post by: holmes221b on January 15, 2011, 04:41:39 pm
Is there supposed to be a missing line in the each sprite?
Grr. Wabbit won't play nice with this.  First, my GetProgName function fails in MathPrint mode (returns Str1="mean(", fixable, but annoying), then my icons all have that row missing, I forget how to fix that.
I was too lazy to just paraphase....
Title: Re: a Basic shell
Post by: Munchor on January 15, 2011, 04:42:21 pm
Is there supposed to be a missing line in the each sprite?
Grr. Wabbit won't play nice with this.  First, my GetProgName function fails in MathPrint mode (returns Str1="mean(", fixable, but annoying), then my icons all have that row missing, I forget how to fix that.
I was too lazy to just paraphase....

Oh yeah! Thanks for noticing holmes.
Title: Re: a Basic shell
Post by: jnesselr on January 15, 2011, 05:05:20 pm
Is there supposed to be a missing line in the each sprite?
Grr. Wabbit won't play nice with this.  First, my GetProgName function fails in MathPrint mode (returns Str1="mean(", fixable, but annoying), then my icons all have that row missing, I forget how to fix that.
I was too lazy to just paraphase....

Oh yeah! Thanks for noticing holmes.
oh, I was just looking at the pretty screenie.
Title: Re: a Basic shell
Post by: Eeems on January 15, 2011, 05:39:24 pm
It looks nice :D reminds me a little of my old CCI shell project, but not as feature filled, although faster. I guess there is a trade off for not using Celtic III and making it more dynamic :P
I hope you have lots of fun with this project :)
Title: Re: a Basic shell
Post by: lookitsan00b on January 15, 2011, 11:36:21 pm
It looks nice :D reminds me a little of my old CCI shell project, but not as feature filled, although faster. I guess there is a trade off for not using Celtic III and making it more dynamic :P
I hope you have lots of fun with this project :)
Oh it's probably nowhere near done... getting it to run programs will be the fun part though. (unless I dump the program name to another program...)
But yeah, most of that speed during boot is because of Wabbit's instant-write flash.  I do quite a bit of archiving on boot. (Pic, GDB, 28-item list)
Is there supposed to be a missing line in the each sprite?
Grr. Wabbit won't play nice with this.  First, my GetProgName function fails in MathPrint mode (returns Str1="mean(", fixable, but annoying), then my icons all have that row missing, I forget how to fix that.
I was too lazy to just paraphase....

Oh yeah! Thanks for noticing holmes.
oh, I was just looking at the pretty screenie.
Yeah, I don't know about that line... Never happened to me on the actual calc until just after I transferred it to the computer. Then, next time I ran it, it garbage-collected and that seems to have fixed it.
Then again, I did just replace the batteries before transferring... ?

Anybody have any ideas for how I can keep a more permanent index of programs? My current method is by index in the VAT, and, needless to say, extremely volatile. Also, I'd rather not use Str2 for permanent icon data... :P
Title: Re: a Basic shell
Post by: lookitsan00b on January 16, 2011, 02:26:08 pm
I figured out why it was returning 'mean(' and 'seq(' for program names: prgm! and prgm# :P  The ascii doesn't tokenize properly.

As for my indexing problem, I am now using a string hash. ('prod(cumsum(L1' after an 'inString(' loop.)  This allows for icons on programs not made for the shell by use of a custom list... but I still need a place for the icontexts...

As for that white line, its because of some system flag making 'Text(' erase the line beneath it. As I said, I have no idea how to fix this, but I know I read it somewhere. :(

EDIT: just remembered: visit the Y= screen. now how does that get set in the first place ???