Omnimaga
Calculator Community => Major Community Projects => The Axe Parser Project => Topic started by: Freyaday on April 01, 2011, 12:14:16 am
-
Does anyone know what happens when you try to include a program in itself? I'd try, but I don't have an emulator and I don't feel like breaking my calc.
-
You get ERR: NESTED LIBS.
-
But what if you include a different program that includes the original program?
-
Same error. I'm guessing Quigibo thought about this before implementing the inclusion of external source programs.
-
Does it take forever and give up or fail instantly?
-
It fails instantly. I wouldn't worry about any bugs regarding this, Quigibo seems to have covered all the bases well.
-
Under what conditions could Axe corrupt the Archive? Is it possible that an Axe program could scribble over the OS?
-
Not unless you knew what you were doing. You'd have to use ASM.
Axe is actually decently safe (as in RAM clears).
-
Would an on-calc font editor be possible in Axe, then? How does the calc display tokens?
-
Font editor or token editor? Those are two different things :D
-
Would an on-calc font editor be possible in Axe, then? How does the calc display tokens?
You mean to change the built-in font? That would be pretty dangerous since you're messing with the OS itself. Not to mention different OSes could have the font stored in different places, so you could end up corrupting someone's calc if they use a different model/OS than you do.
On the other hand, the easy way to change the font would be to install a font hook (http://wikiti.brandonw.net/index.php?title=83Plus:Hooks:9B9C). It's totally reversible and involves no mucking with the OS itself.
-
I'd like to know about both.
-
Erm, is that the link you wanted? And can he do this in Axe?
-
Whoops, meant this: http://wikiti.brandonw.net/index.php?title=83Plus:Hooks:9B9C
And no, these are all much more advanced than Axe provides. For the second you need Asm( at least to start up the hook (Asm(EFE44F)). The first would have to be done nearly entirely with Asm(.
So a rundown:
For the first option, you're modifying the OS to replace the built-in font with a new one. That means you'll have to copy the entire page where the font is stored (I don't know which one that is) to a swap, clear that page, then change it back to the way it was (but with the new font). None of this you can do with Axe (except with Asm(), and since the location of the font could change, you'll have to release a separate version of the patch for each OS version/calc model that differs, including future ones (unless you're planning to let some users brick their calc).
For the second option, you're creating an OS hook that basically intercepts whenever the OS displays a character. You'd need to store your new font somewhere constant (which is why this program would have to be compiled as an application), then write a routine (mostly with Asm() for the actual hook, then copy that code somewhere and finally run Asm(EFE44F) to start up the hook. This is a lot safer than the first option and it can't go wrong (since the font hook is an "official" (documented) hook) unless TI screwed something up in an OS update. (Granted, that could happen.)
-
So, if I make this app, I could enable the calc to display multiple fonts which could be swapped out with the app? How would this work with the variable width font?
-
So, if I make this app, I could enable the calc to display multiple fonts which could be swapped out with the app?
Yep. That's what Omnicalc (http://www.ticalc.org/archives/files/fileinfo/226/22626.html) does (letting you switch between as many fonts as you want).
How would this work with the variable width font?
I don't think it affects var-width font, unfortunately.
-
It would be actually cool if we could display variable-width font on the homescreen.
-
In ASM you can (since the homescreen/graphscreen thing doesn't really matter). Well, sort of.
But you can always use Text(-1,X,Y,"STR") to display homescreen text on the graphscreen :)
-
I mean, with inputting strings if you are not in a prog, so to calculate things.
-
hehe, I like the idea of being able to switch out fonts without going through a menu... I made an App that lets you change the font during program execution or from the homescreen. It only has 6x8 and 8x8 fonts, though :/
-
IIRC, BatLib does variable width fonts, you should ask how it is done.
-
Okay, I'll ask :P
That was the App I was talking about :D
-
I mean the small font.
-
Hmm, I wonder how possible that is. BatLib has a fixed width 4x6 font, so something could be done there.
-
There's got to be some way to mess with the small font, and create a new variable width font, one with different widths.
-
Oh, there is :) Font hooks are your friend, there. The problem is, you would need to use one of the 768 byte buffers if you wanted to use small font as well as another buffer to hold the text.
-
Could I create a 2×3 font? That way, I could put 512 chars on screen at the same time.
-
You could, but it'd be insanely hard to design (think of m, w, h, etc.).
-
It's called Braille. :)
-
Well, yes. As long as you are using the Text( command. You can only have up to 128 chars on the homescreen no matter the size. Well, if you were to really hack it, you could make it anything you wanted, but that would require some major hacking.
/me recalls the fun she had to create her 6x8 and 8x8 font routines
EDIT: Oh, braille!/me knows some braille
That is a really cool idea! In that case, that might be easier to accomplish! and the font would be 64 bytes!
-
I made a Braille decoder in BASIC. It actually handles some of level 2 Braille, the abbreviations and contractions that are used in real life. It also handles numbers and--wait for it--capitals!
-
Hehe, check this: http://www.ticalc.org/archives/files/fileinfo/428/42800.html
I made that one last year in assembly :D I made a BASIC version the year before that :D
-
I didn't know about that at the time. Also, mine's only 1842 bytes. I should really get around to uploading it.
Edit: Fixed a bug.
-
Mine is 225 bytes :D But anywho, the point is, I might be able to make a braille font hook.
-
Wait, does yours convert to or from Braille?
-
Oh, it converts from braille...
-
Mine works off the graphscreen and it has a cursor and custom button mapping and all the bells and whistles and gongs and....