I'm slowly working on my first big project for the Prizm: an add-in that reads .txt files, that is, plain text. These are the files you create with MS Windows' ugly notepad Smile

This is still in a very early stage, and is limited by my knowledge of C and of the Prizm's system calls.

Here's a screenshot of the only thing the add-in does now:


It just reads the contents of the file test.txt from the calculator's memory, and displays them on the screen.
Newlines appear as a return sign followed by a bold P (the first means carriage return and the second one line feed, I guess). I still need to figure out how to turn these into actual different lines on the screen.

Other things to do:
- Eventually implement my own fixed-size small font
- Scroll text up and down
- Allow for choosing the text file to open (preferably with a UI that's faster to list a directory than Casio's one!)

This post is basically just a place to describe the evolution of the project, for me to ask questions and for others to comment Smile
If anyone badly wants, I can post a g3a for download, but trust me: there's not much to see other than that in the screenshot.
For the carriage return/ line feed, why not do the special actions associated with characters with an ASCII code of 32, and print the rest?

In addition, are you thinking of also supporting Unicode encoded files?
Very Nice Smile

are you going to try to allow editing of files too?
Ashbad wrote:
For the carriage return/ line feed, why not do the special actions associated with characters with an ASCII code of 32, and print the rest?

In addition, are you thinking of also supporting Unicode encoded files?


"special actions associated with characters with an ASCII code of 32"... which special actions? I don't know of any Casio-specific ones...

And about Unicode support... well, the first goal in the "special things" field is to support "strange" chars like the ones I use in my native language, Portuguese. Chars like: áéíóú àèìòù ñ Ñ çÇ ÁÉÍ ôû... etc. don't have the usual ASCII code in Casio's systems, so I think I'll need to use some code for string replacement.
Then I'll see about Unicode...

flyingfisch wrote:
Very Nice Smile

are you going to try to allow editing of files too?


I don't think we even know how to create a simple text prompt using system calls, and you're already asking for a full text editor Razz
No, in the first stage of this project it will only read files. (If I succeed in this, I'll think I'm dreaming) Then only after that I'll give a try at editing files...
Oh no... I mean in the long run! I dont expect to be able to edit files at first Wink

Also, is casio planning on coming out with an official sdk like with the 9860GII, or not?
Quote:
"special actions associated with characters with an ASCII code of 32"... which special actions? I don't know of any Casio-specific ones...


Special actions, as in, '\n' doesn't print a character but rather instead does a carriage return and a line feed, for an example.
Probably that SDK would only be compatible with Windows and eventually only with some proprietary paid tool like Visual Studio, so it'd be of no use to me. Of course, it would still help a lot with syscalls and such. Let's hope Smile

And @ Ashbad: I thought \n would just print another arrow+bold P on the calc screen (as \n is just CR+LF), but eventually the PrizmSDK is smart enough to handle it properly. TBH I haven't tried so... and now I'm working on my screen locker.

And by the way, it looks everyone's really excited with this... don't get your hopes up, I'm not that good with C code... Wink
You will create an application like this http://k003.kiwi6.com/hotlink/jb2y6g4jgc/noteview.g3a ?
I was going to create an application like that. My work here, has been done (by someone else)!

Very Happy

Now more seriously... some questions a) how did you find that (I searched the internet for months; I guess Google's still not that good...); b) does it have its source code available somewhere?; c) what's its licence?; d) who made it?

EDIT: and by the way, I already know what happens when the menu shortcut letter gets to Z: it stops attributing shortcut letters past Z.
gbl08ma wrote:
I was going to create an application like that. My work here, has been done (by someone else)!

Very Happy

Now more seriously... some questions a) how did you find that (I searched the internet for months; I guess Google's still not that good...); b) does it have its source code available somewhere?; c) what's its licence?; d) who made it?

EDIT: and by the way, I already know what happens when the menu shortcut letter gets to Z: it stops attributing shortcut letters past Z.


I found this on Omnimaga, created by Simon. no source code, unknown license

This application has has a few bugs
-does not support caracters like ã, é, í, ç
-some letters in long words fall outside of the screen


You could improve the application, I am sure that Simon will share the source, if requested!
i documented some text edit functions on the prizm wiki that can be used for manual text editing. (cannot remember right now) The edit functions can be used, for example, to draw a line of text that can scroll left or right and has a blinking cursor. The function is there to draw the string, but you are left to handle key pressed, editing the string, etc. iirc, there is a function that can help you handle key presses that insert/delete characters from a line, but remember that these are display-oriented functions, you are given a lot of control.

(partial edit: DisplayMBString is what you want. See here for my documentation of it)

edit: The function draws text for only one line. Think of nano and how long lines are handled.
I see. I figured out the application doesn't support certain special chars already. The ' is displayed as a long space.

(talking about Omnimaga, there's also FXTERM which was published in there, and it not being developed it seems; also, has no source)

AHelper: I knew about that function, and I also knew it didn't do most of the work, but it seems there's no function that will do it for me so that means we'll probably have to include our own text editing routines with each addin.
flyingfisch wrote:

Also, is casio planning on coming out with an official sdk like with the 9860GII, or not?


Not according to any information I have.
simonlothar Has updated the application Noteview,
now support special characters...

more info here -> http://ourl.ca/9205/284445
Qwerty.55 wrote:
flyingfisch wrote:

Also, is casio planning on coming out with an official sdk like with the 9860GII, or not?


Not according to any information I have.


I contacted them fourteen months ago and received such information:

Sal Manfredonia on 12/22/2010 wrote:
Mr. Mitchell,

Thank you for contacting Casio America. We do not currently have an SDK
available for PRIZM. At this time, I do not know when or if an SDK will
be made available in the future. SDKs for some of our other calculator
models can be obtained through the Casio worldwide educational site at
http://edu.casio.com, so I recommend that you continue to check that
site periodically to see if an SDK for this calculator becomes
available.

We hope that we were able to assist you with your question, and again
thank you for contacting Casio America.


Sal Manfredonia

CASIO AMERICA, INC.
570 Mt. Pleasant Avenue Dover, NJ 07801
973-361-5400 ext: 4339 Fax: 973-537-8972
e-mail: [redacted]
www.casio.com
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement