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.


Topics - TC01

Pages: [1] 2
1
Other Calc-Related Projects and Ideas / TiLP - Fedora Packages
« on: August 10, 2011, 04:17:29 pm »
Not terribly long ago, I decided to learn how to make RPM packages for Fedora. The software I chose to package was TiLP, because there are no up-to-date packages and because running the installer script on Fedora (especially 64-bit Fedora) seems to have additional complications.

After the next release of TiLP, I intend to try and get them into the official Fedora repos. I'm waiting because there are various issues with TiLP 1.15 that rpmlint (that's the tool for checking RPM packages for conforming to standards and suchlike) complained about.

So, in the meantime, here are the RPMs. To install them, either use a GUI tool (whatever Fedora launches when you double-click on a .rpm file), or use the rpm command: "rpm -i [filename]" as root. Please note: you must install the RPMs in this order:

-libticonv
-libtifiles2
-libticables2
-libticalcs2
-tilp2, gfm, and tiemu

Then, you'll need to run the "tilp" command in the terminal (or "gfm" to use gfm, or "tiemu" to use tiemu).

If you use 32-bit Fedora, you must download the i386 zip. If you use 64-bit Fedora, you should download the x86_64 zip, but you can install the 32-bit packages instead, if you really want to.

2
TI 68K / Memory Usage for the 89
« on: July 08, 2011, 08:39:44 pm »
So, after suddenly finding myself without a project to work on the other day, I resolved to come up with some relatively simple calc utility I could actually code, and then code it.

And I came up with this: Memory Usage, a 68k C program which provides nicely formatted information about how much space is used up on the system.

The AMS's MEM dialog tells you how much space is being used for different variable types and how much is free. I, however, was interested in a folder-by-folder breakdown, among other things.

The attached images summarize the current features pretty well. First, when you run the program, there are three options: "general memory info", "flash app info", and "file/folder info". The general memory info first provides usage statistics about the RAM and the Flash: mostly what you can already get through the AMS's MEM menu. However, it also shows how much memory would be freed through Garbage Collect.

The files/folders mem screen shows a list of all folders and their sizes ordered by size. Selecting a folder opens up a sub menu displaying the number of unarchived bytes and the number of archived bytes. At this point, if you select "All", it shows you an ordered list of all files in that folder; selecting "Archived" or "Unarchived" displays only archived or unarchived programs in that folder, again sorted by size.

Currently, selecting a file does nothing, just exits.

The flash app screen, like the files and folders screen, shows an ordered list of folders by size. The name of an app might be cut off, but selecting the app will display the full name, the application ID (which is a handle to some info about the app in memory), and the size in a little popup window.

It should be compatible with the Titanium, though it cannot run on anything below AMS 1.x.

3
TI 68K / PyMite 68k
« on: July 06, 2011, 04:08:24 pm »
So this is something I just started playing around with, and I thought I'd make a post about it mainly so it'd be easy to ask for help. :P

Python-on-a-Chip (formerly known as PyMite) is a Python interpreter designed for embedded systems. It supports a "significant subset" of the language. Here are it's features:

Quote
•Requires roughly 55 KB program memory
•Initializes in 4KB RAM; print "hello world" needs 5KB; 8KB is the minimum recommended RAM.
•Supports integers, floats, tuples, lists, dicts, functions, modules, classes, generators, decorators and closures
•Supports 25 of 29 keywords and 89 of 112 bytecodes from Python 2.6
•Can run multiple stackless green threads (round-robin)
•Has a mark-sweep garbage collector
•Has a hosted interactive prompt for live coding
•Licensed under the GNU GPL ver. 2

That sounds pretty decent for the 89, which has 256 KB of RAM and 188 KB of it user-accessible.

So theoretically, all I would have to do to make this run on a 68k is write some platform-specific routines for the 89 and get it to compile using GCC4TI.

That might be trickier than it sounds, though, because I'm not that great of a C programmer, and I'm not entirely sure yet how PyMite works. You need to use a Python script to convert your Python code into an image file of some sort, which then gets linked up to the C program... at least, I think it does.

I almost got it to build this morning, but it was complaining about the missing Python images- which I didn't even realize I needed until an hour ago. I haven't done any more on it yet.

4
Other Calculators / A set of TI calc emulators for Android
« on: January 20, 2011, 08:13:17 am »
So- I was a bit surprised not to see anything about these here (instead, I saw them on an Android news site). Though I suppose I could have missed something, I haven't been that active lately.

Android developer Doug Melton has recently released emulators for the TI-83, TI-82, and TI-85. (This is the 86 one). They're ports of the "AlmostReal TI emulators" according to the news article- not really sure what that means though, I'd never heard of such an emulator before.

I'd try one out on my Captivate, except the devices do require Android 2.2 (which I don't have :( ).

Has anyone else seen these or fooled around with them a bit?

5
Other Calc-Related Projects and Ideas / ticalc.org "Package Manager"
« on: November 24, 2010, 09:04:44 pm »
This project is my longstanding attempt to create a command line utility and Python library for accessing, searching, and downloading projects from ticalc.org (and other sites).

Current version is 1.1; 2.0 has been in development for a while but is hopefully nearing a release with possible support for downloading programs from Cemetech and Omnimaga as well.

Development is generally happening at github- you can clone a snapshot from there. Or, you can download the latest version from ticalc.org for Windows or Linux. (Downloads are also hosted on Cemetech for Windows and Linux). Once it's downloaded, extract the archive and run "python setup.py install". Note that if you're on Linux, this command will probably require root access (su or sudo); no matter what platform you are on you will need Python 2.x to run it.

After installing it, you can run it on the command line using:

python calcpkg.py [command] [filename]

Note that if you're on Linux and using 2.0 or higher (or the 2.0 snapshots from github), you should instead be using:
calcpkg [command] [filename]

The first command you run should run is "update"- this will create a local copy of the master.index file from ticalc.org that calcpkg knows how to use for searching and so on. Then you can run "calcpkg search" and "calcpkg install", which will list and download programs. For a full list of all possible options, run "calcpkg -h" (or possibly refer to the README).

Here is a rather old screenshot:

6
Computer Projects and Ideas / Python script to download all xkcds
« on: November 20, 2010, 05:21:03 pm »
Well, actually, this is a Python library for accessing xkcd.

It does contain five scripts- one of which does download all xkcds onto your computer. (I haven't actually downloaded all ~850 yet though). There are two others, for opening up random/last xkcds in your web browser, and two others for downloading the random/latest xkcd to your computer.

Plus, you can use the functions available in the library for doing other things.

You need Python 2.x (2.7 is the latest version) to install: you can get it here.

As of version 1.1, you no longer need the feedparser module. I've modified it to use xkcd's JSON interface, which is good for two reasons: the RSS feed sometimes has things in it that aren't comic) which break the old implemention, and secondly: it removes the only third-party dependency.

The download of xkcd.zip includes seven files (minus the readme, which has all this text):

-dowallxkcd.py: script to download all xkcds
-dowlastxkcd.py: script to download latest xkcd
-dowrandxkcd.py: script to download random xkcd
-lastxkcd.py: script to open a random xkcd in browser
-randxkcd.py: script to open the latest xkcd in browser
-xkcd.py: the library itself
-xkcd-1.0.zip: a zipped Python package - if you know how to install Python packages just install this

To install manually on Windows, you'd put xkcd.py in C:\Python27\lib\site-packages (wherever Python is installed, then \lib\site-packages). The scripts can go anywhere.

To install manually on Linux... it goes to the same lib/site-packages folder, but I'm not sure where this is- either /lib/python/ or /usr/lib/python, probably.

7
Other Calc-Related Projects and Ideas / X-Converter
« on: November 07, 2010, 06:47:39 pm »
This is the project that I alluded to here- a program to extract data from X-Link appvars into programs.

X-Link is potentially very useful in that it allows 83+/84+ calcs to receive data from all other TI calculators (the 85, 86, and 68ks- not Nspire though). But because the 89 Titanium has a very large archive memory, I would rather store TI-84+ programs on the Titanium and send them to an 84+ instead.

Rather than try to create an 89 version of X-Link, I decided to do something simpler. Make a computer program to package 8xp files as 89y custom variables (called "X-Packager"), and then make a z80 assembly program to unpack X-Link appvars and copy the contents into a program.

This would allow a TI-89 user to download TI-84+ games and share them with friends who have z80 calculators (the reason I wanted to do it).

I'd say it's about 50% complete. I've completed a Python program to make the 89y files (it uses ttbin2oth from the TI-68k Developer Utilities for the packaging, and a Python script I wrote to extract data). And I've written a z80 assembly program to extract data from an appvar and copy it to a program (I used Andree Chea's ZCopy as an example for this- it basically did what I wanted, but it copied a program into another program.

I still need an X-Link appvar containing a TI-89 variable, however, to take this any further, for the reasons outlined in the other topic.

8
ASM / Please help: post an X-Link appvar
« on: October 28, 2010, 08:38:03 pm »
So, I'm working on a calculator project that is designed to expand X-Link's functionality. I have made a computer program to package TI-8x programs in TI-89 variable format, and am making a z80 assembly program to convert the appvar produced by X-Link into a program..

But,here's the problem: I don't have the hardware currently to test this (broken link port, remember...). I talked to BrandonW on #ti about this already; he can't quite remember how X-Link saves data; he thinks it consists of the ;ink protocol packets (for sending back to the calc that sent it).

What would be very helpful, though, is an X-Linked appvar to test with. So, if anyone has the hardware, I would greatly appreciate it if you could:

1. Take a variable on a TI-89 (preferably a simple variable; like a number or string) and use X-Link to send it to a TI-83+/84.
2. Use your favourite linking software to send the X-Linked appvar on the 83+/84+ to a computer
3. Post the resulting file here

9
General Calculator Help / 83+ LCD locked up
« on: October 14, 2010, 04:00:13 pm »
So I currently am trying to fix someone's broken 83+ at school.

At first I thought it was bricked- pulling all 5 batteries didn't do anything; the LCD was frozen on the Y= screen with lots of error messages.

Then I discovered (once I hooked it up to a laptop) that I could communicate to it with TI Connect. But I can't fix the LCD...

Netham45 mentioned on IRC there was a fix for this, but I don't know where it is (neither did he). Any ideas?

10
Other Calculators / Solar89 SDK 0.3
« on: October 03, 2010, 04:11:32 am »
Solar89 SDK 0.3



http://www.omnimaga.org/index.php?action=downloads;sa=view;down=579

The Solar89 SDK is a suite of programs to allow TI-BASIC programs for z80 calculators to be written on 68k calculators. There are four programs included, Solar89, maketok, make8xp, and toolbr8x. Documentation on how to use them is included, as is a sample "Hello World" program in *.89t format that serves as a demo. 0.3 is a beta version without all 83+/84+ tokens supported, and without any token files for other z80 calculators.

11
General Calculator Help / Installing TiEmu on Linux
« on: September 30, 2010, 09:17:58 pm »
So, I've recently installed a Fedora 13 partition on my desktop (replacing an old XP partition). I've been installing various calculator-related stuff, but I'm having a little problem with TiEmu.

I ran ./configure after extracting the tar archive, and got the following error message:

Quote
configure: error:
in the prefix, you've chosen, are no KDE headers installed. This will fail.
So, check this please and use another prefix!

This is most likely because I don't have KDE installed on my system- Fedora (13, at least) comes with Gnome. What I'm not sure about is what package to install without installing KDE itself- is there something containing just the headers?

12
Calculator C / Variable length strings in structures?
« on: September 21, 2010, 06:03:53 pm »
So- here's a C language question that reflects my lack of understanding of C- is it possible to define a variable-length string (aka character array) in a structure? (Specifically, in the GNU C implementation used by TIGCC/GCC4TI).

That's the basic question- here's why I want to know:

I have this structure defined in Solar89 (Comments should describe what each item is for):

Code: [Select]
typedef struct
{
    size_t chars; // How many chars are in the string making up the token
    int twoByteToken; // Whether or not the token is two bytes (0 or 1)
    unsigned char hex[2]; // The two bytes making up the token, or only hex[0] if it's a one-byte token
    char name[14]; // The name of the token (never more than 14 chars!)
} tokenInfo;

The way Solar89 currently works is that it reads in a text file and creates an array of these structures. This allows an editable database to store tokens, but it means the initialization will be slow.

I decided I could make it faster by making a second program that does the same thing and writes that array directly to a file. In theory (and correct me if I'm wrong- if I am this entire question is irrelevant) I could read the tokens in much faster by just doing something this (with size being the length of the file, or something like that):

Code: [Select]
fread(tokens, size, sizeof(tokenInfo), file);
Well, I tested the "token file compiler". The token file outputted is about twice the size as the text file is- for a 5000 byte file, it's around 11000 bytes. Now, this might be worth it if it made the process much faster- I haven't tested that though.

I suspect I could get rid of some space if I could shrink down tokenInfo.name when the token name was only "A" or "1" or "prgm"... etc. But I don't know how to do that.

Is this clear? If not, please just go back to the first paragraph for the actual question and try to ignore the context.

13
TI 68K / renamr68k
« on: September 12, 2010, 06:09:13 pm »
In the process of making the latest version of Solar89, I got fed up with having to copy and paste *.89t and *.89p files and change their extensions to *.v2t and *.9xt. I wrote a Python script to do it for me called renamr68k.

What exactly am I talking about, you ask? (If you understood exactly what I just said, skip the next two paragraphs).

GCC4TI produces executable files for all three supported 68k calculators- the 92+, the 89, and the V200. However, if an assembly program needs external files, or is coupled with useful TI-BASIC programs (both of which are true for Solar89) and you only have one 68k calculator, you'll need to manually create duplicate versions for the other calculators. So if I need the text file "test.89t", I send it to my computer from my 89, make two copies, and change them to "test.9xt" and "test.v2t".

The same problem is true if you are making BASIC programs with your calculator and would like to support the other 68ks. Yes, in both cases a user could do it themselves, but they may not know that the file formats are identical on all three 68k calculators.

Hence, this Python (2.x) script. Credit to Kerm for coming up with the core of the name- renamr (which I expanded to renamr68k).

It has been submitted to Cemetech and ticalc.org... download here on Cemetech.

14
Other Calculators / Best TI-89 (Titanium) Shell?
« on: September 11, 2010, 07:43:40 pm »
By a shell, I mean program launcher, and not a kernel- and not this.

I was talking to qazz42 on #cemetech (helping him with his new TI-89 Titanium) and he asked what shell I liked the best. Now, I don't use one at present, but I am fed up with VAR-LINK, and I was wondering what people who have an 89 think is the best one?

I personally think Einstein is cool (sort of like DoorsCS for the 89) except it's in French.

PCTools is also cool, but it's a kernel program. And it's quite possibly the only kernel program I've wanted to run thus far- which is why I use KerNO and not PreOS.

So, I would prefer to use a nostub shell- but if there's nothing very good I'll use a kernel one...

Titanium compatibility is a plus too.  ;)

15
Calculator C / Issues with \0 character
« on: August 16, 2010, 01:03:11 pm »
This morning, I checked if Solar89 can properly handle two-byte tokens (by adding the Matrix tokens). Most of the time it works... but sometimes it doesn't, and I'm not sure how I can fix it.

Here's a situation that would cause a problem: trying to run a text file containing "[A]", or the matrix A token, through Solar89. Why? The hex code for this token is 5C00h.

The way Solar89 is programmed, each line of the text file is looked at individually, and then the hex code for the token is added to an unsigned character array (since unsigned char = 8 bits). So if the line contains the token ClrHome, the program will add the character E1h to the array, then add 3Fh to the array to finish it off. A two-byte token is handled by splitting the hex code into two characters and adding them both to the array. So for the token [C] (5C02h), the character 5Ch and then the character 02h.

The problem? For any token that has a byte of 00 (there aren't too many, but they include [A]), the \0 character is what will be added to that character array. And that seems to prevent me from adding anything else to the array. So if I'm trying to tokenize [A], no end-of-line character will be added, and anything after [A] on that line won't be added either.

But that's not the main problem. The main problem is that the code that saves the token array to a file does it by writing each individual character to the file, and it stops before it reaches \0. So even for a file only containing [A], I won't get 5Ch 00h 3Fh (3Fh being the hard return, the newline character), I'll just get 5Ch.

Fortunately, only a few tokens have a byte of 00h, and probably a lot of programs can be written without using them. But it would be nice to support them, but I'm not really sure how. Would I need to use something other than an unsigned character array? Or can I implement some workaround?

Pages: [1] 2