Omnimaga
Calculator Community => TI Calculators => TI-BASIC => Topic started by: Lutalli on January 24, 2020, 01:38:01 am
-
Hi there!
Is there any on-calc program editor for TI-83/84 PLUS which is different from the default one? I suppose the font that the default editor displays (i.e. the normal font of TI-83+) is a little large so that it's a kind of crowded for some relatively complex programs (the code always needs to be divided into two or more lines!). Thus I need a better editor whose font looks smaller.
It's also nice if we can copy and paste the codes via this new editor while writing programs (like what Omnicalc does on homescreen); or if it offers a "special characters" menu (say we can open it by pressing [Y=]) in order that one can type characters like $, ΞΆ easily; or if so on and on.
Has anyone done any work like this? (!If so, I'll create one perhaps)
:3
-
Both @E37 and I have made efforts to, but mine is not mature enough to really be useful: https://github.com/Zeda/TIDE
E37 may have added more to this (https://www.omnimaga.org/axe-language/guts-of-a-program-editor/) project since the last update, but I'm not sure.
-
Both @E37 and I have made efforts to, but mine is not mature enough to really be useful: https://github.com/Zeda/TIDE
E37 may have added more to this (https://www.omnimaga.org/axe-language/guts-of-a-program-editor/) project since the last update, but I'm not sure.
No, I haven't.
Your best bet is the small font editor in the experimental version of zStart. However, it doesn't work on mathprint os'es (2.53, 2.55 iirc) and when I used it, it corrupted parts of my program occasionally.
-
I thought about creating one with lowest level funtions such as adding tokens and basic menu to put stuff in the program, in Axe, when I got the chance to actually learn it. I also thought about making a basic program that does it too. But the basic program would have to use libraries to do it. What's your knowledge with assembly?
-
@E37 and @Xeda112358 Thanks for your replies!
I just tried TIDE, but I think I got some problems when I tried to build it - here the log:
admin@DESKTOP-4LIGQPD MINGW64 .../TIDE (master)
$ ./spasm64.exe src/TIDE.z80 bin/TIDE.8xk -I src -I ../Z80-Optimized-Routines
Pass one...
Pass two...
App: 4226 bytes
exporter: error SE504: Name field missing
Note. I am working on OS Windows 10 and I put spasm64.exe (downloaded with latest release from https://github.com/alberthdev/spasm-ng/releases (https://github.com/alberthdev/spasm-ng/releases), 64-bit Windows exe) into the directory of TIDE.
@NonstickAtom785 Thanks for you replies also!
I have little knowledge about assembly and I have just learned AXE for a short time. I only have some experience with other programming languages.
By the way, I suppose creating such an application via BASIC is a little far away from my mind - we have to meet some difficults, mainly the speed our program runs at.
-
Oh, yes,the current release of spasm-ng has a bug with the name field. @NonstickAtom785 was working on compiling the fixed fixed version, so maybe he'll be able to upload a spasm.exe this week?
If you want to get it to compile in the meantime, you can open src/TIDE.z80 and edit line 5 to be:
.db $80,$48, "TIDE "
The bug is that spasm is expecting the name field to be $80,$48 (which means an 8-byte name), but it is actually allowed to be $80,$4x. There is a version that has this bug fixed and hasn't been merged yet:
https://github.com/alberthdev/spasm-ng/tree/feature/app-name-var-size
Otherwise, the bin/ folder has an already compiled .8xk (but that doesn't help you if you want to play with modifying the code :P)
-
Em ... Sorry, but it never rains but pours. After I fixed that bug another one occurs:
$ ./spasm64.exe src/TIDE.z80 bin/TIDE.8xk -I src -I ../Z80-Optimized-Routines
Pass one...
Pass two...
App: 4230 bytes
exporter: error SE503: Page count field missing
And I tried directly using the compiled TIDE.8xk, it runs well; but sometimes it behaves strangely ... seems to be a little unstable.
-
Well, that is quite strange. Did you make sure to change it to $48 and add in the four spaces at the end of the name to make it eight bytes?
EDIT: Also, yeah, it is far from a release; it is fairly unstable and likes to crash especially if you go off-screen
-
Ah sorry, this is my fault. I forgot the $48.
Pass one...
Pass two...
App: 4230 bytes
Assembly time: 0.016 seconds
Anyway, really thanks for your help!
-
Hey again my friend. Here is the fixed version of spasm-ng for windows.
https://ourl.ca/22728 (https://ourl.ca/22728)
Also a question for the "pro's". Would it be possible to write a font hook that makes the whole OS run on small font? That would be quite entertaining and also very useful.
-
Also a question for the "pro's". Would it be possible to write a font hook that makes the whole OS run on small font? That would be quite entertaining and also very useful.
It would be quite difficult, probably. The font hooks only ask for the data and expect it to be in a specific format. I had to do some very convoluted things in Batlib to enable 8-pixel wide fonts. Basically, text drawn with the large font (that the OS naturally uses) is drawn only to the LCD and not to the graph screen, and the LCD supports a 6-bit and 8-bit mode.
It is doable, it would just be difficult.
-
Also a question for the "pro's". Would it be possible to write a font hook that makes the whole OS run on small font? That would be quite entertaining and also very useful.
It would be quite difficult, probably. The font hooks only ask for the data and expect it to be in a specific format. I had to do some very convoluted things in Batlib to enable 8-pixel wide fonts. Basically, text drawn with the large font (that the OS naturally uses) is drawn only to the LCD and not to the graph screen, and the LCD supports a 6-bit and 8-bit mode.
It is doable, it would just be difficult.
You wouldn't get anything from it if you did. Unless you plan on rewriting all the os's menu code, it wouldn't show any more information than it normally would. It wouldn't have any idea what to do with the smaller font size. Large font is fixed size and the os makes a lot of assumptions based on that. The only other option is to make a custom font that makes the large characters look like the small ones. And all that would do is make a huge space between each of your characters.
Zeda: Unless I completely misunderstood what nonstickatom is asking, I dont see how it would be doable. What do you mean?
-
Well, in the same way I kind of hacked the 8x8 fonts, I ended up having to make a custom routine and had to mess with the stack pointer to bypass the OS drawing routine. You could do it with a small-font, but it would be hell to write the code for it :|
-
I see. Both points. Thanks for the comments. Maybe when I'm more experienced in writing assembly I'll take a look at your font routines Zeda.
What would be the steps to creating a good editor for programs? Does anyone mind dumbing it down a bit?
-
Honestly, the most difficult part for me has been just displaying the content efficiently, and scrolling accordingly. The other difficult part (that I was able to do) is creating the routines for moving around memory to insert/delete/overwrite. All the fancy stuff like tokenizing (i.e., turning the text "Line(" into the "Line(" token) and re-tokenizing (i.e. displaying "WLine(" as "WhiteLine(") are pretty easy, but tedious. Making menus is difficult, but I already have some pretty general-purpose menu routines, so that is also just tedious.
-
Honestly, the most difficult part for me has been just displaying the content efficiently, and scrolling accordingly. The other difficult part (that I was able to do) is creating the routines for moving around memory to insert/delete/overwrite. All the fancy stuff like tokenizing (i.e., turning the text "Line(" into the "Line(" token) and re-tokenizing (i.e. displaying "WLine(" as "WhiteLine(") are pretty easy, but tedious. Making menus is difficult, but I already have some pretty general-purpose menu routines, so that is also just tedious.
Hmm so it was like a road block when creating the mem editing routines. All I'm thinking about right now is how Mimas works. You can choose what type of assembly program to compile for. Why not just make it so that you can just input the type of program and when you type a word it tokenizes it accordingly? Like a source editor/compiler. That would save the having to use the OS Tokens.(My main thought here is with Grammer. I don't know how hard it would be to imput the tokens according to text into an actual basic program :| )
-
Oh, those were the easy parts. I was saying the hard part was the graphical part :P I already have tokenizing and stuff working for a few teat cases, like when you type the letters for Line(, it convert to the TI-BASIC Line( token and it has special tokens for Axe, and I could easily make "Text('" show up as the single token "TextNum " for Grammer mode :P
-
I found the edge cases the worst. There are so many different special scenarios that break your nice logic. Ignoring those, a program editor is quite easy to write. I could probably whip up a fully functional editor is 2 days if I didn't have those as a roadblock.