Omnimaga

Calculator Community => TI Calculators => Axe => Topic started by: ClrDraw on November 08, 2013, 10:59:03 pm

Title: AlphaCS Project
Post by: ClrDraw on November 08, 2013, 10:59:03 pm
I'm making this thread for any questions I have while making my AlphaCS shell.

(http://img.ourl.ca//AlphaCS.gif)
https://sites.google.com/a/pvlearners.net/clrdraw/ (https://sites.google.com/a/pvlearners.net/clrdraw/)

First question: I've been considering using ZSTAXE (by thepenguin77) to help me run MirageOS programs. The problem is that my program will be completely dependent on the user having zStart on their calculator. Are there any axioms (or anything that I could use in an Axe program) currently that could help me with this?  :-\ If somebody would make me one, I will gladly include them in my credits.
Title: Re: AlphaCS Project
Post by: Sorunome on November 09, 2013, 05:14:03 am
Well, i have zStart anyways on my calc so go for it :P


Anyways, I like your GUI :)
Title: Re: AlphaCS Project
Post by: Matrefeytontias on November 09, 2013, 10:08:59 am
/me recognizes some of his programs/libs in this screenshot

The first thing is that MirageOS provides functions to ASM programs, which functions are directly hard-coded in the shell. The second thing is that MirageOS is an app, so all functions address are relative to $4000 IIRC. So if you don't provide MirageOS functions at the correct addresses, just don't run MirageOS programs.
Title: Re: AlphaCS Project
Post by: ClrDraw on November 09, 2013, 11:43:39 am
Quote
Well, i have zStart anyways on my calc so go for it  :P
Anyways, I like your GUI  :)
Thanks for the support! I might end up doing that for version one and hopefully have some way to do it independently in the next version.

Quote
* Matrefeytontias recognizes some of his programs/libs in this screenshot
They're really good, I've been using them since before I joined Omni.

Quote
Just don't run MirageOS programs.
The problem is that many games I like on my calc require Mirage to be run like cuberunner and paper plane.
Title: Re: AlphaCS Project
Post by: chickendude on November 09, 2013, 01:13:48 pm
I wonder if you couldn't just load a RAM page into $4000 ("memory bank A") to somehow get around that. They're just jumps to the corresponding routine.

Another option might be to check if a program is a MirageOS program and if it is, once you've loaded it in RAM, replace all calls (and jps just for good measure) to ion/mirage routines. But that's a bit more complicated 'cuz you could be changing things you don't wanna change (data or even other instructions). But i think in general you won't come across that issue very much. Anyway, you could just subtract $4080 from the call address and check if it's divisible by 3. If it is and less than 113*3 (there are 113 routines listed in mirage.inc, each points to a jp instruction, which is 3 bytes), change it to where you store your jump table. I'm not sure how feasible this is or if it's even possible, but it might be the start of looking for a workaround that doesn't require zStart (which can already run MirageOS programs, so you'd essentially have two shells on your calc ;)).

I really like the interface to your program, btw. It looks really nice!
Title: Re: AlphaCS Project
Post by: ClrDraw on November 09, 2013, 01:45:05 pm
Thank you chickendude, but I'm just not at that level of programming. I'm pretty good at Axe but I know zero asm  D:
Title: Re: AlphaCS Project
Post by: ClrDraw on November 10, 2013, 11:05:19 am
I just finished adding custom icons to programs, but my program has gotten so cumbersome that Axe says "APP TOO BIG" and won't compile. I still want to include a simple settings menu and folders. Any tips for optimizing my code?

(http://img.ourl.ca//error.gif)

Spoiler For Custom Image Icons:
(http://img.ourl.ca//AlphaIcons.gif)

You can now make a custom icon for any asm file and AlphaCS will embed it in the program for you and show it on the program screen.
Title: Re: AlphaCS Project
Post by: shmibs on November 10, 2013, 11:29:42 am
if you show us the code, we might be able to help :P
Title: Re: AlphaCS Project
Post by: Sorunome on November 10, 2013, 11:39:10 am
You could compile as a program and use something like crabcake to allow it to be >8kb
Title: Re: AlphaCS Project
Post by: ClrDraw on November 10, 2013, 12:05:15 pm
Quote
if you show us the code, we might be able to help  :P

It's super long so I attached the largest part.
This is what I made to help find the programs in alphabetical order. sub(FIRST,-1) will find the first program alphabetically, sub(last,-1) finds the last, sub(next,-1) finds next and sub(PREV, -1) finds previous. If you change -1 to a different number than only programs with that number in T2 (http://www.omnimaga.org/index.php?action=articles;sa=view;article=47 (http://www.omnimaga.org/index.php?action=articles;sa=view;article=47)) will show up. I was going to use this with folders but I don't have enough space to use folders now...

Quote
You could compile as a program and use something like crabcake to allow it to be >8kb
I'm compiling it as an app not as a program  :-\
Title: Re: AlphaCS Project
Post by: TheMachine02 on November 10, 2013, 01:30:24 pm
well, I can see a lot of optimisation, especially is some structure like :

Code: [Select]
If value=0
0->D
Else
1->D
End

wich can be optimisated as :

Code: [Select]
If value
1
End
->D

every

Code: [Select]
If value=0
can be change to
Code: [Select]
!If value

You can is some case use the hl register, like in this case :

Code: [Select]
value->r1
If r1=-1
...
to :

Code: [Select]
value->r1
!If +1
...

this is little tips, I will see if more  better optimisations can be done in structure of the program

EDIT : this topic may help you to optimize your code : http://ourl.ca/8520
Title: Re: AlphaCS Project
Post by: ClrDraw on November 10, 2013, 01:53:24 pm
Thanks TheMachine!
Title: Re: AlphaCS Project
Post by: ClrDraw on November 14, 2013, 10:45:43 am
I'm cutting the embed custom icon feature to have more room in my program (but don't worry, I plan to have it in future versions!), so instead I am going to have default icons for Axe SRC, Basic, ASM, and mirage OS / DoorsCS programs. I am making the Axe SRC icon the same icon doors and mirage use (the axe on top of the black box).

If you have any suggestions for the Basic icon, ASM icon, or mirage OS / DoorsCS icon, please post them here  ;D must be 16 by 16 black and white!

Spoiler For progress:
Almost finished, I just have to finish the settings menu and program info. I still plan to release AlphaCS around November 20th, but there is a possibility that AlphaCS will be completed early and published this weekend instead.
Title: Re: AlphaCS Project
Post by: Sorunome on November 14, 2013, 11:10:07 am
Sounds nice, will you also parse basic programs for if they have a DCS header set and use that one?
Title: Re: AlphaCS Project
Post by: ClrDraw on November 14, 2013, 04:42:53 pm
I've been looking into that http://ourl.ca/19799.new;topicseen#new (http://ourl.ca/19799.new;topicseen#new) but IDK if I can do it  :-\ although Runner112 was still very helpful.
Title: Re: AlphaCS Project
Post by: AssemblyBandit on November 14, 2013, 10:41:06 pm
Once again, ClrDraw is on it!!!
Title: Re: AlphaCS Project
Post by: ClrDraw on November 16, 2013, 11:22:30 pm
Version 1 has now been added to the downloads in the 83+/84+ Programming Tools section! Hopefully it will be approved soon  :)

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

(http://img.ourl.ca//AlphaCS%20%28v1%29.gif)
Title: Re: AlphaCS Project
Post by: Sorunome on November 17, 2013, 05:14:39 am
Looking great, good job! :D
Title: Re: AlphaCS Project
Post by: ClrDraw on November 20, 2013, 10:43:23 am
(version 1 attatched)
Title: Re: AlphaCS Project
Post by: Dapianokid on November 20, 2013, 03:51:25 pm
Another shell! I do hope you realize that you've written the world's first bare-bones shell for MirageOS games and DCS programs and thus have saved me a few app pages on my calculators. :) This kind of development is what's making me get back into calcs!
Title: Re: AlphaCS Project
Post by: ClrDraw on November 20, 2013, 04:37:42 pm
 :thumbsup: glad to help!