Author
Topic: Guts of a program editor (Read 1483 times)

A long time ago I made a small font program editor. At @Xeda112358's request I recently revived it and am working on beating it into a working shape. Im posting it here so I don't have to constantly upload to a 3rd party site every time I update it and on the off chance someone else might want to use it.

I want to be a part of this and help wherever I can. Whether it's testing for or giving ideas.

Ok, I kinda just threw it out there as a base for anyone to expand on but if you are interested, I can pick development back up. First, a couple questions for you so I know how experienced you are. Are you really comfortable with Axe? How familiar are you with assembly? Do you know what an edit buffer is? Do you know how to dynamically resize variables either using Memkit or using Bcalls? Do you know how memory mapping works? (ports 5, 6 and 7)Its fine if you don't know any of these, I just need to know so I can figure out what parts you can help with.

Also you mentioned ideas. What do you have in mind? If I were to finish it I would add copy / paste, search, search + replace, jump to label, jump to line number, editing from archive, the ability to look at other programs without closing the current one, and others that I can't think of off hand.

So at the moment I'm just getting comfortable with Xeda Elenara's Grammer 2. I have a friend who is teaching me the absolute basics of Axe and I'm learning it on my own through comprehensive tutorials that I found and printed. I'm slowly learning assembly using the Learn Assembly in 28 Days tutorials. I printed the entire thing out, hole punched it, inserted it in a binder, and started reading. So as of now I'm able to understand a little assembly. Xeda's asm hex tutorials helped me with learning how the structure works.

As for edit buffer, I would assume that it is a temporary location for the data in programs, above the ram(as not to erase any user ram) that is used to edit the data. I might be wrong though.

Ideas are another thing. I just have a large imaginative range and I can help with UI. My current process is to make a BASIC version of my idea then port it to Grammer, as it is more optimized. Then after I've learned enough with Axe, I will port the Grammer Port to Axe because Axe is super fast. I can help with bug reporting to. I've done so a lot with Grammer.

That gives me a pretty good idea of where you are at. Take a look at the UI I have implemented and tell me what you think of it. What do you think of everything from the way the cursor works to the size of the menus? Ive tried to make sure it feels just like the built in program editor. That way no one has to relearn their muscle memory. If there are any differences, that is a problem. Make sure to tell me. I know that alpha-scrolling is messed up and pressing numbers to select an item in a menu is a little off but the rest of it should be 100% accurate.

Don't bother trying to understand the editor's code. I don't know why it works, only that it does. And I wrote it.

I forgot to ask you if you know what tokens are. iirc Grammer uses them so you might know about them. (If you know the difference between tokens and characters then you are probably fine) Also do you have a emulator or some way of getting screenshots and recordings? If not, it is really easy and I can walk you through how to get it.

I can easily download an emulator. Like most calculator lovers, they probably have a lot of background knowledge of some type of OS. I use Windows 10 and will probably download and install the most popular Wabbitemu.

I will try to get as much feedback on the program as I can muster. (I'm glad I'm not the only one who has muscle memory already )

As for Tokens... It's kind of hard not to know what they are. I think the whole idea that everyone is sharing is adding customs tokens for custom editors so that no one has to use the BASIC Tokens and create hooks that disguise them so they are more readable and understandable.

Also, I'll probably figure it out but..., witch source do I compile first?

A lot of the issues are with the menus I think. Every time I open a menu(except for the prgm menu) it freezes, opens the menu, then refreezes with random letters but not random numbers, then I have to pull the batteries.

A lot of the issues are with the menus I think. Every time I open a menu(except for the prgm menu) it freezes, opens the menu, then refreezes with random letters but not random numbers, then I have to pull the batteries.

Oh, yea. I forgot about that. I messed something up with the loop that selects the tokens. It doesn't *actually* freeze, just displays so many tokens on the screen at once that it is like 5 secs between frames.

As for optimizing it, the core of it is as optimized as it is going to get. The cursor movement and scrolling was a huge pain to get right and I'm not spending 10 hours optimizing it and fixing all the bugs I made for a boost in speed which won't matter once I limit the framerate. Not that it is terribly inefficient or anything though. Almost all the cpu's time is spent on text and displaying the screen. Im using a custom text routine that I made that is 2x faster than the OS's and Ill eventually make a custom lcd update that is 6+ times faster than the default one Axe is using. (partial update instead of the whole screen) Speed isn't an issue. And since the finished editor will be an app anyway space doesn't really matter. I think that pressing 2nd + right to scroll to the end of a really, really long line of code takes a long time but Ill deal with it later. Trying to scroll past the bottom line might be an issue.

Ill work intermittently on this as I find time / motivation. Don't expect speedy updates though. The whole reason I put this up was to help Zeda since she? is making one for Grammer 3. From what I have heard of what is done though, I don't know why mine is needed. That might get more constant updates but I really don't know.