Omnimaga
Omnimaga => Completed => Our Projects => Nspire I/O => Topic started by: Juju on July 18, 2012, 02:10:50 pm
-
This is PrizmIO, a port of NspireIO (http://ourl.ca/9468) for the Casio Prizm. You can now easily output text with printf in your apps!
Right now only char output (with 16 different colors!) and very limited input (\n) works (the rest is commented out), I intend the library to be as much compatible as the Nspire version (same function prototypes, so you can write code that compiles on both Nspire and Prizm).
Download the code on http://github.com/juju2143/prizmio
-
Oh that looks nice. By the way is it mostly a command prompt or also a text routine? Your post seems to tell me it's also a text display routine to use in other apps
-
It's a library you can use in your app to ease text input/output, nFrotz uses this, among others. It's like you're writing a computer program that uses cmd.exe.
Also original NspireIO topic: http://ourl.ca/9468
-
Nice project!
Easy portability between Nspire and Prizm code does sound like an awesome idea. Hope it really happens someday...
-
YAY! Roguelike planned! (or not)
-
Nice work ;)
-
I just compiled just now, i'm giving you the binairies for the lazy guys.
Just put the .h in the include folder and the .lib file in the lib folder! :p
Compiled with Prizm-SDK 0.3
-
Thanks, nice work on your side too because all I did is to replace the SetPixel and getch routine, the rest (at least all that is related to display/keyboard) depends on them. (That and solving many weird compilation problems -_-)
And thanks Eiyeron for posting the binaries, keep in mind several functions are all stubs (reg_* and uart_*, getch only supports EXE) in this version. I think it's pretty enough to make lots of wonderful stuff. ^_^
-
ooh, fancy =D/me is going to be checking this out.
-
UPDATE: Input should work (some keys might be missing though, I should add more keys, tell me what you think) and instead of drawing the screen manually with Bdisp_something it's drawn pixel-by-pixel now (drawing the screen fully is rather slow but it might be more effective for redrawing single characters, but again, tell me what you think, I think I'll need lots of input on this.)
By now, the basic display input/output should work enough for making potable applications, it's just that initializing the console is slow, therefore this library is now released as beta. (Not tested this commit yet as I have some problems with my Prizm on this computer.)
EDIT: Now that I tested it, wtf the keys aren't even at the right place. ???
-
UPDATE: Keyboard works fine now. Shift and Alpha works as expected, OPTN switches between lower and uppercase, feel free to suggest me a more complete keymap.
-
Nice to see this still updated. By the way, was the green text thing in TCAP earlier PrizmIO with new fonts?
-
Don't think so. It still uses the same font. Tinychat cam quality is pretty blurry.
Might post binaries tonight. :P
-
Ah ok, maybe it was some sort of terminal on your computer then?
-
Yeah, that was my terminal with the PrizmIO code in it.
-
As I said after seeing your program running live on your calc, I must say good job so far. You need to do something about how long it takes to load the entire screen with text when it needs to be updated completely, though. D:
-
Latest commit fixes this :D
-
Do you have two modes? Auto-refresh and Manual?
-
Yes, some of the functions draw directly to the screen using syscalls and have variants that only draws to the VRAM. (Like SetPixel and SetPixelVRAM, the former uses the Bdisp_SetPixel_DD syscall (so it gets drawn directly to screen) and the latter does not, merely dumping the pixel in VRAM.) Others, like DrawConsole, use the VRAM variants then uses Bdisp_PutDisp_DD at the end.
-
I'll give you a little tip: don't forget to make functions easy to use and cler0ar ;)
-
They are :) (since I didn't changed the prototypes.)
There's also documentation and easy to understand demos.
-
Are the demos the stuff I saw the other day or are there more?
-
Pretty much all you saw the other day were the demos.
Also, binaries. Demo included. I think I can call this 0.1. :D
https://github.com/downloads/juju2143/prizmio/prizmio-0.1.zip
-
Oh cool, I'll download this when I have a chance. Glad there are binaries too. :P
-
UPDATE:
-
That is great :D. Is it only for characters or can you actually display little squares like that too?
Else, does your program support background color for text?
-
Those squares are made with spaces with a background color. Of course, those colors are also available as text colors.
Next, VT100 escape codes.
-
Ok thanks for the info. If your program was ever used for something like a MUD RPG I assume graphics could be made from those squares, right? I remember some old Telnet RPGs had ASCII art representing rooms.
-
The sky is the limit, DJ. :P
-
(Yeah, more roguelike features!)
-
Also, support of VT100 will also be useful for easy cursor movement commands so it'll be easier to port a rogue game.
-
Those squares are made with spaces with a background color. Of course, those colors are also available as text colors.
Next, VT100 escape codes.
Hi, I released new version of fxTerm - VT100 terminal emulator for Casio fx cg with source code. Download on my page (http://martin.poupe.org/casio/)
Reuse what you want for your PrizmIO :-)
-
Hey thanks, it'll be pretty helpful.
-
UPDATE
New commit: updated from upstream. So cursors, stdio replacement and stuff like that.
EDIT: Yes there's errors, didn't tested yet.
-
UPDATE
PrizmIO is now officially deprecated, merged and superseded by Nspire I/O (http://ourl.ca/9468). New versions will now be found on nspforge (http://nspforge.unsads.com/p/nspireio). Also rewrote the keyboard routines, might not work correctly yet.
-
At first I was scared you were dropping this project lol, glad that isn't the case and that it's continuing forward with NspireIO.
-
I'm having trouble with this. Whenever I try to compile, it says, "unknown type name 'BOOL'"
-
Are you using the latest version of nspireio ?
-
Booleans never worked for me, with or without nspireio
-
Are you using the latest version of nspireio ?
Yes
-
Could you post the complete build log?
-
Here:
../..//bin/sh3eb-elf-gcc.exe -c -m3 -mb -O3 -mhitachi -Wall -nostdlib -I../..//
include -lfxcg -lnspireio -lgcc -L../..//lib -std=c99 main.c -o main.o
In file included from ../..//include/nspireio.h:34:0,
from main.c:4:
../..//include/nspireio-platform.h:63:1: error: unknown type name 'BOOL'
In file included from main.c:4:0:
../..//include/nspireio.h:71:2: error: unknown type name 'BOOL'
../..//include/nspireio.h:72:2: error: unknown type name 'BOOL'
../..//include/nspireio.h:76:2: error: unknown type name 'BOOL'
../..//include/nspireio.h:77:2: error: unknown type name 'BOOL'
In file included from main.c:4:0:
../..//include/nspireio.h:233:1: error: unknown type name 'BOOL'
../..//include/nspireio.h:245:1: error: unknown type name 'BOOL'
../..//include/nspireio.h:352:1: error: unknown type name 'BOOL'
../..//include/nspireio.h:404:40: error: unknown type name 'BOOL'
../..//include/nspireio.h:410:49: error: unknown type name 'BOOL'
../..//include/nspireio.h:378:17: warning: inline function 'nio_time_get' declar
ed but never defined [enabled by default]
../..//include/nspireio.h:378:17: warning: inline function 'nio_time_get' declar
ed but never defined [enabled by default]
make: *** [main.o] Error 1
-
It looks like something in your Makefile is wrong. Try adding -DPRIZM to the gcc flags or have a look at one of the demo Makefiles.
If that doesn't solve the problem you'll have to ask Juju, he maintains the Prizm stuff ;)
-
By the way, if that is what LuaZM 0.1 or so used, you should fix ALPHA/2nd so it operates like the calc by default, because I never got able to switch back to uppercase once <.<
-
Hmmm... Probably some file that wasn't defined correctly.
You have to add -DPRIZM somewhere in the CFLAGS or in the gcc command line of your makefile so it knows it have to include the Prizm-specific stuff, which includes a definition of BOOL.
-
Now it says:
../..//bin/sh3eb-elf-gcc.exe main.o -m3 -mb -O3 -mhitachi -Wall -nostdlib -I..
/..//include -lfxcg -lgcc -L../..//lib -std=c99 -DPRIZM -T../common/prizm.ld -Wl
,-static -o Test.bin
main.o: In function `_main':
main.c:(.text.startup+0x18): undefined reference to `_puts'
main.c:(.text.startup+0x20): undefined reference to `_getchar'
collect2: ld returned 1 exit status
make: *** [Test.bin] Error 1