Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - christop

Pages: [1] 2 3 ... 6
1
TI-Nspire / Re: Nspire Audio player!
« on: March 06, 2013, 09:16:50 pm »
How do you generate the PWM signal? Do you just set the output high or low at each clock interrupt, and what is the clock rate of that interrupt?

I'm just wondering if you could alternate the output signal (pulses) more frequently, as in multiple times per WAV sample, in order to push the pulses into the inaudible frequency range, or at least into a range that can be filtered out with a low-pass filter. I would think that this can be done fairly easily with delta-sigma modulation.

2
TI-Nspire / Re: Nspire Audio player!
« on: February 28, 2013, 09:02:53 pm »
Nope, I don't. I haven't got the right screwdriver, but if it really uses a pull-up, it'd be great!
Sorry, I didn't mean to imply that there would be a visible, discrete resistor on the board. More likely than not the pull-up resistor (if there is one) is inside an ASIC that controls the GPIO hardware, so you wouldn't be able to see it without an electron microscope or something. :)

3
TI-Nspire / Re: Nspire Audio player!
« on: February 28, 2013, 03:23:08 pm »
BTW: Don't plug your speaker in before "Playing!" or you'll short 3,6 V (While playing, you only short ~1,8V)! Unplug them before exiting, the GPIO becomes high on reset! Don't use your amplifier, you may blow it!
Do you know how the GPIO port is driven? If it uses a pull-up resistor (this is what all the TI-8x and TI-9x calculators use in their link port hardware), shorting the port to ground will not harm the calculator (the pull-up resistor is between the 3.6V source and the GPIO pin).

4
TI 68K / Re: Kraphyko, Decthyth, and the Illusiat 12 port
« on: February 27, 2013, 10:26:40 pm »
Yay! Another test version.
Unfortunately, due to TI's EULA, this will be the last until that stupid emulator clause is lifted.
I would have provided the C source, but what use is it without being able to use TI's OS on TIEmu?
By the way, I provided one easy installation program for your disposal.
Even though I think the emulator clause (and, well, the whole EULA) is bunk, you could still run PedroM on TiEmu.

We shouldn't let TI and one silly little clause scare us enough to stop working on our calculator projects. You never agreed to the EULA for TI-OS in the first place, right? So you are not bound to the terms and conditions anyway, and you are free to use the TI-OS software in an emulator.

5
News / Re: TI bans community calculator emulation
« on: February 27, 2013, 02:21:36 pm »
What is the point of the "license" on the TI-OS download pages? You don't need permission to use it. Copyright law (at least in the US) already allows end-users to install and use software without permission from the copyright owner. The "license" doesn't actually give you anything or allow you to do anything that you didn't already have the right to do in return. You can already legally download a copy from TI's site and install and use it in your emulator as you wish, or download it and install it on your real calculator.

There's simply no need to agree to the terms and conditions of the "license" to download and use a TI-OS file (and downloading a file from the download page does not indicate agreement, despite what TI might claim).

Edit to add: if you dump the ROM from your calculator, you are also not subject to any "license". You did not have to agree to any license when you purchased the calculator, and some license on TI's site does not apply to your use of your own calculator.

Edit to add again:
@Keoni there's a EULA in the packaging which you agree to by using the calculator.
The TI-OS EULA (like virtually every other EULA) is a contract, and you are bound to the terms and conditions of that contract only if you indicate assent, and simply using the calculator does not indicate your assent to a contract that is packaged alongside the calculator.

When you bought the calculator, you own the copy of software on it*, and you have full rights to use the software without accepting any contract. Under copyright law, TI has the exclusive right to copy and distribute the software but not to use the software. Use of software (or book, CD, DVD, etc) is not even covered by copyright law (after all, it's not a useright law), except when copying is required to make use of a copyrighted work, as it is with software (but as I mentioned, this right is explicitly granted by copyright law to the owner of a copy of software).

*A lot of trolls in the software industry would claim that you only "licensed" the software and didn't buy it, but they are mistaken from a legal standpoint.

6
Other Calc-Related Projects and Ideas / Re: TI netcat
« on: August 30, 2012, 11:13:04 pm »
lwIP is usually known as a good, small enough TCP/IP stack, indeed, but its footprint would be much above 8K. There's also uIP.
I know the footprint could be over 20k with all features enabled, but lwIP has features that make it easier to use and more suitable than uIP (some features I would have to write to use in the kernel anyway, like dynamic interface support), and it has better network performance than uIP (especially by allowing more than one unacknowledged packet at a time). My kernel is only 98k currently, which is still less than two full pages of Flash, so I'm not too concerned about the footprint yet. Then again, its footprint will be nothing if I never get around to adding networking. :P

7
Other Calc-Related Projects and Ideas / Re: TI netcat
« on: August 29, 2012, 10:56:06 pm »
Let me clear up some possible misconceptions.

First, if I add networking to tinc, it won't do anything that the regular nc (netcat) doesn't already do. It'll be able to talk with only one other computer at a time, and you'll have to pick the IP or host name of the other computer when you run it (or put it in listen mode, then one other computer can connect and talk to the calculator). The calculator can't select the IP to connect to, and it can't know what IP connects to it.

Second, the calculator link protocol has no way to detect or signal an end-of-file condition or, by extension, to either close a network connection or detect when one has closed. In the HTTP demo I had to explicitly put the "Content-length" and "Connection: close" header in the response which told the browser when to close the connection. The calculator didn't know that tinc had exited when the browser closed the connection.

Third (and this is not just a tinc issue), the TI link protocol is only half-duplex, which means only one side can send a byte at a time. Normally this isn't a problem--the two sides can take turns talking at a fast enough rate that it isn't noticeable--but if both sides try to talk at the same time, there is a problem. It's a double problem because the protocol sometimes makes it difficult or impossible to distinguish between a "collision" and the other side simply not responding, so it's usually not possible to recover from it, leading to lost data. This happens a lot during interactive sessions, such as using the calculator as a terminal or a terminal server (I've done both with Punix :)). For example, if the computer is sending a lot of data (perhaps I cat a large file) and I try to type anything while it's sending data (say, Ctrl-C to kill cat), the outgoing data is likely to collide with the incoming data. There's nothing I can do with tinc to fix this problem, either. It's too bad TI didn't use a standard serial UART in their calculators as Casio did in theirs. (I am investigating adding a full-duplex "rs232" driver to Punix which will simulate a UART, but it will run at 2400bps at the very fastest.)

What Lionel mentioned (TCP/IP on the calculator) would fix the first two issues, but it's kind of heavy-weight for a calculator (but I would like to implement it in Punix anyway :)).

What tinc with networking (or used with nc) will let you do is simple point-to-point communication with another calculator anywhere across the globe, as long as you have network connectivity between them. Imagine playing a multi-player game with someone in another country! The game won't even have to use any special protocols like Kerm's CALCnet/globalCALCnet (which I admit are pretty neat protocols). The latency might kill in some types of programs (action games), but I'm sure it'll still be fun. :D

Lionel: I've seen Samir's TCP/IP demo before, and I've also looked at TinyTCP (which his demo is based on) and other small TCP/IP stacks. My favorite at the moment is lwIP. It has a nice callback-driven API which looks like it might fit in well with the Punix kernel (the kernel would be lwIP's "application", and Punix already has timers, a memory allocator, and other necessities for lwIP to use).

8
Casio Calculators / Re: FXTerm - VT100 terminal emulator for Casio fx cg
« on: August 27, 2012, 05:29:47 pm »
Nice state machine! I've been thinking about adding character tables as you did for a few different states (ground, ESC, CSI, etc), but I worried about how much space those will take. Mine currently tests each character (eg, ch == 0x18 || ch == 0x1a || ...). But now I'm thinking the size of character tables shouldn't matter that much; it'll add probably a couple kilobytes or so in ROM but should execute a little faster (which I think matters more than ROM usage).

I'm amused at the way you defined your fonts in source code with defines like _X_X_X (I defined my fonts in the binary PBM image format and automatically convert them to C source code when the software is built).

I'm still jealous of the hardware UART and the higher resolution color screen on the Casio. All I've got is a proprietary serial protocol (TI D-BUS) and a crappy low-resolution monochrome screen. :/

9
Other Calc-Related Projects and Ideas / Re: TI netcat
« on: August 23, 2012, 09:43:47 pm »
Why was this moved to TI-68K Projects? It's a computer program that works with nearly all calculator models (I just happen to use it with Punix in my demos).

Can we get a new sub-forum for calculator-related computer programs?

10
Other Calc-Related Projects and Ideas / Re: TI netcat
« on: August 21, 2012, 04:16:49 pm »
Quote
But tinc works with any calculator that uses the same low-level data protocol, which includes all of the TI-8x, TI-9x, and I'm sure the Nspire as well.
Nope, the Nspire doesn't have a proprietary 2.5mm stereo jack female plug ;)
The 84+ keyboard suitable for Clickpad/Touchpad models has one, but unless one is hot-switching the keyboards during a Ndless program that disables interrupts, the Nspire turns off when the standard keyboard is removed, and starts 84+ emulation mode when turned back on with the 84+ keyboard.
Ah, you are correct. What I should have said is "tinc works with any calculator that is supported by ticables", which also covers Direct USB on the models that support it.

11
Other Calc-Related Projects and Ideas / Re: TI netcat
« on: August 17, 2012, 03:07:06 pm »
Thanks! I'd like to make one, but I have enough projects as it is, and my time is really limited right now. Maybe you could write a simple one in C that reads and writes to a pipe/socket/whatever and to stdin/stdout, and then I can port it to Punix. Note that the select() system call doesn't work yet, so you'll have to find another way to read from the socket/pipe and from stdin without blocking.

I could do it, but I don't have much experience with sockets/pipes/etc, so I'll need to see.
What standard libs can I use in punix ?

Only the C standard library and POSIX system interfaces. Even those are incomplete (such as the select() system call).

Here is an incomplete list of functions that work which I think you would need to write a simple IRC client:
  • open/close/read/write
  • printf/sprintf/fprintf
  • putc/putchar
  • getc/getchar
  • tolower/toupper/isalpha/isdigit/etc (all of ctype.h)
  • malloc/realloc/calloc/free
  • setitimer/getitimer
  • atoi/strtol
  • all str* and mem* (string.h) functions
  • signal/sigaction

The lack of select() is slightly annoying, but you can get around that by setting an interval timer (with setitimer()) to run every 100ms or so to interrupt read() calls on the link port and the terminal. This is what I did in the uterm program. That reminds me: I need to implement the O_NONBLOCK flag for file descriptors which would make read() and write() non-blocking. That shouldn't be too difficult, at least compared to select().

12
Other Calc-Related Projects and Ideas / Re: TI netcat
« on: August 16, 2012, 11:42:32 pm »
Nice, awesome job!!
What about an irc client ? The protocol isnt that complex :D
Thanks! I'd like to make one, but I have enough projects as it is, and my time is really limited right now. Maybe you could write a simple one in C that reads and writes to a pipe/socket/whatever and to stdin/stdout, and then I can port it to Punix. Note that the select() system call doesn't work yet, so you'll have to find another way to read from the socket/pipe and from stdin without blocking.

I thought someone already made one for Nspire ???
Someone probably did, but I'm working with a TI-92+. My primary OS on it is Punix, which makes it relatively easy to read and write to the link port. But tinc works with any calculator that uses the same low-level data protocol, which includes all of the TI-8x, TI-9x, and I'm sure the Nspire as well. What you do with the data that you read and write... well, that's up to you. :)

TI-netcat... so now we can plug a cat to our calculator to have Internet?? O.O

Just kidding I read the first post in overall. Sounds really great. I wonder if eventually there could be something like CALCnet but for 68K calcs?
I have some plans for making a similar protocol to CALCnet (called Chrisnet for now), but mine will be designed more for TCP/IP networking. globalCALCnet works by sending CALCnet frames over TCP using proxy server(s). With Chrisnet, it's the other way around: IP datagrams will be carried inside Chrisnet frames, much like IP is carried inside Ethernet frames. In fact, it will be similar to Ethernet in some ways. I also have ideas for building a hub to translate Chrisnet frames to Ethernet or SLIP or PPP frames, depending on the cost and complexity of parts needed to build one, so you can plug in your calculator and connect to the Internet over TCP/IP. I'm leaning toward SLIP or PPP since they are simpler and less expensive than Ethernet (which uses... CAT 5 cables! :P). But I haven't even made a proof-of-concept for my protocol, so I'm really putting the cart before the horse until I can demonstrate that my protocol works.

(And I actually haven't worked on hardly anything calculator-related for the last few months, up until about a week ago. My job and family keep me plenty busy.)

13
Other Calc-Related Projects and Ideas / TI netcat
« on: August 16, 2012, 03:35:46 pm »
(Cross-posted from cemetech for those who haven't seen it there)

I'm working on a project called "tinc", short for "TI netcat". My original plan was to write a program that can talk to a calculator and can either connect or listen for connections over the network. The current incarnation doesn't speak over the network but rather only over stdin/stdout, but it can still speak over the network with the help of nc (or perhaps even inetd). If I decide not to add networking functionality to tinc, I'll probably rename the project to "ticat".

I've been working with Lionel Debroux and Benjamin Moody to make it work with ticables reliably. Now it's at a point where it should be pretty stable (but it's still not ready for a real release yet). I've only tested it with TiEmu and Punix (not that the OS should make a difference).

Get tinc here: https://github.com/abbrev/tinc

Anyway, here's a little networked tinc demo (using nc for the network part):
Code: [Select]
$ mkfifo pipe
$ <pipe nc -l 8002 | ./tinc -c tiemu >pipe
In Punix on the calculator (TiEmu) I ran the "uterm" program, which  is a terminal program that talks over the link port (kind of like minicom in *nix or Hyperterminal in Windows). Then I browsed to http://localhost:8002/ in Firefox.

In the following screenshot, the first 9 lines (11 lines with line wrapping) starting at "GET / HTTP/1.1" are the HTTP request from Firefox. The next 6 lines (starting at "HTTP/1.1 200") are the HTTP reply that I manually typed on the calculator. Firefox displayed the text "Hello world!" in plain text as soon as I hit enter on the last line. Hooray for an impractical web server. :)




Another use for tinc is to use the Punix shell from a real terminal. This works only if Punix is listening for logins over the link port, which is not the case with the demo above (the link port can be opened only once at a time in Punix).

Anyway, here's a short run using the Punix shell in my Linux terminal:
Code: [Select]
$ ./tinc -c tiemu

server login: root
password:
stupid shell v0.2
root@server:~# help
available applets:
 tests     top       cat       echo      true      false     clear     uname
 env       id        pause     batt      date      adjtime   malloc    pid
 pgrp      poweroff  times     sysctltest ps        bt        crash     mul
 div       kill      time      exit      status    help
root@server:~# echo hello world!
hello world!
root@server:~# exit

server login:
This was actually my first use of tinc, but I think the HTTP demo is more impressive. :)

I hope I can get tinc ready for release before too long, and I hope we all can find useful and innovative uses for tinc. I already thought about writing a VNC server for Punix as a sort of replacement for the TI screenshot functionality. Who knows what else we can come up with?

14
TI 68K / Re: Punix
« on: April 21, 2012, 01:26:34 am »
More than a year after the last release, I'm happy to announce the release of Punix beta 5!

All files: http://sourceforge.net/projects/punix/files/betas/

TI-89: punix-89-beta5.89u
TI-92+: punix-9x-beta5.9xu
Source: punix-beta5.tgz


I also noticed that Punix was recently added to the Levenez Unix History page! :o

15
TI 68K / Re: Punix
« on: March 20, 2012, 08:49:12 pm »
Thank you for reading my article, I hope that machine translation was not too hard to read (but it's probably better than my poor english) ;)
Nah, your English is better than Babelfish.

Quote
Do you know what would be incompatible with the HW1? Grayscale, sure, maybe the sound due to the 68k running at 10mhz, but there is something else?
Yeah, the sound would play slowly on HW1. The system real-time clock would also run slowly, and it would be affected by the battery strength, but that can be fixed somewhat with the adjtimex system call (currently planned) to adjust the system clock frequency. Even grayscale is possible on HW1, but I would have to add support for it in Punix. I can't think of anything else off the top of my head that would be incompatible.

Pages: [1] 2 3 ... 6