Author Topic: New-style Program Editor for TI-83+?  (Read 12485 times)

0 Members and 1 Guest are viewing this topic.

Offline Lutalli

  • LV0 Newcomer (Next: 5)
  • Posts: 4
  • Rating: +0/-0
    • View Profile
New-style Program Editor for TI-83+?
« 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

Offline Xeda112358

  • they/them
  • Moderator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4704
  • Rating: +719/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
Re: New-style Program Editor for TI-83+?
« Reply #1 on: January 24, 2020, 07:44:11 am »
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 project since the last update, but I'm not sure.

Offline E37

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 358
  • Rating: +23/-0
  • Trial and error is the best teacher
    • View Profile
Re: New-style Program Editor for TI-83+?
« Reply #2 on: January 24, 2020, 08:47:08 am »
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 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'm still around... kind of.

Offline NonstickAtom785

  • LV3 Member (Next: 100)
  • ***
  • Posts: 78
  • Rating: +4/-0
  • Just live life. Cal-cu-lat-or style!
    • View Profile
Re: New-style Program Editor for TI-83+?
« Reply #3 on: January 24, 2020, 09:37:59 am »
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?
Grammer2 is Good!

Offline Lutalli

  • LV0 Newcomer (Next: 5)
  • Posts: 4
  • Rating: +0/-0
    • View Profile
Re: New-style Program Editor for TI-83+?
« Reply #4 on: January 26, 2020, 08:55:06 am »
@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:

Code: [Select]
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, 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.

Offline Xeda112358

  • they/them
  • Moderator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4704
  • Rating: +719/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
Re: New-style Program Editor for TI-83+?
« Reply #5 on: January 26, 2020, 09:04:58 am »
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:
Code: [Select]
.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)

Offline Lutalli

  • LV0 Newcomer (Next: 5)
  • Posts: 4
  • Rating: +0/-0
    • View Profile
Re: New-style Program Editor for TI-83+?
« Reply #6 on: January 26, 2020, 09:50:56 pm »
Em ... Sorry, but it never rains but pours. After I fixed that bug another one occurs:

Code: [Select]
$ ./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.

Offline Xeda112358

  • they/them
  • Moderator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4704
  • Rating: +719/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
Re: New-style Program Editor for TI-83+?
« Reply #7 on: January 26, 2020, 10:15:48 pm »
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

Offline Lutalli

  • LV0 Newcomer (Next: 5)
  • Posts: 4
  • Rating: +0/-0
    • View Profile
Re: New-style Program Editor for TI-83+?
« Reply #8 on: January 27, 2020, 07:55:16 am »
Ah sorry, this is my fault. I forgot the $48.

Code: [Select]
Pass one...
Pass two...
App: 4230 bytes
Assembly time: 0.016 seconds

Anyway, really thanks for your help!
« Last Edit: May 17, 2020, 09:10:14 am by Lutalli »

Offline NonstickAtom785

  • LV3 Member (Next: 100)
  • ***
  • Posts: 78
  • Rating: +4/-0
  • Just live life. Cal-cu-lat-or style!
    • View Profile
Re: New-style Program Editor for TI-83+?
« Reply #9 on: January 29, 2020, 03:16:15 pm »
Hey again my friend. Here is the fixed version of spasm-ng for windows.

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.
« Last Edit: January 29, 2020, 03:19:30 pm by NonstickAtom785 »
Grammer2 is Good!

Offline Xeda112358

  • they/them
  • Moderator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4704
  • Rating: +719/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
Re: New-style Program Editor for TI-83+?
« Reply #10 on: January 29, 2020, 03:26:56 pm »
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.

Offline E37

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 358
  • Rating: +23/-0
  • Trial and error is the best teacher
    • View Profile
Re: New-style Program Editor for TI-83+?
« Reply #11 on: January 29, 2020, 04:35:00 pm »
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?
I'm still around... kind of.

Offline Xeda112358

  • they/them
  • Moderator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4704
  • Rating: +719/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
Re: New-style Program Editor for TI-83+?
« Reply #12 on: January 29, 2020, 04:42:07 pm »
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 :|

Offline NonstickAtom785

  • LV3 Member (Next: 100)
  • ***
  • Posts: 78
  • Rating: +4/-0
  • Just live life. Cal-cu-lat-or style!
    • View Profile
Re: New-style Program Editor for TI-83+?
« Reply #13 on: January 30, 2020, 08:36:02 am »
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?
Grammer2 is Good!

Offline Xeda112358

  • they/them
  • Moderator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4704
  • Rating: +719/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
Re: New-style Program Editor for TI-83+?
« Reply #14 on: January 30, 2020, 08:46:41 am »
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.